Rebalance single-token clusters
|
Manual rebalancing isn’t necessary for clusters that use virtual nodes (vnodes) due to automatic redistribution of tokens. |
A cluster is considered balanced when each node is responsible for an equal range of data. OpsCenter determines cluster balance by evaluating the partitioner token ranges assigned to each node. Even if a cluster is considered balanced, it is possible that some nodes have more data relative to others because balance considers only the number of rows (not the size of rows) managed by each node.
For clusters that use a single-token architecture to distribute partition token ranges, you must manually rebalance the cluster periodically. Rebalancing prevents hotspots where one node is responsible for a disproportionate amount of data. Typically, this is required only when changing the cluster topology, such as by adding or removing nodes, or changing the replica placement strategy.
Prerequisites
-
OpsCenter only supports rebalancing on single-token clusters using the RandomPartitioner or Murmur3Partitioner. The OrderedPartitioner isn’t supported.
-
If you use OpsCenter role-based security, rebalancing a cluster requires a role with the Cluster Topology: Rebalance Cluster permission.
Rebalancing workflow
When rebalancing a cluster, OpsCenter performs the following actions:
-
Calculates appropriate token ranges for each node and identifies nodes that need to move, if any.
The optimal path to rebalance clusters with approximately 100 or fewer nodes is determined by calculating the number of moves required and how much streaming data those moves would entail. For clusters with more nodes, the optimal path is calculated based on the number of moves to expedite the rebalancing process.
-
Makes sure that there is appropriate free space to perform the rebalancing.
-
Moves nodes one node at a time so as to lessen the impact on the cluster workloads.
A move operation involves changing the partitioner token assignment for the node, thus changing the range of data that the node is responsible for. A move streams data from other nodes.
-
Runs cleanup after a move is complete on a node.
A cleanup operation removes rows that a node is no longer responsible for.
Rebalance a cluster with OpsCenter
-
In the OpsCenter navigation menu, click the name of the cluster that you want to rebalance.
-
Click Cluster Actions, and then select Rebalance Cluster.
This option is disabled if the cluster uses vnodes or you don’t have the required permissions to rebalance a cluster. Clusters that use vnodes automatically rebalance tokens. For information about the required permissions, see Prerequisites.
OpsCenter checks if the token ranges are evenly distributed across the nodes in the cluster, and then determines how to proceed:
-
If the cluster is already balanced, OpsCenter shows a message that rebalancing isn’t necessary at this time.
-
If the cluster requires a rebalance, the Rebalance Cluster dialog shows the Proposed and Current distribution of tokens.

-
-
If rebalancing is required, click Current and Proposed to compare the token distribution before and after rebalancing.
-
In the Delay Between Moves field, enter the interval in seconds between node moves during rebalancing.
-
Recommended: Don’t select Skip disk space check.
The disk space check verifies that there is enough disk space available for rebalancing. DataStax recommends that you always allow OpsCenter to check disk space during rebalancing. Skip this check only if it causes problems with rebalancing or is impossible to perform.
-
Click Start Rebalance.
-
To monitor the ongoing rebalance operation, click Activities.
-
If a rebalance operation is cancelled before all nodes are moved, click Rebalance Cluster again to resume.
Imbalanced cluster alerts
For monitoring purposes, you can add an alert for out-of-balance clusters.