How does ECS Service Auto Scaling work to handle varying application load?
Short 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…
Advertisement
AModel 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.
Example
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.
Likely 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?
Related topics