← Uber Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

Uber system design round for a software engineering role, full session on designing a ride-sharing backend at scale. The interview went deep on location ingestion, geospatial matching, and consistency guarantees. Felt like a lot of ground to cover in one sitting.

Questions Asked (8)

Q1

Design the core backend of a ride-sharing platform: handle real-time driver location updates at scale, match riders to nearby drivers, and keep the system available under failures.

System DesignTechnical Trade-offs
Author's notes

This is the main prompt and it's massive.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (e.g., number of drivers, update frequency, latency SLAs), then sketch a high-level architecture with separate services for location ingestion, matching, and state management. Dive into the critical components: a scalable geospatial index for driver locations, a real-time matching algorithm, and fault-tolerance strategies like replication and graceful degradation.

Pro tip: Emphasize trade-offs: for example, using a quadtree vs. geohash for spatial indexing, or consistent hashing vs. sharding for partitioning driver data. Show that you can balance latency, consistency, and cost.

1. Clarify Requirements and Scale

Ask questions to understand the expected number of drivers, riders, location update frequency, acceptable latency for matching, and availability targets. This sets the stage for design decisions.

2. High-Level Architecture

Outline the main components: a location ingestion service (e.g., via WebSocket or HTTP), a geospatial index (e.g., Redis with geohashes or a custom in-memory grid), a matching service, and a persistent store for driver/rider data. Mention load balancers and API gateways.

3. Real-Time Location Updates

Explain how to handle high-throughput location updates: use a distributed message queue (e.g., Kafka) to buffer updates, process them with stream processors (e.g., Flink) to update the geospatial index, and ensure low-latency writes.

4. Matching Algorithm and Geospatial Indexing

Describe how to efficiently find nearby drivers: use a geospatial index like geohash or quadtree, partition by region, and implement a matching algorithm that considers distance, driver availability, and traffic. Discuss trade-offs between accuracy and speed.

5. Availability and Fault Tolerance

Detail strategies to keep the system available: replicate the geospatial index across nodes, use leader election for coordination, implement circuit breakers and fallbacks (e.g., degrade to approximate matching), and ensure data consistency with eventual consistency models.

Key Points to Mention

  • Geospatial indexing techniques (geohash, quadtree, S2 geometry) and their trade-offs in terms of precision, memory, and query performance.
  • Partitioning and sharding strategies for driver location data to scale horizontally, such as consistent hashing or geographic sharding.
  • Real-time data pipeline: using Kafka for ingestion and stream processing (e.g., Flink, Spark Streaming) to update indexes and trigger matching.
  • Matching algorithm considerations: proximity, driver rating, ETA, and handling of edge cases like no available drivers.
  • Fault tolerance: replication of state, graceful degradation (e.g., fallback to less accurate matching), and monitoring/alerting.
  • Consistency vs. availability trade-offs: using eventual consistency for location data and strong consistency for critical operations like ride assignment.

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

Q2

How would you ingest roughly one million driver location pings per second and keep the freshest position available for matching with low staleness?

System DesignTechnical Trade-offs
Author's notes

I knew to reach for a partitioned message bus here and said so pretty quickly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: 1M pings/sec, low staleness (e.g., <1s), and matching needs. Then propose a scalable ingestion pipeline (e.g., Kafka) feeding a low-latency store (e.g., Redis) with geo-indexing, and discuss trade-offs between consistency, availability, and cost.

Pro tip: Emphasize that the freshest position is a 'last-write-wins' problem per driver, so you can use per-driver partitioning and in-memory stores to avoid cross-node coordination. Also mention that staleness can be bounded by time-to-live (TTL) and that you might drop older pings if newer ones arrive.

1. Clarify Requirements and Constraints

Ask about acceptable staleness (e.g., 1 second), ping size, geographic distribution, and matching query patterns (e.g., nearest driver). Confirm if exactly-once or at-least-once processing is needed.

2. Design Ingestion Pipeline

Use a distributed message queue like Kafka with partitioning by driver ID to ensure ordered processing per driver. Scale consumers horizontally to handle 1M pings/sec.

3. Choose Storage for Freshness

Store latest position in an in-memory data store like Redis with geospatial indexing (e.g., Redis GEO). Use TTL to expire stale entries and ensure low-latency reads.

4. Handle Updates and Consistency

