From dev-return-71733-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Mon Jul 23 16:56:05 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 9C468180677 for ; Mon, 23 Jul 2018 16:56:04 +0200 (CEST) Received: (qmail 45318 invoked by uid 500); 23 Jul 2018 14:56:03 -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 45307 invoked by uid 99); 23 Jul 2018 14:56:03 -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; Mon, 23 Jul 2018 14:56:03 +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 1F75A1A1621 for ; Mon, 23 Jul 2018 14:56:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id xUzUrNjTLHbV for ; Mon, 23 Jul 2018 14:56:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 047515F418 for ; Mon, 23 Jul 2018 14:56:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 59B50E2567 for ; Mon, 23 Jul 2018 14:56:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id B5C2B27142 for ; Mon, 23 Jul 2018 14:56:00 +0000 (UTC) Date: Mon, 23 Jul 2018 14:56:00 +0000 (UTC) From: "Ismael Juma (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ZOOKEEPER-3100) ZooKeeper client times out due to random choice of resolved addresses MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ZOOKEEPER-3100?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D= 16552955#comment-16552955 ]=20 Ismael Juma commented on ZOOKEEPER-3100: ---------------------------------------- The relevant Kafka ticket for reference https://issues.apache.org/jira/brow= se/KAFKA-7193 > ZooKeeper client times out due to random choice of resolved addresses > --------------------------------------------------------------------- > > Key: ZOOKEEPER-3100 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3100 > Project: ZooKeeper > Issue Type: Bug > Components: java client > Affects Versions: 3.4.13 > Reporter: Rajini Sivaram > Priority: Major > > The changes to ZooKeeper clients to re-resolve hosts made under ZOOKEEPER= -2184 results in delays when only a subset of the addresses that a host res= olves to are actually reachable. This can result in connection timeouts on = the client. > For example, when running tests with a single ZooKeeper server accepting = connections on 127.0.0.1 on a host that has both IPv4 and IPv6, we have see= n connection timeouts in tests if client connects using `localhost` rather = than `127.0.0.1`. ZooKeeper client resolves `localhost` to both the IPv4 an= d IPv6 addresses and chooses a random one. If IPv6 was chosen, a fixed one = second backoff is applied before retry since there is only one hostname spe= cified. After backoff, 'localhost' is resolved again and a random address c= hosen, which could also be the unconnectable IPv6 address. > For the list of host names specified for connection, the clients do round= -robin without backoffs until connections to all hostnames are attempted. C= an we also do the same for addresses that each of the hosts resolves to, so= that backoffs are only applied after connection to each address is attempt= ed once and every address is connected to once using round-robin rather tha= n random selection? This will avoid delays in cases where at least one addr= ess can be connected to. > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)