What Is Consistent Hashing?
Consistent hashing places both keys and nodes on a conceptual ring using a hash function, assigning each key to the next node clockwise. When a node joins or leaves, only the keys between it and its neighbor move, rather than nearly all keys as in plain modulo hashing. Virtual nodes are often added to spread load more evenly.
Why it matters
Naive key-to-node mapping reshuffles almost everything when the node count changes, causing huge cache or data churn. Consistent hashing keeps that churn proportional to the change, which is why distributed caches and shards rely on it.
Related guides
What Is a Sharding Key?A sharding key is the field used to decide which shard a record belongs to, determining how data and load are…
What Is Partition Tolerance?Partition tolerance is a distributed system's ability to keep operating when network failures split nodes int…
What Is a Quorum Read?A quorum read queries enough replicas that their responses overlap with the replicas a write touched, ensurin…