When using the Apache PoolingClientConnectionManager such as:
PoolingClientConnectionManager cm = new PoolingClientConnectionManager();
cm.setMaxTotal(???);
HttpClient client = new DefaultHttpClient(cm);
What is considered a good default value to place there?
An example on the Apache site here uses 100
and elsewhere (stackoverflow.com/questions/13310490/apache-defaulthttpclient-how-to-set-max-total-connection-and-default-max-conn) I read that one should know roughly what the peak load will be and set it to that.
So is there a good default value to place in setMaxTotal(???)
? Or is it recommended to figure our what your peak is and base it off that?
If the latter, what's a good way of determining what your peak load is?
I looked here through this slideshow and saw that the default is 10
, though you can set it to 0
and just let the good times roll (although that apparently negates any time out services, any good reasons for that?). I also happened to glance through the oracle docs (docs.oracle.com/cd/E17904_01/web.1111/e13737/ds_tuning.htm) and saw some good tips on maintaining Connection Pools but nothing on determining the peak load.
Any help on this would be much appreciated.