hi, am a bit confused looking at the docs. Fly.io docs say this
Billing is based on the resources provisioned for your apps, pro-rated for the time they are provisioned.
-Fly App Pricing · Fly Docs
But on another page, it sounds like billing is only based on time that machines are running.
Fly Machines are fast to start and stop, and you don’t pay for their CPU and RAM when they’re in the
-Automatically Stop and Start Machines · Fly Docs
These seem to be conflicting statements, unless I’m just misunderstanding the meaning of resources being provisioned.
I assumed this to mean the machine you provision takes up space on the server regardless of the state it’s in, so you’re always paying for the space your volume(s) take up. Whereas you’re paying for storage, CPU and memory usage for running machines.
I’m assuming it’s like that too. Hoping someone from Fly.io can chime in here with some details and clear things up
Technically, a stopped machine has no provisioned cpu or memory.
This has two implications:
- you aren’t billed for the cpu and memory while the machine is stopped since there is no provisioned cpu and memory
- it’s possible for your machine to be unable to start since the Host server may not have available resources to provision for your machine (this is more likely to happen for large machines that use 64 or 128gb of memory)
In regards to storage, technically storage is provisioned for your docker image and you indeed pay for that but as far as I’m aware fly are not currently billing for it.
ah makes sense. i’m assuming the solution to #2 is to just have a 2nd machine in the same region? and if somehow both machines in that region are unable to start because of their hosts lacking resources, then it goes to the next closest region with a machine?
Yep, that’s pretty much it.
If you’re deploying a production app then you could just create 10s of machines spread across lots of hosts. They are in a stopped state most of the time and only spin up when the autoscaling is needed.
The only catch is that you could get hit with a large bill if you have prolonged high load on your app (e.g. Your small web service gets super popular overnight and stays that way) but you could argue that it’s a good problem to have.
Sounds like a good way to do it, thanks! Think I’ll probably start by just adding a machine or two in many regions before I start adding 10s of machines in each region though
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.