diff options
author | yzongyue <[email protected]> | 2019-10-12 13:57:11 +0800 |
---|---|---|
committer | Matt Holt <[email protected]> | 2019-10-11 23:57:11 -0600 |
commit | fcd8869f51b78f260e3c3aed53d7d87c2051ffe9 (patch) | |
tree | 8e11f11dac75a1d81ebaa3a1724fa101efe2459a | |
parent | 1e31be8de0d1d5587348619225456a793cb30f7f (diff) | |
download | caddy-fcd8869f51b78f260e3c3aed53d7d87c2051ffe9.tar.gz caddy-fcd8869f51b78f260e3c3aed53d7d87c2051ffe9.zip |
reverse_proxy: optimize MaxIdleConnsPerHost default (#2809)
-rw-r--r-- | modules/caddyhttp/reverseproxy/reverseproxy.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go index 266e5c3d0..566c9c4bb 100644 --- a/modules/caddyhttp/reverseproxy/reverseproxy.go +++ b/modules/caddyhttp/reverseproxy/reverseproxy.go @@ -91,8 +91,9 @@ func (h *Handler) Provision(ctx caddy.Context) error { if h.Transport == nil { t := &HTTPTransport{ KeepAlive: &KeepAlive{ - ProbeInterval: caddy.Duration(30 * time.Second), - IdleConnTimeout: caddy.Duration(2 * time.Minute), + ProbeInterval: caddy.Duration(30 * time.Second), + IdleConnTimeout: caddy.Duration(2 * time.Minute), + MaxIdleConnsPerHost: 32, }, DialTimeout: caddy.Duration(10 * time.Second), } |