Skip to content

Guides

How to scale self-hosted runners

Self-hosted runners either queue at peak or sit idle and expensive.

7 min read

Self-hosted runners either queue at peak or sit idle and expensive.

Why it happens

Scaling policy has to react faster than developers notice, and scale down without killing running jobs.

How to fix it

  1. Scale on queue depth, not on CPU utilization
  2. Keep a warm pool sized to your median concurrency
  3. Drain rather than terminate, so in-flight jobs finish
  4. Cap maximum capacity so a runaway workflow cannot exhaust your quota

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.