Skip to content

PAPER EXPLAINED

Dynamo: Amazon’s Highly Available Key-value Store

IntermediateAbout 64 min to read the paper

TL;DR

Dynamo is Amazon's decentralized key-value store. It stays writable during server, network and datacenter failures by relaxing consistency. It combines consistent hashing, replication, vector clocks, sloppy quorums and gossip, and reports production experience.

What problem does Dynamo solve?

Amazon services such as the shopping cart must always be able to read and write state, even while disks fail, networks partition or datacenters go down. At tens of thousands of servers, some components are always failing. Relational databases offered more features than these primary-key workloads needed, were hard to scale out, and typically chose consistency over availability. The difficulty is that strong consistency and high availability cannot both be guaranteed under network failures. Allowing replicas to diverge creates conflicts, and someone must detect and resolve them. All of this had to be done while meeting strict 99.9th-percentile latency targets on commodity hardware.

The core idea

Dynamo accepts every write and resolves disagreements later. Keys are spread across nodes on a hash ring and copied to several nodes. Each update creates a new immutable version tagged with a vector clock. The system can collapse versions that are simple successors of one another. Truly concurrent versions are handed back to the application, which merges them, for example by combining two shopping carts. Applications tune three knobs, N (replicas), R (read quorum) and W (write quorum), to trade off performance, availability, durability and consistency. The design is decentralized and symmetric, with no special master node.

IN THE AUTHORS’ WORDS

“To achieve this level of availability, Dynamo sacrifices consistency under certain failure scenarios.”

Dynamo: Amazon’s Highly Available Key-value Store, p. 1

“Using this reconciliation mechanism, an “add to cart” operation is never lost. However, deleted items can resurface.”

Dynamo: Amazon’s Highly Available Key-value Store, p. 6

“Setting R and W such that R + W > N yields a quorum-like system.”

Dynamo: Amazon’s Highly Available Key-value Store, p. 7

How Dynamo works

  1. Each key is hashed with MD5 onto a circular ring. Every physical node owns several positions on the ring (virtual nodes), so load spreads evenly and stronger machines can take more positions.
  2. The node that owns a key's position coordinates it and copies the key to the next N-1 distinct physical nodes clockwise. These nodes form the key's preference list.
  3. Each update becomes a new immutable version with a vector clock of (node, counter) pairs. Clocks show whether one version supersedes another or whether they are concurrent and need reconciliation by the client.
  4. For a put, the coordinator creates the new clock, writes locally, sends the version to the top N reachable nodes, and succeeds once W-1 of them respond. For a get, it waits for R responses and returns all causally unrelated versions.
  5. With a sloppy quorum, operations use the first N healthy nodes. A replica meant for a down node goes to another node with a hint and is handed back when the original node recovers.
  6. For longer-lasting divergence, nodes compare Merkle trees per key range and synchronize only the keys that differ. Read repair also fixes stale replicas noticed during reads.
  7. Administrators add or remove nodes explicitly. Gossip spreads membership and token ownership so any node can route directly, and seed nodes prevent the ring from splitting logically.

Results

These measurements come from production instances running (3,2,2) on a couple hundred nodes. 99.9th-percentile latencies were around 200 ms, an order of magnitude above the averages, and followed a daily cycle. An in-memory write buffer cut 99.9th-percentile latency by a factor of 5 at peak, at some cost to durability. The share of out-of-balance nodes was about 20% at low load and close to 10% at high load. Strategy 3 partitioning gave the best load-balancing efficiency. In the shopping cart, 99.94% of requests saw exactly one version. Client-driven coordination cut 99.9th-percentile latency by at least 30 ms. Applications received successful responses for 99.9995% of requests, with no data loss reported. Some figures are given only in aggregate form.

Limitations and what came later

  • The full-membership model, where each node gossips the complete routing table, works for a couple hundred nodes. The authors say scaling it to tens of thousands of nodes is not trivial.
  • Dynamo assumes a trusted, non-hostile environment and has no authentication, authorization or data-integrity protections.
  • It offers no isolation guarantees and only single-key updates. Merging conflicting versions can make deleted items resurface.
  • Vector clock truncation can make reconciliation less accurate. The authors say this was not thoroughly investigated because it had not appeared in production.
  • Some latencies, request rates, outage lengths and workloads are reported only in aggregate to protect business interests. Low W or R values open windows for inconsistency and durability loss.

