Question
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.
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.