HLDArena
HLD-303·Geo & Telemetry
Hard · 1,500 pts

Real-Time Ride-Hail Driver Location & Dispatch

Design a high-write geospatial telemetry and nearby-driver discovery backend ingesting continuous 4-second GPS pings from active vehicles while matching riders during surge events.

Max p99
≤ 75 ms
Availability
≥ 99.5%
Budget
≤ $5,800

Functional Requirements

  • FR-1PUT /drivers/{driver_id}/location — Ingests live lat/lng telemetry ping and updates spatial cell index.
  • FR-2GET /riders/nearby?cell={geohash} — Returns closest available drivers within search radius.
  • FR-3DELETE /drivers/{driver_id}/location — Supports tenant retention TTL expiry, rule updates, or stream cleanup while keeping recent rollup caches fresh.
  • FR-4Must degrade cleanly without cascading queue pileups during a 7x downstream storage latency brownout.

Workload Profile

Baseline Commute30,000 Nearby Read RPS / 20,000 GPS Write RPS
Rainstorm Surge75,000 Read RPS / 52,000 GPS Write RPS
Active Working Set18 GB live spatial index cells
Hotspot ProfileDense airport & stadium geohash cell contention

Consistency Model

Eventual spatial freshness (< 3s GPS lag) acceptable for proximity search; trip dispatch state must remain durable.

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