AlgoViz

Inside a key-value store

medium 24 min

A distributed key-value store keeps simple pairs on many machines.

Where it shows up

The same pattern appears across everyday software.

  • Amazon DynamoDB

    A serverless key-value and document database. AWS describes single-digit millisecond performance, and reads are eventually consistent unless the request asks for a strongly consistent one.

  • Apache Cassandra

    A wide-column store with a Dynamo-style token ring. Consistency is chosen for each operation, and the default number of tokens for a node is 16.

  • Riak KV

    A key-value store in the spirit of Dynamo, with a ring of partitions, three copies by default, and siblings that the application can merge.

  • The Dynamo shopping cart

    The Dynamo paper describes a cart that must always accept an added item. Conflicting carts are merged, with the side effect that a deleted item can come back.

  • etcd

    The store that Kubernetes uses for its state. It offers linearizable operations through a majority, so it refuses work when the majority is gone.

  • Consul

    A service catalogue with a key-value store whose servers agree on changes with the Raft protocol.