cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Grasso <>
Subject Re: How to set up a cluster with allocate_tokens_for_keyspace?
Date Mon, 06 May 2019 02:47:14 GMT

If you are planning on setting up a new cluster with
allocate_tokens_for_keyspace, then yes, you will need one seed node per
rack. As Jon mentioned in a previous email, you must manually specify the
token range for *each* seed node. This can be done using the initial_token

The article you are referring to (
includes python code which calculates the token ranges for each of the seed
nodes. When calling that python code, you must specify the vnodes - number
of token per node and the number of racks.


On Sat, 4 May 2019 at 19:14, onmstester onmstester
<> wrote:

> I just read this article by tlp:
> Noticed that:
> >>We will need to set the tokens for the seed nodes in each rack
> manually. This is to prevent each node from randomly calculating its own
> token ranges
>  But until now, i was using this recommendation to setup a new cluster:
> >>
> You'll want to set them explicitly using: python -c 'print( [str(((2**64 / 4) * i) -
2**63) for i in range(4)])'
> After you fire up the first seed, create a keyspace using RF=3 (or whatever you're planning
on using) and set allocate_tokens_for_keyspace to that keyspace in your config, and join the
rest of the nodes. That gives even
> distribution.
> I've defined plenty of racks in my cluster (and only 3 seed nodes), should
> i have a seed node per rack and use initial_token for all of the seed nodes
> or just one seed node with inital_token would be ok?
> Best Regards

View raw message