-
Notifications
You must be signed in to change notification settings - Fork 393
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
Extend RateLimitFilter to support multiple ordered RateLimit rules #5194
Comments
cc @envoyproxy/gateway-maintainers |
@nezdolik this API |
@arkodg Does the premise of this issue still stand with BackendTrafficPolicy? What if I want all my routes exposed via the Gateway to have a high general rate limit rule, but for a specific HTTPRoute, I apply a more specific BackendTrafficPolicy? Does one take precedent over the other or is it non-deterministic? I'm using v1.2.5 of EG, and I remember in older version of the doc (v0.6), there's a specific BackendTrafficPolicy design page that spelled out this collision: "xRoute resource will win in a conflict", just want to make sure this is still the behavior. |
For this case, you'd need to define 2 BackendTrafficPolicies - one that targets the top level Gateway or all the other routes and a second that has a more specific rule for a specific route |
@arkodg would it make sense to define the top level gateway ratelimiting within the ClientTrafficPolicy rather than a BackendTrafficPolicy (and keep the route level limiting in the btp)? |
@ryanhristovski I think this intent
can be achieved by
Im not sure if |
@arkodg wdyt the functionality should be if an HTTPRoute level btp had For example:
Should I add some logic that only allows shared on Gateway & |
hey @ryanhristovski @nezdolik can we close this issue and create a new one or update title and description to better define shared ratelimit bucket feature |
Description:
In certain cases users may need to specify multiple ratelimit rules that should be applied in certain order. E.g. a global RL rule per ip and subsequent rule per ip per upstream/backend service. The Api could look like:
The config would translate into multiple Envoy filters ordered according to priority. Note, in my personal opinion is easier to operate with multiple envoy filters/multiple RL domains than try to order descriptors within single RL domain. This is due how envoy ratelimit service descriptor matcing algo works, e.g. match the longest descriptor first (which will not work for the example above). So Envoy filter chain config would look like:
And RL service descriptors will be populated accordingly.
Looking forward to feedback, if this proposal makes sense.
[optional Relevant Links:]
The text was updated successfully, but these errors were encountered: