HLDArena
HLD-228·Geo & Telemetry
Medium · 1,000 pts

Live "Nearby Friends" Geohash Proximity Radar

Design Snap Map / Find My Friends live proximity sharing where mobile clients stream periodic GPS pings and query friends currently within a 5-mile geohash radius.

Max p99
≤ 52 ms
Availability
≥ 99.5%
Budget
≤ $6,550

Functional Requirements

  • FR-1POST /location/ping — Updates ephemeral user coordinates in geohash_cell cache and history store.
  • FR-2GET /location/nearby/{user_id} — Returns opted-in friends currently inside adjacent geohash cells.
  • FR-3DELETE /location/ping/{geohash_cell} — Supports tenant retention TTL expiry, rule updates, or stream cleanup while keeping recent rollup caches fresh.
  • FR-4Must handle stadium/festival geohash hotspots and survive storage node crashes.

Workload Profile

Baseline Pings24,000 Radar Read RPS / 12,000 GPS Write RPS
Festival Crowd Surge68,000 Read RPS / 28,000 GPS Write RPS
Active Working Set18 GB ephemeral live coordinates
Traffic DistributionDense spatial hotspot on downtown/venue geohash_cell keys

Consistency Model

Bounded eventual location freshness (< 5s GPS ping lag) acceptable for proximity radar.

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
400 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