cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AJ>
Subject Re: Docs: Token Selection
Date Thu, 16 Jun 2011 13:39:53 GMT
Thanks Eric!  I've finally got it!  I feel like I've just been initiated 
or something by discovering this "secret".  I kid!

But, I'm thinking about using OldNetworkTopStrat.  Do you, or anyone 
else, know if the same rules for token assignment applies to ONTS?

On 6/16/2011 7:21 AM, Eric tamme wrote:
> AJ,
> sorry I seemed to miss the original email on this thread.  As Aaron
> said, when computing tokens for multiple data centers, you should
> compute them independently for each data center - as if it were its
> own Cassandra cluster.
> You can have "overlapping" token ranges between multiple data centers,
> but no two nodes can have the same token, so for subsequent data
> centers I just increment the tokens.
> For two data centers with two nodes each using RandomPartitioner
> calculate the tokens for the first DC normally, but int he second data
> center, increment the tokens by one.
> In DC 1
> node 1 = 0
> node 2 = 85070591730234615865843651857942052864
> In DC 2
> node 1 = 1
> node 2 =  85070591730234615865843651857942052865
> For RowMutations this will give each data center a local set of nodes
> that it can write to for complete coverage of the entire token space.
> If you are using NetworkTopologyStrategy for replication, it will give
> an offset mirror replication between the two data centers so that your
> replicas will not get pinned to a node in the remote DC.  There are
> other ways to select the tokens, but the increment method is the
> simplest to manage and continue to grow with.
> Hope that helps.
> -Eric

View raw message