ratelimit icon indicating copy to clipboard operation
ratelimit copied to clipboard

Feature request: unenforced / test-only limits

Open dweitzman opened this issue 4 years ago • 4 comments

Would be used as a precaution against being accidentally overly-aggressive when setting new rate limits on existing systems.

It'd probably be useful if both real and check-only limits could co-exist for the same rate limit pattern, to help with testing whether it would be safe to lower an existing rate limit.

I'm imagining something like check_only_requests_per_unit or test_requests_per_unit that could be set side-by-side with or in place of requests_per_unit and increment a different metric name instead of the existing over-limit metric (and near-limit metric) when it would have triggered.

dweitzman avatar Feb 02 '21 19:02 dweitzman

Yeah I agree this would be a nice feature to have.

mattklein123 avatar Feb 03 '21 00:02 mattklein123

We added shadow mode functionality to our fork as a way of handling this situation https://github.com/replicon/ratelimit/pull/12

repl-david-winiarski avatar Feb 03 '21 14:02 repl-david-winiarski

@repl-david-winiarski This is exactly what we're looking for! Is there a reason for not merging your changes upstream? I think it would be very valuable

jespersoderlund avatar Sep 21 '21 05:09 jespersoderlund

@repl-david-winiarski PR (#294 ) for shadow-mode is now merged which would have a similar effect to what you are after

jespersoderlund avatar Oct 05 '21 07:10 jespersoderlund