How to avoid downtime but with only one continuously running machine on V2 ?


As I understand, with the V2, you need to run at least 2 machines to avoid downtime when redeploying, however if one can’t scale horizontally and need enough resources on 1 machine for a cpu heavy task for example (or whatever) he’d be running 2 big machines although one would suffice.

Are the new auto_start_machines and auto_stop_machines suited for that or does it just react to loads and won’t spawn a new machine when the first one is about to get stopped ? But even if it is the case one may not want to scale to zero which these options force on you.

Is the only way at the moment to write a custom script that starts a new machine with fly machines clone, then perform fly deploy then fly machines destroy one of the 2 machines once successfully done ?


bluegreen deployment for AppsV1 (nomad) does what you’re looking for, but AppsV2 (machines) doesn’t support it: docs. Outside of using 2 machines with rolling deploy strat, you’d have to write your own bluegreen, I am afraid.

you’d have to write your own bluegreen, I am afraid.

The API doesn’t seem to work, I used this guide Working with the Machines API · Fly Docs and successfully got the 404 not found but requests just hang out indefinitely