hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bhowmik, Bindul" <bindulbhow...@gmail.com>
Subject Re: Disabling pooling of PoolingConnectionManager
Date Mon, 17 Oct 2016 18:31:02 GMT
Murat,

On Mon, Oct 17, 2016 at 11:12 AM, Murat Balkan <mrbalkan@gmail.com> wrote:
> Hi,
>
> We are using PoolingHttpClientConnectionManager to open up connections to
> multiple URL's in different threads (via different HttpGet objects).
>
> The only reason we are using the PoolingHttpClientConnectionManager is its'
> performance in multi-thread environments (as suggested by the
> documentation).
>
> However, we are not interested in the actual "pooling" functionality.
> That's to say, we want to open up a brand new connection even if the route
> is the same.

The performance enhancements you achieve from
PoolingHttpClientConnectionManager are due to its connection pooling
feature, that saves you to cost of establishing the connection when
another request goes to the same route.

>
> How can we achieve this? We tried to set maxPerroute to 1 but it seems it
> is not the correct way.

I have not tested, but setting maxPerRoute to 1 would degrade
performance for you as you will have a number of Http clients waiting
for the single connection.

If you do not want to use pooled connections, you can use
BasicHttpClientConnectionManager and not share it.

>
> Regards,
> Murat

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