Surge pricing engine

DesignHard50 minUber and DoorDash style

Your task

Design a surge-pricing engine for a ride-hailing platform operating in 200 cities. The system must compute a per-zone price multiplier every 30 seconds from the live ratio of open ride requests to available drivers, where zones are geohash cells. Peak load is ~500k active riders and ~150k active drivers globally, with sharp demand spikes around events. Multipliers must be stable enough that a rider's quoted price doesn't flip wildly between two refreshes, and must never charge above a quoted price already shown. Discuss zone granularity, the aggregation pipeline, smoothing, and how you guarantee the rider sees a consistent price.

It covers

  • Geohash
  • Demand supply
  • Real time aggregation