System design interview questionHard

Design Proximity Service

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

1. Problem Statement

We're building a nearby-search service for restaurants and other local businesses. If time permits, we can extend it to moving drivers. How do we efficiently query by location?

2. Architecture Discussion Map

Use this as one discussion aid, not a single correct answer. Your design should follow from the requirements, scale, and trade-offs you establish.

Rendering architecture diagram...
Mermaid Source (For AI Bots)
graph LR
    A["Design Proximity Service"]
    A --> F1["Spatial Indexing Geohash vs QuadTree"]
    A --> F2["Replication vs Geographic Sharding"]
    A --> F3["Read vs Write Patterns Read-Heavy Static Places"]
    A --> F4["Accuracy vs Performance trade-offs"]

3. Key Focus Areas

  • 1
    Spatial Indexing (Geohash vs QuadTree)
  • 2
    Replication vs Geographic Sharding
  • 3
    Read vs Write Patterns (Read-Heavy Static Places)
  • 4
    Accuracy vs Performance trade-offs

4. What the Interviewer Looks For

The interviewer probes these areas, and the report grades the interview against them.

  • Requirements and capacity
  • Spatial indexing strategy
  • Serving architecture and hot regions
  • Freshness, updates, and filtering
  • Moving-driver extension (assess only if reached)

Want interactive feedback?

Practice drawing this system component-by-component on a live whiteboard while the interviewer probes at your target level.

Continue to Dashboard

Core Concepts

GeohashingQuadTreesDatabase Indexing

Continue preparing

Build a complete software engineer mock interview plan

Related System Design

Design a Cross-Product Tagging System

Design a shared tagging service that lets users apply tags to entities across multiple Atlassian products, with consistent search and deduplication.

Related System Design

Design a Distributed File System

Design a GFS- or HDFS-style file system that stores petabytes of large files across thousands of servers in one data center for batch processing.

Related System Design

Design a Distributed Message Queue

Design a high-throughput distributed message queue similar to Apache Kafka, with durable replay from stored offsets.