System design interview questionHardProximity / Trie

Design a Ride-Sharing Service like Uber or Lyft

Design Uber/Lyft-style ride sharing: riders request trips, drivers are matched nearby, locations update in near real time.

Interview scope

Client → Gateway/LB → App; Cache for hot location/availability; DB for trips/users; Realtime Gateway for live updates; Message Queue for dispatch/notifications. No Client → DB.

Functional requirements

  • Rider requests a ride with pickup/dropoff.
  • System matches an available nearby driver.
  • Track trip status; stream location updates while on trip.

Scale and quality goals

  • Matching and location updates need low latency.
  • Location writes are very frequent — cache/geo index friendly storage.
  • Use async where helpful (notifications, receipts) without blocking match.

Capacity assumption

Design for this scale

Assume ~1M daily rides city-wide; during peak ~100 rides/s start, plus heavy location pings from active trips.

Practice more than a diagram

Place components on the Froquiz canvas, connect the data flow, and see which decisions the scenario-specific review finds missing. The full exercise and review unlock with Premium.

Explore Premium