HLDArena
HLD-233·Caching & Consistency
Medium · 1,000 pts

Smart Airport & Stadium Garage Spot Reservation Service

Design a multi-garage smart parking availability and pre-booking backend ingesting gate-loop sensor events and serving live lot occupancy.

Max p99
≤ 52 ms
Availability
≥ 99.5%
Budget
≤ $5,200

Functional Requirements

  • FR-1GET /garages/{garage_id}/availability — Returns real-time open stalls by level and EV/accessible type.
  • FR-2POST /garages/{garage_id}/bookings — Reserves a parking pass and updates live stall counters.
  • FR-3DELETE /garages/{garage_id}/availability — Supports tenant retention TTL expiry, rule updates, or stream cleanup while keeping recent rollup caches fresh.
  • FR-4Must maintain read-after-write booking visibility and survive primary DB failover.

Workload Profile

Steady Commuter Load22,000 Read RPS / 3,500 Sensor & Booking RPS
Game-Day Stadium Arrival64,000 Read RPS / 11,000 Write RPS
Active Working Set14 GB live garage floor & reservation state
Traffic DistributionHeavy hotspot on event-day stadium/airport garage_id

Consistency Model

Read-after-write consistency on reserved passes and gate entry QR checks.

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
350 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 104 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology