Memcached distributed algorithm-consistent hashing
Preface:
We know that data should be stored on M servers. The simplest way is to take the remainder (hash_value % m) and put it on the corresponding server, that is, when a server is added or
There are many algorithms available for load Balancing in server load equalization, including: round Robin (Round Robin), hash algorithm (hash), least join algorithm (least Connection), Response speed algorithm (Response time), Weighted method
The traditional distributed algorithmBefore understanding the Redis distributed algorithm, it is better to understand the application scenario in the cache, after understanding the application scenario, then to understand the consistency hashing
On the consistent hashing algorithm, there are many blog posts on the Web are explained. 2 recommended. Http://blog.codinglabs.org/articles/consistent-hashing.html http://blog.csdn.net/cywosp/article/details/23397179 To summarize: 1. Online blog
Document directory
What does memcached mean by its distributed architecture?
Scattered Based on remainder Calculation
Disadvantages of scattered calculation based on Remainder
A brief description of consistent hashing
Function libraries
This blog is written because of a previous interview question:What happens to data on other machines if the memcached cluster needs to increase the machine or reduce the machine?Finally learned that the use of consistent hash algorithm can be solved,
This series of articles navigation
Memcached completely parse –1. The foundation of Memcached
memcached comprehensive analysis of –2. Understanding memcached Memory Storage
Memcached comprehensively analyze the deletion mechanism and development
What does the distributed memcached of memcached mean. Cache::memcached distributed method based on remainder calculation scatter disadvantage consistent hashing consistent hashing simple description support consistent hashing function library
Series article Navigation:
Memcached completely dissect –1. The foundation of Memcached
memcached comprehensive analysis of –2. Understanding the memory storage of memcached
memcached comprehensive analysis of –3. The deletion mechanism and
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.