How Uber Actually Works (in 3 Minutes)
Skip the textbook fluff and dense whitepapers. Understand the 3-step visual journey, discover why naive databases crash under real scale, and test your system intuition with interactive micro-challenges.
๐บ๏ธ The 3-Step Visual Journey
What happens between you tapping your screen and the server doing its magic
Rider Request & The Hexagon Grid (H3)
You open the app, enter a destination, and tap "Request Uber".
Your phone sends latitude and longitude coordinates. Uber immediately snaps this location into an H3 Hexagonal Grid Cell (e.g. 882681a4b5fffff).
Instead of searching through 100,000 drivers across the city, Uber only scans the single hexagon you are inside plus its 6 immediate neighboring hexagons in 0.001ms.
DISCO โ The 30ms Matchmaker
The app shows "Finding your ride..." with a smooth animated circle.
Uberโs DISCO (Dispatch Controller) engine finds the 10 closest drivers in under 30 milliseconds. Active driver locations live in RAM (Ringpop consistent hash rings), never touching slow hard disks.
Memory lookups take nanoseconds. If Uber queried a disk database for 100,000 moving cars every few seconds, the entire backend would crash.
Live Car Motion at 60 FPS on Your Map
You watch the driverโs car icon turn corners in real time on your screen.
The driverโs phone transmits GPS every 4s. Instead of heavy JSON, it uses an 18-byte binary WebSocket packet streaming through Apache Kafka straight to your phone.
Custom binary protocol cuts data bandwidth by 95% and prevents your smartphone battery from burning up.
โ๏ธ The Big Architectural Difference
Why traditional simple databases crash, and how Uber solved it
The Naive Mistake (What beginners try)
Update driver latitude/longitude directly into a MySQL or PostgreSQL table row every 4 seconds.
Uberโs High-Scale Architecture
Keep active driver locations in In-Memory Ringpop Hash Rings & Redis Geospatial caches. Write to persistent databases ONLY when a trip completes!
Why doesnโt Uber store live driver coordinates in a relational database like PostgreSQL?
๐๏ธ Core Concept Flashcards
Tap any card to flip and reveal the plain-English explanation
H3 Hexagonal Grid
Uberโs open-source system that partitions the Earth into hierarchical hexagons so finding nearby cars is an instant O(1) memory lookup.
DISCO Dispatcher
Dispatch Controller engine that calculates supply, demand, road network ETA, and surge pricing multipliers in under 30ms.
18-Byte Binary WebSocket
Custom binary wire protocol replacing 400+ byte JSON payloads, saving 95% mobile battery and cellular data.
Ringpop Gossip Ring
Decentralized peer-to-peer hash ring that coordinates driver locations across hundreds of Go/Node servers with zero master single points of failure.
๐ Where to Go Next?
Now that you know the core story, choose how deep you want to explore