Design a scalable inventory system
Company: Instacart
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: HR Screen
Design an inventory system for an e-commerce platform that tracks stock across multiple warehouses and sales channels. Support reservations for carts/orders, prevent overselling under concurrent updates, and expose APIs for adjust, reserve, commit, and release. Define the data model, consistency model, idempotency and retry strategy, eventing for stock changes, reconciliation with external ERPs/WMS, scaling and partitioning, and handling of backorders, returns, and outages.
Quick Answer: This question evaluates a candidate's competency in designing scalable, consistent inventory systems, covering data modeling for SKU×warehouse, concurrency control to prevent oversell, API idempotency, eventing, and external system reconciliation.