Guides
How to use spot instances for CI runners
On-demand instances are expensive for workloads that are inherently retryable.
5 min read
On-demand instances are expensive for workloads that are inherently retryable.
Why it happens
CI is a good spot workload, but an interrupted job loses all its progress unless the pipeline is designed for it.
How to fix it
- Use spot for short jobs with good caching, on-demand for long release builds
- Diversify across instance types so one capacity shortage does not drain the pool
- Handle the interruption notice by draining rather than dying mid-job
- Keep a small on-demand pool for jobs that must not be interrupted
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.
Related
How to reduce GitHub Actions costsThe CI bill grows faster than the team and nobody is sure why.How to measure CI cost per pull requestYou know the monthly total but not what a single pull request costs.How to attribute CI cost to teamsCI spend is one line on the invoice and no team feels responsible for it.How to set a CI minutes budgetSpend is discovered at the end of the month rather than controlled during it.