Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 2633 invoked from network); 3 May 2010 16:45:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 May 2010 16:45:38 -0000 Received: (qmail 80428 invoked by uid 500); 3 May 2010 16:45:38 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 80407 invoked by uid 500); 3 May 2010 16:45:38 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 80399 invoked by uid 99); 3 May 2010 16:45:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 16:45:38 +0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=AWL,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [216.145.54.172] (HELO mrout2.yahoo.com) (216.145.54.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 16:45:31 +0000 Received: from SNV-EXPF01.ds.corp.yahoo.com (snv-expf01.ds.corp.yahoo.com [207.126.227.250]) by mrout2.yahoo.com (8.13.6/8.13.6/y.out) with ESMTP id o43GiXRq054832 for ; Mon, 3 May 2010 09:44:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=received:user-agent:date:subject:from:to:message-id: thread-topic:thread-index:in-reply-to:mime-version:content-type: content-transfer-encoding:x-originalarrivaltime; b=pqbLd2GegwBmoKN7OJnU2V8ndVxcgP9AXEku9UCIU8F1B5uBYFeSQJpmQHJfMRWr Received: from SNV-EXVS09.ds.corp.yahoo.com ([207.126.227.86]) by SNV-EXPF01.ds.corp.yahoo.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 3 May 2010 09:44:33 -0700 Received: from 10.73.146.106 ([10.73.146.106]) by SNV-EXVS09.ds.corp.yahoo.com ([207.126.227.84]) via Exchange Front-End Server snv-webmail.corp.yahoo.com ([207.126.227.59]) with Microsoft Exchange Server HTTP-DAV ; Mon, 3 May 2010 16:44:32 +0000 User-Agent: Microsoft-Entourage/12.24.0.100205 Date: Mon, 03 May 2010 09:44:31 -0700 Subject: Re: Dynamic adding/removing ZK servers on client From: Mahadev Konar To: Message-ID: Thread-Topic: Dynamic adding/removing ZK servers on client Thread-Index: Acrq3+ckLH8k5Jd9oUWHNlSc6uxWqg== In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-OriginalArrivalTime: 03 May 2010 16:44:33.0509 (UTC) FILETIME=[E8A31950:01CAEADF] Hi Dave, Just a question on how do you see it being used, meaning who would call addserver and removeserver? It does seem useful to be able to do this. This is definitely worth working on. You can link it as a subtask of ZOOKEEPER-107. Thanks mahadev On 5/3/10 7:03 AM, "Dave Wright" wrote: > I've got a situation where I essentially need dynamic cluster > membership, which has been talked about in ZOOKEEPER-107 but doesn't > look like it's going to happen any time soon. > > For now, I'm planning on working around this by having a simple > coordinator service on the server nodes that will re-write the configs > and bounce the servers when membership changes. Clients will may get > an error or two and need to reconnect, but that should be handled by > the normal error logic. > > On the client side, I'd really like to dynamically update the server > list w/o having to re-create the entire Zookeeper object. Looking at > the code, it seems like it would be pretty trivial to add > "RemoveServer()/AddServer()" functions for Zookeeper that calls down > to ClientCnxn, where they are just maintained in a list. Of course if > the server being removed is the one currently connected, we'd need to > disconnect, but a simple call to disconnect() seems like it would > resolve that and trigger the automatic re-connection logic. > > Does anyone see an issue with that approach? > Were I to create the patch, do you think it would be interesting > enough to merge? It seems like that functionality will eventually be > needed for whatever full dynamic server support is eventually > implemented. > > -Dave Wright