← Amazon

Amazon System DesignDesignFree previewFree

Distribution-Center Stock State Service

Last asked

onsiteSWE
SWEdistributed-systemsdata-modelingingestionshardingidempotency

Problem

Maintain the latest inventory state for each location–item pair from distribution-center updates. Support fast quantity, availability and last-update queries across thousands of locations, millions of items and tens of thousands of updates per second.


  • Receive stock updates from distribution centers.
  • Maintain the latest state for every location–item pair.
  • Provide fast lookups of quantity, availability and last-update time.
  • Address consistency and duplicate or out-of-order updates.
  • Explain partitioning and scaling decisions.
  • Retain historical data for analytics.

Constraints

  • Support thousands of locations, millions of items and tens of thousands of updates per second.