HLD-218·Messaging & Queues
Medium · 1,000 ptsCI/CD Pipeline Queue & Ephemeral Runner Dispatcher
Design a CI build scheduling and worker lease service matching queued workflow steps to autoscaled Linux/macOS runner pools with instant build cancellation.
Max p99
≤ 65 ms
Availability
≥ 99.5%
Budget
≤ $5,000
Functional Requirements
- FR-1POST /pipelines/{repo_id}/runs — Enqueues commit workflow steps or cancels superseded runs.
- FR-2GET /pipelines/{repo_id}/runs — Polls live step status for developer PR checks and runner heartbeats.
- FR-3DELETE /pipelines/{repo_id}/runs — Releases canceled or expired leases/holds atomically and immediately refreshes cached availability.
- FR-4Canceled superseded runs must immediately stop dispatching (read-after-write) and survive primary DB crash.
Workload Profile
Baseline Commits22,000 Read RPS / 8,500 Queue Write RPS
Release Freeze Rush62,000 Read RPS / 26,000 Write RPS
Active Working Set16 GB queued workflow DAGs & runner leases
Traffic DistributionSkewed commit storms on large monorepo repo_id queues
Consistency Model
Read-after-write consistency required for pipeline state/cancellation transitions; zero lost commit runs.
Solutions Locked
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Loading solutions...
Submission History (0)Select to replay
No submissions yet
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Design Write-up
0 boxes · 0 edges
0 words