Company
Date Published
Author
Perry Krug
Word count
3212
Language
English
Hacker News points
None

Summary

A rebalance is the process of redistributing data to added or removed nodes within a Membase/Couchbase Server cluster, ensuring an even distribution and load-balanced access to data across all nodes. This process involves several steps, including calculating a new vbucket map, initiating node additions or removals, and moving individual vbuckets between nodes using the TAP (Transport Layer Adaptation Protocol) connection. The orchestrator starts this process, but does not transfer data itself; instead, it coordinates with the source and destination nodes to ensure a smooth transition. During a rebalance, client access remains available, and smart clients like Moxi follow the updated vbucket map, which is communicated through a streaming connection or "comet stream". The cluster maintains a persistent connection to the client and updates the map as necessary, ensuring that the client can continue to operate without interruption. Rebalance can be affected by network issues, but the cluster's design aims to minimize its impact on application performance.