Uber Architecture
Real-time matching of riders and drivers across the globe.
On the roadmap:Software Architect · step 5: Learn from the giants
Overview
Uber's platform handles geo-spatial dispatch, pricing and payments in real time. It evolved from a monolith into thousands of microservices, with custom datastores built on MySQL.
Architecture highlights
- Geo-sharded dispatch for low-latency matching
- Schemaless: append-only datastore on sharded MySQL
- Kafka as the backbone for event streaming
- Domain-oriented microservice architecture
Architecture diagram
Key components
Dispatch service
Matches riders with nearby drivers
Location pipeline
Ingests driver GPS pings continuously
Schemaless / Docstore
Sharded durable storage
Kafka
Event bus for trips, payments and analytics
Pricing service
Computes surge from supply and demand
Challenges and trade-offs
Geo-spatial indexing
Finding nearby drivers requires efficient spatial indexes such as H3.
Write-heavy location stream
Millions of location updates per second need partitioned ingestion.
Consistency of trips
A trip must never be matched twice; state transitions need strict ordering.
Study: Uber
Learn how Uber is built from the people who explain it. Watch first for the picture, then read for the detail.
16 minBasic System Design for Uber or Lyft | System Design Interview Prep
Interview Pen · 899K views
Then
1 h 3 minDesign Uber w/ a Ex-Meta Staff Engineer: System Design Interview breakdownHello Interview · 589K views
46 minSystem Design: Uber Lyft ride sharing services - Interview questionSuccess in Tech · 215K views
30 minUber System Design | Ola System Design | System Design Interview Question - Grab, LyftcodeKarle · 158K views
19 minUber System Design | Websockets and Event Driven ArchitectureByteMonk · 54K views