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
≤ $8,250

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

Relevant practice for

Click an item in Inventory above, or press B to add a component, double-click to name, C to connect.

Design Write-up

Write under ### Architecture for Diagram to take that up directly

Compulsory section · if not written yet, Diagram reads from the start of your write-up.
Architecture: required·FRs mentioned: 0/4·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