This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Not working for limit greater than 10_000 #392
Comments
If people run into the problem then I will increase it, maybe even allowing a configurable option for it. |
kkoomen
added a commit
that referenced
this issue
May 21, 2021
@wips This does work right? It has been implemented so I guess I can close this. I totally forgot to close this. |
@kkoomen , It works, thanks, but in a weird way. For example when I set LIMIT to 1k I need to set scanCount somewhere between 10k and 20k to make it reliably cut-off requests after limit is reached. It happens when I try to load the endpoint at 5-10req/s rate. I assume it has nothing to do with this project, looks like a weird behaviour of ioredis or Redis itself, I don't have much experience with it, so maybe it's expected. |
Is it possible to throw error when |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I think, we should at least add a warning to Readme, that for a limit greater than 10 thousand this will not work because of this redis scan query: https://github.com/kkoomen/nestjs-throttler-storage-redis/blob/master/src/throttler-storage-redis.service.ts#L23 .
I believe that a limit smaller than 10 000 is fine for most cases. I have an API service where the free tier has 15 000 requests in a month (30 days), so I get stuck for a while why is this not working in production. Locally I tested it with a smaller limit and everything worked fine.
You can close this if you think that nobody else will hit this problem.
The text was updated successfully, but these errors were encountered: