Free sample lesson · System Design Uber

The Uber Problem

How do you connect millions of riders with nearby drivers — in under a minute, across an entire city?

Lesson 1 of the Wondering course System Design Uber

The Challenge

You open the app, see cars moving around a map, tap a button, and a driver arrives in minutes.

Behind that simplicity: millions of GPS updates per second, a matching engine that finds the best driver in milliseconds, and a state machine that coordinates the entire ride from request to payment.

What Makes It Hard

Three things make ride-hailing uniquely difficult:

Real-time location — Every driver broadcasts GPS coordinates every few seconds. That's millions of writes per second, and every one needs to be queryable instantly.

Fast matching — When a rider requests, the system must find nearby available drivers, pick the best one, and get acceptance — all within seconds.

Consistency under concurrency — Two riders near the same driver can't both be matched to them. The system must prevent double-assignment at massive scale.

The Plan

We'll build this system layer by layer. Foundation first, then deep dives into location tracking, dispatch, and reliability — each solving a specific problem.

Each technology we introduce has a dedicated deep-dive course. Here, we focus on _why_ each piece exists and _how_ it fits together.

Check yourself

In a real-time ride-hailing system, processing stale location data leads to _____.

  • incorrect behavior
  • reduced data storage costs

Answer: incorrect behavior

Real-time systems require processing data within strict time constraints because stale data results in incorrect system behavior, such as dispatching drivers to outdated rider locations.

In ride-hailing architecture, handling real-time driver updates requires handling millions of _____ per second, while matching algorithms require fast spatial _____ across nearby coordinates.

Answer: In ride-hailing architecture, handling real-time driver updates requires handling millions of writes per second, while matching algorithms require fast spatial queries across nearby coordinates.

Driver updates generate a high volume of concurrent write operations to store continuous GPS positions, whereas matching engines run spatial queries across these positions to locate available drivers.

Why is concurrency control critical when matching drivers to riders in a high-scale ride-hailing engine?

  • It prevents two simultaneous ride requests from assigning the same driver.
  • It reduces the frequency of driver GPS location updates sent to the server.
  • It converts geographic positions into linear distance calculations automatically.
  • It guarantees that payment processing happens before driver matching begins.

Answer: It prevents two simultaneous ride requests from assigning the same driver.

Concurrency control guarantees consistency across simultaneous transactions, ensuring that two riders querying the same area at the exact same moment cannot be matched to the same driver.

Keep going

This is lesson 1 of 15 in System Design Uber. Next up:

  1. Requirements & Core Entities
  2. API Design
  3. High-Level Architecture
  4. Tracking Driver Locations
  5. Geohashing Under the Hood

Start this course free

Wondering turns any topic into short lessons you can read, watch, or listen to, with practice questions and an AI tutor.