I’ve got a rails application running with an app and job group. I’ve got the job group scaled to 5 machines. Most of the time I want all the servers to be off in the jobs group. I’m treating them as a pool and will start machines as need.
I first thought that I could scale the group down but that will destroy the machines in the group. Which means that I would have to recreate them when I want to run a job - and destroy them when jobs are done. I wanted to leave them in a off state (as not to run up billing I’ve got a very bursty workload that drops to 0 most of the time)
Right now I’m thinking of adding a step to the deployment that shuts them all off after a deployment, but I think I would like it better if I could update them but leave them in their existing state (off or on).
Is anyone else doing something similar? What strategies have you employed?
I noticed this on an internal app as well, and I have a working draft of a solution that would skip stopped machines during a deploy. However, a machine may also be stopped because it’s crashing or misconfigured which a user may be trying to fix with a deploy, so I’m considering setting the default to only skip stopped machines when autostart / autostop are configured on a service. Would this work for your case- are your stopped machines configured to use autostart / autostop, or are you starting them on-demand using the API/CLI?