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
asked 9 months ago854 views
1 Answer
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
EXPERT
answered 9 months ago
profile picture
EXPERT
reviewed 9 months ago
  • 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.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions