Can writes success when a Couchbase master node fails

Hello, I have a Java client writing to Couchbase using bucketObj.async().upsert(document). At some point, the master node fails and the client gets a TimeoutException. But the replica node is up.

java sdk version is 2.2.3

I wonder if there are any setting on the client/on the server side to allow the client to keep writing to replica in case of a master node failure.

I read PersistTo and ReplicaTo. It seems both require the master node is up.


Writes to replicas in Couchbase are not allowed, since Couchbase is designed to favor consistency over availability. You can read from replicas, but not make changes to them.

If a node fails, you have some options for failover on the server side. You can manually failover a node, or you can set the cluster to have automatic failover. A failover will promote replicas to active, at which point you can start making changes to them.

For more information, check out the documentation on failover here:

If you want to know more about how to handle a failover situation in Java, I suggest posting in the Java category here: