stephen9834 avatar image
stephen9834 asked Erick Ramirez commented

Help needed on allocation algorithm and vnode configurations

I am creating 3 node cluster having 2 dc . planning configuration as dc1=2 node (1 seed and 1 node) and dc2=(1 solr node ) . As per datastax documentation for solr recommended num token value is 8 and one note is there like ensure that allocate_tokens_for_local_replication_factor option in cassandra.yaml is correctly configured for your environment can you please explain what exactly need to configure ( i will use RF dc1=2 , dc2=1 along with network strategy) . this is confusing me like do we need to use allocation algorithm while creating new cluster or this is only applicable while adding new node to existing cluster. could you please guide what should i configure to avoid future unbalence in cluster .

virtual nodes
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered Erick Ramirez commented

With only two + one nodes, there isn't anything for you to worry about. The token allocation algorithm isn't relevant at all.

Note that our recommendation is a minimum of three nodes with a replication factor of three in each DC for production environments. Cheers!

2 comments Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Thanks . just one query on your answer If we wish to add more node in cluster in future then do we need to use allocation algorithm ? if yes then could you please explain with example how should we add and enable allocation algorithm?

0 Likes 0 ·

As it states in the document you linked, the allocation algorithm optimises the workload (data load) of nodes by picking tokens so the data size is balanced across nodes. So yes, we recommend using it.

If your app keyspace has a replication factor of 3 (recommended), configure the algorithm with:

allocate_tokens_for_local_replication_factor: 3
0 Likes 0 ·