PracHub
QuestionsLearningGuidesInterview Prep
|Home/System Design/Citadel

Design Inventory Availability and Order Placement

Last updated: Jul 14, 2026

Quick Overview

Design e-commerce inventory availability and order reservation without overselling under concurrent requests. Define on-hand, reserved, and available invariants; atomic multi-item placement; idempotent retries; expiration; and optimistic versus pessimistic control for hot SKUs.

  • medium
  • Citadel
  • System Design
  • Software Engineer

Design Inventory Availability and Order Placement

Company: Citadel

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

## Design Inventory Availability and Order Placement Design the inventory portion of an e-commerce system with two core operations: 1. Query the currently available quantity for a product. 2. Place an order for one or more units without overselling under concurrent requests. Focus on data contention, transactional boundaries, and the tradeoffs between optimistic and pessimistic concurrency control. ### Constraints & Assumptions - Inventory is tracked per product SKU at one logical fulfillment location. - A placement request has an idempotency key and either reserves all requested units or none. - Concurrent orders may target the same popular SKU. - Canceled or expired orders release their reservation. - Payment processing is outside scope, but reservation state must support a later confirm or cancel operation. ### Clarifying Questions to Ask - May availability reads be slightly stale, or must they reflect every committed reservation? - Is an order for multiple SKUs atomic across all items? - How long does a reservation live before expiration? - What is the expected contention level for the hottest products? - Should a failed placement return the exact unavailable SKU and current quantity? ### Hints - Distinguish on-hand, reserved, and available inventory. - Make the capacity check and reservation write one atomic decision. - Compare retry behavior under optimistic control with lock wait behavior under pessimistic control. ### What a Strong Answer Covers - Inventory and reservation/order records with clear invariants. - Concrete query, place, confirm, cancel, and expire contracts. - Atomic no-oversell logic and idempotent retries. - Optimistic versus pessimistic behavior under low and high contention. - Multi-SKU deadlock/order concerns, expiration, observability, and failure recovery. ### Follow-up Questions - How would you prevent deadlocks when an order contains several SKUs? - When would a database row lock outperform optimistic retries? - How would you reconcile inventory after a crash between reservation and event publication? - What availability should the query show while a reservation is pending payment?

Quick Answer: Design e-commerce inventory availability and order reservation without overselling under concurrent requests. Define on-hand, reserved, and available invariants; atomic multi-item placement; idempotent retries; expiration; and optimistic versus pessimistic control for hot SKUs.

Related Interview Questions

  • Design a Low-Latency Metrics and Alerting Platform - Citadel (medium)
  • Design alerting for application-to-exchange mappings - Citadel (medium)
  • Design a low-latency trading platform - Citadel (hard)
  • Design stock price time-series store and query - Citadel (easy)
|Home/System Design/Citadel

Design Inventory Availability and Order Placement

Citadel logo
Citadel
Apr 6, 2026, 12:00 AM
mediumSoftware EngineerTechnical ScreenSystem Design
5
0

Design Inventory Availability and Order Placement

Design the inventory portion of an e-commerce system with two core operations:

  1. Query the currently available quantity for a product.
  2. Place an order for one or more units without overselling under concurrent requests.

Focus on data contention, transactional boundaries, and the tradeoffs between optimistic and pessimistic concurrency control.

Constraints & Assumptions

  • Inventory is tracked per product SKU at one logical fulfillment location.
  • A placement request has an idempotency key and either reserves all requested units or none.
  • Concurrent orders may target the same popular SKU.
  • Canceled or expired orders release their reservation.
  • Payment processing is outside scope, but reservation state must support a later confirm or cancel operation.

Clarifying Questions to Ask Guidance

  • May availability reads be slightly stale, or must they reflect every committed reservation?
  • Is an order for multiple SKUs atomic across all items?
  • How long does a reservation live before expiration?
  • What is the expected contention level for the hottest products?
  • Should a failed placement return the exact unavailable SKU and current quantity?

Hints

  • Distinguish on-hand, reserved, and available inventory.
  • Make the capacity check and reservation write one atomic decision.
  • Compare retry behavior under optimistic control with lock wait behavior under pessimistic control.

What a Strong Answer Covers Guidance

  • Inventory and reservation/order records with clear invariants.
  • Concrete query, place, confirm, cancel, and expire contracts.
  • Atomic no-oversell logic and idempotent retries.
  • Optimistic versus pessimistic behavior under low and high contention.
  • Multi-SKU deadlock/order concerns, expiration, observability, and failure recovery.

Follow-up Questions Guidance

  • How would you prevent deadlocks when an order contains several SKUs?
  • When would a database row lock outperform optimistic retries?
  • How would you reconcile inventory after a crash between reservation and event publication?
  • What availability should the query show while a reservation is pending payment?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Citadel•More Software Engineer•Citadel Software Engineer•Citadel System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

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

Product

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

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding 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.