Prepare for the Cassandra Test with flashcards and multiple-choice questions, each with detailed hints and explanations. Elevate your skills and excel in your exam!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which parameter in the cassandra.yaml file configures vnodes?

  1. -num_tokens

  2. -num_nodes

  3. -num_vnodes

  4. -set_numnodes

The correct answer is: -num_tokens

The parameter that configures virtual nodes (vnodes) in the cassandra.yaml file is indeed -num_tokens. This setting determines the number of tokens to be assigned to each node in the cluster. A vnode is a portion of the keyspace that is responsible for storing a certain range of keys. By using vnodes, each node can be assigned multiple tokens, which allows for better data distribution and load balancing across the cluster. Having more tokens improves the cluster’s fault tolerance and allows for easier management of the data distribution. Specifically, if a node goes down, the tokens that belong to that node can be quickly redistributed to other nodes, minimizing the impact on data availability. Consequently, setting the correct number of tokens is crucial for optimizing Cassandra's performance and reliability. The other options do not directly relate to the configuration of vnodes. The -num_nodes parameter, for example, might suggest control over the number of nodes in the cluster but does not partition the data in the same way as vnodes. Similarly, the -num_vnodes and -set_numnodes options do not exist as valid parameters in the cassandra.yaml file, thus reinforcing that -num_tokens is the correct configuration for vnodes.