[ https://issues.apache.org/jira/browse/THRIFT-3429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Larrabee updated THRIFT-3429: ------------------------------------ Summary: Go THttpClient option to fully read/close HTTP response body after Flush (was: Go THttpClient option to fully read/close HTTP response body) > Go THttpClient option to fully read/close HTTP response body after Flush > ------------------------------------------------------------------------ > > Key: THRIFT-3429 > URL: https://issues.apache.org/jira/browse/THRIFT-3429 > Project: Thrift > Issue Type: Improvement > Components: Go - Library > Reporter: Justin Larrabee > Priority: Minor > > Currently the THttpTransport holds onto the HTTP response body until the > owner calls Close(). This has the side effect of not releasing the TCP > connection back to the HTTP client's pool until it is called. When using > keepalive and many of concurrent THttpTransport's, this delay can cause a lot > of additional connections to be created. > I would suggest that the transport be configurable to fully read and close > the HTTP response body after a Flush() call so that the connection is > returned to the pool as quickly as possible. > I would love some opinions on this suggestion. My patch for issue 3405 added > a THttpClientOptions struct to make it easy to support additional features > like this improvement without needing to alter the new public constructors. -- This message was sent by Atlassian JIRA (v6.3.4#6332)