Why Dynamo matters

The paper shows that an eventually consistent store can underpin demanding production services. It makes the availability-versus-consistency tradeoff concrete and tunable through N, R and W. It also demonstrates how a set of decentralized techniques combine into one system, and it treats tail latency as a central design target. Its candid lessons on partitioning, background-task control and client-side coordination are useful to anyone building replicated storage.

Dynamo is a compact, practical case study of designing a storage system around a deliberate choice: keep accepting writes during failures and accept that replicas may temporarily disagree. Instead of introducing one new algorithm, the paper shows how several known techniques fit together in a production system. These include consistent hashing, replication, vector clocks, sloppy quorums, hinted handoff, Merkle-tree synchronization and gossip-based membership. It also reports what happened in operation. The partitioning scheme had to be redesigned, background work interfered with foreground requests, and tail latency rather than average latency drove design decisions. Reading it teaches you to reason about tunable N, R and W settings, about who should resolve conflicts, and about why the 99.9th percentile matters. It is also candid about costs. Deleted shopping-cart items can reappear, some numbers are reported only in aggregate, and the full-membership design was built for clusters of hundreds of nodes.

Before you read

Who it’s for

Software engineers, students in distributed systems or databases courses, and architects choosing replicated storage who want to see how availability-first design works in a real production system.

What to know first

  • Basic idea of hashing and hash functions
  • What replication is and why systems keep multiple copies of data
  • Familiarity with client/server requests and latency
  • Rough understanding of consistency vs. availability tradeoffs under network failures
  • Basic notion of database transactions and ACID

Glossary

Consistent hashing
A partitioning scheme that maps both keys and nodes onto a circular hash space. Each key belongs to the first node found clockwise from it, so a node joining or leaving only affects its neighbors.
Virtual node (token)
One of several positions on the ring assigned to a single physical node. Virtual nodes even out load and let more capable machines take on more of it.
Preference list
The ordered list of distinct physical nodes responsible for storing a given key. It contains more than N nodes so that failures can be tolerated.
Vector clock
A list of (node, counter) pairs attached to each version of an object. It is used to tell whether one version descends from another or whether the two are concurrent.
Sloppy quorum
A quorum taken from the first N healthy nodes in the preference list, rather than a fixed set of N nodes. This keeps operations available when some nodes are down.
Hinted handoff
Temporarily storing a replica on a substitute node, along with a hint naming the intended node. The replica is delivered to that node once it recovers.
Merkle tree
A hash tree whose leaves hash individual key values and whose parent nodes hash their children. Comparing trees lets two replicas find differing keys while transferring little data.
Eventual consistency
A guarantee that every update reaches every replica eventually. In the meantime, reads may return stale or conflicting versions.
Read repair
After a read, the coordinator updates any replicas that returned stale versions. This repairs missed updates opportunistically.
99.9th percentile SLA
A performance target that must be met by 99.9% of requests. Amazon uses it instead of averages so that nearly all customers, not just most of them, get a good experience.

What to pay attention to

  • Why the shopping cart requirement forces conflict resolution onto reads rather than writes (page 3).
  • How virtual nodes fix the uneven load and heterogeneity problems of basic consistent hashing (page 6).
  • The vector clock walk-through in Figure 3, especially how D3 and D4 become concurrent siblings (page 7).
  • Why a write is considered successful after W-1 other nodes respond, and how R + W > N relates to quorums (pages 7-8).
  • How the sloppy quorum and hinted handoff differ from a strict quorum (page 8).
  • The evolution from partitioning Strategy 1 to Strategy 3 and why partitioning and placement were separated (pages 12-13).
  • The tradeoffs of the in-memory write buffer and the single 'durable write' replica (page 11).
  • Which numbers are given only in aggregate form for business reasons (page 2).

You can skip it if… Skip if you need strong consistency, multi-key transactions, or security against untrusted nodes. Dynamo explicitly gives these up. Skip it too if you only want a formal proof-based treatment, since this is an engineering experience paper.

