On Wed, Mar 20, 2013 at 3:18 PM, Tycen Stafford <tstaff...@medio.com> wrote:

> I don’t think that’s correct for a mult-dc ring, but you’ll want to hear a
> final answer from someone more authoritative.  I could easily be wrong.
> Try using the built in token generating tool (token-generator) – I don’t
> seem to have it on my hosts (1.1.6 also) so I can’t confirm.  I used the
> tokentoolv2.py tool (from here
> http://www.datastax.com/docs/1.0/initialize/token_generation) and got the
> following (which looks to me evenly spaced and not using offsets):
>
> tstafford@tycen-linux:Cassandra$ ./tokentoolv2.py 3 3****
>
> {****
>
>     "0": {****
>
>         "0": 0, ****
>
>         "1": 56713727820156410577229101238628035242, ****
>
>         "2": 113427455640312821154458202477256070485****
>
>     }, ****
>
>     "1": {****
>
>         "0": 28356863910078205288614550619314017621, ****
>
>         "1": 85070591730234615865843651857942052863, ****
>
>         "2": 141784319550391026443072753096570088106****
>
>     }****
>
> }
>

For multi-DC clusters, the only requirement for a balanced cluster is that
all tokens within a DC must be balanced; you can basically treat each DC as
a separate ring (as long as your tokens don't line up exactly).  So, either
using an offset for the second DC or evenly spacing all nodes is acceptable.

-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Reply via email to