HLDArena
HLD-301·Transactions & Locking
Hard · 1,500 pts

Flash-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).

Design Write-up
0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
2,000 rps
Write RPS
250 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 320 ms
• Availability: ≥ 99.3%
Valid end-to-end Client → Compute → Storage topology