lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Make an existing rate limit library good like our rate limiter, then use that library here

Open dullbananas opened this issue 9 months ago • 3 comments

Make it optimized and properly handle ipv6

dullbananas avatar Mar 26 '25 14:03 dullbananas

Or move our existing rate limit code to a separate crate and make it a new library.

Nutomic avatar May 30 '25 08:05 Nutomic

Ideally this should be an actix guard or middleware. I did find this https://github.com/jacob-pro/actix-extensible-rate-limit

dessalines avatar May 30 '25 14:05 dessalines

That one only seems to support an overall rate limit for all routes, not separate limits per endpoint like we have now. On the other hand it can rollback based on response code which we need for #5548 and returns headers like x-ratelimit-remaining.

Nutomic avatar Jun 02 '25 09:06 Nutomic