The simplest data model
A key value store maps a key to a value, supporting get and put. Its simplicity is the point. With no joins or complex queries, it scales horizontally far more easily than a relational database.
Partitioning
Data is split across nodes by partitioning the keyspace, usually with consistent hashing. Each node owns a slice of keys. This lets the store grow by adding nodes, each taking a share of keys and traffic.
Replication
To survive node failure, each key is replicated to several nodes:
- A write goes to the owning node and is copied to replicas.
- A read can be served by any replica.
- If a node dies, its replicas still hold the data.
Consistency choices
Replication forces a choice. Strong consistency makes every read see the latest write but costs latency and availability. Eventual consistency lets replicas diverge briefly for speed and uptime, converging later. Quorum reads and writes tune this balance.
Key idea
A key value store maps keys to values with get and put, partitions the keyspace across nodes for scale, replicates each key for fault tolerance, and trades strong against eventual consistency.