← Uber Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

Onsite OOD round at Uber focused entirely on designing the cart and pricing engine for Uber Eats. The round starts deceptively approachable then gets into concurrency and edge cases fast. Prep the PricingStrategy interface before you walk in or you will feel it.

Questions Asked (6)

Q1

Design the core classes and interfaces for a food delivery cart system, including item customizations, pricing strategies, and a receipt breakdown.

System DesignData ModelingTechnical Trade-offs
Author's notes

The receipt object is what actually gets graded, not whether your strategy code is pretty.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then model the core domain objects (Cart, Item, Customization) with clear interfaces. Next, design a flexible pricing strategy using composition, and finally show how to generate an itemized receipt that aggregates all charges. Emphasize extensibility and trade-offs in your design choices.

Pro tip: Demonstrate awareness of real-world complexities like concurrent cart modifications and pricing rule conflicts, and propose how to handle them (e.g., versioning, rule prioritization). This shows you think beyond basic OOP.

1. Clarify Requirements and Scope

Ask questions to understand expected scale, customization types, pricing rules, and receipt format. Confirm whether the system is for a single restaurant or multi-restaurant, and if real-time updates are needed.

2. Define Core Domain Model

Identify main entities: Cart, CartItem, MenuItem, CustomizationOption, and their relationships. Sketch class diagrams with key attributes and methods, focusing on interfaces for extensibility.

3. Design Pricing Strategy

Use the Strategy pattern to encapsulate pricing rules (e.g., base price, customization surcharges, discounts, taxes). Explain how strategies can be composed and applied in a defined order.

4. Implement Receipt Generation

Design a Receipt class that aggregates line items, subtotals, taxes, discounts, and total. Ensure it can be generated from the cart and pricing strategies, with clear breakdowns.

5. Discuss Trade-offs and Extensibility

Highlight design decisions like immutability vs. mutability, interface segregation, and how to add new customizations or pricing rules without modifying existing code.

Key Points to Mention

  • Use of composition over inheritance for customizations and pricing strategies
  • Strategy pattern for flexible pricing rules and easy addition of new promotions
  • Interface segregation for Cart, Item, and Pricing to keep components decoupled
  • Handling concurrency (e.g., optimistic locking) when multiple users modify the same cart
  • Receipt as a value object that captures a snapshot of the cart at checkout
  • Trade-offs between simplicity and extensibility, and how to balance them

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

Q2

How would you design a composable pricing strategy system where discounts, surge pricing, membership benefits, and promotions can be applied in a defined order?

System DesignTechnical Trade-offsPricing & Monetization
Author's notes

The ordering question is sneaky.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, then propose a modular pipeline architecture where each pricing component (discounts, surge, membership, promotions) is a pluggable rule applied in a configurable order. Emphasize extensibility, correctness, and performance, and discuss trade-offs like synchronous vs. asynchronous processing and conflict resolution.

Pro tip: Show awareness of real-world complexities like idempotency, auditability, and the need for a rules engine or DSL to allow business users to define order and conditions without code changes. Mention how you'd handle edge cases like overlapping promotions and surge pricing caps.

1. Clarify Requirements and Scope

Ask questions to understand the scale, latency requirements, consistency needs, and who defines the pricing rules. Identify key entities like rides, users, and promotions.

2. Design Core Architecture

Propose a pipeline of pricing rules where each rule modifies the price sequentially. Use a configuration-driven approach to define the order and conditions for each rule.

3. Define Rule Interface and Composition

Specify a common interface for rules (e.g., apply(context) -> price) and how rules are composed (e.g., chain of responsibility, decorator pattern). Discuss how to handle rule conflicts and precedence.

4. Address Scalability and Performance

Discuss caching, precomputation, and asynchronous processing for non-critical rules. Consider how to shard or parallelize rule evaluation if needed.

5. Ensure Observability and Extensibility

Include logging, metrics, and tracing for each rule application. Design for easy addition of new rule types and dynamic updates without redeployment.

Key Points to Mention

  • Pipeline/chain of responsibility pattern for sequential application of pricing rules
  • Configuration-driven rule order and conditions (e.g., using a DSL or rules engine)
  • Idempotency and consistency guarantees for pricing calculations
  • Handling conflicts and precedence (e.g., membership discounts vs. surge pricing)
  • Caching and performance optimization for high-throughput pricing
  • Auditability and explainability of final price (which rules applied and why)

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

Q3

How do you handle two devices modifying the same cart at the same time without losing updates?

System DesignTechnical Trade-offs
Author's notes

Went with optimistic concurrency on a version column.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, such as consistency needs and latency tolerance. Then discuss concurrency control mechanisms like optimistic locking, pessimistic locking, or CRDTs, and explain how you would choose based on trade-offs. Finally, outline a concrete solution with conflict resolution and failure handling.

Pro tip: Mention that you would first check if the cart can be modeled as a CRDT or use per-item operations to avoid conflicts altogether, showing you think about avoiding locks when possible. Also, discuss how you would measure and monitor conflict rates to validate the chosen approach.

1. Clarify Requirements

Ask about consistency requirements (strong vs eventual), expected concurrency levels, and user experience goals (e.g., should updates never be lost or is merging acceptable?).

2. Identify Concurrency Control Options

List possible approaches: optimistic locking (version numbers), pessimistic locking, last-write-wins, CRDTs, or operational transforms. Briefly explain each.

3. Evaluate Trade-offs

Compare options based on latency, complexity, scalability, and user experience. For example, optimistic locking is simple but may cause retries; CRDTs avoid conflicts but are complex.

4. Propose a Solution

Choose an approach and detail the implementation: e.g., use version numbers per cart, detect conflicts on write, and either reject with a merge prompt or auto-merge using item-level operations.

5. Address Edge Cases and Monitoring

Discuss handling network partitions, retries, and how to monitor conflict rates. Mention idempotency and ensuring operations are commutative where possible.

Key Points to Mention

  • Optimistic concurrency control with version numbers or ETags
  • Pessimistic locking and its impact on scalability and user experience
  • Conflict-free replicated data types (CRDTs) for automatic merging
  • Last-write-wins and its potential for data loss
  • Item-level operations to reduce conflict scope
  • Idempotent operations and retry mechanisms
  • Monitoring and metrics for conflict detection

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

Q4

What happens if the price of an item changes, or a promo expires, between when the user views the cart and when they check out?

System DesignData Modeling
Author's notes

Price snapshot at checkout time.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Frame the problem as a consistency and concurrency challenge in distributed systems, focusing on how to handle stale data between cart view and checkout. Discuss strategies like price locking, versioning, and user notification, and weigh trade-offs between consistency, availability, and user experience.

Pro tip: Emphasize that the solution should align with business goals—such as minimizing cart abandonment while preventing revenue loss—and propose a configurable policy (e.g., honor price for X minutes) rather than a one-size-fits-all rule.

1. Clarify requirements and constraints

Ask about business rules: should the user be notified of changes? Is there a grace period? What are the consistency requirements (strong vs. eventual)?

2. Identify the core technical challenge

Explain that the cart view and checkout are separate requests, so data can become stale due to concurrent updates, requiring a mechanism to detect and handle changes.

3. Propose data modeling and versioning

Suggest storing a snapshot of price and promotions with a version or timestamp when the cart is viewed, and validating against the latest at checkout.

4. Design the checkout flow

At checkout, re-validate prices and promos; if changed, either block the checkout, apply the new price with user confirmation, or honor the old price based on policy.

5. Discuss trade-offs and edge cases

Cover trade-offs like user experience vs. revenue, and edge cases such as concurrent modifications, expired promos, and partial cart changes.

Key Points to Mention

  • Optimistic vs. pessimistic locking for cart items
  • Versioning or timestamping of price and promotion data
  • Idempotency and consistency in distributed transactions
  • User notification and confirmation flows
  • Business policy for honoring prices (e.g., grace period)
  • Caching strategies and cache invalidation

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

