Design Ride Pricing
HardSystem design · Marketplace · Uber
Design the pricing service for a ride-hailing marketplace. It produces upfront fare estimates from route distance and time, applies a dynamic surge multiplier per small geographic cell driven by supply and demand, issues quotes that are honoured for a window, and records why each price was what it was. Focus on surge as a control loop (smoothing, caps), quote lifecycle, rule changes and experiments. Out of scope: the matching and dispatch system (see the ride-hailing problem).
Requirements
- Compose fares from base rates, route distance and time, and a per-cell multiplier
- Compute surge from demand-supply imbalance in small cells with smoothing, hysteresis and caps
- Issue quotes that are idempotent to consume and clear about what the quote fixes
- Support versioned rule changes, geo/time-based experiments (not rider-level), audit of every price, and fail-static serving