Cost-Optimized CI Runner Fleet

Designing CI runner fleets with spot/preemptible instances, warm pools, and cross-region spot arbitrage to minimize cost while handling burst.

Overview

Overview

CI runner cost is dominated by idle capacity during off-hours and cold-start latency during burst. The solution is a hybrid reserved/spot fleet with a warm pool and spot interruption handling.

Two cost drivers

  • Idle capacity — Off-hours — Scale to zero overnight
  • Cold-start latency — Burst during business hours — Warm pool of pre-booted runners

Fleet building blocks

  • Reserved or on-demand baseline — Capacity that spot interruptions cannot take away
  • Spot instances — Cheap burst capacity
  • Warm pool — Absorbs burst jobs without cold-start lag
  • Interruption handling — Drains and re-queues work before a spot instance is reclaimed

> [!WARNING] Never run the fleet 100% on spot: a spot interruption during a build wastes the entire job.

Interview questions

  • How do you design a cost-optimized CI runner fleet that scales to burst capacity during business hours but minimizes cost overnight?
  • What strategies prevent CI flakiness from blocking trunk in a trunk-based development model?

Sign up free to read the full topic

More DevOps topics

Start free on Cariara · Coding problems · System design studio