Load Balancing Algorithm — Part 2:Consistent Hashing

lance
Javarevisited
Published in
5 min readJul 13, 2022

--

Want to know why Redis and Memcached are so scalable?

In a previous article, we learned about four load balancing algorithms and simply implemented them using Java.

In this article, we know that many distributed cache systems use hash algorithm for load balancing. Because of the scalability requirements of distributed cache, almost all distributed cache systems use the optimized hash algorithm — The consistent hashing algorithm. Today, let’s learn more about the consistent hash algorithm.

Considering that every node in the distributed system is likely to collapse, new nodes are likely to be added dynamically. In order to provide good services to the outside world when the cluster nodes change dynamically, especially in the distributed cache system, the consistent hash algorithm is particularly critical. The consistency hash algorithm of a good distributed cache system needs to consider the following points:

Balance

--

--