Implement last-write-wins per driver using timestamps or sequence numbers. Consider write-through caching and idempotent updates to handle duplicates.

5. Address Trade-offs and Scalability

Discuss trade-offs: in-memory vs. disk, consistency vs. availability, cost of replication. Mention sharding by geography and using a CDN or edge nodes for global low latency.

Key Points to Mention

  • Partitioning by driver ID to maintain order and locality
  • Using Kafka or similar for high-throughput ingestion
  • In-memory store (Redis) with geospatial indexing for fast nearest-neighbor queries
  • TTL and timestamp-based eviction to bound staleness
  • Last-write-wins semantics and idempotent processing
  • Horizontal scaling and sharding by geography

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

Q3

What geospatial indexing scheme would you use to efficiently find available drivers within a given radius of a rider's pickup location?

System DesignAlgorithms & Data Structures
Author's notes

Knew geohash going in, mentioned it, then they asked about cell boundary issues and I sort of hand-waved.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: scale, update frequency, and latency needs. Then compare geospatial indexing schemes like Geohash, Quadtree, and S2, explaining why one is best suited for Uber's dynamic driver location problem. Finally, discuss how you would integrate the chosen index with a real-time system for updates and queries.

Pro tip: Mention that Uber actually uses H3 (a hexagonal hierarchical geospatial index) and explain its advantages over square-based grids, such as uniform neighbor distances and better handling of edge cases. This shows you've researched the company's tech stack.

1. Clarify Requirements

Ask about scale (number of drivers, queries per second), latency requirements, and update frequency to tailor your solution.

2. Evaluate Geospatial Indexes

Compare options like Geohash, Quadtree, R-tree, and S2/H3, discussing their pros and cons for radius queries and dynamic updates.

3. Choose and Justify

Select the most suitable index (e.g., H3 or S2) and justify based on requirements, highlighting how it handles proximity queries efficiently.

4. Design System Integration

Explain how to store and update driver locations in the index, and how to query for nearby drivers within a radius, including handling of moving objects.

5. Address Scalability and Trade-offs

Discuss sharding, replication, and consistency trade-offs, and how the index scales with a growing number of drivers and cities.

Key Points to Mention

  • Geohash: encodes lat/lon into a string, but has boundary issues and non-uniform cell sizes.
  • Quadtree: adaptive subdivision, good for non-uniform densities, but can become unbalanced.
  • S2 Geometry: Google's library, uses Hilbert curve, good for complex regions and efficient queries.
  • H3: Uber's hexagonal hierarchical index, uniform neighbor distances, ideal for ride-hailing.
  • Real-time updates: need efficient insert/update/delete as drivers move.
  • Radius query: convert radius to set of cells, then filter by exact distance.

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

Q4

How do you guarantee a driver is never simultaneously assigned to two different riders, even when multiple match requests arrive concurrently?

System DesignTechnical Trade-offs
Author's notes

This is the part I actually felt okay about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and scale, then propose a solution using a distributed lock or atomic conditional update on the driver's state. Explain how you handle concurrency, failures, and trade-offs between consistency and availability.

Pro tip: Mention that you would use a unique constraint or conditional write (e.g., 'UPDATE drivers SET status='assigned' WHERE id=? AND status='available'') to ensure atomicity, and discuss how to handle the case where the driver becomes unavailable after assignment.

1. Clarify requirements and constraints

Ask about scale, latency requirements, and consistency needs. Understand if the system is distributed and what failure modes are acceptable.

2. Choose a concurrency control mechanism

Propose using a distributed lock (e.g., Redis, ZooKeeper) or database transactions with row-level locking. Discuss trade-offs between pessimistic and optimistic locking.

3. Design the assignment flow

Outline the steps: check driver availability, atomically update driver status to 'assigned', and create the ride record. Ensure the update is conditional on the driver being available.

4. Handle failures and edge cases

Address what happens if the driver becomes unavailable after assignment (e.g., timeout, cancellation). Implement idempotency and retries with backoff.

5. Discuss trade-offs and alternatives

Compare approaches: centralized lock vs. distributed consensus vs. database constraints. Mention CAP theorem implications and how to scale.

