Why do three sites recommend a minimum number of sites for Couchbase?

For Cassandra, there is a minimum requirement of three nodes to include records with strong consistency, assuming a replication rate of one (i.e. two copies of the data set). This requirement does not seem to apply to Couchbase, at least I have not found it anywhere. However, Couchbase still recommends a minimum of three nodes for the production system.

The only motivation I find is this: (1) one node failure in a system with two nodes will give one point of failure, and (2) two node systems will have to work hard when scaling to a third node than three node systems ( I assume this is due to rebalancing).

None of the motives seems to me particularly interesting:

Reason (1) is a bit like saying a two-disk RAID-1 is useless, only a three-disk RAID-6 is permissible (one information, two checksums). However, RAID-1 is quite popular (much larger than the three-drive RAID-6: es) and is generally considered relatively safe. Presumably, the loss of a node will lead to quick administrator actions, so the risk should be short-lived.

Reason (2) seems to me even more transient. Two nodes must work harder by adding a third than three nodes when adding a fourth. However, this is only once when this is a problem, and most applications have daily changes in the load where a balance adjustment can be made.

So, I am wondering if there are any other reasons for avoiding Couchbase clusters for two - node, considering that two nodes can carry the load?

+7
minimum couchbase
source share
1 answer

The main reason is that the automatic switch to another resource is disabled with less than three nodes . This is to prevent a split brain situation. Consider two nodes: node A and node B. If one node is unavailable (due to a network problem), then:

  • Node A cannot reach node B, and there are no other nodes that it cannot handle, so it fails (removing B from the cluster and promoting its own replicas)
  • Node B cannot reach node A, and similarly there are no other nodes, so it fails (removing A from the cluster).

Any clients that can still see both nodes now have essentially two independent clusters that both believe that they belong to the entire dataset.

Essentially in this situation you violated Consistency in the CAP.

For this reason, Couchbase will not perform automatic failover with fewer than three nodes, and since this is the recommended feature to use on a production system, you need at least three nodes in your cluster.

See the Fault Tolerance chapter in the Couchbase Administrator Guide for more information.

+9
source share

All Articles