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
已提問 2 年前檢視次數 651 次
1 個回答
2
已接受的答案

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
已回答 2 年前
profile pictureAWS
專家
已審閱 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南