Mock Interviewer

Ask Coach

Ask Coach
Clarify requirements before you design — kept separate from your stage notes.

Tap a question to start, or type your own below.

Uber System Design

Visual Problem Diagram

Uber System Design architecture diagram

Scenario

It's Friday night downtown and 500 ride requests per second hit matching while drivers move every few seconds. A rider sees "3 min away" that jumps to 12 min because locations were stale, or two drivers accept the same trip because matching wasn't atomic. The interview is about geospatial queries, real-time location, and marketplace fairness under surge—not drawing a map pin on a whiteboard.

Design a ride-sharing platform like Uber that connects riders who need a trip with nearby drivers who can accept it in real time. In production this system lives or dies on three paths: a low-latency match when the rider taps "Request," a continuous location stream so ETAs stay believable on the map, and a server-owned ride state machine so neither side is guessing whether the trip is accepted, en route, or completed. Naive designs scan every driver in the city on each request or store locations only in a relational DB—both fail the moment Friday-night demand spikes.

You should support ride requests with pickup and dropoff, matching to nearby available drivers, live tracking during the trip, fare calculation (distance, time, and surge), payment settlement after completion, and two-sided ratings. Be ready to explain your geospatial index and how you query drivers within a radius in seconds, how you ingest 250K+ location updates per second without blocking matching, how you prevent double-assignment when two drivers tap Accept, and how surge multipliers are computed and applied. Matching latency, stale GPS handling, and what the rider sees when no drivers are nearby are all fair game—state your tradeoffs explicitly.

Constraints

Functional

Request ride (pickup/dropoff, optional ride type), match with nearby available drivers, real-time driver location on map, fare quote and final charge (base + distance + time + surge), ride lifecycle (requested → matched → in-progress → completed/cancelled), post-ride payment hook and rider–driver ratings

Non-functional

Match offer within **< 5 s** p95, **99.99%** uptime on request/match/track path, location freshness within **3–5 s** for ETA display, idempotent request and accept APIs, regional isolation for blast radius

Scale

100M registered users, 10M DAU; ~20M rides/day, peak ~500 ride requests/s; ~250K driver location updates/s at peak; match queries concentrated in urban cells with hot-spot skew

Stages ahead

1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs

Log in to start practicing

Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.