Dynamo: Amazon's highly available key-value store
medium 35 minAmazon's shopping cart had to accept every add, even while servers and links failed.
Check yourself
One question at a time. Each answer explains why.
Question 1 of 11
N = 3, W = 1, R = 1. What risk rises?
A node is down for 10 minutes, then returns. Which two mechanisms bring its data back?
What is a sibling in Dynamo?
Which system uses tablets and a single master: Dynamo, Bigtable or Cassandra?
A cart is merged by union and a removed item returns. What fixes it?
Why does the preference list skip some ring positions?
With N = 3 and W = 2, how many replicas must answer the coordinator besides itself before it replies?
What does Dynamo's sloppy quorum change?
Two clocks: [A:2, B:1] and [A:2, C:1]. What are they?
How is DynamoDB's replication described in its 2022 paper?
What did fixed equal partitions (strategy 3) improve?
Pick an answer to see why.
Not quite. R + W = 2 is not more than 3, so read and write sets need not overlap, and a write acknowledged by one node is vulnerable until it spreads (§6).
Not quite. Stand-ins hand back hinted replicas; anti-entropy catches what hints missed.
Not quite. Concurrent versions are all returned so the application can merge them.
Not quite. Bigtable has a master and tablet servers. Dynamo and Cassandra are leaderless rings.
Not quite. The union has no memory of removals. Remove markers or an add/remove set keep it.
Not quite. With virtual nodes the next N positions can belong to fewer than N machines (§4.3).
Not quite. The coordinator writes locally and needs W - 1 = 1 more (§4.5).
Not quite. Section 4.6: operations use the first N healthy nodes from the preference list.
Not quite. Each has a counter the other lacks.
Not quite. Section 3 of the ATC 2022 paper: replication groups use Multi-Paxos for leader election and consensus.
Not quite. Section 6.2: partitions move as files and membership data shrank by three orders of magnitude.
Flashcards
Say your answer, then reveal it.
Card 1 of 12
What does a preference list contain?
The machines responsible for a key in ring order, distinct machines only. The first N own it; the rest are spares.
Say your answer, then reveal it.
What does R + W > N guarantee, and when does it not?
A read and a write from the same N nodes share a node. A sloppy quorum or concurrent writers break the promise.
Say your answer, then reveal it.
What is hinted handoff for?
A down owner's write goes to the next healthy node with a hint; it is handed back when the owner returns.
Say your answer, then reveal it.
Why Merkle trees?
Compare root hashes per key range and descend only where they differ, so replicas sync with few hashes and little disk reading.
Say your answer, then reveal it.
What do vector clocks detect that timestamps cannot?
That two versions are concurrent, so neither should silently replace the other.
Say your answer, then reveal it.
Why virtual nodes?
Even spread, load from a failed node spread over many, and more tokens for bigger machines.
Say your answer, then reveal it.
Dynamo versus DynamoDB replication?
Dynamo: leaderless, sloppy quorum, siblings. DynamoDB: a Multi-Paxos leader per partition, quorum of log replicas.
Say your answer, then reveal it.
Why measure at the 99.9th percentile?
A page calls many services and the mean hides the slow customers. 99.9 was the cost-benefit choice.
Say your answer, then reveal it.
What did a union merge cost the cart?
Removed items can come back. Fix with remove markers or a set that tracks adds and removes.
Say your answer, then reveal it.
What was the common (N, R, W)?
(3, 2, 2), from §6 of the paper.
Say your answer, then reveal it.
How does membership spread?
Gossip: each node contacts a random peer every second; seeds stop the ring from splitting into halves.
Say your answer, then reveal it.
What is read repair?
After replying, the coordinator sends the newest version to replicas that returned an old one.
Say your answer, then reveal it.
These cards come back in Today, just before you would forget them.