arnold icon indicating copy to clipboard operation
arnold copied to clipboard

Scale down pods on the previous stack after switching

Open sampaccoud opened this issue 5 years ago • 3 comments

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe. After a blue/green deployment, keeping the previous stack for a few days is important in case we need to quickly rollback the code. However, on projects that are scaled up with many replica pods, keeping a stack with all its pods mobilizes a lot of resources for nothing.

Describe the solution you'd like

  • [ ] Automatically scale down a stack after switching it to previous e.g all pods set to x1 replica
  • [ ] Automatically scale up the previous stack before initiating a rollback ie all pods set to the number of replica specified in their intial specification.

sampaccoud avatar Jan 21 '20 13:01 sampaccoud

jmaupetit avatar Jan 21 '20 14:01 jmaupetit

good idea

madmatah avatar Jan 22 '20 09:01 madmatah

To go a bit further in our brainstorming:

  • the next stack should also be deployed with a limited number of pods and only scaled up just before switching,
  • when scaling down the previous stack, we should not scale down celery workers because they still have tasks to handle after switching (can take up to a few hours to finish them so maybe we should also find a way to forbid deleting the previous stack before its workers have finished handling their tasks...)

sampaccoud avatar Jan 22 '20 15:01 sampaccoud