cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onmstester onmstester <onmstes...@zoho.com>
Subject Re: Re: Re: how to configure the Token Allocation Algorithm
Date Tue, 02 Oct 2018 06:31:02 GMT
Sent using Zoho Mail ---- On Mon, 01 Oct 2018 18:36:03 +0330 Alain RODRIGUEZ <arodrime@gmail.com>
wrote ---- Hello again :), I thought a little bit more about this question, and I was actually
wondering if something like this would work: Imagine 3 node cluster, and create them using:
For the 3 nodes: `num_token: 4` Node 1: `intial_token: -9223372036854775808, -4611686018427387905,
-2, 4611686018427387901` Node 2: `intial_token: -7686143364045646507, -3074457345618258604,
1537228672809129299, 6148914691236517202` Node 3: `intial_token: -6148914691236517206, -1537228672809129303,
3074457345618258600, 7686143364045646503`  If you know the initial size of your cluster,
you can calculate the total number of tokens: number of nodes * vnodes and use the formula/python
code above to get the tokens. Then use the first token for the first node, move to the second
node, use the second token and repeat. In my case there is a total of 12 tokens (3 nodes,
4 tokens each) ``` >>> number_of_tokens = 12 >>> [str(((2**64 / number_of_tokens)
* i) - 2**63) for i in range(number_of_tokens)] ['-9223372036854775808', '-7686143364045646507',
'-6148914691236517206', '-4611686018427387905', '-3074457345618258604', '-1537228672809129303',
'-2', '1537228672809129299', '3074457345618258600', '4611686018427387901', '6148914691236517202',
'7686143364045646503'] ``` Using manual initial_token (your idea), how could i add a new node
to a long running cluster (the procedure)?
Mime
View raw message