Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At what level is the in-memory rate limiting meant to perform at? #95

Closed
angela-flores-wdc opened this issue Apr 10, 2020 · 4 comments
Closed

Comments

@angela-flores-wdc
Copy link

I ask because after implementing the in-memory store rate limiter, it does not correctly keep count of anything over 2 requests per second. Is this a known limitation or have I misconfigured something in my code? Thanks!

@novln
Copy link
Contributor

novln commented Apr 10, 2020

Hello,

The known limitation is about performance (see #86), but the counter shouldn't have any issue on incrementing itself.

Could you provide a simple gist that reproduces this issue so I could test it locally and find out what's going on.

Thank you in advance.

@angela-flores-wdc
Copy link
Author

Hmm, the simplified version I created for the gist is not experiencing the same problem. I will close this issue then because the rate limiter is behaving as intended, it must be some other factor in my code.

@justincampbell
Copy link

I just noticed a similar issue. When testing the memory store through HTTP handlers, the memory store appears to behave correctly with 1 key (IP address), but introducing a 2nd key causes odd behavior where a limit of 2 req/s allows ~3 requests for the first key and 2 for the 2nd key, and a limit of 3 req/s allows anywhere between 40 and 100 req/s through per key. I'm attempting to write a reproduction now.

@novln
Copy link
Contributor

novln commented Feb 14, 2022

Ok, please let me know 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants