Grokking the System Design Interview, Volume II
Vote

0% completed

High-Level Architecture

Introduction: Dynamo's architecture

  1. Data distribution
  1. Data replication and consistency
  1. Handling temporary failures
  1. Inter-node communication and failure detection
  1. High availability
  1. Conflict resolution and handling permanent failures

At a high level, Dynamo is a

Distributed Hash Table (DHT)
that is replicated across the cluster for high availability and .

Introduction: Dynamo's architecture

Six ideas make up Dynamo's architecture. We name them here, then look at each one in detail in the lessons ahead.

1. Data distribution

Dynamo spreads its data across nodes using consistent hashing. Consistent hashing maps both nodes and keys onto a ring. Only a small set of keys has to move when a node joins or leaves. That property also makes it easy to add or remove nodes from a Dynamo cluster.

2. Data replication and consistency

Data is replicated optimistically. That is, Dynamo provides

rather than guaranteeing every copy agrees the instant a write happens.

3. Handling temporary failures

To handle temporary failures, Dynamo writes to a sloppy quorum rather than a strict majority

. A sloppy quorum can use the next healthy nodes in line, instead of insisting on the usual ones.

4. Inter-node communication and failure detection

Dynamo's nodes use a gossip protocol to keep track of the cluster's state.

5. High availability

Dynamo stays "always writeable," meaning highly available, through hinted handoff. When the right node for a write is down, a nearby node holds the data temporarily. It hands the data off once the original node recovers.

6. Conflict resolution and handling permanent failures

Nothing at write time guarantees that every node agrees on a value, so Dynamo resolves conflicts through two other mechanisms. Vector clocks track a value's history, so divergent versions can be reconciled at read time. In the background, an anti-entropy mechanism, Merkle trees, handles permanent failures.

We look at each of these in the lessons ahead, one at a time.

Reading Progress

0%


Vote for new content

On This Page

Introduction: Dynamo's architecture

  1. Data distribution
  1. Data replication and consistency
  1. Handling temporary failures
  1. Inter-node communication and failure detection
  1. High availability
  1. Conflict resolution and handling permanent failures