[JIRA] Closed: (JSPT-3) Providers helpers for dealing with idle connections in HttpClient

Chad La Joie (JIRA) noreply at shibboleth.net
Mon Mar 5 12:39:16 GMT 2012


     [ https://issues.shibboleth.net/jira/browse/JSPT-3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chad La Joie closed JSPT-3.
---------------------------

    Resolution: Fixed

Done in rev 236

> Providers helpers for dealing with idle connections in HttpClient
> -----------------------------------------------------------------
>
>                 Key: JSPT-3
>                 URL: https://issues.shibboleth.net/jira/browse/JSPT-3
>             Project: Java Support
>          Issue Type: New Feature
>          Components: io
>            Reporter: Chad La Joie
>            Assignee: Chad La Joie
>             Fix For: 1.1.0
>
>   Original Estimate: 4 hours
>  Remaining Estimate: 4 hours
>
> The concurrent HttpClient connection manager has restrictions on how big it can grow per host and overall.  However, it does not ever evict idle connections[1].  This means that connections will remain open as long as the web server allows them, which can be hours.  That's wasteful and probably not very helpful.
> So, it would be helpful to provide two options:
> * The ability to close connection immediately after use.  This can be accomplished by sending the 'Connection: close' header with the request.  There should be an option on the HttpClientBuilder to always do this.  It would be implemented by a request filter.
> * Provide an implementation of a background sweeper thread that purges connections that have been idle for longer than a specified amount of time.
> [1] http://hc.apache.org/httpcomponents-client-dev/tutorial/html/connmgmt.html#d5e647

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the commits mailing list