[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-users
Subject:    Re: HTTP Connection Pool Settings
From:       Dan Checkoway <dcheckoway () gmail ! com>
Date:       2012-05-14 10:04:49
Message-ID: CANK0VvjoO37ZQVcVCvv8OMV9b4M5J+RmoyzLE-MJ=HLte+oOOA () mail ! gmail ! com
[Download RAW message or body]


The thing you really need to consider imho is how many connections you
anticipate being in use simultaneously.  For example, what's the size of
your tomcat executor pool?  (Pardon the assumption that you're using
tomcat...)

But think about it this way -- if your tomcat executor has say 200 threads,
and you're not doing something asynchronous (i.e. firing off a thread to do
HTTP), then you pretty much know you'll never need more than 200 HttpClient
connections concurrently, right?

So considering you only have a single route being used, you could set the
same value for maxTotal and defaultMaxPerRoute.  And once you consider your
concurrency needs (i.e. max # of threads using the pool concurrently), the
value of that property should become fairly intuitive.

Hope this helps.  And please correct me if my approach isn't logical.

On Sun, May 13, 2012 at 9:43 AM, apachehttpdev07
<tenzing.wangdi@gmail.com>wrote:

>
> There is only one target which gets called for example "www.abc.com" which
> returns back results.
>
> traceroute www.abc.com gives me 15 hops from the server.
>
> Let me know if you need anything else.
>
>
> dcheckoway wrote:
> >
> > How many different "routes" do you expect to use?
> >
> > On Mon, May 7, 2012 at 7:21 PM, apachehttpdev07
> > <tenzing.wangdi@gmail.com>wrote:
> >
> >>
> >> We are using Apache Http Client 4.1.3 in production systems now. I am
> >> using a
> >> ThreadSafeClientConnection Manager to pool http connections. We have a
> >> concurrent user base of 126 users per second hitting 2 JVMs in cluster.
> >> What
> >> I need to know is what should be the value of Max Total and
> >> DefaultMaxPerRoute. I have set it to 1000 per JVM box. Is this more than
> >> enough.
> >>
> >> ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager();
> >> cm.setMaxTotal(maxTotal);
> >> cm.setDefaultMaxPerRoute(defaultMaxPerRoute);
> >>
> >> If you need anymore information we will readily provide.
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/HTTP-Connection-Pool-Settings-tp33763553p33763553.html
> >> Sent from the HttpClient-User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> >> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/HTTP-Connection-Pool-Settings-tp33763553p33823483.html
> Sent from the HttpClient-User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic