7
votes

What is the difference between AWS ASG cooldown period (which I can edit when I want to update my autoscaling group) and the warmup period in the scaling policy?

2

2 Answers

10
votes

cooldowns prevent runaway scaling events. If your system is running high on CPU and your auto scaling rule adds an instance, it is going to take 5 minutes or so before the instance is fully spun up and helping with the load. Without a cooldown, the rule would keep firing and might add 4 or 5 instances before the CPU metrics came down, resulting in wasteful over-provisioning. Or in the scale down case, overshoot and result in under-provisioning.

enter image description here

with a cooldown period in place, the Auto Scaling group launches an instance and then suspends scaling activities due to simple scaling policies or manual scaling until the specified time elapses. (The default is 300 seconds.) This gives newly launched instances time to start handling application traffic. After the cooldown period expires, any suspended scaling actions resume. If the CloudWatch alarm fires again, the Auto Scaling group launches another instance, and the cooldown period takes effect again. If, however, the additional instance was enough to bring the CPU utilization back down, then the group remains at its current size.

Cooldown

Instance Warmup

Warm-up value for Instances allows you to control the time until a newly launched instance can contribute to the CloudWatch metrics, so when warm-up time has expired, an instance is considered to be a part Auto Scaling group and will receive traffic.

With step scaling policies, you can specify the number of seconds that it takes for a newly launched instance to warm up. Until its specified warm-up time has expired, an instance is not counted toward the aggregated metrics of the Auto Scaling group. While scaling out, AWS also does not consider instances that are warming up as part of the current capacity of the group. Therefore, multiple alarm breaches that fall in the range of the same step adjustment result in a single scaling activity. This ensures that we don't add more instances than you need.

as-scaling-target-tracking

1
votes

I determined two key differences and one observation of warm-up:

  • warm-up applies only to scale out
  • cooldown applies to both scale in and scale out
  • warm-up applies to all scaling policies
  • cooldown applies only to simple scaling policies
  • warm-up of a step-scaling policy only inhibits scale out of the number of instances it follows on from
    • Scaling according to the first step, from 10->11 will trigger a warm up period
    • During this period metrics within the first range can be ignored entirely
    • A metric in a second step, say adding 3 instances, will only trigger adding 3-1 = 2 instances instead, whilst warm-up is in effect