hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID (ATTSI)" <dk0...@att.com>
Subject If I use MultiThreadedHttpConnectionManager, will it cause issues with load balancers?
Date Fri, 06 Aug 2010 16:19:07 GMT
I'm investigating converting some code using HttpClient to use the
MultiThreadedHttpConnectionManager, which will allow some cached
connections to be able to skip the SSL handshake.  I was wondering if
there are any disadvantages of this approach.

If the URL I'm connecting to is a load balancer, I would think that
means that the connection that gets set up goes directly to a target
node, and not to the load balancer.  I would think a load balancer
either uses a "round-robin" or "load measurement" strategy, or some
combination of both.  If it primarily measures load to determine where
to bind a connection, then doesn't the presence of cached connections
make it more difficult for this kind of load balancer to balance load

I noticed that HttpClient has some notion of expiring "idle"
connections, with the "closeIdleConnections()" on
MultiThreadedHttpConnectionManager.  I'm not sure what this does,
however.  From the wording of the javadoc, it makes it sound like it
performs the action when the method is called (closing idle
connections), as opposed to simply automatically closing all connections
that have been idle that long (which seems much more logical).  Which
interpretation is correct?

I'm not sure whether closing idle connections will mitigate the concern
I have about load balancing, but it might help.

I read the "performance guide", but I didn't see these issues addressed.

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

View raw message