首页 > 其他 > 详细

consist hashing

时间:2021-08-17 10:41:11      阅读:21      评论:0      收藏:0      [点我收藏+]

1.why do we consist hashing?

 Consist hashing is a kind of hashing that when hash table is resized , only keys/slots of keys need to be remapped on average.

 

2.what is consist hashing?

 We can consider consist hashing as a hash ring, the ring has been divided 360(in the real condition it‘s 232).

 When we add a node , we would randomly select K point from the ring.

 

3.what is the advantage of consist hashing?

  •   when we add/remove a new node, least of data will be affected.
  •   because we use the virtual nodes mechnism (one real node will process several virtual nodes data), so when we remove a node, it would not give the impact to a single node(since there‘are several virtual nodes).
  •   data can be more balanced assigned to nodes

 

4.how to implement the consist hashing?

the related algrithm to understand the consist hashing: 

https://www.lintcode.com/problem/520/

consist hashing

原文:https://www.cnblogs.com/cynrjy/p/15150766.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!