couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florin Andrei <flo...@andrei.myip.org>
Subject recommended URL for load balancer health check
Date Mon, 11 Jan 2016 20:14:59 GMT
I'm setting up a cluster of CouchDB 1.6.1 instances, with master/master 
replication, behind a load balancer. All instances contain the same 
data.

The load balancer will require a URL on each instance, to test and 
decide whether the instance is "healthy" or not; instances deemed "not 
health" are automatically removed from the load balancer. I would like 
the test to be fairly comprehensive (in other words, don't return 200 OK 
if the database is in fact not working well), but also I would like to 
avoid tests that place unnecessary load on the DB. The test URL will be 
accessed once every 5 ... 30 seconds.

I have a few options I could think of for now:

1. http://instance:5984/

Probably the lowest impact, but I'm not sure how much it reflects of the 
DBs true health state.

2. http://instance:5984/_stats

Fairly low impact, I guess. Also, if _stats is working, that means at 
least some components of the engine are okay.

3. http://instance:5984/mainDBname

We have one large DB and several smaller DBs. I could just point the 
health check at the base URL for the main DB. I'm sure this is far more 
representative of the actual health state of the DB. OTOH, I'm not sure 
how much work is done by the DB to return that URL, and whether it would 
add some unnecessary load.

Comments? Other ideas? Thanks.

-- 
Florin Andrei
http://florin.myip.org/

Mime
View raw message