DEV Community

Cover image for From the Dynamo Paper to DynamoDB
DynoTable
DynoTable

Posted on • Originally published at dynotable.com

From the Dynamo Paper to DynamoDB

The 2007 "Dynamo: Amazon's Highly Available Key-value Store" paper and the
DynamoDB you call today share a name and a goal — predictable performance at any
scale — but they are not the same system. The paper described an internal,
eventually-consistent store you ran yourself. DynamoDB is a managed service that
kept the lessons and threw out most of the machinery.

Is DynamoDB based on the Dynamo paper?

Partly. DynamoDB takes its name and core goals — predictable performance and high availability at scale — from the 2007 Amazon Dynamo paper, and it kept the partition-key hashing idea almost verbatim. But it is a different, managed system: the paper's vector clocks, gossip membership, and tunable read/write quorums are gone, replaced by AWS-owned internals.

  • The paper solved availability, not ergonomics. Its job was to never reject a write during a holiday-traffic spike, even at the cost of returning a stale read.
  • DynamoDB kept the shape, replaced the internals. Partitioned by a hash of the key, replicated across AZs, scaled horizontally — but the conflict-resolution guts (vector clocks, gossip, read-repair) are gone.
  • You no longer tune the knobs. N, R, and W from the paper became one choice: ConsistentRead true or false. AWS owns the rest.
  • The mental model still pays off. Knowing the lineage explains why a Scan is expensive and why a GSI read can lag — both fall out of the original design.

What the paper was actually solving

Amazon's shopping cart could not go down. A relational database that refused
writes under load — or blocked on a failed replica — was unacceptable. The 2007
Dynamo paper chose availability over consistency: always accept the write,
reconcile disagreements later. That trade is the root of everything below.

To do that without a single master, Dynamo had to answer two questions on its own:
where does a key live, and how many copies must agree before a read or write counts?

Consistent hashing: where a key lives

The paper placed every node on a hash ring. A key's position is the hash of its
key; it's owned by the next node clockwise, and replicated to the following N-1
nodes. Adding or removing a node only reshuffles its neighbors' keys — not the
whole dataset. That's consistent hashing, and it's the one idea DynamoDB kept
almost verbatim.

DynamoDB still hashes your partition key to decide which physical partition stores
the item. Pick a low-cardinality partition key — say STATUS with two values —
and every item with the same value lands in the same partition. That's the hot partition footgun, and it's a direct consequence of the ring: the hash sends
identical keys to identical homes.

Quorum: how many copies must agree

The paper's second knob was a quorum. With N replicas, a write succeeds once
W of them ack, and a read consults R of them. Set R + W > N and any read
overlaps at least one node holding the newest write — strong consistency. Set them
lower and you trade freshness for speed and uptime.

Dynamo ran "sloppy" quorums: if a target node was down, the write went to a
stand-in and was handed back later (hinted handoff). Conflicting versions were
tagged with vector clocks and reconciled by the application on read.

What DynamoDB kept versus changed

DynamoDB inherited the goals and the partitioning, then deleted the parts that
made the original hard to operate.

Concern 2007 Dynamo paper DynamoDB today
Key placement Consistent hashing ring Hash of partition key → managed partition
Replication N nodes, you choose 3 copies across AZs, fixed by AWS
Consistency knobs R, W quorum tuning One flag: ConsistentRead
Conflict resolution Vector clocks, app-side merge on read None needed in-Region — writes serialize through a leader replica; last-writer-wins only across Regions in global tables
Membership Gossip protocol between peers Fully managed; invisible to you
Multi-key ops None — pure key-value Query, GSIs, transactions layered on top

The paper's API was two calls: get(key) and put(key, value). DynamoDB added a
sort key, indexes, and queries on top of the same key-value core — which is why a
Query is cheap (one partition) and a Scan is not (it walks every partition the
ring ever created).

How a write travels, then and now

The flow below contrasts the paper's quorum write with DynamoDB's managed one. The
shape rhymes; the responsibility moved from your code to AWS.

Diagram: view on dynotable.com

In the paper you owned the quorum math and the merge; in DynamoDB that whole lower
half is managed, and you only choose ConsistentRead per request.

Where the lineage leaks into your code

The eventual-consistency default is the paper showing through. A global secondary
index is replicated asynchronously, so a freshly written item can be missing from
the index for a moment — the same "reconcile later" bargain, just at the index
layer. See GSI vs LSI for when that lag matters.

You buy back strong consistency two ways. Use ConsistentRead: true on a base-table
read (it routes to the leader copy), or guard a write with a ConditionExpression
so it only lands if the item's current state matches. Sketch one in the
DynamoDB expression builder — for example
attribute_not_exists(PK) to make a PutItem an insert-only operation, the
modern stand-in for the paper's conflict detection.

The one thing to remember

The paper optimized for never saying no to a write. DynamoDB inherited that bias,
which is why its defaults favor availability and why strong reads cost more. Model
your keys for single-partition Querys, as in single-table design,
and reach for a Scan only when you truly must — the ring
makes a full table walk as expensive as it sounds.

Try DynoTable to browse your tables and their GSIs, then run JOINs and
GROUP BY over your own data in the SQL Workbench.

Top comments (0)