Q5

How would you make the checkout operation idempotent so retries don't result in duplicate charges?

System DesignAPI & Integrations
Author's notes

Used a cart_id plus version as a combined idempotency token.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining idempotency in the context of payments: a retry of the same logical request should not create a second charge. Then propose a concrete mechanism, such as an idempotency key generated by the client and enforced by the server with a unique constraint and stored response, and explain how it handles retries, concurrent requests, and failures.

Pro tip: Emphasize that idempotency must be enforced at the server side with a persistent store, not just in the client, and discuss how to handle the race condition where two identical requests arrive simultaneously.

1. Clarify the problem and requirements

Define what 'idempotent' means for checkout: same logical operation, same result, no duplicate side effects. Identify the retry scenarios (client timeout, network failure, server crash) and the need for exactly-once semantics.

2. Design the idempotency key mechanism

Have the client generate a unique idempotency key per checkout attempt and send it in a header or request body. The server uses this key to deduplicate requests.

3. Implement server-side deduplication

Store the idempotency key with the request state and response in a persistent store (e.g., database) with a unique constraint. On a new request, check if the key exists; if so, return the stored response without re-executing the charge.

4. Handle concurrency and failures

Use atomic operations (e.g., INSERT ... ON CONFLICT) to handle concurrent requests with the same key. If the first request is still processing, return a 409 Conflict or instruct the client to retry later. Ensure the key and response are stored transactionally with the charge.

5. Address edge cases and cleanup

Define key expiration (e.g., 24 hours) to avoid unbounded storage. Discuss how to handle partial failures, such as when the charge succeeds but storing the response fails, and how to recover.

Key Points to Mention

  • Idempotency key generated by the client and sent with each request
  • Server-side persistent storage of idempotency keys with unique constraint
  • Returning the same response for duplicate requests without re-executing the charge
  • Handling concurrent duplicate requests with atomic operations or locking
  • Storing the idempotency key and charge result in the same transaction
  • Key expiration and cleanup to manage storage

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

Q6

How would this design scale to tens of millions of concurrent orders across multiple regions?

System DesignTechnical Trade-offs
Author's notes

This came in the last few minutes as a follow-up and felt like a gut check more than a deep dive.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and requirements, then outline a multi-region architecture that partitions orders by region and uses asynchronous replication for global consistency. Focus on trade-offs between consistency, availability, and latency, and explain how components like sharding, load balancing, and caching enable horizontal scaling.

Pro tip: Emphasize that at Uber's scale, you must design for failure and eventual consistency; mention specific techniques like cell-based architecture and idempotency to show practical experience.

1. Clarify Requirements and Scale

Ask questions to understand the expected read/write ratio, latency requirements, consistency needs, and regional distribution of orders. This ensures your design targets the right constraints.

2. High-Level Architecture

Propose a multi-region active-active or active-passive setup with regional clusters, each handling local orders. Use a global load balancer to route users to the nearest region.

3. Data Partitioning and Sharding

Explain how to shard orders by region or user ID to distribute load. Discuss sharding strategies (e.g., consistent hashing) and how to handle hotspots.

4. Consistency and Replication

Detail the replication strategy across regions (e.g., asynchronous multi-master or synchronous with quorum). Discuss trade-offs between consistency and latency, and how to handle conflicts.

5. Scalability and Fault Tolerance

Describe how to scale each component horizontally (e.g., stateless services, distributed databases) and ensure fault tolerance with redundancy, failover, and monitoring.

Key Points to Mention

  • Sharding strategies (e.g., by region, user ID, or order ID) to distribute load
  • Multi-region replication and consistency models (e.g., eventual consistency, CRDTs)
  • Load balancing and traffic routing (e.g., geo-DNS, anycast)
  • Caching layers (e.g., Redis) to reduce database load
  • Asynchronous processing and message queues (e.g., Kafka) for order events
  • Idempotency and exactly-once semantics to handle retries and duplicates

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