What happens to requests and data when a node goes down


#1

I am new to Couchbase and evaluating for a project. I had a few questions after reading some of the general documents.

In Couchbase, what happens to in-flight requests when a node goes down? Do the requests that the downed node normally responds to fail to return?

Since Couchbase keeps writes in memory and flushes to disk and asynchronously replicates, is there a potential after Couchbase gives a client an ack and the node goes down when an object is lost?

When a Couchbase node is back online, is there a period of time when the data is either inconsistent or “not found” when it actually exists?

Any help would be greatly appreciated


#2

Your client request will timeout, as it will fail to get a response from the server node. That’ll get exposed as some kind of error in your application - exact details depend on the SDK used etc.

Yes. If you care about knowing that data has been written to disk and/or replicated to other nodes you should look at the Observe functionality in your SDK.

It should never be inconsistent:

1 If you’ve enabled auto-failover than replica nodes will “take over” the inaccessible vBuckets which used to be on the downed node, and you’ll quickly have availability to that data again.
2. If you haven’t enabled auto-failover, then the vBucket(s) owned by the offline node will be unavailable - any attempts to access keys on them will fail. When the node comes back the data will be accessible again.