jonnenauha / prometheus_varnish_exporter

Varnish exporter for Prometheus
MIT License
178 stars 101 forks source link

scrape becomes slower with more backends #60

Open hsmade opened 4 years ago

hsmade commented 4 years ago

As the metrics are fetched from varnish during a scrape request, the scraping gets slower with more backends. Due to that old backends are not removed (for a while), the number of backends can increase quickly in a CI/CD environment. This causes scrapes to take longer, and take up resources in prometheus. Generally what you'd want to do in a 'heavy' scraper as this one, is fetching metrics on a Timer.Tick and keeping them. If you fail to get metrics on the next tick, you can empty the cache as well, to signal to prometheus that something failed.

blackjid commented 3 years ago

@hsmade did you find a way to setup this exporter that improve perfomance on metrics scraping??