Configuring and using virtual nodes (vnodes)
A description of virtual nodes (vnodes) and using them in different types of datacenters. Also steps for disabling vnodes.
Virtual nodes simplify many tasks in Cassandra, such as eliminating the need to determine the partition range (calculate and assign tokens), rebalancing the cluster when adding or removing nodes, and replacing dead nodes. For a complete description of virtual nodes and how they work, see About virtual nodes, and the Virtual nodes in Cassandra 1.2 blog.
Guidelines for using virtual nodes
In the cassandra.yaml file, uncomment num_tokens and leave the initial_token parameter unset. Guidelines for using virtual nodes include:
- Determining the num_tokens value:
The recommended initial value for num_tokens is 256. For more guidance, see Setting up virtual nodes.
- Migrating existing clusters:
To upgrade existing clusters to vnodes, see Enabling virtual nodes on an existing production cluster.
- Using vnodes in a mixed architecture deployment:Cassandra supports using virtual node-enabled and non-virtual node datacenters. For example, a single cluster with:
- A cassandra-only datacenter running OLTP.
- A analytics datacenter without vnodes
- A search datacenter with vnodes.