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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인