I just deployed my app for the first time with the following
internal_port = 8443
force_https = **true**
auto_stop_machines = **true**
auto_start_machines = **true**
min_machines_running = 1
processes = ["app"]
The app has deployed fine and my client connects fine. I have pretty much no traffic since my app is under development and I’m the only one using it. To my surprise, I see that after a few deployments tweaking my
toml file, I had 4 machines running. After a few minutes it came down to 2 and now, down to 1. The Fly.io dashboard UI still says 4 (even after refreshing the page), but the Machines list clearly shows 1 running (started), 3 destroyed and 3 stopped.
- why did fly.io bump the machine count to 4?
- I suppose I was being charged for a little while for these 4?
- is there a specific setting I should be setting to limit the number to instances to 1?
- anything else I should take into consideration?
There is a setting for high availability. I think at one point it was on by default, so two apps would spin in a region by default. I think maybe not it’s a --ha flag or something.
You pay for the time machines are running. So i doubt you will notice the cost. Since it says destroyed, maybe something you did when running commands spun up new instances and turned off old ones? I am not sure without understanding things like, are they all in the same region, same size, same process group?
It is a good idea to setup HA if you can, 2 in a region, and atleast one in another region. But scaling is determine by source of traffic, and setting rate/connection setup for concurrency.
Fly does not automatically scale, past the number of machines your provision.
So if you setup 1 machine in 3 regions, and they were at capacity, fly won’t add another. You have to pre-defined the pool of machines.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.