← All Problems
HardLocation-Based45-55 min

Design a Ride-Sharing Service

Design an Uber/Lyft-like ride-sharing platform with real-time matching, location tracking, and dynamic pricing.

UberLyftGoogleAmazon

Functional Requirements

  • Riders request rides with pickup/dropoff locations
  • Match riders with nearby available drivers
  • Real-time location tracking for both parties
  • ETA calculation and route optimization
  • Dynamic pricing (surge) based on supply/demand
  • Payment processing after trip completion
  • Rating system for riders and drivers

Steps (0/6)

Step 1: Requirements & Scale

Clarify: 10M rides/day, 5M drivers, 50M riders. Real-time matching < 10s. Location updates every 3-5 seconds from active drivers.

Key Points

  • 10M rides/day = ~115 rides/sec
  • Location updates: 1M active drivers × every 4s = 250K updates/sec
  • Need geospatial indexing for nearby driver queries
  • Sub-10s matching time requirement
1 / 6