-
Notifications
You must be signed in to change notification settings - Fork 17
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
Configuring a global & route limit #19
Comments
Thanks @ItsReddi for using the package and for leaving your issue. I'm looking into reproducing the issue and will respond with a solution if we identify a bug. I think at first glance, Another issue might be your actual configuration and our explanation of multi-bucket usage. We've got some improved documentation we are working on posting which should help clarify issues like this. Give me a bit of time and we'll get this all sorted out for you. If you need something more urgently reach out to [email protected]. |
Thanks for your reply i could set up an reproduction repository / with a vscode .devcontainer if that would help. Actual result not hitting the limit on /api/v1/tasks:
Expected result not hitting the limit on /api/v1/tasks:
Actual result hitting the limit on /api/v1/tasks: (while beeing throttled, after 5 requests)
Epected result hitting the limit on /api/v1/tasks: (while beeing throttled, after 5 requests)
Furthermore:
|
I want to configure a global limit and i want to configure Route limits.
I think my problem is about the understanding of:
https://github.com/artisansdk/ratelimiter#how-multiple-buckets-work
So i have setup a default in the kernel:
And configured:
So 5 requests at start, 1/s drain, 30 sec penalty.
The rate limits are enforced correctly 👍
But the returned headers are always the headers, from the global default and not from Route Limit.
That makes it impossible to know for the clients, what limits are on a route.
Response while not limited: (request on /api/v1/tasks)
While limited: (request on /api/v1/tasks)
The
retry-after
seems to be correct but notLimit
andRemaining
So i am unsure if its a bug or i misunderstand the README.
Thanks in advance.
The text was updated successfully, but these errors were encountered: