mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/promscrape: reduce default value for -promscrape.discovery.concurrency
from 500 to 100
This should reduce load on Kubernetes API server and Consul when big number of targets are discovered Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/574
This commit is contained in:
parent
1f2826bae2
commit
62e1908986
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
maxConcurrency = flag.Int("promscrape.discovery.concurrency", 500, "The maximum number of concurrent requests to Prometheus autodiscovery API (Consul, Kubernetes, etc.)")
|
maxConcurrency = flag.Int("promscrape.discovery.concurrency", 100, "The maximum number of concurrent requests to Prometheus autodiscovery API (Consul, Kubernetes, etc.)")
|
||||||
maxWaitTime = flag.Duration("promscrape.discovery.concurrentWaitTime", time.Minute, "The maximum duration for waiting to perform API requests "+
|
maxWaitTime = flag.Duration("promscrape.discovery.concurrentWaitTime", time.Minute, "The maximum duration for waiting to perform API requests "+
|
||||||
"if more than -promscrape.discovery.concurrency requests are simultaneously performed")
|
"if more than -promscrape.discovery.concurrency requests are simultaneously performed")
|
||||||
)
|
)
|
||||||
|
@ -65,7 +65,7 @@ func NewClient(apiServer string, ac *promauth.Config) (*Client, error) {
|
||||||
ReadTimeout: time.Minute,
|
ReadTimeout: time.Minute,
|
||||||
WriteTimeout: 10 * time.Second,
|
WriteTimeout: 10 * time.Second,
|
||||||
MaxResponseBodySize: 300 * 1024 * 1024,
|
MaxResponseBodySize: 300 * 1024 * 1024,
|
||||||
MaxConns: *maxConcurrency,
|
MaxConns: 2 * *maxConcurrency,
|
||||||
}
|
}
|
||||||
return &Client{
|
return &Client{
|
||||||
hc: hc,
|
hc: hc,
|
||||||
|
|
Loading…
Reference in a new issue