Key Points to Mention

  • Atomic conditional update (e.g., compare-and-swap) on driver status
  • Distributed locking with Redis or ZooKeeper, including lock expiration and fencing tokens
  • Database transactions with SELECT FOR UPDATE or unique constraints
  • Idempotency keys to handle duplicate requests
  • Handling partial failures and timeouts (e.g., two-phase commit or saga pattern)
  • Trade-offs between strong consistency and availability (CAP theorem)

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

Q5

How does the system stay available for riders and drivers during a regional network partition or partial datacenter loss?

System DesignTechnical Trade-offs
Author's notes

Framed it as different subsystems having different needs, which felt right.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scope: regional partition vs. datacenter loss, and the expected availability targets (e.g., 99.99%). Then describe a multi-region active-active architecture with data replication, failover mechanisms, and graceful degradation to maintain core rider/driver functionality.

Pro tip: Emphasize that availability is not just about infrastructure but also about graceful degradation—e.g., allowing drivers to continue trips offline and syncing later. This shows you understand real-world trade-offs in a mobility platform.

1. Clarify requirements and scope

Ask about the expected availability SLO, the definition of 'regional partition' (e.g., network split between regions), and what 'partial datacenter loss' means (e.g., loss of a zone or a full region).

2. Design for multi-region active-active

Propose deploying services in multiple regions with active-active traffic distribution, using a global load balancer and health checks to route around failures.

3. Ensure data replication and consistency

Discuss data replication strategies (e.g., synchronous within region, asynchronous across regions) and how to handle conflicts, possibly using CRDTs or last-write-wins for non-critical data.

4. Implement failover and degradation

Describe automatic failover to healthy regions, and graceful degradation: e.g., disable non-essential features (like promotions) to prioritize core matching and trip management.

5. Test and monitor

Mention chaos engineering, regular failover drills, and monitoring to ensure the system behaves as expected during partitions and datacenter losses.

Key Points to Mention

  • Multi-region active-active deployment with global load balancing
  • Data replication strategies: synchronous vs. asynchronous, and conflict resolution
  • Graceful degradation: prioritizing core rider/driver matching and trip management
  • Automatic failover and health checks to detect and route around failures
  • Chaos engineering and regular disaster recovery drills
  • Monitoring and alerting for partition detection and latency spikes

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

Q6

How would you handle a surge of ride requests all coming from the same small area at once, like right after a stadium event ends?

System DesignTechnical Trade-offs
Author's notes

Follow-up question, came fast.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and constraints (e.g., number of requests, geographic area, latency requirements), then outline a high-level architecture that handles the surge through load balancing, geospatial indexing, and dynamic pricing. Finally, discuss trade-offs between consistency, availability, and cost, and propose mitigations like rate limiting and pre-warming resources.

Pro tip: Mention that surges are predictable (e.g., stadium events have known end times), so proactive capacity planning and pre-scaling are often more effective than purely reactive auto-scaling. Also, highlight the importance of monitoring and graceful degradation to maintain core functionality under extreme load.

1. Clarify Requirements and Scale

Ask questions to understand the expected request volume, geographic concentration, latency SLAs, and whether the surge is predictable. This sets the stage for a targeted design.

2. Design for Geospatial Sharding and Load Distribution

Propose partitioning the map into geohash or S2 cells and routing requests to shards based on location. Use a load balancer to distribute requests across multiple instances and avoid hotspots.

3. Implement Surge Handling Mechanisms

Describe techniques like dynamic pricing to throttle demand, request queuing with backpressure, and rate limiting per user or area. Also consider pre-warming caches and scaling resources in advance.

4. Ensure Reliability and Graceful Degradation

Discuss fallback strategies such as serving approximate ETAs, temporarily disabling non-critical features, and using circuit breakers to prevent cascading failures. Emphasize monitoring and alerting.

5. Evaluate Trade-offs and Iterate

Compare consistency vs. availability (e.g., CAP theorem), cost of over-provisioning vs. user experience, and simplicity vs. optimization. Suggest A/B testing or simulation to validate the approach.

Key Points to Mention

  • Geospatial indexing (e.g., geohash, S2) for efficient matching and sharding
  • Load balancing and horizontal scaling to distribute the surge
  • Dynamic pricing and demand throttling to manage load
  • Caching and pre-computation of frequent queries (e.g., driver locations)
  • Rate limiting and queuing to protect backend services
  • Monitoring, alerting, and graceful degradation to maintain core functionality

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

Q7

How would you extend this to a multi-region active-active setup, and how do you prevent a driver crossing a regional boundary from getting double-assigned by two different regions?

System DesignTechnical Trade-offs
Author's notes

Honestly the hardest follow-up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining a multi-region active-active architecture with regional shards and a global coordination layer. Then explain how to prevent double-assignment using a combination of consistent hashing, distributed locks, and idempotent assignment protocols. Emphasize trade-offs between consistency, latency, and availability.

Pro tip: Highlight that driver assignment is a stateful operation and that you would use a lease-based approach with a global lock service like Chubby or etcd to ensure only one region can assign a driver at a time. Mention that you would also implement a reconciliation process to handle edge cases like network partitions.

1. Define multi-region active-active architecture

Describe how you would partition data and services across regions, ensuring each region can handle requests independently. Mention regional shards for driver and rider data, with replication for fault tolerance.

2. Identify the double-assignment problem

Explain that when a driver crosses a regional boundary, two regions might simultaneously try to assign the driver to different trips. This can lead to conflicts and poor user experience.

3. Propose a coordination mechanism

Suggest using a global lock or lease service (e.g., etcd, ZooKeeper) to ensure only one region can assign a driver at a time. Alternatively, use a consistent hashing scheme to route assignment requests for a driver to a single region.

4. Ensure idempotency and conflict resolution

Design assignment operations to be idempotent, so repeated requests don't cause duplicate assignments. Implement a conflict resolution strategy, such as last-write-wins or vector clocks, to handle concurrent assignments.

5. Discuss trade-offs and failure handling

Acknowledge the latency and availability trade-offs of strong consistency. Describe fallback mechanisms for when the global coordination service is unavailable, such as regional autonomy with reconciliation.

Key Points to Mention

  • Consistent hashing to route driver assignment requests to a single region based on driver ID.
  • Distributed locks or leases (e.g., using etcd) to serialize assignment decisions across regions.
  • Idempotent assignment APIs to prevent duplicate assignments from retries.
  • Eventual consistency and reconciliation for handling network partitions and failures.
  • Latency considerations: global locks add latency, so consider regional autonomy with conflict resolution.
  • Monitoring and alerting for double-assignment incidents and automated rollback.

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

Q8

What are the top metrics you'd monitor for this system, and what would you set alerts on?

Product Analytics & MetricsSystem Design
Author's notes

Nice change of pace after all the heavy design stuff.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's purpose and key user journeys, then categorize metrics into customer-facing (e.g., latency, success rate) and operational (e.g., resource utilization, error rates). Prioritize metrics that directly impact user experience and business goals, and propose alerts with thresholds based on SLOs and historical baselines.

Pro tip: Tie every metric and alert to a clear action or owner; avoid alert fatigue by focusing on symptoms that indicate user impact, not just causes. Mention Uber's scale and the need for real-time monitoring with tools like Prometheus and Grafana.

1. Clarify the system and goals

Ask clarifying questions to understand the system's functionality, scale, and critical user journeys. Identify what 'good' looks like from both user and business perspectives.

2. Define key metrics

List metrics across layers: user-facing (latency, error rate, throughput), infrastructure (CPU, memory, network), and business (conversion, revenue). Prioritize the ones most critical to the user experience.

3. Set alert thresholds

For each metric, propose alert thresholds based on SLOs, historical baselines, and acceptable error budgets. Distinguish between warning and critical alerts.

4. Explain alerting strategy

Describe how alerts will be routed, escalated, and actioned. Emphasize reducing noise by alerting on symptoms (e.g., high latency) rather than causes (e.g., high CPU).

5. Iterate and refine

Mention that metrics and alerts should evolve with the system, using postmortems and monitoring data to adjust thresholds and add new metrics as needed.

Key Points to Mention

  • SLOs/SLIs and error budgets to define alert thresholds
  • The Four Golden Signals: latency, traffic, errors, saturation
  • User-facing metrics like request success rate and p95/p99 latency
  • Infrastructure metrics like CPU, memory, disk I/O, and network
  • Alerting on symptoms (e.g., elevated error rate) rather than causes (e.g., high CPU)
  • Tools like Prometheus, Grafana, and PagerDuty for monitoring and alerting

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