ECS auto scale-in doesn't work event though I got CloudWatch scale-in Alarm

0

Environment

  • ECS & Fargate
  • Scaling policy Enter image description here

And I got scale-in alarm like: Enter image description here

But, ECS doesn't scale-in since 18:43 Enter image description here

Enter image description here

I don't use scale-in protection option.

Please let me find the reason if you experienced similar problems.

1 réponse
1
Réponse acceptée

Hello,

In general, AutoScaling might choose not to scale-in when an alarm goes off for quite a few reasons (already at the min, suspended processes, in progress activities, etc). And Target Tracking specifically has multiple additional layers of checks built in (ex, if there's multiple target tracking policies, they all need to want to scale-in at the same time). This is all done to prevent excessive oscillation and maintain high availability in the environment.

There was a recent Application AutoScaling feature launched to help add additional transparency to these not-scaling decisions. From the AWS CLI, can you run the below command (filling in your specific info where needed) and let me know if it has information to shed light on the delayed scaling?

aws application-autoscaling describe-scaling-activities \
    --include-not-scaled-activities \
    --service-namespace ecs \
    --scalable-dimension ecs:service:DesiredCount \
    --resource-id service/default/web-app

If you see an error in the CLI stating that --include-not-scaled-activities isn't a valid flag, you'll need to update the CLI (since this is a relatively recent feature). Alternatively, you could use CloudShell in the AWS Console which should have the latest CLI build

AWS
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions