HLDArena
HLD-214·Search & Indexing
Medium · 1,000 pts

Nearby Restaurant & Local Business Geo-Search

Design a geospatial point-of-interest search backend serving nearby open restaurants, ratings, and live kitchen wait times during Friday dinner rushes.

Max p99
≤ 45 ms
Availability
≥ 99.5%
Budget
≤ $5,000

Functional Requirements

  • FR-1GET /places/search?cell={geohash} — Returns ranked open venues within caller radius.
  • FR-2PUT /places/{place_id} — Updates live wait-time, open/closed hours, or review rating aggregate.
  • FR-3PATCH & DELETE /places/search/{geohash} — Updates, revokes, or deletes geohash entries with bounded TTL or explicit cache/index invalidation.
  • FR-4Must sustain sub-45ms search p99 when underlying search/storage nodes suffer a 6x latency brownout.

Workload Profile

Baseline Searches36,000 Read RPS / 2,500 Merchant Write RPS
Friday Dinner Peak109,000 Read RPS / 7,000 Write RPS
Active Working Set24 GB metro spatial index & venue cards
Traffic DistributionDense hotspot skew on downtown metro geohash cells

Consistency Model

Eventual index propagation (< 10s) acceptable for venue wait times; merchant edits persisted durably.

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