Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 1.8
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
5.3 Rebalancing (Expanding and Shrinking your Cluster)
Chapter Sections
Chapters

5.3.3. Swap Rebalance

Version Support Note: 1.8.1

Swap Rebalance functionality was added to Couchbase Server 1.8.1.

Swap Rebalance is an automatic feature that optimizes the movement of data when you are adding and removing the same number of nodes within the same operation. The swap rebalance optimizes the rebalance operation by moving data directly from the nodes being removed to the nodes being added. This is more efficient than standard rebalancing which would normally move data across the entire cluster.

Tip

Swap rebalance can be used during an upgrade process to upgrade all the nodes of the cluster, without requiring data to be moved around the cluster degrading the performance. For more information, Section 2.3.1.1, “Upgrading to Couchbase Server 1.8.1 Using Swap Rebalance”.

Swap rebalance only occurs if the following are true:

Note

Swap rebalance occurs automatically if the number of nodes being added and removed are identical. There is no configuration or selection mechanism to force a swap rebalance. If a swap rebalance cannot take place, then a normal rebalance operation will be used instead.

When Couchbase Server 1.8.1 identifies that a rebalance is taking place and that there are an even number of nodes being removed and added to the cluster, the swap rebalance method is used to perform the rebalance operation.

When a swap rebalance takes place, the rebalance operates as follows:

For example, if you have a cluster with 20 nodes in it, and configure two nodes (X and Y) to be added, and two nodes to be removed (A and B):

The benefits of swap rebalance are:

The behaviour of the cluster during a failover and rebalance operation with the swap rebalance functionality affects the following situations: