hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Feng Jiang" <feng.a.ji...@gmail.com>
Subject Re: Can httpclient fetch a url by given ip without querying dns?
Date Mon, 11 Jun 2007 08:52:53 GMT
Hi Pete,

Thanks for you answer. Well, the JVM will cache the dns information for me
automatically after the first query, but in my experience, it still cost too
many time. That is why I still need a perfect solution for it. Looks like
Oleg's solution is good.

Best regards,
Feng

On 6/8/07, Pete Keyes <PKeyes@starbucks.com> wrote:
>
> I assume that would work, but you shouldn't really need to do that.  I
> believe that the java.net.InetAddress class explicitly states that it
> caches DNS lookup information to avoid that cost.
>
> Look at the JavaDocs for java.net.InetAddress - it explains the
> algorithm used and how to modify it.
>
> In the end HttpClient isn't in control of the hostname-to-ip
> resolution...unless there is some kind virtual name processing being
> used.
>
> ...Pete
> Starbucks Coffee Co. - MS IT-5
> 2401 Utah Ave S
> Seattle, WA. 98134
> (w) 206-318-5933
>
> -----Original Message-----
> From: Feng Jiang [mailto:feng.a.jiang@gmail.com]
> Sent: Friday, June 08, 2007 1:19 AM
> To: httpclient-user@jakarta.apache.org
> Subject: Can httpclient fetch a url by given ip without querying dns?
>
> Hi all,
>
> when i use httpclient to fetch a lot of urls, i have already had the ip
> of
> host for each url. I don't want the httpclient to query dns for its ip,
> because it will cost a lot of time. So can I explicitly set IP for each
> url?
>
>
> Thanks a lot,
>
> Feng
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message