Questions to keep in mind

  • What do you gain and lose by letting the application, rather than the data store, resolve conflicting versions?
  • Why does Dynamo use a sloppy quorum instead of a strict one, and what risks does that introduce?
  • How would you pick N, R and W for a read-heavy catalog compared with a shopping cart?
  • Why did Amazon focus on the 99.9th percentile of latency rather than averages, and which design choices follow from that?
  • What prevents the full-membership gossip design from scaling to tens of thousands of nodes?

Dynamo quiz: check your understanding

1. What do the parameters N, R and W mean in Dynamo?

Show the answer

N is the number of hosts each data item is replicated on. R is the minimum number of nodes that must take part in a successful read. W is the minimum number that must take part in a successful write. Choosing R + W > N gives a quorum-like system. A common configuration in the paper is (3,2,2).

2. Why does Dynamo resolve update conflicts during reads rather than writes?

Show the answer

Dynamo aims to be 'always writeable' because rejecting customer updates, such as shopping cart additions, would hurt the customer experience. Resolving conflicts at write time could mean rejecting writes when replicas are unreachable. So Dynamo accepts the writes and moves the conflict resolution work to reads.

3. What is hinted handoff?

Show the answer

Sometimes a node that should hold a replica is temporarily down. The replica is then sent to another healthy node, with a hint in its metadata naming the intended recipient. That node stores it in a separate local database. Once it detects that the intended node has recovered, it delivers the replica and may delete its own copy.

4. How do vector clocks tell whether two versions conflict?

Show the answer

A vector clock is a list of (node, counter) pairs attached to each version. If every counter in the first clock is less than or equal to the matching counter in the second, the first version is an ancestor of the second and can be discarded. Otherwise the two versions are in conflict and need reconciliation.

5. How does Dynamo detect and repair replicas that have drifted apart in the background?

Show the answer

It runs an anti-entropy protocol based on Merkle trees, keeping one tree per key range. Two nodes compare the roots of their trees. If the roots differ, they compare child hashes down the tree until they find the keys that are out of sync. This keeps the amount of data transferred small.

6. Which partitioning strategy performed best, and why was it preferred?

Show the answer

Strategy 3, which uses Q/S tokens per node and equal-sized partitions, had the best load-balancing efficiency. Compared with Strategy 1, it also cut the membership information each node keeps by three orders of magnitude. Because partitions are fixed, each can be stored and moved as a file, which makes bootstrapping, recovery and archiving easier.

7. How often did the shopping cart service see divergent versions?

Show the answer

Over a 24-hour profile, 99.94% of requests saw exactly one version. Only tiny fractions saw two, three or four versions. The paper attributes increases in divergent versions mainly to concurrent writers, often automated robots, rather than to failures.

Your answers stay on this page and are cleared when you leave.

Go a little deeper

Dynamo lets each application choose its own conflict resolution, from merging carts to last-write-wins. When is pushing this logic to developers a strength, and when does it become a liability? Consider the shopping cart's resurfacing deletes and the paper's note that new applications need early analysis to pick a resolution method.

Read next

More papers on Distributed storage.

Related reading lists

All papers explained →

Cite Dynamo

DeCandia, G., Hastorun, D., Jampani, M., Kakulapati, G., Lakshman, A., Pilchin, A., Sivasubramanian, S., Vosshall, P., & Vogels, W. (2007). Dynamo: Amazon’s Highly Available Key-value Store. ACM SOSP. https://doi.org/10.1145/1294261.1294281

@inproceedings{decandia2007dynamo,
  title = {{Dynamo: Amazon’s Highly Available Key-value Store}},
  author = {Giuseppe DeCandia and Deniz Hastorun and Madan Jampani and Gunavardhan Kakulapati and Avinash Lakshman and Alex Pilchin and Swaminathan Sivasubramanian and Peter Vosshall and Werner Vogels},
  year = {2007},
  booktitle = {ACM SOSP},
  doi = {10.1145/1294261.1294281},
  url = {https://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf}
}

DOI: 10.1145/1294261.1294281 · Original PDF ↗

Study Dynamo in ReadingTrack

Add the paper to your ReadingTrack library with its authors, venue and year, and get this page’s quiz as suggested review cards. You choose which cards to keep; nothing enters your reviews until you accept it.

Last reviewed 26 November 2026 by the ReadingTrack editors. Explanations are our own; quotes are short and attributed, and the paper is linked at its original source.