Consistent Hashing
Updated 2026-07-30
Summary
Consistent hashing is a special kind of hashing algorithm. With consistent hashing, a change in the number of slots (size) of the hash table requires remapping on average only K/n keys, where K is the number of keys and n is the number of slots...
Definition
A special hashing algorithm. When the size of the hash table (e.g., the number of servers) changes, only a small fraction of data needs to be remapped, without reshuffling all data. It solves the thrashing problem during scaling in distributed systems. Scaffold use: Smoothly scalable architecture. When designing organizational structures or rules, consider future 'scaling'. A good system (like consistent hashing) minimizes disruption to existing systems when adding new people or departments, without needing to start over.
Introduction
How to use
Smoothly scalable architecture. When designing organizational structures or rules, consider future 'scaling'. A good system (like consistent hashing) minimizes disruption to existing systems when adding new people or departments, without needing to start over.
Mechanism
Map both nodes and data keys onto a circular hash space. When nodes are added or removed, only the data in the affected range is reassigned to adjacent nodes, reducing the rebalancing cost from O(N) to O(K/N).
Practice
In progress 0/1Practice this model in one real situation:
Cases
- Distributed caches (e.g., Memcached/Dynamo) use consistent hashing to reduce data migration during node changes.
Common pitfalls
- Not using virtual nodes leads to load skew; improper ring space selection causes uneven distribution; ignoring replica placement strategies.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E4%B8%80%E8%87%B4%E5%93%88%E5%B8%8Cverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS