Tune tcp keep-alives with new kernel timeout options (#9963)

For more deeper understanding https://blog.cloudflare.com/when-tcp-sockets-refuse-to-die/
This commit is contained in:
Harshavardhana
2020-07-03 10:03:41 -07:00
committed by GitHub
parent 21a37e3393
commit e59ee14f40
8 changed files with 63 additions and 55 deletions
+1 -1
View File
@@ -409,7 +409,7 @@ const updateTimeout = 10 * time.Second
func getUpdateTransport(timeout time.Duration) http.RoundTripper {
var updateTransport http.RoundTripper = &http.Transport{
Proxy: http.ProxyFromEnvironment,
DialContext: xhttp.NewCustomDialContext(timeout, timeout),
DialContext: xhttp.NewCustomDialContext(timeout),
IdleConnTimeout: timeout,
TLSHandshakeTimeout: timeout,
ExpectContinueTimeout: timeout,