Consider a cluster with 4 healthy nodes. Our application uses the following connection string to connect to CB at startup:
And using the following code snippet to secure our connection:
var config = new ClusterOptions()
var clusterTask = Couchbase.Cluster.ConnectAsync(connectionString, config);
Cluster = clusterTask.Result;
Here is what we are experiencing:
- When cluster is healthy, application starts with no issues.
- server005 is dropped (for rolling upgrade, wanting no downtime)
- Application continues to run without issues (indicating initial bootstrapping worked when all nodes were healthy at startup)
- Attempt to restart the application–application will not start. In this case, we are receiving Couchbase.AuthenticationFailureException
- server005 is added back into the cluster (without rebalance)
- Application is started, but hangs on "Bucket could not be selected" errors
- Rebalance node on server005 back into cluster
- Application begins working.
Seems to be two issues here. #1 The SDK will not attempt connection to the next server in the connection string if the FIRST server listed is down. #2 If a server is online, but has not been rebalanced back into the cluster, errors on that one server hang the application instead of moving to the next server in the connection list.