AlgoViz

Dynamo: Amazon's highly available key-value store

medium 35 min

Amazon's shopping cart had to accept every add, even while servers and links failed.

Numbers that decide

Work out a number when the answer changes what you build.

Work it out

Numbers worth having ready

QuestionAnswer
Common (N, R, W)(3, 2, 2); R + W - N = 1 node of overlap
A write with W = 2 waits forThe second fastest replica, the coordinator included
Keys moved when the 5th machine joinsAbout 1 / 5 with a ring, about 4 / 5 with hash mod N
Clock threshold"say 10" pairs, oldest dropped
Cart reads with one version99.94% over 24 hours
Example SLA300 ms for 99.9% of requests at 500 per second

Requests a cart store might take

10,000,000 carts×20 ops86,400 s≈2,315/s→×36,944/s\frac{10{,}000{,}000\ \text{carts} \times 20\ \text{ops}}{86{,}400\ \text{s}} \approx 2{,}315/\text{s} \xrightarrow{\times 3} 6{,}944/\text{s}
Our own assumptions: 10 million active carts a day, 20 reads and writes each, peak 3 times the average. With N = 3, the replicas see three times the writes.