You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Semb Wever (Jira)" <ji...@apache.org> on 2020/11/07 16:12:00 UTC

[jira] [Comment Edited] (CASSANDRA-16205) Offline token allocation strategy generator tool

    [ https://issues.apache.org/jira/browse/CASSANDRA-16205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227818#comment-17227818 ] 

Michael Semb Wever edited comment on CASSANDRA-16205 at 11/7/20, 4:11 PM:
--------------------------------------------------------------------------

An offline discussion with [~paulo] came to the following points
- This is an advanced use-case, as the allocation strategy introduced (and having it defined for RF=3 and {{num_tokens:16}}) is intended to automate and simplify the operator installation and bootstrap experience. The use of this script takes away from that, so we shouldn't be encouraging/publicising it. For this reason the doc page, and the binaries in the packaging {{$PATH}}, has been removed.
 - It would be nice to get json output, so the script was easier to script against.
 - It would be nice to extend the script so it can be used when adding a batch of nodes to an existing cluster.
 - The purpose of the script is to pre-generate tokens for a large number of nodes, using the exact same algorithm as if the nodes were bootstrapping and generating their own tokens. With pre-generated tokens bootstrapping nodes still has to happen sequentially, the exception if {{auto_bootstrap}} is disabled. Pre-generated tokens may also be useful for configuration management scripts, and when it's necessary to know the tokens before first starting and bootstrapping node.
 - Splitting the ring into perfectly balanced token rages is another way to pre-generate tokens. While the ring is perfectly balanced for those nodes, the allocation strategy generated tokens ensure the ring remains reasonably balanced as nodes are added/removed. This also means that the script can be used to pre-generate tokens for more nodes than initially planned for, and the ring will still be reasonably balanced. 
 - Using the allocation strategy when pre-generating tokens also avoids the token clashes compared to perfectly splitting the token ring by token count.


was (Author: michaelsembwever):
An offline discussion with [~paulo] came to the following points
- This is an advanced use-case, as the allocation strategy introduced (and having it defined for RF=3 and {{num_tokens:16}}) is intended to automate and simplify the operator installation and bootstrap experience. The use of this script takes away from that, so we shouldn't be encouraging/publicising it. For this reason the doc page, and the binaries in the packaging {{$PATH}}, has been removed.
 - It would be nice to get json output, so the script was easier to script against.
 - It would be nice to extend the script so it can be used when adding a batch of nodes to an existing cluster.
 - The purpose of the script is to pre-generate tokens for a large number of nodes, using the exact same algorithm as if the nodes were bootstrapping and generating their own tokens. With pre-generated tokens bootstrapping nodes still has to happen sequentially, the exception if {{auto_bootstrap}} is disabled. Pre-generated tokens may also be useful for configuration management scripts, and when it's necessary to know the tokens before first starting and bootstrapping node.
 - Splitting the ring into perfectly balanced token rages is another way to pre-generate tokens. While the ring is perfectly balanced for those nodes, the allocation strategy generated tokens ensure the ring remains reasonably balanced as nodes are added/removed. This also means that the script can be used to pre-generate tokens for more nodes than initially planned for, and the ring will still be reasonably balanced.

> Offline token allocation strategy generator tool
> ------------------------------------------------
>
>                 Key: CASSANDRA-16205
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16205
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local/Config, Local/Scripts
>            Reporter: Michael Semb Wever
>            Assignee: Michael Semb Wever
>            Priority: Normal
>
> A command line tool to generate tokens (using the allocate_tokens_for_local_replication_factor algorithm) for pre-configuration of {{initial_tokens}} in cassandra.yaml.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org