Uber — Mock Interview
HardA real-time ride-hailing marketplace: match riders to the nearest available driver over a constantly-changing geospatial index, without double-dispatch.
Interviewer
Uber — Mock Interview
You're designing Uber for a live system-design interview. Drivers stream their GPS location continuously; a rider requests a ride and expects the nearest available car within seconds; the system matches the two, tracks the trip live, and prices it. The defining challenge is a live geospatial index: millions of drivers each ping every few seconds, so the "who is where" index is rewritten constantly — yet riders query it for nearby cars and must be matched almost instantly, with no driver ever dispatched to two riders at once.
Scale assumptions:
- ~5M active drivers at peak, each pinging location every ~4s (>1M location writes/s).
- ~100M riders; ~10M rides/day; hundreds of thousands of nearby-car queries/s at peak.
- Targets: dispatch a match in < 5s, nearby query < 200 ms p99, location freshness within seconds, 99.99% marketplace availability.
I'll take you through requirements, estimation, architecture, a geo-index + matching deep dive, and trade-offs. Think out loud and state your assumptions.
Sign in to start the interview.
The interviewer grades each stage against a hidden rubric and asks a probing follow-up, mirroring a real system design round. Sessions are capped at 30 turns.