🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
đŸ’ŧ Servicesâ„šī¸ Aboutâœ‰ī¸ ContactView Pricing Plansfrom $10

Design Uber

System Design ProblemsReal-Time SystemsđŸŸĸ Free Lesson

Advertisement

System Design Problems

Design Uber

Uber serves 100M+ monthly active users across 70+ countries with real-time ride matching, location tracking, and dynamic pricing. This design covers geospatial indexing, dispatch systems, and ETA estimation.

  • Scale — 100M+ MAU, 19M trips/day, 5M+ drivers
  • Latency — Driver matching < 5 seconds
  • Real-time — Location updates every 4 seconds

Uber's core challenge is solving the real-time matching problem at global scale with sub-second latency.

Requirements Clarification

Functional Requirements

  1. Request a ride and get matched with a driver
  2. Real-time driver location tracking
  3. ETA calculation for pickup and dropoff
  4. Dynamic pricing (surge pricing)
  5. Trip management (start, end, payment)
  6. Driver availability management
  7. Rating system for riders and drivers

Non-Functional Requirements

  1. Availability: 99.99% uptime
  2. Latency: Match driver < 5 seconds
  3. Consistency: Strong for location, eventual for payments
  4. Scale: 5M concurrent drivers, 100K ride requests/minute

Back-of-the-Envelope Estimation

High-Level Architecture

Rider/DriverAPI Gateway / Load BalancerTrip SvcMatching SvcLocation SvcPricing SvcRoute SvcPayment SvcEvent Bus (Kafka)Redis (Location)S2 GeometryPostgreSQLHBase (Trips)Kafka (Events)

Geospatial Indexing: S2 Geometry

Matching Algorithm

Rider RequestFind Nearby DriversRank by ScoreDispatch Offer

Surge Pricing

Trip State Machine

REQUESTEDMATCHEDARRIVINGIN_PROGRESSCOMPLETEDCANCELLED

Data Model

Practice Exercises

  1. Geospatial: Design a system to find all drivers within 5km of a rider. What data structure would you use?
  2. Matching: How would you handle the case where a driver rejects a ride offer? Design the retry logic.
  3. Surge: Design a surge pricing algorithm that doesn't frustrate riders but balances supply/demand.
  4. Scale: How would you handle 10x traffic during New Year's Eve?

What to Learn Next

-> Design Airbnb Marketplace and booking systems.

-> Design Amazon E-commerce at scale.

-> Design WhatsApp Real-time messaging systems.

-> Design Leaderboard Sorted sets and ranking.

-> Saga Pattern Distributed transactions.

-> Idempotency Handling duplicate requests safely.

Need Expert System Design Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement