Testing connection

We are using kubernetes for our deployment and kubernetes have readiness probe, which checks the node application if its completely ready to serve requests. Basically in that we want to call couchbase to see if we still have an active connection. One way to do this could be i just run a query on the bucket but just wondering is there any other way where i dont have to load couchbase server with one query. Since, i am planning to get this probe called every few seconds so i want the connection check to be as minimal as possible.

Hey @ashishgupta,

Have you tried performing a single KV operation (a GET for instance). These operations are extremely low cost, and do not incur much network overhead. You may also consider using the /pools/default/buckets/[bucket_name] HTTP endpoint to identify the state of the bucket/cluster.

Cheers, Brett

Yes i did KV get for an invalid key so there is absolutely no network overhead either. I think i am fine with that, as i wanted to use Nodejs api and connection application have to do connection.

Thanks for the confirmation