Why is consistent hashing superior to standard modulo hashing in distributed clusters?
Standard modulo hashing (hash(key) % N) invalidates nearly 100% of cached keys whenever a node joins or leaves the cluster. Consistent hashing maps keys and nodes to a virtual ring, ensuring that adding or removing a node only migrates 1/N of keys.
Answered in
12 Core Architectural Concepts: Load Balancing, Caching, Sharding, and Circuit BreakersA comprehensive architectural reference: load balancing, CDNs, sharding, consistent hashing, rate limiting, circuit breakers, and event-driven queues.
Read the full analysisOther questions this article answers
More system design & architecture questions
- What is the architectural difference between an API Gateway and a Reverse Proxy?
- When should an architecture use Layer 4 instead of Layer 7 load balancing?
- How do edge ingress layers prevent backend cascading thundering herds?
- What algorithm is best for sticky sessions without breaking even distribution?
- How can a CDN improve performance for dynamic requests?
- What is the hardest part of operating behind a CDN?
- How can a CDN help with traffic surges or DDoS attacks?
- What is the difference between a Push CDN and a Pull CDN?
Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the System Design & Architecture beat.