CI/CD cost reduction
How a redesigned CI/CD runner platform reduced infrastructure cost by 96%.
A production CI/CD environment was costing approximately €1,080 per month. I redesigned how runner capacity was provisioned and introduced AWS Spot Instances safely, reducing monthly infrastructure cost to approximately €43.
- Before
- ≈€1,080
- Per month, before
- After
- ≈€43
- Per month, after
- Reduction
- 96%
- Infrastructure cost reduction
- Annualized saving
- ≈€12,440
- Annualized saving
Client context
A European technology company operating a high-volume GitLab CI/CD environment on AWS.
The challenge
The runner fleet was provisioned statically, sized for peak load and left running through the quiet hours in between. General-purpose instances handled every job type - unit tests, integration tests and deploys alike - because splitting the fleet by workload had never been worth the engineering time on its own. The team needed cost brought down without slowing pipelines down or introducing the kind of flaky failures that erode trust in CI fast.
Baseline
- Approximately €1,080 per month in runner infrastructure cost
- Statically-provisioned, always-on EC2 runners sized for peak demand
- A single general-purpose instance type used across all job types
Decomposing the cost
Runner spend split cleanly into a few components once measured separately rather than as one line item:
- Always-on capacity running through nights and weekends with no jobs to serve
- Idle capacity within business hours, sized for peak rather than average demand
- Instance selection - one general-purpose type used regardless of what a job actually needed
- The gap between peak and average pipeline concurrency
- Which jobs were genuinely interruptible and retryable, and which were not
The solution
The fix wasn't a single setting - it was matching how capacity gets bought to how work actually arrives, and being deliberate about which jobs could safely tolerate cheaper, interruptible capacity and which couldn't.
- Runner capacity now follows the pipeline demand curve instead of running flat around the clock
- Workloads were split by risk, not just by job type - only work that can safely retry moved to lower-cost capacity
- The new setup is version-controlled and reviewed the same as application code, not a one-off change someone has to remember
Runner architecture, before and after
Before: one pool, sized for peak, running whether or not there's work. After: capacity matched to demand, with reliability-critical work kept separate from cost optimization.
Reliability controls
Cost reduction that breaks pipelines isn't a result - it's a different problem. Reliability was designed in from the start, not added after the savings were already in place:
- Anything with a side effect that isn't safely re-runnable never touches lower-cost capacity, regardless of what it would have saved
- The fleet is resilient to losing any single source of capacity, not tuned to whichever option happens to be cheapest today
- The change was proven against the existing fleet on a subset of pipelines before it touched everything
Results
- Monthly infrastructure cost: approximately €1,080 → approximately €43
- 96% reduction in monthly CI/CD infrastructure cost
- Approximately €1,037 in monthly savings, approximately €12,440 annualized
What made the result possible
Spot pricing alone doesn't explain a 96% reduction - a statically provisioned fleet running on Spot instead of On-Demand would have saved perhaps a third of the bill, not the majority of it. The larger saving came from matching the purchasing model to the actual demand curve: capacity that scales to zero when nothing is building, sized to average load rather than peak, with Spot applied only where workload characteristics made it safe.
Lessons
- Matching capacity to demand was the bigger lever - cheaper purchasing options alone rarely explain a result this size.
- Which jobs qualify for lower-cost capacity is a property of the job, not a setting you apply uniformly across the platform.
Next step
Is CI/CD infrastructure consuming more than it should?
CloudSphere can establish a cost and performance baseline, identify the changes with the highest impact, and implement an agreed runner and pipeline architecture.
Discuss a CI/CD optimization project
Related: CI/CD Pipeline Optimization · GitLab Runner Optimization · AWS Cost Optimization