You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Jeff Roberts <je...@rcshome.com> on 2006/01/25 15:18:29 UTC

2.0.2 - maxConnectionsPerHost and maxTotalConnections

I've picked up some code that everyone suddenly disavows all knowledge of...you know how that goes. :-)

We are creating a MultiThreadedHttpConnectionManager, setting�maxConnectionsPerHost to 8 and maxTotalConnections to 8 * 10.� That object is passed to the constructor for HttpClient.� We then receive requests, which we route to an Apache server, which is load balancing to 1 or more Tomcats via mod_jk.

I am told that someone fiddled around and found the 8/80 setting works well if we're "balancing" over only 1 Tomcat, but that they think we should multiply one or both of the properties by the number of Tomcats as we add servers.� No one seems to know where the "* 10" in the call to maxTotalConnections came from, or whether we still need it if we multiply the 8 by the number of Tomcats.

1. If any of that made sense, does anyone have a clue if we're setting these parameters correctly, and if either the 8 or the "* 10" makes any sense?

2. Does it sound right to multiply one or both by the number of Tomcats?

3. Can I call setMaxConnectionsPerHost() and setMaxTotalConnections() at any time?� While requests are cranking through, in other words?� Can I call them both with a larger and a smaller number than the current setting without problems, as Tomcats are added or removed?

Any info much appreciated.

--- 
J. Jeff Roberts 
jeff@rcshome.com 
(859) 552-5806 




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