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 5D28E18724 for ; Wed, 9 Mar 2016 01:19:03 +0000 (UTC) Received: (qmail 45118 invoked by uid 500); 9 Mar 2016 01:19:02 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 45059 invoked by uid 500); 9 Mar 2016 01:19:02 -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 45047 invoked by uid 99); 9 Mar 2016 01:19:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2016 01:19:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C570BC12CA for ; Wed, 9 Mar 2016 01:19:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id EF5PMIqCEgEX for ; Wed, 9 Mar 2016 01:19:00 +0000 (UTC) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 6C8A05F20E for ; Wed, 9 Mar 2016 01:18:59 +0000 (UTC) Received: by mail-wm0-f51.google.com with SMTP id n186so156602918wmn.1 for ; Tue, 08 Mar 2016 17:18:59 -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; bh=dZMGFoEyscHFSj27F/vu5RYAgzuYdlP4vf1Uo91j/wY=; b=je6B34eomW9s1fEXYbDwv6+Q+qgmEOQ/5E7ir6yhoO7Duz6ydVjTQCYX8Bug7l698y njfY1VNxqCMTZH9ftLEc3LzrDNIhTyT0bNc8exyBr/TJnYknv/8NE8zrdn2tUs75fCz6 AD387cFyBBoUIWUKH1X7FV/NOStLnyTcUvBuGoPYXcFGBkUsTqQA4yYTXIJNHo/oWQOB gNbg4iyWXBdsE81UoFmW/EE9AuBC/8wLw6jmDsH/QgNF3vB6g/cwB25sKWpfJ8UnAeEw SSJfnN7kV38kLO0C64FhFCR44U9FuZnSf9gD2NbKFmnpKSmIK9+rE9HZvBityNOGiyc/ QZwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=dZMGFoEyscHFSj27F/vu5RYAgzuYdlP4vf1Uo91j/wY=; b=hLcpa7+4mkqksOeMgIGVt/gV9bGhXo2tC09nLXxFa7joxxw5J/mdI4P9VPri9dixDL iCI7XYn8ZPngH/kn0xsxDptJcgxLXdvsYw3XZ6gvQDz3jvklvvllmf9krklsFQmYFVLe gd6/FWodZMqhJC25axL5F1o7aHd7cy4uV8bmPvaNQHddegsOIReeIbdG3a+H2RrHMhft KWkl8sIvyaWlWzrNLAM0Tn4NRq75NK+nxch5qn54n0hx7vhZQFVXp92KqkTq2bS3VEIY w1NwfIRceNKSigaMP9sXdSBHwi/g4bpRNJnpeFSGvej43gOX1KO2++zvymC1eZxSFGm4 jvGg== X-Gm-Message-State: AD7BkJKmdBfCT5vE4nFMLUPmLhuQX+FTftLHCrSQ9RpgmHDQ4Iw9UWOwS4dpsK5+taXNmo/sjIgiS/g0EBhqYQ== MIME-Version: 1.0 X-Received: by 10.28.128.83 with SMTP id b80mr18675070wmd.6.1457486338313; Tue, 08 Mar 2016 17:18:58 -0800 (PST) Received: by 10.28.213.129 with HTTP; Tue, 8 Mar 2016 17:18:58 -0800 (PST) In-Reply-To: <56DF69E6.2090207@elyograg.org> References: <56DF69E6.2090207@elyograg.org> Date: Tue, 8 Mar 2016 17:18:58 -0800 Message-ID: Subject: Re: Multi DC ( DC-1 and DC-2) zookeeper setup From: s influxdb To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=001a1142052c75d643052d937bca --001a1142052c75d643052d937bca Content-Type: text/plain; charset=UTF-8 I am referring to a set up that has different clusters for example 3 zk cluster cluster ABC DC1 { node 1, node 2 } DC 2 { node 3 , node 4 } DC 3 { node 5} cluster DEF DC2 { node 6, node 7 } DC 1 { node 8 , node 9 } DC 3 { node 10} cluster GHI DC3 { node 11, node 12 } DC 2 { node 13 , node 14 } DC 1 { node 15} This survives any single DC being unavailable. My question was how is the data kept in sync among the 3 different zk clusters. for example between cluster ABC and DEF. and how is the client failing over to DEF when ABC is unavailable On Tue, Mar 8, 2016 at 4:10 PM, Shawn Heisey wrote: > On 3/8/2016 3:40 PM, s influxdb wrote: > > How does the client failover to the DC2 if DC1 is down ? Does the > services > > registered on DC1 for example with ephemeral nodes have to re-register > with > > DC2 ? > > Even though Flavio and Camille have both said this, I'm not sure whether > the posters on this thread are hearing it: > > If you only have two datacenters, you cannot set up a reliable zookeeper > ensemble. It's simply not possible. There are NO combinations of > servers that will achieve fault tolerance with only two datacenters. > > The reason this won't work is the same reason that you cannot set up a > reliable ensemble with only two servers. If either data center goes > down, half of your ZK nodes will be gone, and neither data center will > have enough nodes to achieve quorum. > > When you have three datacenters that are all capable of directly > reaching each other, you only need one ZK node in each location. If any > single DC goes down, the other two will be able to keep the ensemble > running. > > Data is replicated among the DCs in exactly the same way that it is if > all the servers are in one place. I don't know enough about internal ZK > operation to comment further. > > ============= > > Some TL;DR information to follow: > > If you want to be able to take a node down for maintenance in a multi-DC > situation and *still* survive an entire DC going down, you need three > nodes in each of three data centers -- nine total. This ensemble is > able to survive any four servers going down, so you can take down a node > in one DC for maintenance, and if one of the other DCs fails entirely, > there will be five functioning servers that can maintain quorum. > > Detailed information for the specific situation outlined by Kaushal: > > DC-1 1 Leader 2 Followers > DC-2 1 Follower 2 Observers. > > A six-node ensemble requires at least operational four nodes to maintain > quorum. If either of those data centers fails, there are only three > nodes left, which is not enough. > > Thanks, > Shawn > > --001a1142052c75d643052d937bca--