Closed DGolubets closed 1 year ago
Is this similar to your requirement: https://the-asf.slack.com/archives/CUC5MN17A/p1690449611274429?
Is this similar to your requirement: https://the-asf.slack.com/archives/CUC5MN17A/p1690449611274429?
I don't have ASF account to check.
Please join #apisix channel after joining the ASF slack workspace: https://join.slack.com/t/the-asf/shared_invite/zt-1z1cth9wx-2CMIattLWRW5R5ytuNHIgA
hi @DGolubets have you try this feature in req-limit plugin ?
Hey,
Please join #apisix channel after joining the ASF slack workspace: https://join.slack.com/t/the-asf/shared_invite/zt-1z1cth9wx-2CMIattLWRW5R5ytuNHIgA
Thanks for the invite
No, my requirement is different, it's more like what I found a bit down the thread there: https://the-asf.slack.com/archives/CUC5MN17A/p1676970398154249
hi @DGolubets have you try this feature in req-limit plugin ?
The problem with keys is that you can only specify the variable name, not the value.
Essentialy what I want is:
ConsumerA -> Route1 -> 10 rps
ConsumerA -> Route2 -> 20 rps
ConsumerB -> Route1 -> 5 rps
ConsumerB -> Route1 -> 5 rps
ConsumerB -> Route2 -> unlimited
ConsumerC -> unlimited
Hey,
Please join #apisix channel after joining the ASF slack workspace: https://join.slack.com/t/the-asf/shared_invite/zt-1z1cth9wx-2CMIattLWRW5R5ytuNHIgA
Thanks for the invite
No, my requirement is different, it's more like what I found a bit down the thread there: https://the-asf.slack.com/archives/CUC5MN17A/p1676970398154249
hi @DGolubets have you try this feature in req-limit plugin ? https://apisix.apache.org/docs/apisix/plugins/limit-req/
The problem with keys is that you can only specify the variable name, not the value.
Essentialy what I want is:
ConsumerA -> Route1 -> 10 rps ConsumerA -> Route2 -> 20 rps ConsumerB -> Route1 -> 5 rps ConsumerB -> Route1 -> 5 rps ConsumerB -> Route2 -> unlimited ConsumerC -> unlimited
Currently rate limit plugin doesn't support per consumer per route, this can be a feature request.
I've found the Workflow plugin, which seems to allow me to do what I want, though it only supports limit-count
. I think it would be really cool if it supported all the plugins, allowing for complex logic.
@DGolubets would you mind sharing how you did that? Maybe you can share the route configuration as well.
@shreemaan-abhishek I have my route as following:
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: public-api-route
spec:
http:
- name: rule1
match:
hosts:
- test.myhost.com
paths:
- /graphql
backends:
- serviceName: public-api
servicePort: 80
plugins:
- name: key-auth
enable: true
- name: workflow
enable: true
config:
rules:
- actions:
- - limit-count
- count: 60
rejected_code: 429
time_window: 60
case:
- - consumer_name
- '=='
- test
I see, thanks for the share. You can close this issue if your problem is resolved.
Description
I want to enable rate limiting for a particular consumer for a particular route.
So far I didn't find how can that be enabled.
Environment
APISIX install with Helm in k8s. Chart version: apisix-2.1.0 App version: 3.4.0