From bd2b22572fec9889f60b18479ba3cde9db979d11 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 3 Aug 2018 16:29:28 -0700 Subject: [PATCH] Increase max idle connections from 100 to 4096 (#6244) This is to be inline with our benchmarking results --- cmd/rpc/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/rpc/client.go b/cmd/rpc/client.go index 2343846b4..385a866de 100644 --- a/cmd/rpc/client.go +++ b/cmd/rpc/client.go @@ -116,11 +116,13 @@ func NewClient(serviceURL *xnet.URL, tlsConfig *tls.Config, timeout time.Duratio Transport: &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: newCustomDialContext(timeout), - MaxIdleConns: 100, + MaxIdleConnsPerHost: 4096, + MaxIdleConns: 4096, IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, TLSClientConfig: tlsConfig, + DisableCompression: true, }, }, serviceURL: serviceURL,