Rebalancing

Rebalancing is the process of redistributing information across nodes

Data is stored within Couchbase Server through the distribution method that is provided by the vBucket structure. When a Couchbase Server cluster is expanded or shrunk, the information stored in the vBuckets is redistributed between the available nodes and the corresponding vBucket map is updated to reflect the new structure. This process is called rebalancing.

Rebalancing is an deliberate process that you need to initiate manually when the structure of your cluster changes. The rebalance process changes the allocation of the vBuckets used to store the information and then physically moves the data between the nodes to match the new structure.

The rebalancing process can take place while the cluster is running and servicing requests. Clients using the cluster read and write to the existing structure with the data being moved in the background between nodes. Once the moving process has been completed, the vBucket map is updated and communicated to the smart clients and the proxy service (Moxi).

The result is that the distribution of data across the cluster has been rebalanced, or smoothed out, so that the data is evenly distributed across the database. Rebalancing takes into account the data and replicas of the data required to support the system.