diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index 31761fb7d..c89129301 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -2337,7 +2337,7 @@ func getKubernetesInfo(dctx context.Context) madmin.KubernetesInfo { } client := &http.Client{ - Transport: NewHTTPTransport(), + Transport: globalHealthChkTransport, Timeout: 10 * time.Second, } diff --git a/cmd/bucket-replication.go b/cmd/bucket-replication.go index ab6096538..782adfa3e 100644 --- a/cmd/bucket-replication.go +++ b/cmd/bucket-replication.go @@ -179,7 +179,7 @@ func checkRemoteEndpoint(ctx context.Context, epURL *url.URL) error { } client := &http.Client{ - Transport: NewHTTPTransport(), + Transport: globalRemoteTargetTransport, Timeout: 10 * time.Second, } diff --git a/cmd/globals.go b/cmd/globals.go index 0d8d0bba3..507fd53ea 100644 --- a/cmd/globals.go +++ b/cmd/globals.go @@ -390,6 +390,8 @@ var ( globalRemoteTargetTransport http.RoundTripper + globalHealthChkTransport http.RoundTripper + globalDNSCache = &dnscache.Resolver{ Timeout: 5 * time.Second, } diff --git a/cmd/server-main.go b/cmd/server-main.go index 9a54c7d7c..97bdf1981 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -339,7 +339,7 @@ func serverHandleCmdArgs(ctxt serverCtxt) { globalProxyEndpoints = GetProxyEndpoints(globalEndpoints) globalInternodeTransport = NewInternodeHTTPTransport(ctxt.MaxIdleConnsPerHost)() globalRemoteTargetTransport = NewRemoteTargetHTTPTransport(false)() - + globalHealthChkTransport = NewHTTPTransport() globalForwarder = handlers.NewForwarder(&handlers.Forwarder{ PassHost: true, RoundTripper: NewHTTPTransportWithTimeout(1 * time.Hour),