prometheus/config
Łukasz Mierzwa 870627fbed Add enable_compression scrape config option
Currently Prometheus will always request gzip compression from the target when sending scrape requests.
HTTP compression does reduce the amount of bytes sent over the wire and so is often desirable.
The downside of compression is that it requires extra resources - cpu & memory.

This also affects the resource usage on the target since it has to compress the response
before sending it to Prometheus.

This change adds a new option to the scrape job configuration block: enable_compression.
The default is true so it remains the same as current Prometheus behaviour.

Setting this option to false allows users to disable compression between Prometheus
and the scraped target, which will require more bandwidth but it lowers the resource
usage of both Prometheus and the target.

Fixes #12319.

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2023-11-20 12:02:55 +00:00
..
testdata Add enable_compression scrape config option 2023-11-20 12:02:55 +00:00
config_default_test.go Add new Go build tags. 2021-08-27 10:24:14 +02:00
config_test.go Add enable_compression scrape config option 2023-11-20 12:02:55 +00:00
config_windows_test.go Invert service discovery dependencies (#7701) 2020-08-20 13:48:26 +01:00
config.go Add enable_compression scrape config option 2023-11-20 12:02:55 +00:00