Uber System Design
How Uber matches riders with nearby drivers in seconds: live location updates, geospatial indexing, a matching service, surge pricing and payments. Useful for system design interview preparation.
How it flows
- Rider App → API Gateway (Request ride)
- Driver App → API Gateway
- API Gateway → Load Balancer
- Load Balancer → Location Service
- Load Balancer → Trip Service
- Location Service → Geo Index (Index drivers)
- Location Service → Location Cache
- Geo Index → Matching Service
- Surge Pricing → Matching Service (Surge rate)
- Matching Service → Trip Service
- Trip Service → Surge Pricing
- Trip Service → Event Queue
- Event Queue → Trip Worker
- Trip Worker → Payment Service
- Trip Worker → Notification Service
- Trip Service → Trip DB
- Notification Service → Rider App
- Payment Service → User & Driver DB
- Trip DB → User & Driver DB
Components
Location Service · Geo Index · Matching Service · Trip Service · Surge Pricing · Event Queue · Trip Worker · Trip DB · Location Cache · User & Driver DB · Driver App · API Gateway · Load Balancer · Rider App · Payment Service · Notification Service