Code Room
System designHardsd-g397
Subject Surge pricingLevel Senior–Staff~50 minCommon in Distributed systems · Algorithms & data structures interviewsIndustries Technology

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.

What a strong answer looks like

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.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.