Back to results for “Monitoring (CloudWatch)”
AWS › Amazon ECS (Elastic Container Service)

How does ECS Service Auto Scaling work to handle varying application load?

Advanced

Answer

ECS Service Auto Scaling integrates with Application Auto Scaling to automatically adjust the number of running tasks in a service based on metrics such as average CPU utilization or the number of requests per target, so during high traffic periods more tasks are launched automatically, and during quiet periods the count scales back down to save cost.
aws application-autoscaling register-scalable-target --service-namespace ecs --resource-id service/my-cluster/my-service --scalable-dimension ecs:service:DesiredCount --min-capacity 2 --max-capacity 10
Real-world example A media streaming application configures ECS Service Auto Scaling to add more tasks automatically whenever average CPU usage exceeds seventy percent, ensuring smooth playback for users even during unexpected traffic surges.

Common follow-ups: What metrics can trigger ECS Service Auto Scaling besides CPU utilization?;How quickly does ECS Service Auto Scaling respond to a traffic spike?