hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jakarta-httpclient Wiki] Update of "ConnectionManagementDesign" by RolandWeber
Date Sun, 28 Jan 2007 06:17:22 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-httpclient Wiki" for change
notification.

The following page has been changed by RolandWeber:
http://wiki.apache.org/jakarta-httpclient/ConnectionManagementDesign

The comment on the change is:
corrected implementation review for MTHCM / HttpMethodDirector

------------------------------------------------------------------------------
  
  The {{{MultiThreadedHttpConnectionManager}}} in !HttpClient 3.x keeps a pool of connections.
Re-use depends on exact matches of the route. Limits are enforced per route. In other words,
the maximum connections per host are interpreted as maximum connections per route. If multiple
proxy servers are available, the maximum per host can be exceeded by using different routes
to the target host. This has not been a problem in the past.
  [[BR]]
- The {{{HttpMethodDirector}}} in !HttpClient 3.x will use an allocated connection for different
targets when following redirects, thereby evading the limit per host (or route) enforced by
the connection manager.
+ Once a connection is obtained from the manager, it can be used for any target. As long as
it is allocated it will count as a connection along the route for which it was obtained.
+ The {{{HttpMethodDirector}}} takes care to use connections only for the route for which
they are obtained.
+ When following redirects on a different route, the connection is released and a new one
gets allocated.
  
  A more sophisticated connection manager could provide performance benefits for !HttpClient
4.x. In particular, re-use of plain connections to a proxy for all routes via that proxy has
potential. Even more so if the proxy requires NTLM authentication and the previous authentication
state can be re-used.
  [[BR]]
- Correct enforcement of connections per host limits on a per-host basis in the presence of
redirects requires changes to both the connection management and the redirect handling logic.
+ Adherence to connections per host limits on a per-host basis requires changes to the connection
management logic.
+ Enforcement of connection usage exclusively along the advertised route is only required
when dealing with misbehaving applications. 
  
  
  = Design Ideas =

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message