consistent hashing
A way of mapping keys to servers on a ring so that adding or removing a server moves only a small share of keys.
In more detail
Load balancers use it for affinity: the same key reaches the same backend, keeping caches warm. Virtual nodes smooth the spread. A heavy key is still pinned to one backend, and a lost backend's keys all move at once to cold caches.
Related terms
- virtual node — One of many positions a single server takes on a consistent hashing ring, to spread its keys more evenly.
- sticky session — A load balancer setting that sends every request from one client to the same server copy, usually because that copy holds its state in memory.
- hot key — A single key that receives a large share of all traffic, such as a celebrity account or a popular event.
Taught in
- Load Balancing And The Failure Modes It Introduces — Scalable System Design & Distributed Architecture