prometheus_varnish_exporter icon indicating copy to clipboard operation
prometheus_varnish_exporter copied to clipboard

scrape becomes slower with more backends

Open hsmade opened this issue 5 years ago • 1 comments

  • Varnish 6.3.1
  • prometheus_varnish_exporter 1.5.1

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.

hsmade avatar Dec 12 '19 13:12 hsmade

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

blackjid avatar Mar 12 '21 16:03 blackjid