-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
LocalRateLimiter with dynamic descriptor values #19895
Comments
Hi @junr03 @mattklein123 , can U answer this please. |
This is basically the same issue as #19685. I think we should probably also support the substitution formatter for dynamic descriptor values. cc @kyessenov |
I think you can use the expression rate limit action extension for dynamic values. We can add substitution formatter, too, as another extension. We should document this better. I could only find some test case here https://github.com/istio/proxy/blob/master/test/envoye2e/ratelimit/ratelimit_test.go#L41. |
I have a similar issue - I want to be able to set a default rate limit for each client and configure special rate limits for some clients. I am trying to using local rate limit + descriptors as in this example. |
No, there is no way to add dynamic buckets with local rate limiter AFAICT. You might need some global rate limit with quotas for that. |
I seem to be having a similar issue as @sseetharaman6 here. Only that I am trying to define local rate limit to throttle requests based on PATH. Note: I was able to get this working using the global rate limits. The URIs are in the form I have raised #38008 highlighting the configurations that I have tried. I see that the feature referenced in this issue (#19685 ) is specific to the Network Rate Limiter, I was wondering if someone can provide me with cues to realise my use-case. |
@ns-asriram how were you able to achieve this using global rate limits? ie rate limiting based on the {id} which is in the URL? |
I have setup a localRateLimiter Filter on the route level . I am trying to configure the rateLimiter such that the limits are applied based on the remote-address or an Auth token passed in the request header. Eg: For a particular API path /foo, Allow 5 reqs per min per token or remoteAddress. Although I could configure this with the GlobalRateLimiter, despite digging through the documentation multiple times, I am not able to find a relevant configuration to achieve this with the localRateLimiter.
LocalRateLimitConfig
Using the following struct provided for the globalRateLimiter Config throws an invalid descriptor error.
Does Envoy not support dynamic values for LocalRateLimiter descriptors .. ??
Documentation Reference : https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/local_rate_limit_filter#using-rate-limit-descriptors-for-local-rate-limiting
The text was updated successfully, but these errors were encountered: