Skip to content
$ lynuxpro
← All system designs

MID · 13 MIN · DEVOPS · PLATFORM

CI/CD platform for 500 microservices

Shared pipelines, autoscaling runners, caching, security scans, an artifact registry and GitOps deploys across environments.

Peak load
~60 concurrent jobs
Availability target
99.9%
RTO: back up within
1 hour
RPO: data you can lose
15 min

← Swipe sideways to see the whole diagram →

ClientServiceInfrastructureData storeSecurityasync / background

The question

"Design a CI/CD system for 300 engineers and 500 microservices. Builds should be fast, safe and the same for every team."

Requirements

  • Every merge request: build, test, scan; every merge to main: deploy to dev, then staging, then prod with approval.
  • Pipelines finish in under 10 minutes for most services.
  • One standard pipeline, so security and compliance are built in.
  • Cost under control: no idle build machines at night.

Quick numbers

ItemAssumptionResult
Pipelines300 engineers × 10 pushes a day~3,000 pipelines a day, peaks ~10 per minute
Jobs per pipeline~6~60 concurrent jobs at peak
Runner size2 vCPU, 4 GB per job~120 vCPU at peak, near 0 at night

How it works

  1. A push or merge request triggers a webhook to the CI orchestrator (GitLab CI or GitHub Actions).
  2. Jobs run on autoscaling runners: Kubernetes pods or spot VMs that appear when jobs queue and disappear after.
  3. Each service includes a shared, versioned pipeline template (GitLab CI components or reusable workflows): build, unit test, SAST, dependency scan, image build, image scan.
  4. Builds use a remote cache (dependency cache, Docker layer cache, build tool cache) so most builds don't start from zero.
  5. The image is pushed to the artifact registry, tagged with the commit SHA and signed.
  6. The pipeline updates the image tag in a GitOps repo; Argo CD syncs dev automatically, then staging, then prod after approval and checks.

Key decisions

DecisionChoiceWhy
Standard pipelineversioned templates teams includeone place to improve speed and security
Runnersephemeral, autoscaledclean every time, no cost when idle
Speedcaches + only test what changedmost pipelines under 10 minutes
DeployGitOps (pull) instead of CI pushing to clustersclusters don't trust CI with admin keys; Git is the audit log
SecretsOIDC from CI to cloud, no long-lived keysnothing to leak

What breaks and how it heals

  • Queue piles up: autoscaler limits and alerts on queue time; priority for main-branch and hotfix pipelines.
  • Flaky tests: track flaky tests automatically and quarantine them, so people stop re-running pipelines.
  • Bad template change: release templates with versions and roll out to a few teams first.

High availability and disaster recovery

TargetNumberHow it is met
Availability99.9% during work hours (internal tool)stateless orchestrator replicas, autoscaled runners, HA database
Runner node diesjob retriedephemeral runners; jobs are idempotent and retried once automatically
Git server failsRTO 1 hour, RPO 15 minutesa replica in a second region (for example GitLab Geo) plus hourly database backups
CI fully down during an incidenthotfix still possiblea documented, audited break-glass deploy path
Pipeline queue timeunder 2 minutes at the 95th percentileautoscaler adds runners when jobs wait; alerts if queue time grows

What interviewers listen for

  • Standardization through templates, with escape hatches.
  • Concrete speed tactics (caching, parallel jobs, change detection).
  • Supply-chain security: scans, signing, OIDC, and promotion between environments.