← Uber Interview Insights

Uber·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

System design round at Uber for a software engineering role. The whole session was one big question about building a real-time driver heatmap, and it went deeper than I expected pretty fast.

Questions Asked (1)

Q1

Design a real-time driver heatmap for a ride-hailing platform. Partition the city into grid cells using something like geohash, ingest driver location pings, stream updates to clients over WebSockets, and compute the top-K hottest cells per region with low latency. Cover the data model, aggregation approach, update frequency, scalability, fault tolerance, and how clients subscribe and unsubscribe.

System DesignData ModelingTechnical Trade-offs
Author's notes

This one sprawled in every direction.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (latency, update frequency, scale, consistency) and then walk through the end-to-end pipeline: ingestion, aggregation, storage, and delivery. Focus on the trade-offs between accuracy and latency, and explain how you would partition and scale each component.

Pro tip: Emphasize that the heatmap is an approximation and that you would use a sliding window with incremental updates to balance freshness and cost. Also, mention that you would monitor and adapt the update frequency based on driver density and client demand.

1. Clarify Requirements and Constraints

Ask about expected scale (number of drivers, pings per second, city size), latency requirements (e.g., <1s), update frequency, and consistency needs. Also clarify client types (mobile, web) and subscription patterns.

2. Design Data Model and Partitioning

Choose a geospatial indexing scheme (e.g., geohash, S2, or H3) to partition the city into cells. Define the data model for driver locations and cell aggregates, considering time windows (e.g., sliding window of last N minutes).

3. Design Ingestion and Aggregation Pipeline

Outline how driver pings are ingested (e.g., via Kafka), processed in a stream processor (e.g., Flink, Spark Streaming) to update cell counts, and how top-K per region is computed. Discuss windowing, watermarks, and handling late data.

4. Design Storage and Delivery to Clients

Decide on a storage layer for aggregates (e.g., in-memory cache, Redis) and a pub/sub system (e.g., Kafka, Redis Pub/Sub) to push updates to WebSocket servers. Explain how clients subscribe to specific regions and receive updates.

5. Address Scalability and Fault Tolerance

Discuss horizontal scaling of ingestion, processing, and WebSocket servers. Explain how to handle failures (e.g., checkpointing, replication) and ensure exactly-once or at-least-once semantics. Mention monitoring and backpressure.

Key Points to Mention

  • Choice of geospatial indexing (geohash vs. S2 vs. H3) and its impact on cell size and query efficiency.
  • Stream processing framework (e.g., Flink) with event-time windowing and handling of out-of-order data.
  • Incremental aggregation and top-K computation using data structures like count-min sketch or heap for efficiency.
  • WebSocket connection management, including subscription/unsubscription and region-based filtering.
  • Scalability via partitioning (e.g., by geohash prefix) and load balancing across WebSocket servers.
  • Fault tolerance through replication, checkpointing, and idempotent updates.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.