Given I have three nodes as a cluster:

My client IP is
In the program I connect to a node IP, say

For the data transfer latter, I am not sure what way they take.
#1 all the data are sending to, and this node then does a distribution among all three nodes.
#2 the client has the chance to talk directly with other two nodes, and send the data directly to them.

得到社区里Trond Norbye的回答如下:
The Couchbase clients will distribute the data across all nodes in your cluster.


One of the most common questions when developing applications is how clients and client libraries react and are affected by the topology and topology changes that occur in a running cluster.

In general, a Couchbase Server cluster acts as a “black box” in terms of the client and database interaction. If you are using a smart client, the topology, node structure, and changes to this are entirely handled through the combination of the vBucket map and the client library.

The client library will take care of the communication between the client and the in- dividual nodes. The node that you use to connect to the cluster when first opening a connection does not act as a proxy or distribution service.

Instead, a smart client (or Moxi) will load the vBucket map, and from this information, determine which node within the cluster should be contacted to store and retrieve different documents. The information exchange is direct with the right node for that data.

During a topology change (for example, a rebalance or failover operation), the client library should automatically handle any transient errors. In all other respects, the con- figuration and topology of the cluster is not something you should ever have to worry about.