hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Smith <randomd...@gmail.com>
Subject Re: Implementing failover
Date Mon, 07 Dec 2015 18:49:53 GMT
> Not quite. HttpClient as of version 4.4 supports so called multi-home
> hosts, that is hosts with multiple DNS records. HttpClient will attempt
> to establish connection to a responsive endpoint and only if all of them
> fail to respond and will propagate the exception up the caller stack to
> be eventually acted upon by HttpRequestRetryHandler.

Interesting, that's good to know.  Although obviously multi-A record
hosts doesn't apply in my instance ... unfortunatley.  However
certainly worth remembering for the future !

>
> If the default fail-over logic is not what you want there is an option
> of building a custom connection operator and replacing the default one.
>
> http://hc.apache.org/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.html
>
> Oleg


Sounds like a good option.  I guess this would be the preferable route
than say chaining a bunch of try/catch with boolean flags !

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


Mime
View raw message