Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C59E3200C3E for ; Tue, 7 Mar 2017 02:06:27 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C1513160B81; Tue, 7 Mar 2017 01:06:27 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E27D6160B76 for ; Tue, 7 Mar 2017 02:06:26 +0100 (CET) Received: (qmail 18510 invoked by uid 500); 7 Mar 2017 01:06:25 -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 18498 invoked by uid 99); 7 Mar 2017 01:06:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Mar 2017 01:06:25 +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 18DBD1AA960 for ; Tue, 7 Mar 2017 01:06:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.293 X-Spam-Level: *** X-Spam-Status: No, score=3.293 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 2Hic9AoAw7hL for ; Tue, 7 Mar 2017 01:06:23 +0000 (UTC) Received: from mail-ua0-f182.google.com (mail-ua0-f182.google.com [209.85.217.182]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 55CF75F479 for ; Tue, 7 Mar 2017 01:06:17 +0000 (UTC) Received: by mail-ua0-f182.google.com with SMTP id u30so58535805uau.0 for ; Mon, 06 Mar 2017 17:06:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=hjiXX1iNZ2Hqr8r+ljfa6JYcj5eZZDAjAqO82Pc1KkY=; b=ILVT1OpVOqrdSHtXNynBqhqP1Fzb5RbiNSvLoHuSS8Je2mHYkWG9YcRkLANyYJI8Op JG51guCKgUKjWKluPGg4oUboSZicjDG9gr7AzKixyvkSwCJiblBTomBoBpjfJjIFU7Ru YAal/tghxvcJf6PcQHnSeQIljY6jo39mY7ESXDFDYgYIRdBBHKlnWTYa6YmK30WZTsY2 h5Nx3w8c2nrnhTTNnBKwcSIVVCVVskMR1v5Mc+lnXiTEzjQehcC/jFuX0WtpVNzajlua BtiM+hWBon4OuF6PNy4YrJJVWBVoKILUYd1Xm6uc4EXP7mnFIUjNC5bMIjIDIvVoV1AH eVWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=hjiXX1iNZ2Hqr8r+ljfa6JYcj5eZZDAjAqO82Pc1KkY=; b=lQ1oK7I8tYqhaZExfWnnJgNiB3Tkn3kQdea/qn6zwSUdDTohd8KjDDwYXy0YV0BdB7 YO/u0R9kMou4F/N4jQ+UoQIpa4mod6cOUEbdJwzOKzY00vR9OESyma3gTVART4m7p7oM k/tb+Rt7MuNheYeoinHP/1YGcgCxRVWOqowQfn7UVYV3vwXkFevouDZ1XpAkzoMR8C4P A5zkx1wZenuLrJKR/pzgTAcS+X3GfmoziTYq8BSr01aT1zI0E15H4stet85zv1xObhYP UjDNUns/pMfTpp/FEQtdNG8yb3Yxds5Tm+usFmRUXqZV7x/ZByMjYnl9+YUo8swwoenn Mfcg== X-Gm-Message-State: AMke39msoqcXJfs0ryJvPSbtdzJ6GAIBPh3/3ukCv0S4Bzh3KBDNH3bg2755quuzUq4WUzekPfBN0Qo0HNv4uH/I X-Received: by 10.176.80.242 with SMTP id d47mr8464724uaa.107.1488848773512; Mon, 06 Mar 2017 17:06:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.66.66 with HTTP; Mon, 6 Mar 2017 17:05:43 -0800 (PST) In-Reply-To: References: <0040A58A-7EC4-4FDD-BEC7-1A5C79BBAEFE@jordanzimmerman.com> <34C37303-1075-4DD5-8E83-248D2F5AE3F8@slac.stanford.edu> From: Michael Han Date: Mon, 6 Mar 2017 17:05:43 -0800 Message-ID: Subject: Re: Zookeeper Cross Datacenter Cluster To: UserZooKeeper Content-Type: multipart/alternative; boundary=94eb2c191da04526be054a199e26 archived-at: Tue, 07 Mar 2017 01:06:28 -0000 --94eb2c191da04526be054a199e26 Content-Type: text/plain; charset=UTF-8 Back up requires replication which has two types, synchronous and asynchronous. ZooKeeper quorum provides synchronous replication. But as mentioned, 2 DC will not work no matter how. You need at least three (and in general odd numbers - for majority quorum). There are quorum weights and groups that you might leverage but those would not solve 2 DC fault tolerant case. There were a good discussion awhile ago about these concepts and multi-DC set up for reference. [1] ZooKeeper observer provides asynchronous replication. One setup is to have a quorum of servers in one DC and having all observers in another. As with any async replication, you might lose data, and whether or not this is OK depends on your use case and your requirement on data integrity. For fail over, using quorum you get it for free, as no extra work is required. Using observer to fail over requires to reconfigure and restart the ensemble by promoting observers to followers, so it is not automatically provided by ZK and you'd need application logic to handle it or do it manually. There are other "external" approaches of backing up for example you can run a background job to periodically backup ZK transaction log and snapshots and store those somewhere then later spin a new ensemble and recover from those. This approach is likely to lose data as well as its async replication and it also requires application logic to handle the recover process or do it manually... [1] http://zookeeper-user.578899.n2.nabble.com/zookeeper-deployment-strategy-for-multi-data-centers-td7582358.html On Mon, Mar 6, 2017 at 2:42 PM, Le Cyberian wrote: > Thank for your replies. > > I see, in that way then failover won't be possible as if the main/major DC > is down. > > Is there something i can do using hierarchical quorum groups or observers ? > > I am quiet confused to achieve this setup somehow, as how someone would > build a failover over 2 dc's :-/ > > On Mon, Mar 6, 2017 at 11:08 PM, Van Klaveren, Brian N. < > bvan@slac.stanford.edu> wrote: > > > Or, an extra server in a third datacenter to break the tie. > > > > Brian > > > > > > > On Mar 6, 2017, at 2:05 PM, Jordan Zimmerman < > jordan@jordanzimmerman.com> > > wrote: > > > > > > This scenario is not possible. An even number of servers doesn't help > > you as a quorum in ZooKeeper is (N/2)+1. So, if you put 2 servers in each > > DC, a network partition would disable BOTH DCs. (4/2)+1 == 3. So, the > only > > option is to choose one of the DCs as the main DC and put an extra server > > there. This way you could lose the "minor" DC. > > > > > > -Jordan > > > > > >> On Mar 6, 2017, at 11:34 AM, Le Cyberian > wrote: > > >> > > >> Hi Guys, > > >> > > >> I would like to have Kafka Cluster which is dependent on Zookeeper > like > > >> many other great projects out their. Kafka would have 4 nodes as its > > >> cluster since their having even number is not a problem because it > does > > >> leader election based its config it keeps in zookeeper. > > >> > > >> My scenario is having two server rooms on different floors having > fiber > > >> connectivity with each other so network latency / lag is almost like a > > >> local connection. > > >> > > >> However, I would like to implement zookeeper cluster between both of > > them > > >> for auto-failover / redundancy purposes. So if one server room is down > > >> other should work properly. > > >> > > >> For example: on a 5 node zookeeper cluster distributed on both of the > > >> server rooms with 3 in one and 2 in other would give me 2 node failure > > >> tolerance, However if the server room which has 3 servers is down then > > >> ensemble would be broken and split brain. > > >> > > >> Can you please suggest how to achieve this to have failover / > redundancy > > >> between two server rooms or two locations lets say ? > > >> > > >> Is it possible to run 3 node cluster in each server room and have some > > sort > > >> of master-master between them ? > > >> > > >> Thank for your time and helping out in advance. > > >> > > >> Kind regards, > > >> > > >> Le > > > > > > > > -- Cheers Michael. --94eb2c191da04526be054a199e26--