Update machine without killing the old one

I have a use case where I want the previous version of a service to remain running for ~24 hours after deploying the new version of a service. The service doesn’t accept requests, so I’m not concerned about routing requests or anything. There will be jobs running on the machine that I want to have time to finish.

Is there an easy way to do this with fly, or will I need to manually deploy/destroy as needed? Thanks!

afaik, building out your own deploy mechanism with flyctl m run / flyctl m update is the best bet in this case. Your older machines can fail health-checks which should prevent fly-proxy from routing live traffic to those.

There will be jobs running on the machine that I want to have time to finish.

There’s a kill_timeout parameter in fly.toml, but I don’t think you can set it as high as 24h. If allowed, unsure how such high timeouts behave when doing rolling / immediate deploys via flyctl.

Another way is to have two fly prod apps (A, B) and DNS switch between the two as newer versions are alternatively deployed to A or B.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.