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