1

I am new at Cassandra, and I believe I setup all the configurations. Now after reading for a while I came across a setup article, and I found a difference between my setup and what was being explained.

Here is a Screenshot my configuration. enter image description here Now my question is, what is Tokens for? and How can I change it to 256?

Thanks a lot in advance!

user2597012
  • 581
  • 4
  • 9
  • 28

1 Answers1

1

If you use the virtual nodes features, then you can set the number of tokens to a value like 256, and this will allow Cassandra to automatically load balance your data when nodes are added or removed from a cluster.

There are two fields in cassandra.yaml that control the use of virtual nodes: ".. don’t set the initial_token parameter in your conf/cassandra.yaml and instead enable the num_tokens parameter. A good default value for this is 256." See more information here. You would also generally set partitioner: org.apache.cassandra.dht.Murmur3Partitioner

If you want to change the number of virtual nodes on an existing node, you need to rebuild the data on the node. See this.

Community
  • 1
  • 1
Jim Meyer
  • 9,275
  • 1
  • 24
  • 49
  • Thanks Jim! I started working on it, and I was able to change the seed's tokens and I am making my way towards the others. I just have one question, and I hope you can answer it. The tokens num, does it have to do anything with how fast the reads are? – user2597012 Sep 19 '15 at 08:45
  • As far as I know, using virtual nodes doesn't impact the read time, but I'm not sure. I have read that using vnodes will slow down repair time since each token is repaired separately. – Jim Meyer Sep 19 '15 at 10:22
  • Thanks Jim, I will test and let you know. – user2597012 Sep 19 '15 at 10:28