From user-return-12171-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Fri Sep 27 14:43:39 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id D40C2180638 for ; Fri, 27 Sep 2019 16:43:38 +0200 (CEST) Received: (qmail 9561 invoked by uid 500); 27 Sep 2019 14:43:37 -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 9549 invoked by uid 99); 27 Sep 2019 14:43:37 -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; Fri, 27 Sep 2019 14:43:37 +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 91B2BC2DE6 for ; Fri, 27 Sep 2019 14:43:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.2 X-Spam-Level: X-Spam-Status: No, score=-0.2 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id UUH0jW4h0d3C for ; Fri, 27 Sep 2019 14:43:34 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.45; helo=mail-ed1-f45.google.com; envelope-from=c.turksema@gmail.com; receiver= Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id 4C7E9BC577 for ; Fri, 27 Sep 2019 14:43:34 +0000 (UTC) Received: by mail-ed1-f45.google.com with SMTP id y91so2527194ede.9 for ; Fri, 27 Sep 2019 07:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:date:message-id:in-reply-to:references:user-agent:subject :mime-version:content-transfer-encoding; bh=kR2dV7SYLKrnsuYHnH7LtlcyduQFeOBqo5wrFenCU+4=; b=Stx9SMiBogGjvX8zC1+jPub5IWhuGWjaWJdPnzfGCQRoP1SEMVe3N64BKXS2Yhooep p61mnhv4X/9cb9LhR3kzEkvA8LBKzJCBmH6mMupGxd8Porh+gbSVrrxgs4JDF2KVcUM3 Le5v/2Rf8kpRrfxH1aIIK6Yzx+/v+qKzacEKQtuQomgX0fpKbaPrH0yMqXilkTFLiJo6 6n1YarhmYL8DkCBmmq6Wuvq4MPG0TIxJLgIINYNDxV3Sr6miCOVZZ4VQN8uheQd7hObh dF5JrDnsksbu3lgx51dJLiPOt5uih5bEj7bAVBEP8y0p+V5EZ/Vcsbh+pDdaEb9HmlKb 5x7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:date:message-id:in-reply-to:references :user-agent:subject:mime-version:content-transfer-encoding; bh=kR2dV7SYLKrnsuYHnH7LtlcyduQFeOBqo5wrFenCU+4=; b=WjqG3CW053RuOdY/w/LXzt2VyOIXMA8fU2MXIPrUzIRgwKPcxf7nS2NEAVaI+eUd1o Xl3XoI6Lkr++iDZXr5Xn6H8cma23TIjLxHGWZWy5NqhS8vJNvAzmHWJIzzwM5pUyzS+n 63ZwjXId3qWzaoDtmcrMOIwTe3jFqJ84hIDl3F/rqEmSulyoucqum7bvVVeDAkm3pqUo o+6Yr8p79P6nuw+SR1gxIfcR5fg3Ul91MYA4CJ+GrARqlB0uI9kW8uL6n8MSW/N9++j4 RWZpoNEf4YqJNs744fAQsQuFqlyn3KAxn5OSK5NrtbK9ptoBeNi27zVbXM2iAXP1Fxs2 eWXA== X-Gm-Message-State: APjAAAWnUsE1fKmdUY7BKGUUoPMKGlH3kWxvXPSh/dcQ5X7TclsKAKx6 H5MNpriusuBvS46tBEty72aNf79XPi4= X-Google-Smtp-Source: APXvYqzxQjRl+p3pZqZs243m+loWqZxXMDtPOs2/2gp4Xn6P9TucaTrnHs+QXoboX34hm44Lw30Fjw== X-Received: by 2002:a17:906:35c2:: with SMTP id p2mr7917481ejb.241.1569595412799; Fri, 27 Sep 2019 07:43:32 -0700 (PDT) Received: from [10.0.0.4] (92-108-98-225.cable.dynamic.v4.ziggo.nl. [92.108.98.225]) by smtp.gmail.com with ESMTPSA id o22sm564863edv.26.2019.09.27.07.43.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Sep 2019 07:43:32 -0700 (PDT) From: Cee Tee To: Date: Fri, 27 Sep 2019 16:43:30 +0200 Message-ID: <16d732d4650.27db.495a588ebf64bb63541fbe4ec3b29808@gmail.com> In-Reply-To: References: User-Agent: AquaMail/1.20.0-1469 (build: 102100004) Subject: Re: Zookeeper client with single address pointing to multiple servers MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8" Content-Transfer-Encoding: 8bit You could do that as follows: 1 Connect to a single always online entrypoint zookeeper of the zookeeper cluster. 2 get Data the config node at /zookeeper/config 3 parse it into a multinode connect string and reconnect using that string. On 27 September 2019 16:33:48 LEE Ween Jiann wrote: > Hi, > > From the Zookeeper constructore in JAVA API: > “To create a ZooKeeper client object, the application needs to pass a > connection string containing a comma separated list of host:port pairs, > each corresponding to a ZooKeeper server.” > > I see that zookeeper resolves all the IPs from an address and randomly > picks one. Why would multiple addresses, one for each server be needed? Why > couldn’t zk client resolve all the servers from a single address? > > I’m asking this for helm deployment on Kubernetes as zookeeper is deployed > with a single headless service that points to multiple server.