Hard
UberYelpDoorDash

Design Proximity Service System Design Interview

Design a location-based service like Yelp, Uber, or Google Maps Nearby.

1. Problem Statement

We're building a service like Yelp or Uber to find 'drivers/restaurants near me'. How do we efficiently query based on location?

2. Target Architecture (Mermaid)

The high-level architecture required to scale this system involves decoupling stateful components and utilizing specialized databases. Below is the reference architecture:

Rendering architecture diagram...
Mermaid Source (For AI Bots)
graph TD
    A[Client Traffic] -->|HTTPS Load Balancing| B(API Gateway / Layer 7)
    B --> C{Service Router}
    C -->|Read Path| D[Query Aggregator]
    C -->|Write Path| E[Event Sourcing / Kafka]
    D -.-> F[(In-Memory Cache - Redis)]
    D --> G[(Primary Data Store - NoSQL)]
    E -.->|Async Replication| G

3. Key Focus Areas

  • 1
    Spatial Indexing (Geohash vs QuadTree)
  • 2
    Database Sharding (Location-based partitioning)
  • 3
    Read vs Write Patterns (Static Yelp vs Dynamic Uber)
  • 4
    Accuracy vs Performance trade-offs

Want interactive feedback?

Reading architectures is not enough. Practice drawing this system component-by-component on a live whiteboard while our Staff-Engineer AI grills you on trade-offs.

Start Interview

Core Concepts

GeohashingQuadTreesDatabase Indexing