Hey,
I’ve already read other posts regarding this topic, but I want to double check:
My app is poorly built, but the client isn’t paying for a refactor.
This is a temporary machine for a single event (few hours), and I need to ensure only one machine is running (they didn’t pay for load balancing), otherwise the whole system does not work as expected (internal state, and other poorly built logic).
If I have to change a secret or do vertical scaling, I want the single server to shut down, and restart with the required changes (I guess restart for secret, and kill old machine + new machine for vertical scaling).
Here is my config:
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = false
auto_start_machines = false
min_machines_running = 0
processes = ['app']
[[vm]]
# When vertical scaling is needed
# memory = '32gb'
# cpu_kind = 'performance'
# cpus = 16
size = "shared-cpu-2x"
memory = "512mb"
Is the config correct?
From what I read, I need to always use --ha=false
to ensure that a single machine is used.
In the case of:
- a new secret:
fly secrets set MY_SECRET='new value'
- How to prevent the rolling update? Afaik this will have 2 machines running during the update.
- scaling vertically: change the
fly.toml
, then runfly deploy --ha=false
- Will this kill the old machine before doing the update? Will I have 2 machines running like a rolling update?
Last time I had to do this kind of updates, it was a mess. Especially the beefy machine was always restarting (I guess I had auto_start_machines
to true?).
Thanks for the help