Is it possible to connect to a couchbase cluster instead of a specific node?

var cluster = new Cluster(new ClientConfiguration
Servers = new List { new Uri(“http://releasetest1”) }

is what I currently do, I have a test cluster with 4 nodes (2 windows 2 linux) I have 3 nodes running couchbase 6.5 (the last one will be upgraded today) it’s running 5.1)

is it possible to use the cluster name and let couchbase decide which node to access? This way I could take a node down and not worry about the app breaking

otherwise, I’ll store the node to access somewhere and read it that way I can just change the data without having to rebuild the solution




Due to the nature of Couchbase’s architecture, connecting to a cluster always connects to all nodes in the cluster. The list of servers you’re providing for bootstrap is just a list of possible options that the SDK can use to start the process. It randomly tries one, and once successful throws away the list and connects to all the nodes returned from the server. The reason for having a list of nodes is simply for redundancy if a node is down during bootstrap.



Well @btburnett3 beat me to another answer :slight_smile:

But as an alternative to listing URLs, I will plug some of Brant’s work and say that you can use DNS SRV as another option (see Brant’s post here:, the .NET extension here: and it’s especially helpful if you happened to be using Kubernetes:


thanks for the response, so I could pass in ALL the nodes in my cluster and it would keep trying till one worked or they all failed?

1 Like

I will certainly look into this



Yes, that’s the recommended best practice.