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 5d0c37bec0
commit c25b0c2cd5

View file

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