statsd_exporter icon indicating copy to clipboard operation
statsd_exporter copied to clipboard

reliability: option to safe guard against cardinality explosion

Open eightnoteight opened this issue 4 years ago • 2 comments
trafficstars

prometheus doesn't support cardinality explosion by default, so when applications send a lot of metrics by mistake both statsd exporter and prometheus can get overwhelmed and lead to statsd exporter crashing due to memory or prometheus ingesting thousands of series and crashing or slow ingestion + slow queries.

So essentially I'm proposing a cli option to only maintain first N metric series received. and the rest to be simply dropped. Any thoughts on this area?

eightnoteight avatar Dec 05 '20 21:12 eightnoteight

Hmm. I like the idea, but I am not sure how to make it "good" for users. The statsd protocol does not let us "reject" metrics so I am worried about silently dropping data. Combined with TTLs expiring old metrics, it could be very hard to understand what is going on. How would you like to get insight when this limit is hit?

matthiasr avatar Dec 18 '20 10:12 matthiasr

How would you like to get insight when this limit is hit?

I think this could potentially be solved by emitting a metric when the limit is hit and outputting an error log.

fpetkovski avatar May 23 '22 09:05 fpetkovski