I have a application that will talk to several hosts (from 1 to 25). For each
host, it will make repeated (timed interval) ongoing GETs and POSTs to a few
ports.

QUESTION: What is the recommended usage of the
HttpClient/HttpConnectionManager for this scenario?

Do I use a single HttpConnectionManager for each host (20 hosts ==> 20 HCM)?
Or, can I reuse one HttpConnectionManager and talk to more than one host (20
host ==> 1 HCM)?

I am reasonably certain that I need to use the
MultiThreadedHttpConnectionManager.
What I think is that I'd create one connection manager and create a single
HttpClient instance for each host/port combination... like below:

HttpConnectionManager      HttpClientHost1Port3331
                                      HttpClientHost1Port8080
                                      HttpClientHost2Port3331
                                      HttpClientHost2Port8080
                                      ...

Agree/Disagree?

 
I see lots of posts about this but I am not 100% sure about the answer for
my scenario.
Thanks for any feedback in advance. 

NOTE: I want to solve this with 3.x and then move to 4.x
-- 
View this message in context: 
http://www.nabble.com/Proper-Use-of-HTTPClient-3.x-for-Many-Hosts-tp21631377p21631377.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Reply via email to