← Uber Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

System design round at Uber for a backend role. The whole session was basically one big question about shopping cart architecture for a food delivery app, and it went pretty deep into tradeoffs I hadn't fully thought through before.

Questions Asked (6)

Q1

Design the shopping cart service for a food delivery platform like Uber Eats, covering item management, cross-device persistence, menu reconciliation, and checkout integration.

System DesignTechnical Trade-offsData Modeling
Author's notes

This was the core question and it sprawled.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scope, then design a scalable cart service with a focus on data modeling and consistency. Walk through the key components: item management, cross-device persistence, menu reconciliation, and checkout integration, highlighting trade-offs and failure handling.

Pro tip: Emphasize idempotency and eventual consistency in cart operations, and discuss how to handle menu changes gracefully to avoid order errors—this shows you understand real-world production challenges.

1. Clarify requirements and scope

Ask about expected scale, consistency needs, and integration points (e.g., menu service, checkout). Define functional and non-functional requirements to guide design decisions.

2. Design data model and storage

Propose a schema for carts, items, and menu snapshots. Choose a database (e.g., NoSQL for scalability, SQL for transactions) and discuss partitioning and indexing strategies.

3. Detail core operations and APIs

Outline APIs for adding/removing items, updating quantities, and retrieving carts. Address cross-device persistence via user identity and session management, and ensure idempotency.

4. Handle menu reconciliation and checkout

Explain how to detect menu changes (e.g., price updates, item availability) and reconcile with the cart, possibly using snapshots or versioning. Describe checkout integration, including validation and order creation.

5. Discuss trade-offs and failure scenarios

Highlight trade-offs (e.g., consistency vs. availability, latency vs. accuracy) and failure handling (e.g., menu service downtime, concurrent updates). Mention monitoring and scaling considerations.

Key Points to Mention

  • Idempotency and concurrency control for cart updates
  • Cross-device persistence using user IDs and session tokens
  • Menu reconciliation strategies: versioning, snapshots, or event-driven updates
  • Checkout integration with validation and order service
  • Data modeling choices: SQL vs. NoSQL, denormalization for performance
  • Handling menu changes: price updates, item removal, and user notifications

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

Q2

How would you handle two devices editing the same cart at the same time? Walk through your concurrency strategy.

System DesignTechnical Trade-offs
Author's notes

I went with optimistic concurrency and versioned writes.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: what 'cart' means in this context (e.g., a shopping cart with items, quantities, and prices) and the expected consistency level. Then propose a concurrency control strategy, such as optimistic concurrency with versioning or pessimistic locking, and discuss trade-offs like latency, conflict frequency, and user experience. Walk through how you'd handle conflicts, including retries and conflict resolution, and mention how you'd scale and monitor the solution.

Pro tip: Emphasize idempotency and conflict resolution at the item level rather than locking the entire cart, as this reduces contention and improves user experience. Also, mention that you'd consider using a distributed lock only for critical sections and fallback to optimistic concurrency for most operations.

1. Clarify requirements and assumptions

Ask about the expected concurrency level, consistency requirements (e.g., strong vs. eventual), and whether the cart is per-user or shared. Clarify what operations are involved (add, remove, update quantity) and the impact of conflicts on user experience.

2. Choose a concurrency control mechanism

Propose optimistic concurrency control (e.g., version numbers or ETags) for low-contention scenarios, or pessimistic locking (e.g., database row locks or distributed locks) for high-contention. Explain why you'd choose one over the other based on the requirements.

3. Design conflict detection and resolution

Describe how conflicts are detected (e.g., version mismatch) and resolved (e.g., last-write-wins, merge, or user prompt). Discuss idempotency keys to handle retries safely and ensure operations are commutative where possible.

4. Address scalability and performance

Explain how the strategy scales with many users and devices, including partitioning by cart ID, using caching, and avoiding global locks. Mention monitoring and metrics to track conflict rates and adjust the approach.

5. Summarize trade-offs and edge cases

Conclude by weighing the trade-offs of your chosen approach (e.g., latency vs. consistency, complexity vs. user experience) and mention edge cases like network partitions, offline edits, and partial failures.

