Return-Path: X-Original-To: apmail-zookeeper-dev-archive@www.apache.org Delivered-To: apmail-zookeeper-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4D5F0108AC for ; Fri, 29 Nov 2013 08:34:44 +0000 (UTC) Received: (qmail 93957 invoked by uid 500); 29 Nov 2013 08:34:43 -0000 Delivered-To: apmail-zookeeper-dev-archive@zookeeper.apache.org Received: (qmail 93549 invoked by uid 500); 29 Nov 2013 08:34:39 -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 93509 invoked by uid 99); 29 Nov 2013 08:34:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Nov 2013 08:34:36 +0000 Date: Fri, 29 Nov 2013 08:34:36 +0000 (UTC) From: "Jong Wook Kim (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ZOOKEEPER-1666) Avoid Reverse DNS lookup if the hostname in connection string is literal IP address. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ZOOKEEPER-1666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13835250#comment-13835250 ] Jong Wook Kim commented on ZOOKEEPER-1666: ------------------------------------------ Hi, this patch still had the reverse DNS lookup delay issue for me. I have set connectionString to have hostname (not literal IP), but the stock 3.4.5 client had the delay. In my case resolvedAddress.toString() also had its hostname as well as the literal IP, like "hostname/10.0.0.1", apparently not starting with "/". I guess the if condition should find it already has a resolved IP address somehow differently. > Avoid Reverse DNS lookup if the hostname in connection string is literal IP address. > ------------------------------------------------------------------------------------ > > Key: ZOOKEEPER-1666 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1666 > Project: ZooKeeper > Issue Type: Improvement > Components: java client > Affects Versions: 3.4.5 > Reporter: George Cao > Assignee: George Cao > Labels: patch, test > Fix For: 3.4.6, 3.5.0 > > Attachments: ZOOKEEPER-1666-34.patch, ZOOKEEPER-1666-34v2.patch, ZOOKEEPER-1666.patch, ZOOKEEPER-1666.patch > > > In our ENV, if the InetSocketAddress.getHostName() is called and the host name in the connection string are literal IP address, then the call will trigger a reverse DNS lookup which is very slow. > And in this situation, the host name can simply set as the IP without causing any problem. -- This message was sent by Atlassian JIRA (v6.1#6144)