Problem Statement
When a distributed system adds or removes servers, a naive hashing method causes most keys to remap to different servers. This leads to massive cache misses or data reshuffling, causing high latency and instability.
┌─────────────┐ │ Hash Ring │ │ │ │ ● Server A │ │ ↑ │ │ ● Server B │ │ ↑ │ │ ● Server C │ │ │ │ ● Key 1 → Server B │ ● Key 2 → Server C │ ● Key 3 → Server A └─────────────┘
This diagram shows servers and keys placed on a circular hash ring. Each key maps to the next server clockwise, illustrating how consistent hashing distributes keys.