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 296A017D6D for ; Sat, 11 Oct 2014 18:10:27 +0000 (UTC) Received: (qmail 58040 invoked by uid 500); 11 Oct 2014 18:10:26 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 57988 invoked by uid 500); 11 Oct 2014 18:10:26 -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 57976 invoked by uid 99); 11 Oct 2014 18:10:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Oct 2014 18:10:26 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ralph.tice@gmail.com designates 209.85.217.177 as permitted sender) Received: from [209.85.217.177] (HELO mail-lb0-f177.google.com) (209.85.217.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Oct 2014 18:10:00 +0000 Received: by mail-lb0-f177.google.com with SMTP id w7so4581374lbi.8 for ; Sat, 11 Oct 2014 11:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=pqy+vlfSOs6vd7dBW4pJOKImY+MS+6TPVR4FuUS4fZk=; b=Gz1XErGK2xYUusog59oninsjxGcfIsgUMZMR34gAMcA4APG1IgIJTBXAQIwHXALwrL m9Ao5ak/xx9QCHbVQWwL964cDPiWRVoYxzkbt7D+WX2IXWtb1moiK63C6zUBERL5twgJ oqGNGxQ+uzjF4R4nzE565p2H+jRLFHzzd3cww4T2kelQZ4SB0AU3wDP+KhH+ziG54Jam Kxpsar3DyGrCYat+XXEuD5ZyDEbQlazp+9nI8OuzyKsmNv+QDfI7CofGtWz9bwKJG2ql WZ1upWC8cjekRYR0mxe51zIvK2YnX+1LuJceLXw1ucVciCtQa9Yguk/+Le7zAdDvqCg8 pEBw== MIME-Version: 1.0 X-Received: by 10.152.37.135 with SMTP id y7mr12973477laj.66.1413050999865; Sat, 11 Oct 2014 11:09:59 -0700 (PDT) Received: by 10.152.123.2 with HTTP; Sat, 11 Oct 2014 11:09:59 -0700 (PDT) In-Reply-To: <21EEE329-6E78-4FD6-BE34-189E93DF23EB@codepuppy.com> References: <1065A2D3-E37E-4C9A-A561-BB8369AC48AC@codepuppy.com> <87h9zcxb1h.fsf@ip-10-56-193-148.eu-west-1.compute.internal> <21EEE329-6E78-4FD6-BE34-189E93DF23EB@codepuppy.com> Date: Sat, 11 Oct 2014 13:09:59 -0500 Message-ID: Subject: Re: Changing leader to follower? From: ralph tice To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=089e01493a14e5888d05052992f1 X-Virus-Checked: Checked by ClamAV on apache.org --089e01493a14e5888d05052992f1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I'm not an expert but I don't think there is a magic bullet here, leader election has to happen in this circumstance and that takes time. You may be better served by building better resilience to eliminate ZooKeeper's uptime from being a single point of failure in your services layer. Pinterest and Airbnb both have some prior art here, http://engineering.pinterest.com/post/77933733851/zookeeper-resilience-at-p= interest and http://nerds.airbnb.com/smartstack-service-discovery-cloud/ I'm curious why you chose a cross-DC ensemble versus localized same-region ensembles. Don't you deal with a significant frequency of leader elections from being in 3 regions anyway? On Sat, Oct 11, 2014 at 11:21 AM, Jeff Potter < jpotter-zookeeper@codepuppy.com> wrote: > > The reason I ask is that we=E2=80=99ve noticed, when running zookeeper cr= oss-DC, > that restarting the node that=E2=80=99s currently the leader causes a bri= ef but > real service interruption for 3 to 5 seconds while the rest of the cluste= r > elects a new leader and syncs. We=E2=80=99re on AWS, with 2 ZK nodes in U= S-East, 2 > in US-West-2, and 1 in US-West (as a tie-breaker). > > It would seem taking a leader to follower status would be useful; and > doing so without it actually being a stop / disconnect on all clients > connect to the node. (Especially for doing rolling restarts of all nodes, > e.g. XEN-108 bug.) > > -Jeff > > > > On Oct 10, 2014, at 10:16 AM, Ivan Kelly wrote: > > > Or just pause the process until someone else takes over. > > > > 1. kill -STOP > > 2. // wait for election to happen > > 3. kill -CONT > > > > This wont top it from becoming leader again. Also, client may migrate t= o > > other servers. > > > > -Ivan > > > > Alexander Shraer writes: > > > >> Hi, > >> > >> I don't think there's a direct way, although this seems a useful thing > to > >> add. > >> > >> One think you could do is to issue a reconfig changing the leader's > >> leading/quorum port (through which > >> it talks with the followers). This will cause it to give up leadership > >> while keeping it in the cluster. > >> > >> Cheers, > >> Alex > >> > >> On Fri, Oct 10, 2014 at 5:57 AM, Jeff Potter < > >> jpotter-zookeeper@codepuppy.com> wrote: > >> > >>> > >>> Hi, > >>> > >>> Is there a way to =E2=80=9Cretire=E2=80=9D a leader while keeping it = in the cluster? > >>> > >>> Thanks, > >>> Jeff > > --089e01493a14e5888d05052992f1--