Design a Proximity Search Service (Yelp / Google Maps)
Find nearby places: QuadTrees in memory, Geohashes in Redis, Google S2 geometry, spatial sharding, and business review caching.
01.1. Functional & Non-Functional Requirements
A Proximity Search Service (Yelp, Google Maps, TripAdvisor) enables users to discover nearby points of interest (restaurants, gas stations, hotels) within a specified distance or map viewport.
Functional Requirements
- Nearby Place Discovery: Find businesses within radius
R(e.g.2 km) of coordinates(lat, lng). - Category & Attribute Filtering: Filter results by category (e.g., "Italian Pizza"), price tier (
-
$), open status ("Open Now"), and average rating (ge 4.5$ stars).
3. Business Profile & Reviews: View place details, photos, business hours, and customer reviews.
4. Business Ingestion: Allow business owners to register, update details, and add photos.
Non-Functional Requirements
- Sub-15ms Query Latency: Return nearby search results in
< 15 ms(p99) to support fluid map pan and zoom. - High Read-to-Write Ratio:
1000:1read-heavy workload (100M searches/dayvs10k business updates/day). - Boundary Edge-Case Accuracy: Never miss businesses located physically close to the user but across a geospatial grid border.
Proximity Search Architecture with In-Memory QuadTree Indexing 🗺️
Proximity Search Architecture with In-Memory QuadTree Indexing 🗺️
Dynamic QuadTree spatial decomposition in RAM for sub-millisecond radius search, multi-get Redis metadata hydration, and 8-neighbor boundary scans.
Unlock Topic #251: Design a Proximity Search Service (Yelp / Google Maps)
You are viewing a preview. The full in-depth engineering deep dive, interactive simulators, architecture flowcharts, and self-assessment quizzes for this topic are available with Pro or Lifetime Access.
Failure modes, high-throughput bottlenecks, and real FAANG implementation decisions.
Interactive system topology diagrams, live parameter simulators, and downloadable SVG charts.
Staff-level multiple-choice quiz questions with instant feedback and answer explanations.
Firebase Google authentication automatically syncs your completed topics and quiz scores.
How clear and staff-actionable was this system breakdown?