Key Points to Mention

  • Optimistic concurrency control with versioning (e.g., ETags or version numbers) to detect conflicts without locking.
  • Pessimistic locking (database row locks or distributed locks like Redis) for high-contention scenarios, with caveats about deadlocks and latency.
  • Idempotency keys to ensure retries don't duplicate operations, especially for add/remove item actions.
  • Conflict resolution strategies: last-write-wins, merge (e.g., combining quantities), or prompting the user to resolve.
  • Item-level locking or versioning instead of cart-level to reduce contention and improve user experience.
  • Monitoring and metrics (e.g., conflict rate, retry count) to evaluate and refine the concurrency strategy.

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

Q3

The cart is persisted server-side. What storage technology would you choose and why, and how do you handle abandoned carts?

System DesignData Modeling
Author's notes

Went with a document store for the cart contents since the schema is flexible per-item customizations and all that.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: cart size, read/write patterns, consistency needs, and scale. Then recommend a primary store (e.g., DynamoDB or Cassandra) for high availability and horizontal scaling, with Redis as a cache for hot carts. For abandoned carts, propose a TTL-based expiry combined with a scheduled job or event-driven workflow to trigger recovery actions.

Pro tip: Emphasize that abandoned cart handling is not just deletion—it's a business opportunity. Propose a two-phase approach: soft-expire carts after inactivity, then run recovery campaigns (email/push) before hard deletion, showing you think about product impact.

1. Clarify requirements

Ask about cart size, read/write ratio, consistency requirements, and expected scale to justify your storage choice.

2. Choose primary storage

Recommend a highly available, horizontally scalable NoSQL store like DynamoDB or Cassandra, explaining why it fits cart access patterns.

3. Add caching layer

Propose Redis or Memcached to cache active carts and reduce latency for frequent reads.

4. Design abandoned cart detection

Use TTL or a last-updated timestamp with a scheduled job to identify carts inactive beyond a threshold.

5. Handle recovery and cleanup

Trigger recovery workflows (e.g., notifications) for soft-expired carts, then hard-delete after a grace period to free storage.

Key Points to Mention

  • Data model: key by user ID or cart ID, with items as a collection; consider denormalization for read performance.
  • Storage trade-offs: SQL vs NoSQL, consistency vs availability, and cost implications at scale.
  • TTL-based expiry in DynamoDB or Cassandra for automatic cleanup of abandoned carts.
  • Event-driven architecture: use change streams or CDC to trigger recovery emails/push notifications.
  • Idempotency and concurrency: handle concurrent cart updates with optimistic locking or versioning.
  • Monitoring and metrics: track cart abandonment rate and storage growth to tune TTL and recovery strategies.

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

Q4

How do you keep the cart consistent with live menu data, especially around price changes or items going out of stock?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

Probably my weakest area in this interview.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the consistency requirements and user experience goals, then propose a design that separates menu data (source of truth) from cart state, using techniques like versioning, event-driven updates, and validation at checkout. Emphasize trade-offs between consistency, latency, and complexity, and how you handle edge cases like price changes and stock-outs.

Pro tip: Mention that you would use optimistic UI updates with server-side validation at checkout to balance responsiveness and correctness, and highlight the importance of idempotency and graceful degradation during menu service outages.

1. Clarify requirements and constraints

Ask about consistency needs (e.g., strong vs. eventual), scale, latency tolerance, and user experience expectations for price changes and stock-outs.

2. Design data model and source of truth

Propose that the menu service owns item data with versioning, and the cart stores item references and a snapshot of price/availability at add-time for validation.

3. Implement update propagation

Use event-driven architecture (e.g., pub/sub) to notify cart service of menu changes, and apply strategies like TTL caching or version checks to keep cart data fresh.

4. Handle conflicts and edge cases

Define behavior for price changes (e.g., notify user, revalidate at checkout) and stock-outs (e.g., mark item unavailable, suggest alternatives), ensuring idempotent operations.

5. Validate at checkout and ensure resilience

Perform final validation against live menu data before order placement, with fallbacks and monitoring to handle failures gracefully.

Key Points to Mention

  • Event-driven architecture with pub/sub for menu updates
  • Versioning of menu items to detect stale cart data
  • Optimistic UI with server-side validation at checkout
  • Idempotency and retry mechanisms for update operations
  • Graceful degradation during menu service outages (e.g., cached data with warnings)
  • Trade-offs between consistency, latency, and complexity

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

Q5

How would you design the API for cart operations to handle client retries safely?

API & IntegrationsSystem Design
Author's notes

