gloo
gloo copied to clipboard
Dynamic ratelimit values
a common ask is to pass the values or the rate limit dynamically, for example, a call reaches the gateway and based on the identity of the user/ call a different or compute its quota, then this quota gets used for the rate-limiting.
@antonioberben and @asayah we have a header that can be used to create a rule for every single thing that passes through. So what extra scope.
@asayah @kevin-shelaga how do you feel about this being driven by a header on the request? It doesn't really make sense for clients to set the rate limit themselves, of course. I'm thinking more along the lines of users configure edge with transformations to set headers as part of request processing. This would allow the rate limiting to be driven off a dynamic value (from the header) and it leverages our existing support for header transformations, JWT processing claims to headers, etc.
To be clear, the above does not work today. I'm just floating this as a potential direction after discussing with a few folks.
That's risky but fine imo, (ideal it would be in the metadatas) the scenario can be:
- Request received
- Do authn
- Add a Plugin auth, and based on oidc group + Ip + something else set a header with RL values
- RL based on the header values
- Sanitize header
The idea would be to have a direct feedback from a potential user
Fixed by https://github.com/solo-io/gloo-mesh-enterprise/issues/11512, closing.