Skip to content

Uber / Lyft — Notes#

Functional#

  • Request ride, match driver, compute fare.
  • Live tracking, ETA.
  • Pay, rate, tip.
  • Surge pricing.
  • Driver onboarding, payouts.

Non-functional#

  • Dispatch decision < 5 s.
  • Driver location lag < 3 s.
  • 99.99% on hot path.

Capacity#

  • Millions of active drivers globally.
  • 10M+ rides/day.
  • Location ingests: millions/s peak.

Schema#

  • drivers(id, status, vehicle, ratings)
  • presence(driver_id, cell, lat, lng, ts) Redis Geo / KV
  • trips(id, rider_id, driver_id, pickup, drop, fare, status_history[])
  • payments(...)

Trade-offs#

  • Centralized matcher simpler but bottleneck → matcher sharded by city / region.
  • Eventual presence consistency is fine; double-assign protected by atomic update.
  • Surge balances supply/demand but unpopular; cap and explain.

Refs#

  • Uber Engineering blog (Schemaless, Ringpop, Cadence, M3, H3 hex grid).
  • Lyft engineering (Envoy origin) blog.
  • ByteByteGo "Design Uber", Alex Xu Vol 2.