Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A841418321 for ; Mon, 11 Jan 2016 20:15:15 +0000 (UTC) Received: (qmail 57598 invoked by uid 500); 11 Jan 2016 20:15:14 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 57498 invoked by uid 500); 11 Jan 2016 20:15:14 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 57487 invoked by uid 99); 11 Jan 2016 20:15:14 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jan 2016 20:15:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id BBDDC1A0A4A for ; Mon, 11 Jan 2016 20:15:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id GXS4dJYk0jyw for ; Mon, 11 Jan 2016 20:15:07 +0000 (UTC) Received: from andrei.myip.org (75-149-39-41-SFBA.hfc.comcastbusiness.net [75.149.39.41]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTP id B5986206A7 for ; Mon, 11 Jan 2016 20:15:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by andrei.myip.org (Postfix) with ESMTP id 2C962FA0B1F for ; Mon, 11 Jan 2016 12:15:01 -0800 (PST) X-Virus-Scanned: amavisd-new at example.com Received: from andrei.myip.org ([127.0.0.1]) by localhost (weiqi.lan.home [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d3qG9ULmYxnG for ; Mon, 11 Jan 2016 12:15:00 -0800 (PST) Received: from andrei.myip.org (localhost [127.0.0.1]) by andrei.myip.org (Postfix) with ESMTP id 02B13FA01DF for ; Mon, 11 Jan 2016 12:15:00 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 11 Jan 2016 12:14:59 -0800 From: Florin Andrei To: user@couchdb.apache.org Subject: recommended URL for load balancer health check Reply-To: user@couchdb.apache.org Mail-Reply-To: user@couchdb.apache.org Message-ID: <9798d9ced3057396764863b0f3796a49@andrei.myip.org> X-Sender: florin@andrei.myip.org User-Agent: Roundcube Webmail/0.9.2 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/