West, cut off
sold10:08
Dev buys it. West’s count said 1.
Module 23 · Replication & consistency
Keeping a copy of your data in every region makes a shop fast and keeps it open. It also lets two regions sell the last item. Here you watch Larkspur’s three warehouses drift apart, then choose what each product can risk.
New to databases? Start with Databases & indexes.
The whole idea in one example
10:08
Dev buys it. West’s count said 1.
10:12
Eve buys it too. North never heard.
Counts come from a simulated morning: Larkspur’s own orders and planning numbers, not a measurement of any real database.
How it works
West still counts a hinge North sold
Dynamo describes itself as an eventually consistent data store: all updates reach all replicas eventually.
Source, checked 24 October 2026
Stay open or stay right, not both
Gilbert and Lynch (2002) proved that when the network can lose messages, no read/write data store can guarantee both availability and atomic consistency: the CAP theorem.
Source, checked 24 October 2026
Reads and writes that always overlap
Amazon’s Dynamo paper (2007): R is the fewest replicas a read must reach and W the fewest a write must reach; setting R + W > N gives a quorum-like system.
Source, checked 24 October 2026
One place decides, one order at a time
In the Dynamo paper, “last write wins” means that when versions diverge, the one with the largest timestamp is kept as the correct version.
Source, checked 24 October 2026
The story
Larkspur Supply Co. copies its stock count to three warehouses; the team finds how the last hinge sells twice, and picks what each product can risk when the line goes down. You’re on the team that keeps the counts.
Your path


Chapter 2 · done
What happens when two warehouses sell the last unit at the same moment?





Chapter 7 · done
Which settings never sell the drill press twice and refuse the fewest orders?
Anyone whose product keeps the same data in more than one place, and who wants to know why it sometimes sells what it doesn’t have. No background needed beyond what a database is.