Lesson 14 of 15
44. Design Ride-Hailing with Surge Pricing (Uber / Rapido)

Sources

3 min read+10 XP

Source notes

  • Geospatial cells, H3 and driver indexes: see Chapter 18 and its source notes (Uber's H3).
  • Atomic assignment and idempotent events: Chapters 17 and 24. Real-time connections: Chapter 21.
  • Driver counts, ride volumes, update intervals, speeds, fare constants and surge formula are interview assumptions agreed in Step 1, not any company's real pricing. Arithmetic computed 2026-10-08.
  • Driver index with stale expiry, ETA vs straight-line ranking, atomic dispatch, smoothed and capped surge, idempotent trip states and fares: tested 2026-10-08 (code/ch44_ride_hailing.py, all checks pass).