Add a limit to the number of in-flight requests (#1166)
Add a limit to the number of in-flight requests (#1166)

In order to avoid stuck collectors using up all system resources, add a
limit to the number of parallel in-flight scrape requests. This will
return a 503 error.

Default to 40 requests, this seems like a reasonable number based on:
* Two Prometheus servers scraping every 15 seconds.
* Failing scrapes after 5 minutes of stuckness.

Signed-off-by: Ben Kochie <9bbf917dc63fbaa40c67921332d26cf16a50db75@gmail.com>
siavashs/node_exporter,prometheus/node_exporter,siavashs/node_exporter,derekmarcotte/node_exporter,prometheus/node_exporter,siavashs/node_exporter,siavashs/node_exporter,prometheus/node_exporter,derekmarcotte/node_exporter,derekmarcotte/node_exporter,derekmarcotte/node_exporter