CouchbaseCluster setup for multiple nodes running data, query, index and analytics


Using java-client-2.7.0

In our cluster, there are 4 nodes running data, query, index and analytics.

10.xx.xx.xx -> data
10.xx.xx.xx -> query
10.xx.xx.xx -> index
10.xx.xx.xx -> analytics

What is the correct way to create Pass each IP address to CouchbaseCluster.create() method as an array of string?

Cluster cluster = CouchbaseCluster.create(“10.xx.xx.xx”, “10.xx.xx.xx”, “10.xx.xx.xx”, “10.xx.xx.xx”);

Is the above statement correct?


Hi Dony,

Yes, that should work.

You can pass only one of the addresses if you want, but then the client won’t be able to find the cluster if that one node is offline.

For a deep dive into this topic, check out Michael Nitschinger’s blog post:



Thanks for the reply, David.