0

I was reading through this AWS DOC https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html around Application Auto Scaling Step policies as target auto scaling policies won't work for my use case.

Something that's not clear to me is whether if I define a Step that adds 1 capacity to, say, number of tasks of an ECS Service, that tracks an alarm threshold X (measured in percentage) and, even after the scale out action the X percentage keeps relatively still, if that will continue increasing the number of tasks (after the cooldown period).

Eg.:

T0

  • number of tasks = 10
  • metric X = 60%
  • with a step scaling policy that scales-out when X >= 70%

T1

  • metric X goes up to 80%
  • scale out action is triggered

T2

  • number of tasks is now 11
  • the new task reduces the burden and metric X is reduced to 75%

then here comes the question; will that step scale policy trigger another scale out (given that the metric X is still > 70%)?

thiagoh
  • 7,098
  • 8
  • 51
  • 77

1 Answers1

1

Yes, every minute that a cloudwatch alarm stays in alarm state it will trigger the AutoScaling action. So as long as the alarm triggers the policy after the cooldown ends, it would scale again (remembering that the cooldown doesn't start until the first scaling action /finishes/).

You can also define multiple steps, and if a larger one is triggered while the first is still in progress, the difference will happen to allow another scale out. For example:

T0 step policy triggers +1

T1 (1 minute later while the +1 is in progress): step policy is triggered at the +3 step. 2 more tasks would be added now.

As a side note, why doesn't target tracking work for you, what metric are you using? You can define a custom metric specification if creating the policy outside the CLI to use non-predefined metrics

Shahad
  • 771
  • 4
  • 6