Mohit Anchlia wrote:
Currently we have code that does HttpClient client = new HttpClient();
for every post request. We have around 30 concurrent requests being
made. I am trying to understand if we use HttpClient this way then
does it create new connection for every request
Yes, it does. You effectively throw away a potentially reusable
connection after each request execution.
For proper usage of HttpClient connection pooling see:
http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html#d4e596
http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html#d4e629
I mean does it have a max concurrent request limit
when HttpClient is used in this way?
Also, how do I see or debug how many requests are waiting on
HttpClient to get a connection?
Use wire / context logging
http://hc.apache.org/httpcomponents-client/logging.html
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]