Auto Scaling Warmup Period and Health Check Grace Period

0

Can the Warmup Period and the Health Check Grace Period work together in Auto Scaling Group or can I configure a time for both periods? How would they work together? And what would happen if I also add a Lifecycle Hook?

HHEECC
已提问 9 个月前901 查看次数
1 回答
1

To best answer your question, I'd suggest you to go through this AWS Documentation, specially Scaling performance considerations section in this doc.

Yes, you can configure both periods and if you don't set a default instance warmup, the instance refresh feature uses the health check grace period as the default warm-up time. Most applications will benefit from having one default instance warm-up time that applies to all features rather than different warm-up times for different features. For example, if you don't set a default instance warmup, the instance refresh feature uses the health check grace period as the default warm-up time. If you have any target tracking and step scaling policies, they use the value set for the default cooldown as the default warm-up time. If you have any predictive scaling policies, they have no default warm-up time.

And for cool down, lets assume: Health Check Grace Period = 200 and Default Cooldown = 100:

Let's say I've launched instance and CPU utilization goes above 50%(defined threshold), instance will wait 200 seconds to become healthy. If CPU utilization comes under 50% and it becomes healthy after 200 seconds, it will continue to run, otherwise it will be terminated. If the CPU utilization is above 50% at 100th second, the auto scaling group will start a new instance. Which means that, with this configuration, new instance would be launched at 100th second by ASG if CPU utilization was above 50% at 100th second.

Lifecycle hook is a mechanism for custom solution that are aware of events in the Auto Scaling instance lifecycle, and then perform a custom action on instances when the corresponding lifecycle event occurs. It comes in to the play at the time of scale in and scale out but it is scoped for performing custom actions at the time of instance launching and instance terminating. Lifecycle hook won't have influence on Scaling Warmup Period and Health Check Grace Period. Instead will start performing those custom actions when scale in/scale out will be happening.

Additional Reference:

Hope you find this information helpful.

Comment here if you have additional questions, happy to help.

Abhishek

profile pictureAWS
专家
已回答 9 个月前
profile picture
专家
已审核 9 个月前
  • Sorry, I missed to cover lifecycle hooks part in my answer, just added that in the answer, please check and comment here if you have additional questions.

  • Adding a bit of clarification on the Hook part: The instance will move to InService once the launching lifecycle hook finishes. Cooldown/warmup/grace period all start once the instance moves to InService

  • Thank you Shahad_C for adding to it. @HHEECC, do you have additional questions.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则