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 Andy <an...@hotmail.com> on 2010/12/04 16:28:56 UTC
MultiThreadedHttpConnectionManager general question
Hi,I would like to use HttpClient in a multi-threaded environment so I am looking at using the MultiThreadedHttpConnectionManager.I read the document at: http://hc.apache.org/httpclient-3.x/threading.htmlBut I am still not quite sure what these options mean or what how they are different: maxConnectionsPerHost and maxTotalConnections
My goal is to bulk load (call a web service) 5,000 requests, using a max of 50 threads at a time.
Can anyone help clarify? Thanks-
RE: MultiThreadedHttpConnectionManager general question
Posted by Andy <an...@hotmail.com>.
I wrote up how I accomplished my goal using Spring and Spring WS, for those interested:
http://forum.springsource.org/showthread.php?p=332874#post332874
> Date: Sat, 4 Dec 2010 16:23:08 +0000
> Subject: Re: MultiThreadedHttpConnectionManager general question
> From: sebbaz@gmail.com
> To: httpclient-users@hc.apache.org
>
> On 4 December 2010 15:28, Andy <an...@hotmail.com> wrote:
> >
> > Hi,I would like to use HttpClient in a multi-threaded environment so I am looking at using the MultiThreadedHttpConnectionManager.I read the document at: http://hc.apache.org/httpclient-3.x/threading.htmlBut I am still not quite sure what these options mean or what how they are different: maxConnectionsPerHost and maxTotalConnections
>
> maxConnectionsPerHost means what it says - the maximum number of
> connections allowed to the same host.
> Likewise maxTotalConnections is the overall connection total, for all hosts.
>
> > My goal is to bulk load (call a web service) 5,000 requests, using a max of 50 threads at a time.
> > Can anyone help clarify? Thanks-
> >
>
> If there is one host involved, set both maxima to the same number, in
> this case at least 50.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
RE: MultiThreadedHttpConnectionManager general question
Posted by Andy <an...@hotmail.com>.
Great that helps, thank you!
> Date: Sat, 4 Dec 2010 16:23:08 +0000
> Subject: Re: MultiThreadedHttpConnectionManager general question
> From: sebbaz@gmail.com
> To: httpclient-users@hc.apache.org
>
> On 4 December 2010 15:28, Andy <an...@hotmail.com> wrote:
> >
> > Hi,I would like to use HttpClient in a multi-threaded environment so I am looking at using the MultiThreadedHttpConnectionManager.I read the document at: http://hc.apache.org/httpclient-3.x/threading.htmlBut I am still not quite sure what these options mean or what how they are different: maxConnectionsPerHost and maxTotalConnections
>
> maxConnectionsPerHost means what it says - the maximum number of
> connections allowed to the same host.
> Likewise maxTotalConnections is the overall connection total, for all hosts.
>
> > My goal is to bulk load (call a web service) 5,000 requests, using a max of 50 threads at a time.
> > Can anyone help clarify? Thanks-
> >
>
> If there is one host involved, set both maxima to the same number, in
> this case at least 50.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
Re: MultiThreadedHttpConnectionManager general question
Posted by sebb <se...@gmail.com>.
On 4 December 2010 15:28, Andy <an...@hotmail.com> wrote:
>
> Hi,I would like to use HttpClient in a multi-threaded environment so I am looking at using the MultiThreadedHttpConnectionManager.I read the document at: http://hc.apache.org/httpclient-3.x/threading.htmlBut I am still not quite sure what these options mean or what how they are different: maxConnectionsPerHost and maxTotalConnections
maxConnectionsPerHost means what it says - the maximum number of
connections allowed to the same host.
Likewise maxTotalConnections is the overall connection total, for all hosts.
> My goal is to bulk load (call a web service) 5,000 requests, using a max of 50 threads at a time.
> Can anyone help clarify? Thanks-
>
If there is one host involved, set both maxima to the same number, in
this case at least 50.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org