Design a CI/CD Pipeline System

Problem

Design GitLab's core domain: a CI/CD pipeline system that runs jobs on commits across many projects.

Requirements

Functional:

  • Define pipelines (stages, jobs, dependencies) as config
  • Schedule jobs on a pool of runners
  • Stream logs; report status back to the MR
  • Cache artifacts between stages

Non-functional:

  • Millions of jobs/day, many self-hosted runners
  • Fair scheduling and isolation
  • Reliable, resumable

Discussion points

  1. Job DAG modeling and scheduling
  2. Runner pool, autoscaling, and isolation
  3. Artifact/cache storage
  4. Log streaming and status reporting
  5. Retries, timeouts, and fairness
added …
LeaderboardSalaryAccount