Code RoomNearby search
MediumPrep Room Coding #3262

Nearby search

System designML systemsMid–Senior~40 min

Design the 'restaurants near me' backend for a local-discovery app with 50M points of interest worldwide and 100M searches/day. A search takes a location + radius + optional filters (cuisine, open-now, rating) and returns ranked results in under 200ms. POIs are mostly static but ratings/hours change. Cover the spatial index, filtering, and ranking.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify4:30 left
Estimate4:30 planned
Design13:30 planned
Deep dive10:30 planned
Failure7:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.