PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Instacart

Design a scalable inventory system

Last updated: Mar 29, 2026

Quick Overview

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.

  • hard
  • Instacart
  • System Design
  • Software Engineer

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.

Related Interview Questions

  • Design an inventory management system - Instacart (medium)
  • Design cloud storage with quotas and compression - Instacart (hard)
  • Design an e-commerce catalog - Instacart (medium)
  • Design scalable inventory system and avoid races - Instacart (hard)
  • Design an inventory system - Instacart (medium)
Instacart logo
Instacart
Jul 31, 2025, 12:00 AM
Software Engineer
HR Screen
System Design
5
0

System Design: Multi-Warehouse, Multi-Channel Inventory Service

You are designing an inventory service for an e-commerce platform that sells across multiple sales channels (e.g., web, marketplace, retail partners) and fulfills from multiple warehouses. The service must prevent overselling under concurrent load and support cart reservations and order commits.

Requirements

  1. Scope and Responsibilities
    • Track inventory at the granularity of SKU × warehouse.
    • Support per-channel inventory policies (e.g., safety stock, backorder rules).
    • Maintain real-time availability for browsing and checkout.
  2. Core Operations and APIs
    • Adjust: apply deltas from physical counts, transfers, damages, or WMS/ERP updates.
    • Reserve: hold stock for a cart or pre-authorized order with TTL.
    • Commit: finalize reservation on payment/ship confirmation.
    • Release: free a reservation on cancel, expiration, or failure.
    • Define request/response shapes, idempotency, and retry behaviors.
  3. Data Model
    • Entities for SKU, Warehouse, Inventory (with on_hand, reserved, inbound, safety_stock, damaged), and Reservation.
    • Support fields for channel-specific constraints and policies.
  4. Consistency and Concurrency
    • Define invariants and the consistency model needed to prevent oversell under concurrent updates.
    • Describe how you handle multi-warehouse reservations and cross-row transactions.
  5. Idempotency and Retries
    • Strategy to make all mutation APIs idempotent and safe under at-least-once delivery.
  6. Eventing
    • Publish stock change events for downstream systems (e.g., search, merchandising, marketplaces).
    • Ensure ordering and delivery guarantees; describe the outbox/CDC approach.
  7. Reconciliation with ERP/WMS
    • How the service integrates with external systems, which system is the source of truth for physical stock, and how periodic reconciliation works.
  8. Scaling and Partitioning
    • Partitioning strategy, hot-key mitigation, read/write scaling, and latency targets.
    • Caching and materialized views for browse availability.
  9. Business Scenarios and Failure Handling
    • Backorders and pre-sell against inbound.
    • Returns and restocking flows.
    • Degraded modes during outages (DB, message bus, ERP/WMS).

Deliver:

  • A clear data model.
  • API designs for adjust, reserve, commit, and release with idempotency.
  • Consistency model and concurrency control strategy.
  • Eventing model and reconciliation plan.
  • Scaling/partitioning approach.
  • Handling of backorders, returns, and outages.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Instacart•More Software Engineer•Instacart Software Engineer•Instacart System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,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.