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 A79502298 for ; Thu, 5 May 2011 16:37:04 +0000 (UTC) Received: (qmail 99884 invoked by uid 500); 5 May 2011 16:37:04 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 99818 invoked by uid 500); 5 May 2011 16:37:04 -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 99659 invoked by uid 99); 5 May 2011 16:37:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 16:37:03 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jared.cantwell@gmail.com designates 209.85.160.170 as permitted sender) Received: from [209.85.160.170] (HELO mail-gy0-f170.google.com) (209.85.160.170) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 16:36:57 +0000 Received: by gyb11 with SMTP id 11so1162042gyb.15 for ; Thu, 05 May 2011 09:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=OwJVNcaSnOg04Ef+CILKXkXhR7zYKtYQsnaZvGeXxvY=; b=E9stSW4k0GcpUE8empZlMjgOkCHakWvhk8GESUVy8B8F5sg6PsOaSnFwa6QY4ZDxl/ CUoeQ+cNLU9NKmBp/LgHV+0LIqjpbL8PRZJGcrqDrqOzPyUnNVKkIOAICECFhjPv2ZWj iSpwixHltxw73kEBEbdURwkFMlV76BCJpMQ1s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=QwkYD/CkYpJVyDwibgZxsmiI03Yy8rqjuxevFasQolCS4tFklEbIbAjb49FuS8Pxrs mi678PiQZ5+sQ05JdIb2T+pVqvc4e5Gh3+kGr9MQeSQa7e3odxCrIjdZVbZV1EOB5ql1 aBJgMMIUZgdRxPpnO8AGM8BuORWmKxytyBWxo= Received: by 10.91.149.5 with SMTP id b5mr2442259ago.91.1304613396104; Thu, 05 May 2011 09:36:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.97.12 with HTTP; Thu, 5 May 2011 09:36:16 -0700 (PDT) In-Reply-To: References: <660D007A-C5E2-496B-A73E-CBE2560BB976@me.com> From: Jared Cantwell Date: Thu, 5 May 2011 12:36:16 -0400 Message-ID: Subject: Re: Growing a cluster To: user@zookeeper.apache.org Cc: "J\"zookeeper-user@hadoop.apache.org\"" Content-Type: multipart/alternative; boundary=0016e64095c20b45a704a289fa48 X-Virus-Checked: Checked by ClamAV on apache.org --0016e64095c20b45a704a289fa48 Content-Type: text/plain; charset=EUC-KR Content-Transfer-Encoding: quoted-printable Thats Patrick, this is roughly the procedure we have are testing. In your procedure, can (4) and (5) be performed simultaneously? Also, am I correct in thinking that going from 1 to 3 server could be dangerous for this reason: 1. start server 1 in standalone mode and write some data to it 2. follow you procedure with 3 servers 3. say during leader election, servers 2 and 3 form the quorum first and elect server 2 as the leader. 4. server 2 believes the last txn to be 0, since it is a fresh cluster 5. now server 1 joins the quorum and knows about txn 100, but the other 2 servers do not, uh oh Is this a real problem, or is there something preventing this case? It seems like you can only grow a cluster such that at least on member of the old quorum MUST be present in the new quorum. Is this correct? ~Jared 2011/5/5 Patrick Hunt > Hi Jared, you can go from 1 to 2+ nodes just fine: > > 1) change the configuration of server 1 from standalone to quorum > based (be sure to list the new members of the ensemble) > 2) add a myid file for server 1 > 3) setup new servers 2+ > 4) restart server 1 > 5) start servers 2+ > > At this point the quorum should just come up. I just tried this > example and it worked fine for me going from 1 to 3 (the data I > created in standalone was available once I started the ensemble). > > Regards, > > Patrick > > 2011/5/5 Jared Cantwell : > > Great information guys-- this helps me understand what needs done when > > expanding from 2 nodes to X nodes. > > > > Does anyone have insight on going from 1 node to 3 nodes? > > > > ~Jared > > > > 2011/5/5 Chang Song > > > >> > >> We are in a bit similar situation. > >> > >> 3 node -> 5 node ensemble. > >> > >> The only way to do this is the following. > >> > >> Assumption is that we have one DNS hostname for three zookeeper ensemb= le > >> IP. > >> Since five node ensemble allows 2 node failure for quorum, we can do > >> > >> > >> 0. First all two new ensemble IPs > >> > >> 1. change all three existing node config (zoo.cfg) and add two new nod= e > >> information > >> Restart all three existing nodes in a sequence. > >> > >> 2. Replicate the new existing zoo.cfg to two new ensemble > >> Start Zookeeper on two new server > >> > >> > >> You can do this in backward sequence (0 -> 2 -> 1) > >> In your case, you can do 0 -> 2 -> 1, I think. > >> > >> Chang > >> > >> > >> > >> 2011. 5. 5., =BF=C0=C8=C4 9:57, Jared Cantwell =C0=DB=BC=BA: > >> > >> > It would be acceptable to me to do this non-dynamically and > non-rolling > >> as > >> > well. For example, I can shut down all nodes, make necessary > >> modifications > >> > to config files, and then restart all nodes. If I do this, should > >> switching > >> > from standalone mode to multi-node mode work? Has anyone done this > >> before? > >> > Preliminary tests seem to work, but I haven't looked into all the ra= ce > >> > conditions and such yet. > >> > > >> > ~Jared > >> > > >> > On Thu, May 5, 2011 at 12:02 AM, Alexander Shraer < > shralex@yahoo-inc.com > >> >wrote: > >> > > >> >> Hi Jared, > >> >> > >> >> Currently there is no support for adding and removing zookeeper nod= es > >> >> dynamically. See: > >> >> https://issues.apache.org/jira/browse/ZOOKEEPER-107 > >> >> > >> >> We're currently working to add this feature. However, AFAIK there i= s > no > >> >> intention to support > >> >> transformation between standalone and multi-node modes, only > membership > >> >> changes in multi-node mode. > >> >> > >> >> Regards, > >> >> Alex > >> >> > >> >> > >> >>> -----Original Message----- > >> >>> From: Jared Cantwell [mailto:jared.cantwell@gmail.com] > >> >>> Sent: Wednesday, May 04, 2011 7:17 PM > >> >>> To: zookeeper-user@hadoop.apache.org > >> >>> Subject: Growing a cluster > >> >>> > >> >>> Hello, > >> >>> > >> >>> Say I was going to grow a cluster from 1 node to 3 nodes. Is this > >> >>> possible, > >> >>> and what would be the recommended way? > >> >>> > >> >>> At first I was thinking that I could go from 1 to 2 and then 2 to = 3, > >> >>> and it > >> >>> seems to be working actually. But I'm not sure if this is > supported, > >> >>> mostly > >> >>> because in standalone mode the on-disk files are different than th= ey > >> >>> are in > >> >>> a multi-node configurations. Mutli-node configurations embed the > >> >>> quorum > >> >>> incarnation into the filename, which standalone does not. Should = a > >> >>> quorum > >> >>> node be able to startup using snapshots and logs that a standalone > node > >> >>> wrote out? Is there a way around this? > >> >>> > >> >>> Thanks, > >> >>> Jared > >> >> > >> > >> > > > --0016e64095c20b45a704a289fa48--