Idempotency keys on mutations.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: cart operations must be idempotent and safe under retries, with clear semantics for each operation. Then propose a design using idempotency keys, versioning, and appropriate HTTP methods, and discuss how to handle conflicts and failures.

Pro tip: Emphasize that idempotency is not just about preventing duplicate writes but also about ensuring consistent responses for retried requests, and mention the importance of idempotency key expiration and storage.

1. Clarify requirements and scope

Ask about the cart operations (add, update, remove, checkout) and the expected retry scenarios (network failures, timeouts). Confirm non-functional requirements like latency, consistency, and scale.

2. Define idempotent API semantics

Propose using idempotency keys for mutating operations (POST/PUT) and leverage HTTP methods correctly (GET, PUT, DELETE are idempotent). Explain how to generate and validate keys.

3. Design idempotency key handling

Describe storing idempotency keys with request fingerprints and responses in a fast store (e.g., Redis) with TTL. Outline the flow: check key, process if new, store result, return cached response for duplicates.

4. Address concurrency and versioning

Use optimistic concurrency control (e.g., ETags or version numbers) to handle conflicting updates. Explain how to return 409 Conflict or 412 Precondition Failed when appropriate.

5. Discuss error handling and edge cases

Cover scenarios like partial failures, key expiration, and retries with different payloads. Mention monitoring and alerting for idempotency key collisions or storage issues.

Key Points to Mention

  • Idempotency keys for POST requests to prevent duplicate cart modifications
  • Use of HTTP methods: GET, PUT, DELETE are idempotent; POST requires idempotency keys
  • Storing idempotency keys with request hash and response, with TTL for cleanup
  • Optimistic concurrency control using version numbers or ETags to handle conflicts
  • Returning appropriate status codes: 200 for success, 409 for conflict, 412 for precondition failed
  • Handling retries with same idempotency key but different payload (return 422 or error)

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

Q6

How would you apply promotions, coupons, taxes, and delivery fees at checkout, and where does that logic live in the system?

System DesignPricing & MonetizationAPI & Integrations
Author's notes

I said a dedicated pricing/promotions service that gets called at checkout time, not baked into the cart service itself.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the checkout flow and the order of operations for applying promotions, coupons, taxes, and delivery fees, emphasizing that the sequence matters for correctness and compliance. Then describe where each piece of logic lives (e.g., pricing service, promotion engine, tax service) and how they are orchestrated via an API gateway or checkout service. Highlight idempotency, consistency, and scalability considerations.

Pro tip: Emphasize that pricing logic should be centralized in a dedicated service to avoid duplication and ensure consistency across platforms, and mention the importance of idempotency keys to handle retries safely in a distributed system.

1. Clarify requirements and order of operations

Confirm the business rules: promotions and coupons are applied before taxes, and delivery fees may be taxed or not depending on jurisdiction. Establish the correct sequence to avoid incorrect calculations.

2. Design the pricing service architecture

Propose a dedicated pricing service that orchestrates calls to sub-services: promotion engine, coupon validation, tax calculation, and delivery fee calculation. This service exposes a single API for checkout to get the final price breakdown.

3. Detail each component's responsibility

Explain that promotions and coupons are handled by a promotion engine that applies rules and validates eligibility; taxes are computed by a tax service using jurisdiction rules; delivery fees are calculated based on distance, time, and demand. Each component should be independently scalable and testable.

4. Address consistency, idempotency, and failure handling

Discuss how to ensure consistency across services (e.g., using a saga pattern or distributed transactions) and idempotency to handle retries. Mention fallback strategies if a service is unavailable (e.g., default tax rate, cached promotions).

5. Discuss scalability and extensibility

Explain how the design supports high throughput (e.g., caching, async processing) and extensibility for new promotion types or tax rules. Mention monitoring and logging for auditing price calculations.

Key Points to Mention

  • Order of operations: apply promotions/coupons first, then taxes, then delivery fees (or as per business rules).
  • Centralized pricing service to avoid duplication and ensure consistency across clients.
  • Promotion engine with rule evaluation and coupon validation, possibly using a rules engine or DSL.
  • Tax service integration with jurisdiction-specific rules and compliance.
  • Idempotency keys and distributed transaction patterns (e.g., saga) to handle retries and failures.
  • Caching and async processing for scalability, and audit logging for price breakdowns.

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