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 59B112A89 for ; Thu, 5 May 2011 17:06:45 +0000 (UTC) Received: (qmail 62447 invoked by uid 500); 5 May 2011 17:06:44 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 62300 invoked by uid 500); 5 May 2011 17:06:44 -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 62286 invoked by uid 500); 5 May 2011 17:06:44 -0000 Delivered-To: apmail-hadoop-zookeeper-user@hadoop.apache.org Received: (qmail 62279 invoked by uid 99); 5 May 2011 17:06:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 17:06:44 +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 (athena.apache.org: domain of ted.dunning@gmail.com designates 209.85.220.176 as permitted sender) Received: from [209.85.220.176] (HELO mail-vx0-f176.google.com) (209.85.220.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 17:06:40 +0000 Received: by vxa37 with SMTP id 37so3995484vxa.35 for ; Thu, 05 May 2011 10:06:19 -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=06ObM1RDJTavJ6qduCNGjNAVmjAlqbM2N4aSrSi4Log=; b=e92AFOZQ0yS22PIwOs7RTRCSJlkhFtX+XFKJEED7N8PpTKM3yAs1HPjtV0r2s9VJRw 4GV/5aP5a6+lxRrgsLRpoI3wBHIscRch44Mhv/NJTiFJq6BKDKySHRL/4II/i7ye6oBR O59uhEJo9BS0eq/udNq6Gm6OAktfx0juXfiPs= 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=uiacY7FJpqEfGpAtbCHe90rdelPuTNXYnVkAnwadaipzM4S0c3Yq7HW/4XHVhiQ34t bu2qRURRRurpgfv0VzabIi62klMRgpEEMRY3ustzNXgBuJGoTnWoJ1kfvjH3FpcMI5C5 wAcnMfzQ7zGO+OTAco1Flgg/2amQnmUCTgSVg= Received: by 10.52.71.70 with SMTP id s6mr1385715vdu.80.1304615179051; Thu, 05 May 2011 10:06:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.116.42 with HTTP; Thu, 5 May 2011 10:05:59 -0700 (PDT) In-Reply-To: References: <660D007A-C5E2-496B-A73E-CBE2560BB976@me.com> From: Ted Dunning Date: Thu, 5 May 2011 10:05:59 -0700 Message-ID: Subject: Re: Growing a cluster To: user@zookeeper.apache.org Cc: "zookeeper-user@hadoop.apache.org" Content-Type: multipart/alternative; boundary=bcaec501647350e26604a28a6467 --bcaec501647350e26604a28a6467 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable To be explicit on a (probably) obvious point, you will have a few tens of seconds of downtime during the restart of server 1 until the second server comes on-line and participates in the election. It there is a difference between 10 seconds of downtime and 2 minutes of downtime in your application, I recommend going from 1 to 3 nodes first then to 3+. It is easier to have a very shor= t downtime when only a single additional node needs to come up. You might also be able to start server 2 before you bounce server 1, but you have to be very careful not to start enough machines to have a quorum before server 1 joins in. 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., =EC=98=A4=ED=9B=84 9:57, Jared Cantwell =EC=9E=91=EC=84= =B1: > >> > >> > 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 > >> >> > >> > >> > > > --bcaec501647350e26604a28a6467--