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 78F6D72DD for ; Sun, 24 Jul 2011 20:03:11 +0000 (UTC) Received: (qmail 35176 invoked by uid 500); 24 Jul 2011 20:03:11 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 35075 invoked by uid 500); 24 Jul 2011 20:03:10 -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 35061 invoked by uid 99); 24 Jul 2011 20:03:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jul 2011 20:03:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hakisenin@gmail.com designates 209.85.210.170 as permitted sender) Received: from [209.85.210.170] (HELO mail-iy0-f170.google.com) (209.85.210.170) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jul 2011 20:03:02 +0000 Received: by iym1 with SMTP id 1so3939256iym.15 for ; Sun, 24 Jul 2011 13:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=rizYIcw3mGwiCQ0pdt2xgKUIzvb34p4jUNQ52CjWnzc=; b=lCiljvXV1LbNgFhOxGFDjSCSV70B0LWjrj7NcYEIjagGG1TQoaaoantIMLbRVu0gq4 6N6uey2gXG8HrtiBLmIlIfRL4F2kKg8kM6JsZ3nvDBMrKS2EBvRq3Mz+bOd4eRzmA1X8 iedNMOws3wSksM7yKz7w8IbrXybcq6RaUkMTc= MIME-Version: 1.0 Received: by 10.231.117.79 with SMTP id p15mr3900624ibq.29.1311537760654; Sun, 24 Jul 2011 13:02:40 -0700 (PDT) Received: by 10.42.220.131 with HTTP; Sun, 24 Jul 2011 13:02:40 -0700 (PDT) Date: Mon, 25 Jul 2011 01:32:40 +0530 Message-ID: Subject: Zookeeper Node strategy to pick up the leader? From: Chiku Singh To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=00504501453855537204a8d62e4b X-Virus-Checked: Checked by ClamAV on apache.org --00504501453855537204a8d62e4b Content-Type: text/plain; charset=ISO-8859-1 Suppose I have 5 node configuration in the Zookeeper {1,2,3,4,5} Zookeeper says that a leader is elected when a majority of nodes vote for any given node then, the node having majority of nodes is selected as the leader. Zookeeper benchmark says that a leader election typically takes 200 ms. My question is how is the convergence achieved? Do all nodes start voting for the node 1 as the leader or they start selecting the leader randomly? If the appointment of leader is totally random then how does it ensure convergence or such fast rates of leader election? Thanks for the answer! Help appreciated! --00504501453855537204a8d62e4b--