hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Thread Contention (due to use of proxys) in HttpClient 4.3
Date Thu, 15 May 2014 08:50:51 GMT
On Wed, 2014-05-14 at 16:05 +0100, Daniel Feist wrote:


> I agree 10% isn't that much and this testing maybe isn't 100% through,
> but I think it's fairly clear that unless you use minimalClient with
> 4.3, it doesn't matter which features you turn off (even all of them),
> 4.3 still doesn't perform as fast as 4.2.  Also I'm surprised that 3.1
> runs so fast, even if it doesn't scale quite as well as 4.x.
> Couple of outstanding question:
> 1) I assume your recommendation about leaving stale connection
> checking on by default unless you know what you are doing is still the
> same in 4.3?  Maybe it's a good idea to turn if off by default for
> idempotent http methods and on by default for others, rather than
> having it on for everything?

We are actually planning to do away with indiscriminate stale connection
checking for each request in 4.4 [1][2] The current plan is to start
checking connections only after a certain period of inactivity. We might
also treat idempotent requests differently, but generally people tend to
scream bloody murder every time they see an I/O exception and blame it
on HttpClient. This is the reason why we have the damn check on by

> 2) I'm still unsure why 4.3 is running slower than 4.2, even with
> everything turned off..

Let's keep digging.

> For my particular use case i think I might just stick to 3.1 for now,
> until our next minor release anyway, because the huge performance
> difference I was seeing between 3.1 and 4.3 it seems was 100% down to
> the stale connection check!  That said i like the fluent interface and
> flexibility of 4.3.

I would advise against using HC 3.1. It has been unmaintained for too
long. HC 4.2 has the same fluent APIs so you should not lose too much. 


[1] http://wiki.apache.org/HttpComponents/HttpComponentsRoadmap
[2] https://issues.apache.org/jira/browse/HTTPCLIENT-1493

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

View raw message