app/vmagent: tune http client for sending data to remote storage in order to disable closing keep-alive connections

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/663
This commit is contained in:
Aliaksandr Valialkin 2020-08-04 20:59:55 +03:00
parent a04f4a3d9a
commit a930460236

View File

@ -69,7 +69,9 @@ func newClient(argIdx int, remoteWriteURL, urlLabelValue string, fq *persistentq
TLSClientConfig: tlsCfg, TLSClientConfig: tlsCfg,
TLSHandshakeTimeout: 5 * time.Second, TLSHandshakeTimeout: 5 * time.Second,
MaxConnsPerHost: 2 * concurrency, MaxConnsPerHost: 2 * concurrency,
WriteBufferSize: 16 * 1024, MaxIdleConnsPerHost: 2 * concurrency,
IdleConnTimeout: time.Minute,
WriteBufferSize: 64 * 1024,
} }
pURL := proxyURL.GetOptionalArg(argIdx) pURL := proxyURL.GetOptionalArg(argIdx)
if len(pURL) > 0 { if len(pURL) > 0 {