From user-return-11270-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Tue Feb 20 17:04:50 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 DC6C1180654 for ; Tue, 20 Feb 2018 17:04:49 +0100 (CET) Received: (qmail 89070 invoked by uid 500); 20 Feb 2018 16:04:48 -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 89045 invoked by uid 99); 20 Feb 2018 16:04:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2018 16:04:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 4281CC012E for ; Tue, 20 Feb 2018 16:04:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Jj7lLUVziUSZ for ; Tue, 20 Feb 2018 16:04:45 +0000 (UTC) Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id B636D5FB6B for ; Tue, 20 Feb 2018 16:04:44 +0000 (UTC) Received: by mail-wr0-f175.google.com with SMTP id u49so11217820wrc.10 for ; Tue, 20 Feb 2018 08:04:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=bU4o7iRRgwUud+rKkifJo4cMD2wpbLuRncB/mtIMA2o=; b=WBuKkzliJiUU3jta237w24Sf89okaugG20ZjBJx12HUm3HftIZU589GjCeaKX1yEbT YuWTgD4aiTV3o571W3ewJn9/YMz6sXAmj0D5R98l9WTDuvbMwR9qg/QWLthx/j3w/PAh ZPQm9+zMdWm+7pNEv7MC7coehDpp2YlVBztXUPoFw18A9C6dSkg1FY2zUMeassedBVjw otubOj+GVbmkwlCEMe5vCR+BhowO2t52exytNepl/QOQl6KwNde/LlSfURoUuo7oAoyA BsDePHNXKgy2ovnbkCwisx3W18oIk5/MZAR67tMR0VqWjgb41MYqfG0W933HuXQBaBJ7 ibTw== X-Gm-Message-State: APf1xPA3OEoi/1lcXY1HSzILIISAy7FDDZlSlkebEAbkC2zNrx2W2cn5 9mAst1EcKFOfHds6yj+41Ft6uGEh X-Google-Smtp-Source: AH8x224Tt17Rlr2VXOGWSdobyPF2JN9XTd6dXZnkrUIsWqEXbiRT8egSXg8dGTMmvU+28HE08UOyxg== X-Received: by 10.223.139.197 with SMTP id w5mr112980wra.186.1519142684020; Tue, 20 Feb 2018 08:04:44 -0800 (PST) Received: from [192.168.1.53] ([80.31.94.197]) by smtp.gmail.com with ESMTPSA id m6sm27234059wmb.6.2018.02.20.08.04.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 08:04:43 -0800 (PST) From: Flavio Junqueira Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Zookeeper client behavior on ZK server segmentation Date: Tue, 20 Feb 2018 17:04:41 +0100 References: To: user@zookeeper.apache.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3273) Hey Sergey, > My question is if there is a way to configure ZooKeeper client in such = a > way that it will try to reconnect to other ZooKeeper servers when the > server it was connected to gets segmented? The connect string that you pass when creating a zookeeper handle can contain multiple server names or addresses. If you configure that way, the client will try to reconnect to a different server upon = disconnecting. Note that the zk client will notify the application of the connection = loss, but that notification (or exception, depending on whether you are on the = sync or Async API) does not imply that the session is expired. Session = expiration is declared by the leader. -Flavio > On 20 Feb 2018, at 14:59, Sergey Chugunov = wrote: >=20 > Hello Zookeeper folks, >=20 > I'm from Apache Ignite community [1]; I'm trying to adopt ZooKeeper = ver. > 3.4.6 in our project. >=20 > As Ignite is a distributed platform we need some discovery mechanism = to > build a cluster; when integrating ZooKeeper for this purpose I faced = the > following issue. >=20 > My scenario is simple: I use ZK multinode cluster to organize = discovery > environment where Ignite nodes publish discovery data to find each = other. >=20 > So each Ignite node connects to some ZK server in order to join the > cluster. > However, when ZK server gets segmented from ZooKeeper cluster, it = seems it > closes sessions of all connected clients; as a result all Ignite nodes > connected to that particular server shut down. >=20 > My question is if there is a way to configure ZooKeeper client in such = a > way that it will try to reconnect to other ZooKeeper servers when the > server it was connected to gets segmented? >=20 > If no, what would you recommend to overcome the issue? Is it possible = to > handle server segmentation in ZooKeeper client and organize reconnect > procedure at Ignite's code level? >=20 > Thanks, > Sergey Chugunov. >=20 > [1] https://ignite.apache.org/