Skip to content

Case study: Uber (ride matching)

Design real-time ride matching: an in-memory H3 cell index for 250k location pings/s, atomic conditional claims so no driver is double-booked, and city-scoped failover.

35 min9 steps

By the end you can
  • Estimate location ping rate, in-memory supply index size and ride-matching request rate
  • Index moving drivers with H3 hexagonal cells in memory rather than a disk-backed relational database
  • Prevent double assignment under contention using atomic conditional updates and leases
  • Predict how the system behaves during a downtown surge, a ping storm or a dispatch database failover

Requirements

Request, assign, track trips

  • Nearby drivers; exactly one assignment; city outage isolation

Matching ~1s

  • GPS pings loss-tolerant; never two concurrent trips/driver

How do the consistency requirements of location pings and driver claims differ?

Answer this step to continue.