Design high-volume stock-state ingestion with per-location/item versions, duplicate and out-of-order handling, partitioned latest-state reads, cache freshness, and analytics history.
Design a Distribution-Center Inventory Update Service
Company: Amazon
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Onsite
Design a service that receives stock updates from distribution centers and maintains the latest quantity, availability, and last-update time for each location–item pair. Support fast lookups, thousands of locations, millions of items, and tens of thousands of updates per second.
### Constraints & Assumptions
Preserve the distinction between an update's event time and its authoritative ordering/version. Clarify whether updates are absolute snapshots or deltas before defining deduplication and out-of-order behavior. Historical data must remain available for analytics.
### Clarifying Questions
Who assigns versions for a location–item pair? Are negative quantities valid? How fresh must reads be? Does availability mean quantity greater than zero or include reservations and other rules? How long is history retained?
### What a Strong Answer Covers
Idempotent ingestion, per-key ordering, partitioning, latest-state storage, lookup consistency, hot-key handling, analytics history, and recovery/reconciliation.
### Follow-up Questions
What if two sources claim the same version? How would you handle a late delta versus a late absolute snapshot? What happens when caches lag or a partition is replayed after failure?
Overview: Design high-volume stock-state ingestion with per-location/item versions, duplicate and out-of-order handling, partitioned latest-state reads, cache freshness, and analytics history.
Design a Distribution-Center Inventory Update Service
Amazon
Sep 14, 2026
mediumSoftware EngineerOnsiteSystem Design
0
0
Design a service that receives stock updates from distribution centers and maintains the latest quantity, availability, and last-update time for each location–item pair. Support fast lookups, thousands of locations, millions of items, and tens of thousands of updates per second.
Constraints & Assumptions
Preserve the distinction between an update's event time and its authoritative ordering/version. Clarify whether updates are absolute snapshots or deltas before defining deduplication and out-of-order behavior. Historical data must remain available for analytics.
Clarifying Questions Guidance
Who assigns versions for a location–item pair? Are negative quantities valid? How fresh must reads be? Does availability mean quantity greater than zero or include reservations and other rules? How long is history retained?
What if two sources claim the same version? How would you handle a late delta versus a late absolute snapshot? What happens when caches lag or a partition is replayed after failure?