hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: The reverse DNS lookup in httpcomponents core
Date Fri, 20 Dec 2013 12:11:49 GMT
On Thu, 2013-12-19 at 23:20 +0000, Huibing Yin wrote:
> Hi,
> We use httpcomponents core for sending high volume of data through SSL connection. Right
now we have encountered an issue: if the first nameserver is out of rotation, the performance
is vastly degraded. The initial investigation found that there is this class "org.apache.http.nio.pool.AbstractNIOConnPool"
in which the "requestCompleted" method has a lock on a block of code, where the connection
is created. During the connection creation, the constructor of "org.apache.http.nio.reactor.ssl.SSLIOSession"
will do a reverse DNS lookup through
>  final String<http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/String.java#String>
hostname = ((InetSocketAddress<http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/net/InetSocketAddress.java#InetSocketAddress>)
> There is a cache DNS TTL setting for enable the cache for ip lookup by name. But I didn't
found any setting for enabling the cache for reverse dns lookup.  So the question is: is there
any way to avoid this reverse DNS lookup?

Hi Huibing

This is a known problem. 


Unfortunately it was discovered only after the 4.3 release. The proper
resolution requires some API changes and therefore can only be done in
the 4.4 branch. I am still trying to figure out a way to resolve the
problem on the client side in the 4.3 branch without changing the
existing APIs.


PS: please subscribe to the list prior to posting

To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org

View raw message