aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weed/util/http/client/http_client.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/util/http/client/http_client.go b/weed/util/http/client/http_client.go
index d1d2f5c56..3e015ca2d 100644
--- a/weed/util/http/client/http_client.go
+++ b/weed/util/http/client/http_client.go
@@ -119,6 +119,7 @@ func NewHttpClient(clientName ClientName, opts ...HttpClientOpt) (*HTTPClient, e
Certificates: []tls.Certificate{},
RootCAs: caCertPool,
InsecureSkipVerify: false,
+ NextProtos: []string{"http/1.1"}, // Disable HTTP/2 for parallel connections
}
if clientCertPair != nil {
@@ -130,6 +131,8 @@ func NewHttpClient(clientName ClientName, opts ...HttpClientOpt) (*HTTPClient, e
httpClient.Transport = &http.Transport{
MaxIdleConns: 1024,
MaxIdleConnsPerHost: 1024,
+ MaxConnsPerHost: 0, // 0 means no limit, allows parallel connections
+ ForceAttemptHTTP2: false,
TLSClientConfig: tlsConfig,
}
httpClient.Client = &http.Client{