Skip to content
Latchkey

Autoscaling Policy - CI/CD Glossary Definition

An autoscaling policy is the rule set that decides when to add or remove runners based on a signal such as queue depth, CPU utilization, or a custom metric. It defines scale-up and scale-down thresholds, cooldown periods, and minimum and maximum instance counts.

Queue-depth scaling

For CI runner fleets, the most useful signal is the number of queued (pending) jobs. A policy might add one runner per N queued jobs and scale down after a runner sits idle for a cooldown window. Scaling on CPU alone is a poor proxy because a runner waiting for a job is idle even when work is queued.

Avoiding thrash

Cooldown periods and hysteresis (different up and down thresholds) prevent rapid add/remove cycles, which waste boot time and money. Setting a minimum of zero enables scale-to-zero during quiet hours.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →