scale postgres VM vs Horizontal scaling

No, these were reasonable things to wonder about.

(And this forum adheres to the “there are no dumb questions” standard, anyways.)

I don’t have Fly Postgres nodes myself anymore, but I may be able to help a little with the cost side…

The property of “never go down or less chances to go down” that you were inquiring about corresponds to High Availability—3 Postgres Machines, all in the same region. That works out as follows:

machine region cost
web app 1 sin 1 :large_blue_circle: + 5 :yellow_circle:
web app 2 sin 1 :large_blue_circle: + 5 :yellow_circle:
pg 1 sin 1 :large_blue_circle: + 1 :red_circle: +20 :yellow_circle:
pg 2 sin 1 :large_blue_circle: + 1 :red_circle: +20 :yellow_circle:
pg 3 sin 1 :large_blue_circle: + 1 :red_circle: +20 :yellow_circle:

The colored dots are like gaming chips, where you get a certain number for free when you walk in the door but have to pay for the remainder. (The resemblance of Fly’s billing system to an elaborate card game is not universally admired, but it works out strongly in your favor here.)

So, you get 3 :large_blue_circle:, 3 :red_circle:, and 30 :yellow_circle: completely for free (“free allowance”), but then have to pay for the remaining 2 :large_blue_circle: + 40 :yellow_circle:.

chip meaning free allowance cost for extras
:large_blue_circle: tiniest CPU+RAM config 3 $2
:red_circle: 1GB disk slice 3 $0.15
:yellow_circle: 1GB network traffic 30* $0.04*

*Assuming Asia/Pacific

(The figures in the second column are all per month, and the ones in the final column are per chip, as it were. You don’t necessarily have to buy in these exact discrete lumps, incidentally. That’s just an expository expedient.)

Almost all of the above is estimates, of course, and the network traffic in particular is just based on what people have reported in the past in the forum. As I understand it, there is a fair amount of chatter of PG nodes with themselves, even when there is no SQL activity from the web app, and it sounds like Fly.io has maybe stopped waiving the fees for that.

Thus, assuming that you can indeed get away with using such small CPU and RAM sizes (which would be atypical), the charge per month would be ~$5.


Clarification: “web app 1” and “web app 2” are the two Machines in your existing web app, and “pg 2” and “pg 3” are new Machines in your Postgres app.

2 Likes