-
Notifications
You must be signed in to change notification settings - Fork 170
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
Add X-RateLimit-* headers #953
Comments
In the latest version (3.4.0) we introduced one of those headers: #929 When rate-limited by the 3scale backend, APIcast returns the number of seconds that the caller needs to wait before it's authorized again in the "Retry-After" header. Returning something like Imagine a set of mapping rules like this one: When the caller hits |
Hi @davidor, and thanks for your reply! Forewords: various countries are introducing API frameworks requiring (esp. for payment/revenue govt APIs) specific throttling headers (links below). iiuc mismatches are related to configurations where different endpoints increase the same metric, but probably there was a similar issue with Reading https://github.com/3scale/apicast/pull/929/files#diff-31313c92616b54028dac1ba183e6f79aR359 it seems that similar values are exposed via I can even try to provide PRs & co once we agree on the subject. Thanks for your time, Links |
Hi @ioggstream , The problem does not apply to the I'd be open to adding the "limit" and "remaining" headers, but I think they should be opt-in, because of the problems I mentioned above. I think that with the 3scale model it is very common to have several endpoints that increment the same metric. It's important to take into account "parent metrics" as well. When increasing the child metric the parent gets increased by the same value. So imagine that we have two metrics "m1" and "m2", and both of them are children of "Hits", in that case, if we define a limit on "Hits" the information in the "limit" and "remaining" headers might not be accurate for a set of rules like the following one:
|
Hi @davidor, and thanks for your reply!
Sure! We will document it.
Ok, so depending from the api path you could be throttled out or not. In any case |
Hi @davidor, I'm writing this draft-rfc on the subject. Let me know if that can help https://ioggstream.github.io/draft-polli-ratelimit-headers/draft-polli-ratelimit-headers.html |
@unleashed do you confirm we can close this via #1166? |
Yep, thanks |
I wish
apicast supports returing those 3 headers after every call:
Steps To Reproduce
Current Result
Expected Result
Notes
See https://issues.redhat.com/browse/THREESCALE-3795
The text was updated successfully, but these errors were encountered: