Design a Real-Time Hexagon Demand Heatmap for Drivers

Last updated: November 29, 2026

Quick Overview

Design the system that shows drivers a live map of where ride demand is high relative to supply, aggregated into hexagonal cells and refreshed every few seconds across every city Uber operates in.

Uber
System Design
Software Engineer
Uber
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the system that shows drivers a live map of where ride demand is high relative to supply, aggregated into hexagonal cells and refreshed every few seconds across every city Uber operates in.

Uber built H3 partly to aggregate marketplace signals into hexagons, and the driver heat map is a visible consumer of that work. Interviewers check streaming aggregation with windows, handling late data, and serving a city-sized snapshot to many drivers cheaply.

What the Interviewer Expects
  • Aggregate requests and open drivers into hex cells with sliding or tumbling windows
  • Compute a smoothed demand to supply signal with neighbor smoothing
  • Publish per-city snapshots rather than per-driver queries
  • Handle late and duplicate events
  • Avoid oscillation where every driver chases the same hex
Key Topics to Cover
Stream processing
Windowed aggregation
H3 hexagons
Snapshot serving
Feedback loops
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • Why hexagons instead of square grid cells?
  • How would you avoid sending 1,000 drivers to the same hot hex?
  • What window length would you choose, and what is the trade-off?
  • How do you backfill when the stream processor was down for 5 minutes?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Inputs: rider app opens and ride requests (demand), online idle drivers (supply), all with location and time. Output: per cell an intensity level for the driver map, refreshed every 5 to 10 s. Hundred...

High-Level Design
  • Events from the request service and location stream go to Kafka, partitioned by city.
  • Stream processor (Flink): maps each event to an H3 cell at a resolution around 8, aggregates counts pe...

Submit Your Answer
Markdown supported