EC2 Auto Scaling 组的实例刷新低于健康阈值

EC2 Auto Scaling Group's Instance refresh goes below Healthy threshold

我有一个具有 desired/min/max 个 1/1/5 实例的 ASG(我希望 ASG 仅用于滚动部署和区域故障转移)。当我使用 MinHealthyPercentage=100,InstanceWarmup=180 启动实例刷新时,进程从注销开始(实例几乎立即在我的 ALB 上进入耗尽模式,而不是等待 180 秒预热直到新实例健康)并且应用程序变为暂时不可用。 请注意,这不仅仅针对我的一个实例。如果我有两个实例,该过程也会从注销其中一个实例开始,这也不满足 100% MinHealthy 约束(尽管该应用程序将保持可用)! 是否有我应该调整的任何其他配置选项来创建滚动更新并首先预热新实例?

目前实例刷新总是在启动前终止,它使用 minHealthyPercent 来确定批次大小以及何时可以进入下一个批次。

It takes a set of instances out of service, terminates them, and launches a set of instances with the new desired configuration. Then, it waits until the instances pass your health checks and complete warmup before it moves on to replacing other instances.

...

Setting the minimum healthy percentage to 100 percent limits the rate of replacement to one instance at a time. In contrast, setting it to 0 percent causes all instances to be replaced at the same time.

https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html

这似乎不再是这样了。实例刷新现在创建一个新实例,并在健康检查成功后终止旧实例。 AWS Support 提到此行为自 2020 年以来没有改变。