allow configuring maximum idle connections per host (#18908)

This commit is contained in:
Harshavardhana
2024-01-29 16:50:37 -08:00
committed by GitHub
parent 403ec7cf21
commit 2ddf2ca934
6 changed files with 27 additions and 14 deletions

View File

@@ -587,7 +587,7 @@ func GetDefaultConnSettings() xhttp.ConnSettings {
// NewInternodeHTTPTransport returns a transport for internode MinIO
// connections.
func NewInternodeHTTPTransport() func() http.RoundTripper {
func NewInternodeHTTPTransport(maxIdleConnsPerHost int) func() http.RoundTripper {
lookupHost := globalDNSCache.LookupHost
if IsKubernetes() || IsDocker() {
lookupHost = nil
@@ -601,7 +601,7 @@ func NewInternodeHTTPTransport() func() http.RoundTripper {
CurvePreferences: fips.TLSCurveIDs(),
EnableHTTP2: false,
TCPOptions: globalTCPOptions,
}.NewInternodeHTTPTransport()
}.NewInternodeHTTPTransport(maxIdleConnsPerHost)
}
// NewCustomHTTPProxyTransport is used only for proxied requests, specifically