1
votes

I have an ASG with desired/min/max of 1/1/5 instances (I want ASG just for rolling deploys and zone failover). When I start the Instance refresh with MinHealthyPercentage=100,InstanceWarmup=180, the process starts by deregistration (the instance goes to draining mode almost immediately on my ALB, instead waiting the 180 Warmup seconds until the new instance is healthy) and the application becomes unavailable for a while. Note that this is not specific just to my case with one instance. If I had two instances, the process also starts by deregistering one of the instances and that does not fulfill the 100% MinHealthy constraint either (the app will stay available, though)! Is there any other configuration option I should tune to get the rolling update create and warm up the new instance first?

2

2 Answers

3
votes

Currently instance refresh always terminates before launching, and it uses the minHealthyPercent to determine batch size and when it can move on to the next back.

"During an instance refresh, Amazon EC2 Auto Scaling takes a set of instances out of service, terminates them, and then launches a set of instances" - https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html

-1
votes

This does not seem to be the case anymore. An instance refresh creates now a fresh instance and terminates the old one after health checks are successful. AWS Support mentioned this behavior was not changed since 2020.