In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
What is the consistent HASH algorithm? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
Consistent HASH algorithm is a special HASH algorithm, which aims to solve the problem of distributed cache. When removing or adding a server, it can change the mapping relationship between the existing service request and the processing request server as little as possible.
Adaptive condition of hash algorithm
Equilibrium (Balance)
Balance means that the results of the hash can be distributed to all buffers as much as possible, so that all buffers can be utilized. Many hash algorithms can meet this condition.
Monotonicity (Monotonicity)
Monotonicity means that if some content has been allocated to the corresponding buffer through hashing, and a new buffer is added to the system, then the result of the hash should be able to ensure that the original allocated content can be mapped to the new buffer, but not to other buffers in the old buffer set. (this translation message has negative value. When the buffer size changes, the consistent hash (Consistent hashing) tries to protect the allocated content from being remapped to the new buffer. )
Dispersion (Spread)
In a distributed environment, the terminal may not see all the buffers, but only some of them. When the terminal wants to map the content to the buffer through the hashing process, the buffer range seen by different terminals may be different, resulting in inconsistent hash results. the end result is that the same content is mapped to different buffers by different terminals. This situation should obviously be avoided because it causes the same content to be stored in different buffers, reducing the efficiency of system storage. Dispersion is defined as the severity of the above situation. A good hash algorithm should be able to avoid inconsistencies as much as possible, that is, to minimize dispersion.
Load (Load)
The load problem actually looks at the problem of decentralization from another perspective. Since different terminals may map the same content to different buffers, it may also be mapped to different content by different users for a particular buffer. Like dispersion, this situation should be avoided, so a good hashing algorithm should be able to minimize the buffer load.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 294
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.