cloudpatterns.appClassroomKatasWhiteboardBlog
Story

Amazon Dynamo: a shopping cart that never says no

How Amazon built a store that keeps taking Add to Cart through failures — and what it gave up to do it.

12 minMedium

Members lesson

Membership isn’t open yet. The free lessons are open — 17 of them.

What you'll be able to do

  1. 1Choose W and R for a Ledger table from its read / write mix and how much staleness and downtime it tolerates — fast reads, fast writes or balanced.
  2. 2Predict whether a read can miss the latest confirmed write from N, W and R, and how many copies can be down before writes or reads fail.
  3. 3Explain why W + R > N still isn't linearizable — sloppy quorums, concurrent writes settled by timestamps, a failed write left on some copies — and how hinted handoff, read repair and anti-entropy bring copies back together.

Inside the lesson

steps
5
questions
5
simulation
1

You guess first, then run the system and see if you were right.

Step 1 · The setup

In 2007, Amazon published how it stores shopping carts. Its shop served tens of millions of customers at peak, on tens of thousands of servers in many data centers — and at that size, some servers and network links are failing at any moment.

One rule shaped everything: an Add to Cart must never be rejected or forgotten, even mid-failure. Decide what you would do, then see what Amazon did.

Steps 2–5 are for members