Swap Rebalance Online Upgrade

Online upgrade with the swap rebalance is the preferred upgrade method when there is not enough cluster capacity to service requests once an existing node is removed.

Since each upgraded node requires only one rebalance operation, this strategy is also faster than the standard online upgrade.

To perform a swap rebalance online upgrade, first add a new node to the cluster and then perform a swap rebalance to shift data from an existing node to the new one.

The suggested general procedure is to rebalance and remove a node for upgrade, proceed with a swap rebalance operation as if the removed node was an extra or "spare" node; once this is complete, add and rebalance the extra node back into the cluster.

Swap Rebalance Example

You can perform a swap rebalance to upgrade your Couchbase Server nodes without reducing your cluster performance due to diminished capacity from missing nodes.

You need at least one extra node to perform a swap rebalance. If you are unable to perform an upgrade via swap rebalance, perform a standard online upgrade instead.

Without an extra node available

If you don’t have an extra node available and you have enough cluster capacity to service requests after removing one of the nodes, prepare for swap rebalance by first removing an existing node to serve as the initial swap node:

  1. Back up the entire cluster.

  2. Remove one node from the cluster by selecting Manage  Server Nodes  Remove Server for the node you wish to remove.

  3. Click Rebalance.

  4. Proceed with the instructions.

With an extra node available for the rebalance

  1. Install the latest version of Couchbase Server on the extra node that is not yet a part of the cluster. For instructions see Single Node Upgrade.

  2. Create a backup of your cluster data using the cbbackup tool.

  3. Open the Couchbase Web Console on an existing cluster node.

  4. Select Servers  Active Servers to view and manage the cluster nodes:

    upgrade online 01
  5. Click Add Server.

  6. In the Add Server dialog, provide either a hostname or IP address for the new node to be added. Enter your Couchbase Server administrative credentials in the fields Username and Password and select the appropriate service.

    upgrade online 02
  7. Remove one of your existing old nodes from the cluster.

    Under Server Nodes  Servers, click Remove for the node you want to remove to mark it for removal.

  8. In the Servers panel, click Rebalance. The rebalance process moves data from the existing node to your newly added node.

Repeat these steps for all the remaining old nodes in the cluster. You can add and remove multiple nodes from a cluster. However, always add the same number of nodes from the cluster as you remove.

For example, the addition of 4 nodes and the removal of 4 nodes is classed as a swap rebalance, but the addition of 7 nodes and removal of 4 nodes is not.