[sheepdog] [PATCH] sheep: improve the consistent hashing
HaiTing Yao
yaohaiting.wujue at gmail.com
Tue May 29 05:31:39 CEST 2012
On Fri, May 25, 2012 at 2:29 PM, <yaohaiting.wujue at gmail.com> wrote:
> From: HaiTing Yao <wujue.yht at taobao.com>
>
> On the consistent hash ring, member change should only influence its
> neighbors. Now every member change leads to whole cluster recovery.
>
> 1, Some node need not to start recovery.
>
> 2, One node does recovery, it need not to connect to all of other nodes
> to get its object list.
>
> Signed-off-by: HaiTing Yao <wujue.yht at taobao.com>
It seems nobody has interests on the patch. The hash changes is
difficult. The first steps to improve the hash may be obscure and
ugly.
1, To make things simple, assume every node has one virtual node
One cluster has ten nodes, and data has three copies, and partition like this
A 10 B 15 C 25 D 30 E 40 F 50 G 70 H 80 I 85 J 90
One new node K wants to join the cluster, and its partition is 20.
The affect nodes is A B K C D, only these nodes need recovery data,
not all of nodes. The affected nodes only get objects list from A B K
C D, not all of nodes.
2, One node have multible vnodes
One node must have multible vnodes now.
Lets consider the abov example. Let's assume the ten existed nodes
have 64 vnodes by default. If K still has 64 vnodes, althogh there is
chance that some nodes maybe not be affected by theory, but I think
all of nodes need recovery data by fact. If K has two or three vnodes,
then the benefit can be seen.
Thanks
Haiti
More information about the sheepdog
mailing list