mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
bc7cf4950b
While fasthttp.Client uses less CPU and RAM when scraping targets with small responses (up to 10K metrics), it doesn't work well when scraping targets with big responses such as kube-state-metrics. In this case it could use big amounts of additional memory comparing to net/http.Client, since fasthttp.Client reads the full response in memory and then tries re-using the large buffer for further scrapes. Additionally, fasthttp.Client-based scraping had various issues with proxying, redirects and scrape timeouts like the following ones: - https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1945 - https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5425 - https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2794 - https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1017 This should help reducing memory usage for the case when target returns big response and this response is scraped by fasthttp.Client at first before switching to stream parsing mode for subsequent scrapes. Now the switch to stream parsing mode is performed on the first scrape after reading the response body in memory and noticing that its size exceeds the value passed to -promscrape.minResponseSizeForStreamParse command-line flag. Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5567 Overrides https://github.com/VictoriaMetrics/VictoriaMetrics/pull/4931 |
||
---|---|---|
.. | ||
alecthomas/units | ||
aws | ||
Azure/azure-sdk-for-go/sdk | ||
AzureAD/microsoft-authentication-library-for-go | ||
beorn7/perks | ||
bmatcuk/doublestar/v4 | ||
cespare/xxhash/v2 | ||
cheggaaa/pb/v3 | ||
cpuguy83/go-md2man/v2 | ||
davecgh/go-spew | ||
dennwc/varint | ||
fatih/color | ||
felixge/httpsnoop | ||
go-kit/log | ||
go-logfmt/logfmt | ||
go-logr | ||
gogo/protobuf | ||
golang | ||
golang-jwt/jwt/v5 | ||
googleapis | ||
grafana/regexp | ||
hashicorp/go-version | ||
influxdata/influxdb | ||
jmespath/go-jmespath | ||
jpillora/backoff | ||
json-iterator/go | ||
klauspost/compress | ||
kylelemons/godebug | ||
mattn | ||
modern-go | ||
mwitkow/go-conntrack | ||
oklog/ulid | ||
pkg | ||
pmezard/go-difflib | ||
prometheus | ||
rivo/uniseg | ||
russross/blackfriday/v2 | ||
stretchr/testify | ||
urfave/cli/v2 | ||
valyala | ||
VictoriaMetrics | ||
VividCortex/ewma | ||
xrash/smetrics |