From httpclient-user-return-4441-apmail-jakarta-httpclient-user-archive=jakarta.apache.org@jakarta.apache.org Mon Nov 05 19:49:25 2007 Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 42765 invoked from network); 5 Nov 2007 19:49:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Nov 2007 19:49:25 -0000 Received: (qmail 8397 invoked by uid 500); 5 Nov 2007 19:49:03 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 8387 invoked by uid 500); 5 Nov 2007 19:49:03 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 8374 invoked by uid 99); 5 Nov 2007 19:49:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2007 11:49:03 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [213.46.255.22] (HELO viefep24-int.chello.at) (213.46.255.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2007 19:49:34 +0000 Received: from [192.168.0.101] (really [84.75.131.77]) by viefep24-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20071105194845.WTSP8093.viefep24-int.chello.at@[192.168.0.101]> for ; Mon, 5 Nov 2007 20:48:45 +0100 Subject: Re: IP address resolution From: Oleg Kalnichevski To: HttpClient User Discussion In-Reply-To: References: Content-Type: text/plain Date: Mon, 05 Nov 2007 20:48:32 +0100 Message-Id: <1194292112.5643.9.camel@okhost> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Mon, 2007-11-05 at 11:02 -0800, Pete Keyes wrote: > Is anyone aware of how http-client will react in the following scenario: > - DNS lookup evaluates to 2 physical IP addresses for: > "HttpCient.getHostConfiguration().setHost(host, port)"; > > We have a trading partner that is implementing a fault tolerant B2B > service, so the DNS lookup will return 2 IP addresses. The desire they > have is to use the physical IP address of the first available service - > doesn't matter which one. > > I don't know how http-client will handle this. I know the IP addresses > are cached by the JVM and both IP addresses are accessible in the > InetAddress.getAllByName("host.domain.com"). > > Does anyone know how http-client will react to this scenario? > Pete, Per default HttpClient always picks up the default IP address, but it is trivial to plug in a more complex socket factory that makes of InetAddress.getAllByName. In fact such factory has already been contributed and is planned for inclusion into HttpClient 4.0 https://issues.apache.org/jira/browse/HTTPCLIENT-643 Hope this helps Oleg > ...Pete > Starbucks Coffee Co. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-user-help@jakarta.apache.org