Distributed Key-Value Store diagram template

A Dynamo-style store with consistent hashing, replication and quorum reads and writes.

Distributed Key-Value Store architecture diagramOpen in ArchBoard

Builds a new scene in your browser. Your existing scenes are not touched.

About this design

A distributed key-value store answers one question many times: which nodes own this key? Consistent hashing places nodes and keys on a ring so that adding a machine moves only a small slice of data. Each key is replicated to several neighbouring nodes, and clients or a coordinator read and write with a quorum, for example two of three replicas, trading latency against consistency. Writes also append to a commit log and an in-memory table that flushes to sorted files on disk, which keeps writes fast. Gossip spreads membership and failure information, hinted handoff holds writes for a node that is briefly down, and anti-entropy repair reconciles replicas that drifted apart. The diagram is deliberately small so you can talk through vector clocks, tombstones, hot keys and what the client sees during a network partition.

Diagram as text

This is the source of the diagram, in the ArchBoard diagram DSL. Paste it into Tools, Diagram from text to rebuild or change it.

title "Distributed key-value store"
direction LR
client "Client" -> service coord "Coordinator"
[coord x3]
coord -> node n1 "Storage node A"
coord -> node n2 "Storage node B"
coord -> node n3 "Storage node C"
n1 -> n2 -> n3
monitor prometheus "Cluster health"
coord -> cluster-health

More interview classics templates