mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Increase MaxIdlConnsPerHost to 25
This commit is contained in:
parent
b67a6e6d41
commit
2ab3f1e1d5
@ -34,6 +34,8 @@ type tlsTransportCache struct {
|
|||||||
transports map[string]*http.Transport
|
transports map[string]*http.Transport
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const idleConnsPerHost = 25
|
||||||
|
|
||||||
var tlsCache = &tlsTransportCache{transports: make(map[string]*http.Transport)}
|
var tlsCache = &tlsTransportCache{transports: make(map[string]*http.Transport)}
|
||||||
|
|
||||||
func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) {
|
func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) {
|
||||||
@ -66,6 +68,7 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) {
|
|||||||
Proxy: http.ProxyFromEnvironment,
|
Proxy: http.ProxyFromEnvironment,
|
||||||
TLSHandshakeTimeout: 10 * time.Second,
|
TLSHandshakeTimeout: 10 * time.Second,
|
||||||
TLSClientConfig: tlsConfig,
|
TLSClientConfig: tlsConfig,
|
||||||
|
MaxIdleConnsPerHost: idleConnsPerHost,
|
||||||
Dial: (&net.Dialer{
|
Dial: (&net.Dialer{
|
||||||
Timeout: 30 * time.Second,
|
Timeout: 30 * time.Second,
|
||||||
KeepAlive: 30 * time.Second,
|
KeepAlive: 30 * time.Second,
|
||||||
|
Loading…
Reference in New Issue
Block a user