Connection readiness status

Dear All,

I am dealing with checking readiness(and health check) of Couchbase server from within C SDK. I need to know when the server is down and when its ready again, so i can use a backup in case of a failure. I tried to use Ping requests, but this wasn’t sufficient enough, because e.g. when the Couchbase server is starting, services seems ready based on Ping requests, but any attempt to read or write will result in error code 11: “Temporary failure received from server”.
Is there any more reliable way to determine status of Connection/Couchbase server?
I mean, the obvious choice would be to actually write and read data to check the status, but this solution seems a bit clunky to me.
Also i tried lcb_diag(), which is actually causing segmentation fault when executed with server down :frowning: (Invalid read of 8 bytes somewhere within the libcouchbase).
I am testing with libcouchbase 2.10.5 and Couchbase server 6.0.3. I am using simple KV API only so far.

Thanks for any suggestions!