ExitAmazon ECS: service auto scaling1 / 9
Explanation

Choose a signal that responds to task capacity

How ECS service scaling policies translate workload demand into task capacity within deployment, cooldown, and capacity constraints. · advanced

Service Auto Scaling uses Application Auto Scaling to change an ECS service's desired task count. ECS publishes service-average CPU and memory usage to CloudWatch. A suitable utilization metric changes when demand changes at fixed capacity; at fixed demand, doubling tasks should halve the metric. Choose the resource that depletes first, not simply whichever metric is easiest to obtain.

An efficient CPU-bound server can scale horizontally using CPU-based scaling: adding replicas, or doubling instance size, halves average CPU utilization relative to capacity at constant demand. An efficient memory-bound server exhausts memory before CPU at maximum concurrency, which need not be its maximum throughput. For asynchronous SQS workers, a custom backlog-per-task metric can drive service scaling.

Target tracking changes task count to maintain a metric target. Step scaling applies adjustments that vary with the size of a CloudWatch alarm breach. Scheduled scaling changes task capacity according to date and time. These express different instructions: maintain a measured level, respond to breach size, or act at a specified time.

Scaling approachInputCapacity instruction
Target trackingMetric and targetMaintain target value
Step scalingAlarm breach sizeApply matching adjustment
Scheduled scalingDate and timeChange task capacity