The consistent hashing algorithm (consistent Hashing algorithms) is a common algorithm in a distributed system. The traditional hash algorithm, when slot (slot) increases or decreases, faces all data re-deployment problems, and the consistent
The consistent hashing algorithm (consistent Hashing algorithms) is a frequently used algorithm in a distributed system.The traditional hash algorithm, when slot (slot) increases or decreases, faces the problem of all data being deployed again. The consistent
Reproduced from: http://blog.csdn.net/cywosp/article/details/23397179/
Reprint please indicate the source: http://blog.csdn.net/cywosp/article/details/23397179 consistent hashing algorithm a distributed hash (DHT) implementation algorithm proposed by MIT in 1997, The design goal is to solve the hot spot problem in the Internet, the original intention and carp very similar.
In this paper, we share the principle of--consistent hashing algorithm and Java implementation, as well as the effect test, in order to realize some key techniques used in distributed task scheduling system.Background introductionConsistency hashing is often used in distributed systems to minimize the data migration overhead associated with node changes. The
1. DescriptionA distributed hash (DHT) implementation algorithm, proposed by MIT in 1997, was designed to address hot spot problems in the Internet, with a similar intent to carp.The consistent hash corrects the problem caused by the simple hashing algorithm used by carp, so that distributed hashing (DHT) can be really applied in the peer-to-peer environment.2. P
Until now, consistent hashing has not been clearly defined. Most documents still describe consistent Hashing Based on their application scenarios. "Hash" must have been understood by everyone. The question is "consistency "?
Consistency
Before discussing consistent hash,
The origin and introduction of the consistent hashing algorithm it's not going to be said, this is typically used for distributed caching, for handling cached data and for the correspondence between multiple cache servers.The personal understanding is that if you can get to the data from the cache server is the cache hit, directly from the cache server to obtain data, if you die from the underlying server t
Source: Zhi Welcome to share the original to Bole headlinesa.PrefaceThe consistent hash (consistent Hashing), first proposed by MIT's Karger in 1997, is primarily used to address the service shocks caused by outages and expansions in volatile distributed web systems. Now the idea of the algorithm has been widely used, and in practice has been a great development.
a . PrefaceThe consistent hash (consistent Hashing), first proposed by MIT's Karger in 1997, is primarily used to address the service shocks caused by outages and expansions in volatile distributed web systems. Now the idea of the algorithm has been widely used, and in practice has been a great development.two . Algorithm Design1. Source of the problemA service c
Consistent hashing is mainly used in large-scale high-availability distributed storage, especially for KV storage, such as memcaced, Redis cluster, compared to ordinary hash% N, but the advantage is that when adding or deleting nodes, the data migration will be relatively small, usually only partial jitter and migration. But its relative to the shortcomings of th
every time the server is not fixed. The determination of the Memcacha server depends mainly on the algorithm indicated above. Here we discuss the consistent hashing algorithm which is widely used in the cache system.
1 Basic scenarios:
For example, you have n cache server (behind the cache), then how to map an object to the n cache, you are likely to use similar to the following common method to compute t
Since there is a consistent hash, there must be an inconsistent hash, why is it that no one usually says inconsistent hashing? Because the common hash is inconsistent, it is not decorated, to the consistency of the hash is special to add a description of the word decoration.Hashing is generally a large number of the mold and then dispersed into different barrels, assuming we have only two barrels, there are
Consistent hashing algorithm-balance-Virtual nodeThe consistent hashing algorithm is a common algorithm in distributed systems. For example, a distributed storage system, to store data on a specific node, if the use of ordinary hash method, the data mapped to a specific node, such as Key%n,key is the data key,n is the
algorithm is only to help us reduce the number of machines in the cache cluster increase or decrease, the cache data can be rebuilt at least. As long as the number of servers in the cache cluster changes, data hit issues inevitably occur2, for the data distribution balance problem, through the idea of virtual node to achieve a balanced distribution. Of course, the fewer cache server nodes we need, the more virtual nodes are needed to balance the load.3, our cache client does not maintain a map
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 Examples of the result of the hash value is defined in 0-232-1, is actually not necessary, you can set a smaller than t
Brief Introduction
Last blog I briefly introduced the basic idea of the consistent hashing algorithm. However, the consistent hashing algorithm is also accompanied by the emergence of a new problem, that is, when a server node is dead, its task will be assigned to its next server node, then this is against the distrib
The consistent hashing algorithm is a common algorithm in distributed systems. For example, a distributed storage system, to store data on a specific node, if the use of ordinary hash method, the data mapped to a specific node, such as Key%n,key is the data key,n is the number of machine nodes, if a machine joins or exits the cluster, then all the data map is invalid , if you are persisting the storage to d
and the corresponding value.Defects:If a host is down or a host is added (it must be considered), the algorithm will result in a large number of cache failures (calculated to other hosts that do not cache the data), the database, etc. suddenly bear a huge load, it is likely to cause the DB service is not available and so on.----------------------------------------------------------------Three, the principle of consistent
Consistency hash Algorithm consistent HashingFor the original hash algorithm hash%nSo ...1. Words do not say more directly on the code, the principle or the detailed self-Baidu canimport Cn.pheker.utils.UtilElapsedTime;import Cn.pheker.utils.UtilLogger;import cn.pheker.utils.UtilMD5;import java.util.*;/*** >* Author Cn.pheker* Date 2018/3/19 10:20* Email [email protected]* desc consistent
up and down node information, but also to know the indirect node information of a certain depth n jump, and to maintain the node list dynamically.Consistent hashing basically solves the most critical problem in a peer-to-peer environment-how to distribute storage and routing in a dynamic network topology. Each node only needs to maintain a small number of neighboring nodes, and when the node joins/exits the system, only a small number of related node
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.