hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <bimargul...@gmail.com>
Subject Re: Telling HC to make new connections all the time
Date Tue, 21 Jun 2016 12:28:07 GMT
Oleg, If I set a TTL, do I also need an IdleConnectionMonitorThread (
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html#d5e652
)? thanks, benson.


On Tue, Jun 21, 2016 at 4:41 AM, Oleg Kalnichevski <olegk@apache.org> wrote:
> On Mon, 2016-06-20 at 13:57 -0400, Benson Margulies wrote:
>> We use the async http components library to connect various components
>> in a system that is deployed, in some cases, on AWS. When it's
>> deployed on AWS, there are ELBs involved.
>>
>> Like some other people, we've having various trauma dealing with the
>> very dynamic environment of AWS ELBs, which includes constant DNS
>> changes and some other issues. So far, we've been making our HC
>> configuration more and more complex. I'm wondering if we should back
>> off and make it simpler -- make a new connection for each request.
>> Obviously, this will be somewhat slower and more expensive, but at the
>> moment we might prefer a slower and more expensive approach that works
>> to one that occasionally gets lost.
>>
>> I appreciate that even making new connections all the time won't
>> compensate for all possible DNS problems -- if Java itself caches a
>> stale name->address translation, making a new connection will fail
>> just as effectively as anything else.
>>
>> Does anyone out there have advice to share (other than running away from ELB)?
>>
>
> Hi Benson
>
> I personally would consider disabling connection persistence extreme and
> unnecessary. Consider setting the TTL (total time to live) of persistent
> connections to some low value (say, 10 seconds or even less) instead.
> This should improve distribution of connections across the cluster of
> servers behind a load balancer.
>
> Hope it helps
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>

---------------------------------------------------------------------
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