You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Hontvári József Levente <ho...@flyordie.com> on 2012/03/05 12:13:07 UTC

Rationale behind incrementing all tokens by one in a different datacenter (was: running two rings on the same subnet)

I am thinking about the frequent example:

dc1 - node1: 0
dc1 - node2: large...number

dc2 - node1: 1
dc2 - node2: large...number + 1

In theory using the same tokens in dc2 as in dc1 does not significantly 
affect key distribution, specifically the two keys on the border will 
move to the next one, but that is not much. However it seems that there 
is an unexplained requirement (at least I could not find an 
explanation), that all nodes must have a unique token, even if they are 
put into a different circle by NetworkTopologyStrategy.




On 2012.03.05. 11:48, aaron morton wrote:
> Moreover all tokens must be unique (even across datacenters), although 
> - from pure curiosity - I wonder what is the rationale behind this.
Otherwise data is not evenly distributed.

Re: Rationale behind incrementing all tokens by one in a different datacenter (was: running two rings on the same subnet)

Posted by Jeremiah Jordan <je...@morningstar.com>.
There is a requirement that all nodes have a unique token.  There is 
still one global cluster/ring that each node needs to be unique on.  The 
logically seperate rings that NetworkTopologyStrategy puts them into is 
hidden from the rest of the code.

-Jeremiah

On 03/05/2012 05:13 AM, Hontvári József Levente wrote:
> I am thinking about the frequent example:
>
> dc1 - node1: 0
> dc1 - node2: large...number
>
> dc2 - node1: 1
> dc2 - node2: large...number + 1
>
> In theory using the same tokens in dc2 as in dc1 does not 
> significantly affect key distribution, specifically the two keys on 
> the border will move to the next one, but that is not much. However it 
> seems that there is an unexplained requirement (at least I could not 
> find an explanation), that all nodes must have a unique token, even if 
> they are put into a different circle by NetworkTopologyStrategy.
>
>
>
>
> On 2012.03.05. 11:48, aaron morton wrote:
>> Moreover all tokens must be unique (even across datacenters), 
>> although - from pure curiosity - I wonder what is the rationale 
>> behind this.
> Otherwise data is not evenly distributed.