-
Notifications
You must be signed in to change notification settings - Fork 324
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
Proper rate limiting headers #139
Comments
Hi there ! With a little bit of investigation, it appears that RFC6585 mentions a |
Sure! Thanks for looking it up. I think its not completely necessary to abolish it, don't get me wrong. But it would be nice to have some sort of customizability to specify the other stuff that I mentioned. Mainly expressing the rate limits limit and remaining. Reset can be helpful when it comes to easily have a "back-off" to make sure to not make more requests. |
Closed by #141 |
I was told to x-post this on here since it's more of an issue/feature with/for the oxy middleware.
traefik/traefik#3440
Do you want to request a feature or report a bug?
Feature
What did you expect to see?
The way the current rate limits are implemented are a bit of lackluster. I hope this can be improved upon.
Currently when you define your rate limits as suggested in the .yml or .toml file, you can specify a duration, an average and a burst. Additionally to an expression it should trigger on.Now iIf you hit one of those rate limitsin the loadbalancerit will return a string which says the following:oxy/ratelimit/tokenlimiter.go
Lines 174 to 176 in d5b7318
While this may be sort of okay, the headers that get set are:
oxy/ratelimit/tokenlimiter.go
Lines 181 to 189 in d5b7318
For users that want to properly build around those rate limits and throttle depending on how close you are to hitting them, it would be kind of nice to have a way of always sending rate limit headers?
Maybe something along the lines of on every request:
This way the users that interface with any service could properly integrate their application into those ratelimits.
Additionally, it would be nice to have a configurable response. Currently as mentioned above it returns a string, which can certainly throw off any implementation on a JSON based REST API since the response body would not match the expected JSON response.
The text was updated successfully, but these errors were encountered: