Difference between all_nodes VS cluster_nodes CouchDB 2.X cluster membership?
2
votes
2
answers
1275
views
The
_membership
endpoint in CouchDB (http://user:pass@domain:5985/_membership
) returns the following json to me:
{
all_nodes: [
"couchdb@n1.domain.me",
"couchdb@n2.domain.me",
"couchdb@n3.domain.me"
],
cluster_nodes: [
"couchdb@n1.domain.me",
"couchdb@n2.domain.me",
"couchdb@n3.domain.me"
]
}
When would all_nodes
NOT be the same as cluster_nodes
?
I managed to setup a cluster incorrectly when building CouchDB from source - there were 3 nodes in 'all_nodes', but none in 'cluster_nodes'.
An answer points to the Server Fault question BigCouch all_nodes vs cluster_nodes , where using BigCouch the question author found _membership
returned a list of cluster_nodes
but nothing in all_nodes
. (So similar to the question I'm asking, although opposite to what I've seen where only all_nodes
had values).
I don't understand the answer:
> I just heard from Robert Newson on IRC that BigCouch nodes are connected lazily.
Because:
1. I thought I read in CouchDB somewhere that nodes to be online at the time they are added to a cluster; and
2. This is at best one reason why there may be differences in the all_nodes
and cluster_nodes
results.
I'm effectively asking why there are 2 fields for what seems to be the same thing in CouchDB 2.x? My (very limited) experience is that a cluster that shows nodes in the all_nodes
field but not in the cluster_nodes
field doesn't work.
It's either not an answer to this question, or so far above my level that I don't understand it.
Asked by Zach Smith
(2430 rep)
Aug 24, 2017, 08:04 AM
Last activity: Aug 30, 2017, 09:53 AM
Last activity: Aug 30, 2017, 09:53 AM