A concert ends and demand in a few city blocks jumps 20x in minutes. Design the platform that keeps pricing, ETAs, and trip requests reliable through spikes like this.
Practice against the follow-up probes
- Where exactly does 20x-in-one-neighborhood stress a system that handles the whole city fine?
- What must stay strongly consistent during a surge, and what can be seconds stale?
- Thundering herd: every app in the venue refreshes at once. What absorbs it?
- How do you prevent duplicate trip creation when users rage-tap through timeouts?
- What load do you shed first, and how do users experience degradation?
Show answer guide
What the interviewer is probing
Hot-partition reasoning: geographic sharding concentrates a local spike onto a handful of shards/keys, so the answer is absorbing structures — caching with request coalescing, aggregation before fan-in, backpressure, and tiered shedding — plus consistency judgment (prices shown can be stale-bounded; the price committed to a trip must be exact) and idempotency under retry storms.
Strong answer outline
- Identify the hot spots: the venue's geo-cells become hot keys in every layer — location ingestion, demand aggregation, pricing reads, matching. City-scale capacity doesn't help; per-key throughput does.
- Ingestion/aggregation: driver/rider events flow through a partitioned log keyed by cell; pre-aggregate demand/supply counts at the edge of the pipeline (windowed counts, not raw events, cross the network); pricing recomputes per cell on a short cadence — by design a rate-limited consumer, immune to input spikes.
- Read path: surge multipliers and ETAs served from replicated caches with short TTLs and request coalescing (one recompute per cell per tick, thousands of readers share it); app refresh jitter and client-side backoff flatten the herd; static fallbacks (last-known multiplier with staleness cap) if the pricing service lags.
- Consistency split: displayed price/ETA — bounded staleness (seconds) is fine; committed trip price — locked at request time: the trip creation transaction snapshots the quote (signed/versioned), so a surge tick between tap and commit never surprises the rider or the ledger.
- Duplicate protection: trip creation is idempotent (client-generated request key, atomic check-and-create); rage-taps and retries collapse to one trip; offers to drivers similarly idempotent.
- Shedding order and UX: drop analytics/telemetry first, widen ETA refresh intervals, coarsen pricing granularity (cell → zone), queue match requests with honest wait messaging — never drop committed trips or corrupt pricing; capacity signals (queue depth, cache hit-rate, per-cell RPS) drive automation and dashboards.
The underlying concept
Geographic load is power-law bursty, and sharding by geography converts a citywide non-event into a per-key crisis — so spike architecture is about absorption: aggregate early (turn N events into one count), coalesce reads (turn N queries into one compute), backpressure producers, and shed along an explicit value ladder. The consistency principle is asymmetric like every marketplace's: advertisements may be stale within bounds, commitments must be exact and idempotent — and the commit point is where the system snapshots truth. Graceful degradation is designed, not discovered: decide in peacetime what fails first.
Source
Distilled Prep canon — curated from Uber's public work on surge infrastructure and real-time marketplace reliability.