From dev-return-76526-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Fri Dec 7 11:11:32 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8DDE7180647 for ; Fri, 7 Dec 2018 11:11:31 +0100 (CET) Received: (qmail 99446 invoked by uid 500); 7 Dec 2018 10:11:30 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 99434 invoked by uid 99); 7 Dec 2018 10:11:29 -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; Fri, 07 Dec 2018 10:11:29 +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 92986C0B7F for ; Fri, 7 Dec 2018 10:11:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.788 X-Spam-Level: * X-Spam-Status: No, score=1.788 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-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 G0Ml14nKmvz3 for ; Fri, 7 Dec 2018 10:11:27 +0000 (UTC) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id A6FD95F575 for ; Fri, 7 Dec 2018 10:11:27 +0000 (UTC) Received: by mail-qt1-f171.google.com with SMTP id r14so3865516qtp.1 for ; Fri, 07 Dec 2018 02:11:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=S0LCNXRLjhDxl3Qu2Hx9nKpgrq5rLTIP5lH10ecP29o=; b=Tu0+9yHq3ViHS3sTUtxvSBSxY2p+TdesCiHkuQdwNy0sx5G+g3vsSUEupRFxIY0zCs FewVfGuV1KakoBZukLVooLVXmMPHsbYH0GIyg/GmtMW7VWIozM40sy3W26rwuQM+71kj TLeFhMocfTY3ybdbtecDn7jemC1/B7HBwMGbnRu5gj7FSy3+1F8ULFHGvxUp9xSPcl4a WdT/+xs7qyocCbnPXb9RI7thjutKb9ESW+WAWylj+falMETdL7B80gvDmBlj0VuyH/SZ IcxPavN50ZhaNn5kwuJWo9B3oF49usIpqwJ9NR826RNl0ARdCux3uQhkX93o1uo0DqeK cyhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=S0LCNXRLjhDxl3Qu2Hx9nKpgrq5rLTIP5lH10ecP29o=; b=fmmnJyw22wRXyPJpHljwdbMi2TSwcmgK7TZ+hKThqq/gcr0xmbUCxyIGcrFXQkouRQ bCAPXdj7lI2RZJvSb6RUrw/41PfVDmitVZuqjZ/CACb6yDiX+ka+2zHw0thEYIaWQdm0 i8n1WY84z+yvi2w/zOusQte3qkmRDwoMcbQKsklBdrTnKiGdIBu3VMVOkVGJST18MtAw l/8y4T/Q8482YVl5v6xGBEKZQEyyDbuDe5j8YfXcUVH3UrSok/ynpIQ8mXbjB4G3A03B kqmydARk1TBFdYk0gAu+rpNpon937pg7cTdMM9v5qc3nYt4sbUcZNGt5ayF99jz59uM1 3D1A== X-Gm-Message-State: AA+aEWb7enqZbSKJA9uJ7UjNz0MNiinE05adpHa7U8B1MEBMaSINVuZO bTgV6ziC0RE9PLDUl8raqUt8xdspq+ugsW3ja+CKFs4GaAA= X-Google-Smtp-Source: AFSGD/XfpL5Nq102QZigWZ+fAOFntOZSy+dbErCteRCOIzP16Rm+K5A6Kz7PKLA83K5uzfYV7p1H3WHIZ+JxtTU4G6s= X-Received: by 2002:a0c:c192:: with SMTP id n18mr1277169qvh.99.1544177487092; Fri, 07 Dec 2018 02:11:27 -0800 (PST) MIME-Version: 1.0 References: <2AB495FA-0239-4293-94AB-F9F6CC425BEA@jordanzimmerman.com> <5464F3BD-71EE-497E-A72E-90BB9474D6EF@jordanzimmerman.com> In-Reply-To: From: =?UTF-8?Q?Maciej_Smole=C5=84ski?= Date: Fri, 7 Dec 2018 11:11:14 +0100 Message-ID: Subject: Re: Leader election To: dev@zookeeper.apache.org Content-Type: multipart/alternative; boundary="00000000000096a10a057c6bd61a" --00000000000096a10a057c6bd61a Content-Type: text/plain; charset="UTF-8" On Fri, Dec 7, 2018 at 3:03 AM Michael Borokhovich wrote: > We are planning to run Zookeeper nodes embedded with the client nodes. > I.e., each client runs also a ZK node. So, network partition will > disconnect a ZK node and not only the client. > My concern is about the following statement from the ZK documentation: > > "Timeliness: The clients view of the system is guaranteed to be up-to-date > within a certain time bound. (*On the order of tens of seconds.*) Either > system changes will be seen by a client within this bound, or the client > will detect a service outage." > This is related to the fact that ZooKeeper server handles reads from its local state - without communicating with other ZooKeeper servers. This design ensures scalability for read dominated workloads. In this approach client might receive data which is not up to date (it might not contain updates from other ZooKeeper servers (quorum)). Parameter 'syncLimit' describes how often ZooKeeper server synchronizes/updates its local state to global state. Client read operation will retrieve data from state not older then described by 'syncLimit'. However ZooKeeper client can always force to retrieve data which is up to date. It needs to issue 'sync' command to ZooKeeper server before issueing 'read'. With 'sync' ZooKeeper server with synchronize its local state with global state. Later 'read' will be handled from updated state. Client should be careful here - so that it communicates with the same ZooKeeper server for both 'sync' and 'read'. > What are these "*tens of seconds*"? Can we reduce this time by configuring > "syncLimit" and "tickTime" to let's say 5 seconds? Can we have a strong > guarantee on this time bound? > As describe above - you might use 'sync'+'read' to avoid this problem. > > > On Thu, Dec 6, 2018 at 1:05 PM Jordan Zimmerman < > jordan@jordanzimmerman.com> > wrote: > > > > Old service leader will detect network partition max 15 seconds after > it > > > happened. > > > > If the old service leader is in a very long GC it will not detect the > > partition. In the face of VM pauses, etc. it's not possible to avoid 2 > > leaders for a short period of time. > > > > -JZ > --00000000000096a10a057c6bd61a--