Amazon's shopping cart looks simple. Under the hood: eventual consistency + always-add semantics + inventory awareness. Classic Dynamo paper's motivating use case.

WebMobileAlexaCart APICart ServiceInventory CheckRecommendationsin-cartSession MergeCheckout HandoffDynamoDBcart replicasProduct CatalogSession StoreOrder Service
Amazon cart: multi-device merge + DynamoDB replicas + always-add semantics
Advertisement

Always add, never lose

Adding to cart never fails. Even if item soon becomes unavailable, cart entry stays. User sees it at checkout with 'unavailable' badge.

Always add, never lose

Adding to cart never fails. Even if item soon becomes unavailable, cart entry stays. User sees it at checkout with 'unavailable' badge.

Advertisement

Eventually consistent replicas

DynamoDB replicates cart. Reads may show stale. Adds converge. Removals resolved by vector clocks (concurrent add + remove → add wins).

Multi-device merge

Add on phone, checkout on laptop. Session store links devices via user ID. Cart merged across.

Inventory check late

Adding doesn't reserve inventory. Only at checkout time. Prevents zombie reservations from browsers left open.

Recommendations in cart

'Customers who bought X also bought Y'. Contextual to cart contents. Small revenue boost, massive personalization signal.

Always-add + eventual consistency + late inventory check. That's how carts scale to Amazon's traffic.