Uber's system design
☰
Uber is a live map of every driver plus a matchmaker: phones stream their position in, a dispatch system picks the best car for a batch of riders, and every trip is a state machine that must never be half-changed.
+ The whole system in one paragraph− Hide
Uber is a loop between phones and servers. Every online driver's phone streams its GPS position into an index that files drivers by map cell. When you request a ride, Uber reads only the cells near you, ranks those drivers by drive time and offers the trip to the best one. Then it pushes every change to both phones.
In this lesson
4 chapters · ~7 min · a quick check in eachEverything is on this page — just scroll down ↓
The whole system
What it must do — and how well
Uber in one picture
Requests go in through the API gateway; updates come back to phones through the push platform. The marketplace picks your driver. One database holds each live trip, another keeps history.
All the time, every online driver's app sends its GPS position through the API gateway into the location index — every four seconds, per Uber in 2015.
Request a ride, second by second
The one request everyone makes, in time order. The server pushes what changed instead of the apps asking — that's why your map moves without a refresh.
9 steps. Follow the flow one step at a time — what happens first, and what comes next.
Curious? Go deeper+ 2 optional
How a push finds your phone (RAMEN)
Uber keeps one open connection to every app and pushes changes down it, numbered, so nothing is lost if you reconnect. That's why your map moves by itself.
ⓘ Details & sources− Hide details
It carries offers, pickup and arrival times, route lines and nearby cars. Dec 2020: 1.5M+ open connections, 250,000+ messages a second, 99.99% server-side reliability.[8]
8 steps. Follow the flow one step at a time — what happens first, and what comes next.
A trip's life, as Uber's API reports it
Every trip is a state machine: one state at a time, moving only along the arrows, so rider, driver and servers can change it at once without leaving it half-changed.
5 steps. Follow the flow one step at a time — what happens first, and what comes next.
Uber carries 40M+ trips a day. Roughly how many trips is that per second?
Pick one — or just keep scrolling, it's not graded.
Keep going — it's free
Create your free account to unlock the rest of Uber's system design, keep your progress and pick up right where you left off.
- 2Matching & pricing
- 3Maps & ETAs
- 4Failures & growth
Ask anything about this system, or share how you'd design it.
Log in to join the conversation