PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Uber

Design cart management lifecycle service

Last updated: Apr 23, 2026

Quick Overview

This question evaluates system design and backend engineering competencies, focusing on data modeling, indexing strategy, concurrency control, transactional correctness, and scalability for a multi-device cart lifecycle and one-time checkout.

  • medium
  • Uber
  • System Design
  • Software Engineer

Design cart management lifecycle service

Company: Uber

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

## Scenario You are designing the backend for an on-demand delivery app (restaurants and grocery). Users can create a cart, modify items from multiple devices, and then checkout to create an order that will be fulfilled. The prompt is intentionally vague. Drive the requirements, scope, and assumptions through clarifying questions. ## Core workflow (cart lifecycle) 1. Create cart 2. Add / remove items 3. Update quantity / options 4. View cart 5. Checkout (convert cart → order) with strong correctness guarantees 6. Fulfillment happens on the order 7. Cart closes after checkout, or expires if abandoned ## Functional requirements - Create an active cart for a user and a merchant/store. - Mutations: - Add item - Remove item - Update quantity - Update selected options (e.g., size, toppings) - Read: - Fetch active cart (commonly by user + merchant) - Fetch cart details (header + full list of items) - Checkout: - Convert an active cart into an order exactly once. - Validate correctness (prices/options, cart not stale, cart not already checked out, etc.). ## Non-functional requirements - Correctness/consistency is the top priority, especially at checkout. - Low latency and high availability are important, but cannot compromise correctness at checkout. - Concurrency: multiple devices may update the same cart at the same time. ## Scale assumptions - Up to **10M concurrent orders** (use this to derive rough QPS and storage assumptions). ## Data modeling expectations Propose a data model and indexing strategy that supports typical queries and correctness. Examples of typical queries to support: - Get a user’s active cart quickly (often by `(user_id, merchant_id)` or `(user_id, status)`). - Get all items by `cart_id`. - At checkout, read cart + items efficiently and validate consistency. Also discuss how you would handle: - Optimistic concurrency control (e.g., `version` on cart header and conditional writes). - If asked: finer-grained conflicts (e.g., can two devices modify different items without conflict?).

Quick Answer: This question evaluates system design and backend engineering competencies, focusing on data modeling, indexing strategy, concurrency control, transactional correctness, and scalability for a multi-device cart lifecycle and one-time checkout.

Related Interview Questions

  • Design a Stock Trading Platform - Uber (medium)
  • Design an Uber Eats Cart Service - Uber (medium)
  • Design a Scalable Calendar Service - Uber (medium)
  • Design A URL Shortener - Uber (medium)
  • Design Nearby Restaurant Search - Uber
Uber logo
Uber
Mar 1, 2026, 12:00 AM
Software Engineer
Technical Screen
System Design
128
0

Scenario

You are designing the backend for an on-demand delivery app (restaurants and grocery). Users can create a cart, modify items from multiple devices, and then checkout to create an order that will be fulfilled.

The prompt is intentionally vague. Drive the requirements, scope, and assumptions through clarifying questions.

Core workflow (cart lifecycle)

  1. Create cart
  2. Add / remove items
  3. Update quantity / options
  4. View cart
  5. Checkout (convert cart → order) with strong correctness guarantees
  6. Fulfillment happens on the order
  7. Cart closes after checkout, or expires if abandoned

Functional requirements

  • Create an active cart for a user and a merchant/store.
  • Mutations:
    • Add item
    • Remove item
    • Update quantity
    • Update selected options (e.g., size, toppings)
  • Read:
    • Fetch active cart (commonly by user + merchant)
    • Fetch cart details (header + full list of items)
  • Checkout:
    • Convert an active cart into an order exactly once.
    • Validate correctness (prices/options, cart not stale, cart not already checked out, etc.).

Non-functional requirements

  • Correctness/consistency is the top priority, especially at checkout.
  • Low latency and high availability are important, but cannot compromise correctness at checkout.
  • Concurrency: multiple devices may update the same cart at the same time.

Scale assumptions

  • Up to 10M concurrent orders (use this to derive rough QPS and storage assumptions).

Data modeling expectations

Propose a data model and indexing strategy that supports typical queries and correctness. Examples of typical queries to support:

  • Get a user’s active cart quickly (often by (user_id, merchant_id) or (user_id, status) ).
  • Get all items by cart_id .
  • At checkout, read cart + items efficiently and validate consistency.

Also discuss how you would handle:

  • Optimistic concurrency control (e.g., version on cart header and conditional writes).
  • If asked: finer-grained conflicts (e.g., can two devices modify different items without conflict?).

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Uber•More Software Engineer•Uber Software Engineer•Uber System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.