Consistent hashing

Keys and nodes are placed on a ring, and each key belongs to the next node clockwise. Adding or removing a node moves only about 1/N of the keys instead of nearly all of them; virtual nodes even out the load.

Where it shows up in real systems

  • Wide-column store

    Every node accepts writes and each row is stored on RF replicas. The consistency level decides how many replicas must answer: ONE is fast and stays available when nodes fail but can return stale data; QUORUM on both reads and writes guarantees you read your latest write, at the cost of latency and availability. This is PACELC in practice.

    In production: Apache Cassandra, ScyllaDB, Amazon Keyspaces, Azure Managed Instance for Cassandra

See it break, then fix it

Build an architecture, send it a day of traffic and outages, and learn why it holds or fails. Free to start.