Definition
Consistent hashing is a technique for distributing keys across a changing set of nodes so that membership changes move as little data as possible. Nodes and keys are both hashed onto a conceptual ring; each key belongs to the first node clockwise from it. When a node joins or leaves, only the keys in that node's segment move — roughly 1/N of the total — while naive modulo hashing (hash(key) % N) would remap almost every key.
The name refers to keys staying consistently placed as membership changes, not to consistency guarantees — a common confusion. Production systems add virtual nodes (each physical node appears at many ring positions) to smooth out load imbalance from uneven hashing.
How it comes up in interviews
This is the standard answer to "what happens to your cache cluster when you add a node?" — with modulo hashing, a resize causes a cache-miss storm that can crush the database behind it. Interviewers listen for the 1/N remapping property and for virtual nodes as the load-balancing refinement.