Most replicated databases protect data consistency by rejecting writes whenever too many replicas become unreachable. Amazon’s 2007 SOSP paper inverted that default: a customer adding an item to an Amazon shopping cart could never be turned away, even while disks failed, network routes flapped, or tornadoes knocked out entire datacenters. Rather than waiting for synchronous consensus, Giuseppe DeCandia and colleagues built Dynamo as an “always writeable” key-value store that accepts updates on any reachable substitute node and pushes conflict resolution onto reads.
In Amazon’s service-oriented platform, rendering a single e-commerce page triggered requests to over 150 services, and every link in that call chain was bound by strict Service Level Agreements measured at the 99.9th percentile rather than the average. Dynamo combined five decentralized techniques into a blueprint that defined eventual consistency in production and directly inspired Cassandra, Riak, and Voldemort.
- Tail-latency SLAs over averages: typical Dynamo services required 99.9% of reads and writes (for binary blobs under 1 MB) to finish within 300 ms at peak loads such as 500 requests/s, because shoppers with long histories sit in the slow tail.
- Always writeable via sloppy quorums: under the standard
(N=3, R=2, W=2)setup, writes spill past down replicas to lower-ranked healthy hosts via hinted handoff, yielding 99.9995% non-timeout responses and zero data loss over two years. - Vector clocks decouple writes from locks: Dynamo tracks
(node, counter)causal histories and returns concurrent branches for application merging; over a 24-hour shopping-cart trace, 99.94% of reads saw one version and only 0.00113% saw two to four versions. - Fixed partitions cut gossip 1,000x: moving from random tokens per node (Strategy 1) to
Q/Stokens overQequal-sized partitions (Strategy 3) shrank per-node routing metadata by three orders of magnitude and eliminated full-day node bootstraps.
Zero-hop routing, equal partitions, and tail latency
Traditional peer-to-peer overlays like Chord and Pastry route lookups across multiple overlay hops. Dynamo rejected multi-hop routing immediately: extra network hops amplify latency variance and blow past a 99.9th-percentile SLA. Instead, Dynamo operates as a zero-hop DHT. Every storage host gossips its membership history with one random peer every second (anchored by externally configured seed nodes so isolated hosts do not form split rings) and keeps enough routing state locally to forward any get or put straight to a key’s coordinator.
Hashing a key with MD5 onto a 128-bit ring gives incremental scalability, yet naive consistent hashing (one random ring position per server) fails in two ways: random spacing skews key distribution, and physical servers vary in capacity. Dynamo therefore assigns each host multiple virtual nodes (tokens) scattered around the ring, walking clockwise to place a key across N distinct physical hosts in its preference list (spanning multiple datacenters).
Even virtual nodes ran into trouble under production traffic. Section 6.2 documents three partitioning strategies that reveal why decoupling placement from key boundaries mattered:
- Strategy 1 (
Trandom tokens defining ranges): Every node join or departure shifted adjacent token boundaries. During busy shopping traffic, a joining node forced existing hosts to run low-priority scans over local Berkeley DB stores to extract stolen keys, dragging bootstrap out to almost a full day, invalidating Merkle trees across shifting ranges, and making dataset archival painfully slow. - Strategy 2 (
Qequal partitions,Trandom tokens): FixingQequal-sized hash partitions decoupled key ranges from placement, yet random token mapping produced the worst load-balancing efficiency (mean load / max load) across the whole 30-node evaluation in Figure 8. - Strategy 3 (
Q/Stokens,Qequal partitions): DividingQfixed partitions evenly amongSnodes let partitions live in separate files that transfer whole during bootstrap and archival, achieved the highest load balance in Figure 8, and shrank per-node membership metadata by three orders of magnitude.
Tail-latency tuning went further inside request coordination. Routing through a generic load balancer added an extra forwarding hop when a random server received a key outside its preference list. Moving the coordinator state machine into a partition-aware client library (polling a random node every 10 seconds for membership updates, Table 2) cut 99.9th-percentile read latency from 68.9 ms to 30.4 ms and 99.9th-percentile write latency from 68.5 ms to 30.4 ms (and dropped averages from 3.9 ms to 1.55 ms on reads and 4.02 ms to 1.9 ms on writes). On the storage node itself, adding an in-memory 1,000-object write buffer cut peak 99.9th-percentile latency by a factor of 5 (Figure 5), while an admission controller monitored trailing 60-second 99th-percentile database read latency against a 50 ms threshold to throttle background Merkle tree scans whenever foreground requests heated up.
Sloppy quorums, vector clocks, and resurrected items
Dynamo exposes only get(key) and put(key, context, object), parameterized per service by (N, R, W): total replicas N, read quorum R, and write quorum W. Unlike strict quorum systems (or strongly consistent Raft logs) that refuse writes when fewer than W of the key’s canonical N replicas answer, Dynamo runs a sloppy quorum.
If node A in Figure 2’s (N=3) preference list [A, B, C] is unreachable, the coordinator writes A’s copy to the next healthy node down the preference list (D) tagged with a hint naming A. Node D keeps that object in a separate local database and periodically checks whether A has recovered; once A responds, D hands the object back and deletes its local copy. Because temporary node failures are detected purely locally (node A marks B down when B ignores its RPCs, without waiting for a global failure detector like SWIM), writes keep succeeding as long as W healthy nodes exist anywhere along the preference list.
Allowing writes during splits creates parallel update branches, so Dynamo attaches a vector clock (a list of (node, counter) pairs) to every object version, passed back to callers inside an opaque context. Figure 3 traces how causal tracking works:
- A client writes
D1via coordinatorSx, yielding clock[(Sx, 1)]. A second write viaSxproducesD2 [(Sx, 2)], which dominatesD1and lets replicas garbage-collectD1automatically (syntactic reconciliation). - Next, one client updates
D2viaSyto createD3 [(Sx, 2), (Sy, 1)], while a concurrent client readsD2and writes viaSzto createD4 [(Sx, 2), (Sz, 1)]. Neither clock dominates the other. - A later
get()collects bothD3andD4and returns both values plus a merged context[(Sx, 2), (Sy, 1), (Sz, 1)]. The application resolves the fork (semantic reconciliation) and writes backD5 [(Sx, 3), (Sy, 1), (Sz, 1)].
For Amazon’s Shopping Cart Service, semantic reconciliation unions the items in conflicting cart branches so an Add to Cart is never silently lost. That guarantee carries a famous side effect noted in Section 4.2: if a shopper removes an item in one branch while another branch still carries it from an older cart state, merging the branches makes the deleted item reappear. Services that cannot tolerate resurrected deletes or application merge code instead configure Dynamo for timestamp-based Last-Write-Wins (such as customer session state, at the cost of silently dropping concurrent writes) or as a high-performance read engine with (R=1, W=N) for rarely updated product catalogs.
Trace Dynamo across five production modes
Dynamo is not one fixed database configuration; tuning (N, R, W), write buffering, and conflict logic produces five distinct operating behaviors. Step through the tabs below to inspect how each mode handles failures, latency, and consistency.
Select a mechanism or workload mode (or use Left and Right arrow keys) to compare what triggers it, how Dynamo responds, and what breaks.
Keeping writes alive when top preference nodes go dark
Temporary outageWhen a canonical replica fails or partitions away, writes spill down the preference list so customer carts never stall.
- Why strict quorum breaks
- Under (3, 2, 2), losing two of [A, B, C] rejects all writes, and losing even one node drops durability to two copies.
- Dynamo's mechanism
- Coordinator skips down node A and writes to healthy substitute D with metadata hinting A; D delivers back once A recovers.
- Measured reliability
- Combined with multi-datacenter preference lists, production Dynamo returned non-timeout replies for 99.9995% of requests with zero data loss.
- Failure window
- If D dies permanently before handing back to A, background Merkle-tree anti-entropy across Q fixed partitions must repair drift.
Branching and merging versions on read (Figure 3)
Concurrent updatesWhen two writers update the same ancestor D2 via different coordinators, neither version dominates and both return to the client.
- Why LWW breaks carts
- Physical-clock Last-Write-Wins silently overwrites one concurrent add-to-cart update whenever clocks skew or writes overlap.
- Dynamo's mechanism
- D3 [(Sx,2),(Sy,1)] and D4 [(Sx,2),(Sz,1)] are incomparable; get() returns both plus summary context so put() writes D5 [(Sx,3),(Sy,1),(Sz,1)].
- Production frequency
- Over 24 hours on Shopping Cart Service, 99.94% of reads saw 1 version; 0.00057% saw 2, 0.00047% saw 3, and 0.00009% saw 4.
- Real culprit & quirk
- Divergent bursts came mainly from automated robots rather than outages, and cart union merges can resurrect deleted items.
Trading strict write durability for 5x lower tail latency
Tail optimizationBuffering writes in node memory avoids synchronous disk flushes on the critical path while keeping one durable replica.
- Why disk syncs hurt
- Writing synchronously to disk at W=2 replicas pushed 99.9th-percentile write latency around 200 ms during peak holiday traffic (Figure 4).
- Dynamo's mechanism
- Nodes queue writes in a 1,000-object memory buffer flushed asynchronously, while the coordinator requires 1 of the W acks to be a durable disk write.
- Measured speedup
- Cut 99.9th-percentile latency by a factor of 5 during peak traffic (Figure 5), smoothing diurnal spikes without shrinking W.
- Tradeoff accepted
- A crash on buffered non-durable replicas drops their queued memory writes, narrowing but not eliminating the durability risk.
Moving the coordinator state machine onto the caller
Zero-hop reads/writesLetting clients poll membership every 10 seconds eliminates the load balancer and one extra server-side forwarding hop.
- Why load balancers lag
- Random node selection sends requests to hosts outside the key's preference list, forcing an extra intra-cluster forward on writes and reads.
- Dynamo's mechanism
- Client library pulls routing state from a random node every 10s (refreshing immediately if a target fails) and coordinates directly.
- Measured speedup
- Table 2: 99.9th-percentile read/write latency dropped from 68.9/68.5 ms to 30.4/30.4 ms; averages fell from 3.9/4.02 ms to 1.55/1.9 ms.
- Why pull beat push
- Servers keep zero per-client subscription state, though a caller can hold a stale ring view for up to 10 seconds.
Flipping Dynamo to R=1, W=N for high-read catalogs
Tunable (N,R,W)Services with heavy read traffic and rare updates invert the quorum knobs instead of paying multi-node read fanout.
- Why (3,2,2) wastes work
- Querying N nodes and waiting for R=2 replies on every product-catalog read adds fanout overhead when writes are rare.
- Dynamo's mechanism
- Set R=1 and W=N (often with timestamp LWW), turning Dynamo into a partitioned, persistent cache fronted over heavyweight stores.
- Operational gain
- Reads complete from a single reachable replica with minimum latency while writes pay full N-node propagation upfront.
- Durability vs availability
- Setting W=N lowers write availability whenever a single replica stalls, proving availability and durability move in opposite directions.
If you prefer the concise summary without clicking through the tabs, here are Dynamo’s five key operating tradeoffs:
- Hinted handoff: keeps writes succeeding under
(3, 2, 2)during node outages by spilling onto healthy lower-ranked replicas, contributing to 99.9995% non-timeout responses. - Vector forks: only 0.00113% of shopping-cart reads hit multiple versions (mostly from concurrent automated bots), yet cart-union merges can resurrect deleted items.
- Write buffering: a 1,000-object memory buffer cut 99.9th-percentile write latency by 5x while keeping one synchronous durable write among the
Wreplies. - Client-driven coordination: removing the load-balancer hop via 10-second ring polling cut 99.9th-percentile latency by over 38 ms (
68.9 msto30.4 ms). - Tunable
(N, R, W): session stores use LWW timestamps, while read-heavy product catalogs setR=1, W=Nto minimize read fanout.
Caveats and how Dynamo aged in practice
Three sharp caveats separate the 2007 paper from how modern cloud databases run today.
First, Dynamo’s architecture was scoped to small, trusted internal clusters. Section 2.1 explicitly assumes a non-hostile environment with zero authentication or authorization, and Section 6.6 notes that full-ring gossip caps each instance at a couple hundred nodes before routing-table chatter saturates the cluster. Every Amazon service ran its own isolated Dynamo instance rather than sharing a multi-tenant fabric.
Second, vector-clock truncation and client-side merges carried subtle traps. To stop vector clocks from growing unboundedly during prolonged partitions, Section 4.4 discards the oldest (node, counter) entry once a clock exceeds a threshold such as 10, a heuristic the authors admit can break causal ancestry detection (though it had not triggered in production by 2007). Worse, pushing conflict resolution into application code turned out to be hard for ordinary engineering teams to reason about; when AWS later launched managed DynamoDB, it abandoned client-side vector clocks in favor of single-leader Paxos replication groups per partition.
Third, the paper framed Dynamo around partitions even though latency shaped its everyday defaults. As Daniel Abadi later proved in PACELC, CAP theorem outages are rare; Dynamo’s (3, 2, 2) quorums, write buffers, and opportunistic read repair were engineered primarily to keep normal-day 99.9th-percentile latency flat across multiple datacenters (PA/EL).
For engineers building stateful services today, Dynamo’s lasting lesson is not to adopt sloppy quorums and vector clocks blindly. Its real gift was proving that every storage knob (N, R, W, buffered durability, and reconciliation policy) is an explicit business-semantics contract: decide upfront whether your application prefers stalling a write, losing an overwrite under LWW, or merging branches that might bring a deleted item back.


