What is the max(vnodes) num_token we can keep at one node ?
The maximum number of tokens configurable per node in Cassandra is 1,536.
For reference, here is the configuration in
DatabaseDescriptor.java in C* 3.11.6:
private static final int MAX_NUM_TOKENS = 1536;
However, we don't recommend assigning a large number of tokens to nodes. It is no longer recommended to assign 256 as it was for a number of years since large values impact the performance of nodes and operations such as repairs.
The recommendation is to allocate either 8 or 16
num_tokens per node. There will be a slight skew in the distribution of data but the algorithm for
allocate_tokens_for_keyspace should offset it. If unbalanced data is a real concern, assign 32 tokens but be aware of the tradeoffs. As always, you should test exhaustively based on your use case, data model and expected access patterns. Cheers!
6 People are following this question.