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 9FA5D182C8 for ; Sun, 22 Nov 2015 22:25:22 +0000 (UTC) Received: (qmail 73559 invoked by uid 500); 22 Nov 2015 22:25:21 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 73504 invoked by uid 500); 22 Nov 2015 22:25:21 -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 73492 invoked by uid 99); 22 Nov 2015 22:25:21 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Nov 2015 22:25:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 074931A08A3 for ; Sun, 22 Nov 2015 22:25:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.9 X-Spam-Level: ** X-Spam-Status: No, score=2.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id nPyox3QJ96Or for ; Sun, 22 Nov 2015 22:25:09 +0000 (UTC) Received: from mail-oi0-f48.google.com (mail-oi0-f48.google.com [209.85.218.48]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 658FD2064F for ; Sun, 22 Nov 2015 22:25:08 +0000 (UTC) Received: by oies6 with SMTP id s6so105382108oie.1 for ; Sun, 22 Nov 2015 14:25:01 -0800 (PST) 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 :cc:content-type; bh=g6kZNkPvn85XP4bNmg3z2CxKdIYCZD4MduQSvgv6mro=; b=pl/oDo2zx5+7lgumfoJPhKP2Abmy+gVDhd4dSrncuHwwTRFuUIWSpogGCOCW8CLzRL /3JCqli8s6rZsZhxzq3es2eZXlOGXFm4LvrvVc1j26tFIL7gqFJytjmsfxrCkdQjwj5w 1dDkSWI2Pyw0xb4YAsLJxPr2tZ68/st5tnzaQWRT2RheE1lbIWmQwhw/30cKzlsNl2ae XPf0q2dbkbGFyjDlK9NQvorOxWes6ZRnvNqKfhZc8BQM7OjYph2it0NSl52SKY/WZ46O fuW60l9priZzglGCNVJtzXopmJ6s9IPFYFGsHXNIDy+bnqUBYune7DAHJgTE3PN1oUZR ucgw== MIME-Version: 1.0 X-Received: by 10.182.76.68 with SMTP id i4mr14636653obw.33.1448231101074; Sun, 22 Nov 2015 14:25:01 -0800 (PST) Received: by 10.202.82.72 with HTTP; Sun, 22 Nov 2015 14:25:00 -0800 (PST) Received: by 10.202.82.72 with HTTP; Sun, 22 Nov 2015 14:25:00 -0800 (PST) In-Reply-To: References: Date: Sun, 22 Nov 2015 17:25:00 -0500 Message-ID: Subject: Re: ZK + dynamic config + EC2 From: Alexander Shraer To: Artem Oboturov Cc: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=047d7b6700cf551520052528948e --047d7b6700cf551520052528948e Content-Type: text/plain; charset=UTF-8 Yes, unique ids require consensus (or admin), but ZK gives you this. you could use for example the sequential flag or alternatively the set conditional on a version. On Nov 22, 2015 3:34 PM, "Oboturov, Artem" wrote: > There is one more thing to it: ZK has a byte range for values server IDs - > 255 in total, how could you allocate those to instances without having a > central registry for IDs? It could be based on IPs, but it seems there are > no other idempotent/reliable ways to get them assigned? > > On 21 November 2015 at 20:42, Alexander Shraer wrote: > >> The only issue I see is that if the new server has the same id as the old >> one you're replacing, I think you should first remove the old one and then >> in a separate command add the new one. Intuitively this way you avoid >> having the newly joining server act as someone who knows the current state >> of the system (which it doesn't), a situation that may cause you to loose >> transactions. >> >> Notice that there are two reconfig interfaces -- incremental and bulk >> (see manual >> ). >> >> On Sat, Nov 21, 2015 at 1:16 PM, Oboturov, Artem < >> artem.oboturov@zalando.de> wrote: >> >>> Hi >>> >>> I was looking at the ZK 3.5.x series new feature - dynamic configuration. >>> As an example, we could have an EC2 auto scaling group for 3 ZK nodes. >>> When >>> one of them goes down, a new one would be spawned, but its IP could be >>> different. We could query EC2 to get all instances from group and >>> generate >>> a config for ZK to take all currently running servers as part of ZK >>> cluster, and then run an update of cluster configs for all existing ones >>> using dynamic config feature. Would this strategy work? Are there any >>> alternatives? >>> >>> -- >>> Regards >>> Artem Oboturov >>> >> >> > > > -- > Regards > Artem Oboturov > --047d7b6700cf551520052528948e--