HLD-240·Geo & Telemetry
Medium · 1,000 ptsSpatial Supply-Demand Window & Dynamic Surge Pricing
Design Uber / Lyft’s dynamic surge-multiplier engine aggregating rider quote requests vs. idle drivers per H3 hex cell over 60-second sliding windows.
Max p99
≤ 42 ms
Availability
≥ 99.5%
Budget
≤ $5,550
Functional Requirements
- FR-1POST /surge/signals — Ingests rider quote opens and driver idle beacons keyed by h3_cell.
- FR-2GET /surge/{h3_cell} — Serves authoritative current surge multiplier to fare-quote services.
- FR-3PATCH & DELETE /surge/signals/{h3_cell} — Updates, revokes, or deletes h3_cell entries with bounded TTL or explicit cache/index invalidation.
- FR-4Must handle rainstorm / concert-exit H3 hotspots and survive primary state node crashes.
Workload Profile
Normal City Traffic32,000 Quote Read RPS / 9,500 Signal Write RPS
Rainstorm & Venue Exit90,000 Read RPS / 26,000 Write RPS
Active Working Set16 GB H3 cell sliding-window counters & multipliers
Traffic DistributionExtreme hotspot on airport & stadium h3_cell hexagons
Consistency Model
Bounded eventual multiplier recomputation (every 3–5s per H3 cell); quote locks multiplier via token.
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