Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-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 C700917A04 for ; Fri, 29 May 2015 18:11:22 +0000 (UTC) Received: (qmail 65626 invoked by uid 500); 29 May 2015 18:11:22 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 65573 invoked by uid 500); 29 May 2015 18:11:22 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 65557 invoked by uid 99); 29 May 2015 18:11:21 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 May 2015 18:11:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 67F49C9C3B for ; Fri, 29 May 2015 18:11:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=6.31 tests=[SPF_PASS=-0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id lLp6Z41ZGI37 for ; Fri, 29 May 2015 18:11:06 +0000 (UTC) Received: from relayvx11a.securemail.intermedia.net (relayvx11a.securemail.intermedia.net [64.78.56.46]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 6E84F20D7C for ; Fri, 29 May 2015 18:11:04 +0000 (UTC) Received: from securemail.intermedia.net (localhost [127.0.0.1]) by emg-ca-1-1.localdomain (Postfix) with ESMTP id C6B6C53E1D for ; Fri, 29 May 2015 11:11:02 -0700 (PDT) Subject: Re: Meaning of quorum and ensemble MIME-Version: 1.0 x-echoworx-emg-received: Fri, 29 May 2015 11:11:02.802 -0700 x-echoworx-msg-id: 5e8c7b6f-1d0b-453a-92f6-0a89c0d52db7 x-echoworx-action: delivered Received: from emg-ca-1-1.securemail.intermedia.net ([10.254.155.11]) by emg-ca-1-1 (JAMES SMTP Server 2.3.2) with SMTP ID 369 for ; Fri, 29 May 2015 11:11:02 -0700 (PDT) Received: from MBX080-W4-CO-2.exch080.serverpod.net (unknown [10.224.117.102]) by emg-ca-1-1.localdomain (Postfix) with ESMTP id 9941453E66 for ; Fri, 29 May 2015 11:11:02 -0700 (PDT) Received: from MBX080-W4-CO-2.exch080.serverpod.net (10.224.117.102) by MBX080-W4-CO-2.exch080.serverpod.net (10.224.117.102) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Fri, 29 May 2015 11:11:01 -0700 Received: from MBX080-W4-CO-2.exch080.serverpod.net ([10.224.117.102]) by mbx080-w4-co-2.exch080.serverpod.net ([10.224.117.102]) with mapi id 15.00.1044.021; Fri, 29 May 2015 11:11:01 -0700 From: Chris Nauroth To: "user@zookeeper.apache.org" Thread-Topic: Meaning of quorum and ensemble Thread-Index: AQHQmjIXVmRWoNNGKE2tQpqP/+OJ8J2TQTyA Date: Fri, 29 May 2015 18:11:01 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [50.181.140.32] x-source-routing-agent: Processed Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable Hello Kaushal, 1. "Quorum" refers to the minimum number of nodes that must agree on a transaction before it is considered committed. 2. Yes, your understanding of ceil(N/2) is correct. It sounds like your formulation of it is more like floor((N+1)/2). The two formulations are equivalent, so whichever one is more intuitive to you is valid. 3. "Ensemble" refers to the full set of peer servers in a ZooKeeper cluster. Tying this back to your examples, a 3-node ensemble requires a quorum of 2 servers running to commit a transaction. A 5-node ensemble requires a quorum of 3 servers running to commit a transaction. An administrator can deploy a ZooKeeper cluster sized according to trade-offs between budget (number of servers) and desired fault tolerance (number of simultaneous server failures). A more detailed discussion is available in the ZooKeeper Internals document: http://zookeeper.apache.org/doc/r3.4.6/zookeeperInternals.html I hope this helps. --Chris Nauroth On 5/29/15, 10:08 AM, "Kaushal Shriyan" wrote: >Hi, > >I have a question regarding quorum in context to >http://stackoverflow.com/questions/13022244/zookeeper-reliability-three-ve >rsus-five-nodes > >Zookeeper requires that you have a quorum of servers up, where quorum is >ceil(N/2). For a 3 server ensemble, that means 2 servers must be up at any >time, for a 5 server ensemble, 3 servers need to be up at any time. > > 1. what does quorum mean? > 2. so does ceil(N/2) mean 3+1/2 =3D 4/2 which is 2 servers in context t= o >3 > server ensemble and 5+1/2 =3D 6/2 which is 3 servers in context to 5 >server > ensemble if the ceil(N/2) is a ceiling function? > 3. what does ensemble mean in context to Apache zookeeper? > >I would appreciate your help. > >Regards, > >Kaushal