Slow down ASG target tracking scale out

0

From what I can tell, ASG with target tracking does not define a cooldown period. As a result, if instances are slow to initialize, the ASG could scale out again, before the new instances join the work. Is there a way to make it wait longer before scaling out again?

Shahar
asked 2 years ago638 views
1 Answer
2
Accepted Answer

Cooldown is used by Simple Scaling and 100% blocks additional simple scaling policies from triggering until the cooldown expires.

Target tracking (and step scaling) use warmup instead. During the warmup (either set at the group level, or on the specific scaling policy), a given instance isn't counted towards the groups actual capacity yet, which prevents excessive scale outs. Here's an example, assume each top level bullet is 1 minute apart and there's a 5 minute warmup set

  • Group is stable with desired capacity of 4 and 4 instances
  • High usage alarm triggers target tracking
    • target tracking calculates a +1 change
    • 4 + 1 = 5; new desired is set to 5 and 1 instance is launched
  • High alarm is still going off, and metric value is roughly the same
    • target tracking again calculates a +1 change
    • 1 instance is still in warmup and isn't counted towards the groups capacity yet, so the calculation is still:
    • 4 + 1 = 5; new desired should be 5 so no instances are launched
  • High alarm is still going off, but metric value went up
    • target tracking calculates a +2 change
    • 1 instance is still in warmup and isn't counted towards the groups capacity yet, so the calculation is:
    • 4 + 2 = 6; new desired is set to 6, so 1 instance is launched

This way the ASG can still dynamically react to increasing metric values, but it shouldn't over scale while the instance is still warming up. Note that warmup starts AFTER lifecycle hooks are done (if you're using launching lifecycle hooks)

AWS
answered 2 years ago
profile pictureAWS
EXPERT
reviewed 2 years ago

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