Rafael Almeida <almeida...@yahoo.com> wrote:
> I find it hard to explain that without an example. So, let's say the token 
> space
> is actually from 0 to 100 and we have 4 nodes (let's do this in order to make
> things more manageble). In our example, we have the following initial_tokens:
>
> node A = 0
> node B = 20
> node C = 70
> node D = 90
>
> Node A would have 0 - 20 tokens assigned to it (20/100 = 20% of the load).  
> Node
> B would have 70 - 20 = 50 tokens assigned to it (50% of the load). Node C 
> would
> have 90 - 70 = 20 tokens assigned to it (20% of the load) and, finally, node D
> would have 10% of the tokens assigned to it. See how that works?

That's the general idea, but confusingly, the node's token gives the
LAST key that it is responsible for, not the first.  So in your
example the ranges would be:

node A = 91 through 0 (10%)
node B = 1 through 20 (20%)
node C = 21 through 70 (50%)
node D = 71 through 90 (20%)

theo

Reply via email to