Uber·Backend Engineer·Onsite - System Design / Architecture
- Design the shopping cart service for a food delivery app like Uber Eats, including adding, updating, and removing items with quantities and per-item customizations, scoped to a single restaurant.
- How would you handle a user editing their cart from multiple devices at the same time? Walk through the tradeoffs between optimistic and pessimistic concurrency control here.
- If a menu item goes out of stock or its price changes while the user has it in their cart, how do you reconcile that at checkout?
- What storage solution would you choose for the cart service, and how would you handle TTL for abandoned carts?
- How would you design the API for cart operations to be idempotent so client retries don't cause duplicate mutations?
- How would you apply promotions, coupons, taxes, and delivery fees at checkout, and how does that integrate with order placement and payment?
- How would you scale this cart service across multiple regions with low-latency reads?
“This is the core question and it sounds straightforward until you realize how many edge cases are hiding in 'per-item customizations.' I started with a basic CRUD API and a document store, which was fine, but I spent too long on the data model before they nudged me toward the harder parts.”