Connection to multiple nodes

Hi,

I tried the following code;

var db = new couchbase.Connection({
host: [":8091",":8091"]
bucket:‘default’,
}

Now, if I shut down host1, than I get a connection. If I shut down host2, than the connection fails.

BTW: The following works:

var db = new couchbase.Connection({
host: [":8091",":"]
bucket:‘default’,
}

So, if one host in the list is not reachable than I get a connection failure.

Am I doing something wrong?

Are both hosts a part of the same cluster and are they the only two in that cluster?

There are only two machines in the cluster.

I worked around the problem. The nodeJS process runs on the same machine as Couchbase. So I connect simply to localhost on each host. This works fine to me.

Still, the behavior looks like a bug to me.