HLD-301·Transactions & Locking
Hard · 1,500 ptsFlash-Sale Concert Ticket Checkout
Design a high-contention seat reservation and checkout backend for stadium concert drops. Thousands of buyers compete simultaneously for the exact same event inventory.
Max p99
≤ 160 ms
Availability
≥ 99.3%
Budget
≤ $4,500
Functional Requirements
- FR-1GET /events/{event_id}/seats — Fetches live available seat inventory.
- FR-2POST /events/{event_id}/reserve — Atomically reserves a specific seat_id for 5 minutes; must NEVER double-book or oversell.
- FR-3DELETE /events/{event_id}/reservations/{seat_id} — Releases canceled or expired 5-minute holds atomically back into available seat inventory.
- FR-4Zero committed reservations may be lost if a primary storage node crashes mid-sale.
Workload Profile
Baseline Browse25,000 Read RPS / 2,500 Write RPS
T=0 Drop Surge45,000 Read RPS / 28,000 Concurrent Reserve RPS
Active Working Set12 GB active event & seat state
Contention ProfileExtreme write hotspot on single popular event_id
Consistency Model
Strict linearizable / serializable seat allocation (RPO = 0, zero overselling, zero stale availability reads during booking).
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