Search:

Search all manuals
Search this manual
Manual
Membase Manual 1.7
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
7.1 REST/JSON
Chapter Sections
Chapters

7.1.5. Redundancy & Availability

Client library authors should allow their user applications to specify multiple URLs into the membase cluster for redundancy. Ideally, the user application would specify an odd number of URLs, and the client library should compare responses from every REST/JSON URL until is sees a majority of equivalent cluster configuration responses. With an even number of URLs which provide conflicting cluster configurations (such as when there's only 2 membase servers in the cluster and there's a split-brain issue), the client library should provide an error to the user application rather than attempting to access items from wrong nodes (nodes that have been Failover'ed out of the cluster).

The libvbucket C library has an API for comparing two configurations to support these kinds of comparisons. See the vbucket_compare() function here.

As an advanced option, the client library should keep multiple REST/JSON streams open and do continual "majority vote" comparisons between streamed configurations when there are re-configuration events.

As an advanced option, the client library should "learn" about multiple cluster nodes from its REST/JSON responses. For example, the user may have specified just one URL into a multi-node cluster. The REST/JSON response from that one node will list all other nodes, which the client library can optionally, separately contact. This allows the client library to proceed even if the first URL/node fails (as long as the client library continues running).