cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onmstester onmstester <>
Subject Fwd: Re: how to configure the Token Allocation Algorithm
Date Mon, 01 Oct 2018 10:17:59 GMT
Thanks Alain, What if instead of running that python and having one node with non-vnode config,
i remove the first seed node and re-add it after cluster was fully up ? so the token ranges
of first seed node would also be assigned by Allocation Alg ============ Forwarded message
============ From : Alain RODRIGUEZ <> To : "user"<>
Date : Mon, 01 Oct 2018 13:14:21 +0330 Subject : Re: how to configure the Token Allocation
Algorithm ============ Forwarded message ============ Hello, Your process looks good to me
:). Still a couple of comments to make it more efficient (hopefully). - Improving step 2:
I believe you can actually get a slightly better distribution picking the tokens for the
(first) seed node. This is to prevent the node from randomly calculating its token ranges.
You can calculate the token ranges using the following python code:  $ python # Start the
python shell [...] >>> number_of_tokens = 8 >>> [str(((2**64 / number_of_tokens)
* i) - 2**63) for i in range(number_of_tokens)] ['-9223372036854775808', '-6917529027641081856',
'-4611686018427387904', '-2305843009213693952', '0', '2305843009213693952', '4611686018427387904',
'6917529027641081856'] Set the 'initial_token' with the above list (coma separated list) and
the number of vnodes to 'num_tokens: 8'. This technique proved to be way more efficient (especially
for low token numbers / small number of nodes). Luckily it's also easy to test.
View raw message