Hi folks,
I have a question around the lifecycle of deployments. I’ve only just started using Fly.io so apologies if I’ve missed something in the docs (and I couldn’t find anything after a quick search in the forums either).
I gathered that we can send a kill signal and set a timeout: App Configuration (fly.toml) · Fly Docs
My question is, how exactly does it work during a deployment? i.e. What happens to old and new instances when a kill signal is sent to an instance?
For my use case, I have some background processes that run locally on the instance, and due to the way they work, a Lambda / serverless worker is not a suitable option. So, ideally, I would like the lifecycle to be something along the lines of:
fly deploy
- After the successful build, new instances are spun up and added to the cluster and ready for inbound connections
- A kill signal is then sent to all old instances, whilst waiting for the kill to complete, the instances are immediately taken out of the cluster so no inbound connections are made to them
From reading the docs on deployment strategies (rolling, canary and immediate), I’m not sure if any of them would do it the way I described?
Any thoughts or suggestions?
Thanks!
Fred