Rebalancing is the process of redistributing information across nodes.
As you store data into the Couchbase Server cluster, you may need to alter the number of nodes in the cluster to cope with changes in application load, RAM, disk I/O and network performance requirements.
Data is stored within Couchbase Server through the distribution method that is provided by the vBucket structure. When the Couchbase Server cluster is expanded or shrunk, the information stored in the vBuckets is redistributed among the available nodes and the corresponding vBucket map is updated to reflect the new structure. This process is called rebalancing .
Rebalancing processRebalancing is a deliberate process that you need to initiate manually when the structure of your cluster changes. It 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 among nodes. Once the moving process has been completed, the vBucket map is updated and communicated to the smart clients and the proxy service (Moxi).
As a result, the distribution of data across the cluster is 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.