What is auto-scaling, and what metrics commonly trigger scaling decisions for a Node.js service running in the cloud?
Short answer
Auto-scaling automatically adjusts running instance count based on demand -- common triggers include CPU utilization, memory usage, request latency, and queue depth for background-job services, since a growing backlog signals worker capacity falling behind incoming volume.
Advertisement
AModel answer
Auto-scaling automatically adjusts running instance count based on demand -- common triggers include CPU utilization, memory usage, request latency, and queue depth for background-job services, since a growing backlog signals worker capacity falling behind incoming volume.
{
"TargetValue": 60.0,
"PredefinedMetricSpecification": { "PredefinedMetricType": "ECSServiceAverageCPUUtilization" },
"ScaleOutCooldown": 60,
"ScaleInCooldown": 300
}Real-world example
An e-commerce platform auto-scales when CPU exceeds 60% for two minutes, handling a traffic surge without manual intervention, then scales down overnight.
Likely follow-ups
- Why is scale-in cooldown typically set longer than scale-out cooldown?
- How does auto-scaling a stateless HTTP API differ from auto-scaling a background-job worker fleet?
Related topics