Couchnode connection to cluster


I use couchnode to connect to a couchbase cluster

the cluster is scaled to add or remove servers depending on the charge , is it necessary to update the list of server each time we change the list or the client can it by itself?

let s say we have 3 servers ,

my node.js code is :

var serverList = "couchbase://,,"
var cluster = new couchbase.Cluster(serverList)

is it the right way to connect , or giving only one server will be ok ?

if I add cbase04 does it have to update to :

var serverList = "couchbase://,,,"
var cluster = new couchbase.Cluster(serverList)

Hey @nico_ad,

The list of remote servers you provide to the SDK is used only when initially connecting. As long as you have a reasonable number of servers in your list, you will be protected from intermittent failures of any specific node from preventing your application from starting up. Other than the initial bootstrap case, adding new nodes to your cluster will be automatically determined and updating the list is unnecessary.

Cheers, Brett

Thanks @brett19 for the clarification. very usefull :slightly_smiling: