You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are the following consumers: c1, c2.
There are the following routes: r1, r2.
I hope to configure different consumer count values for the limit-count plugin when accessing different routes.
For example:
Consumer c1 has a limit of 50 requests every 60 seconds when accessing route r1 and a limit of 100 requests when accessing r2.
Consumer c2 has a limit of 100 requests every 60 seconds when accessing route r1 and a limit of 200 requests when accessing r2.
Currently, the plugin configuration only allows setting one upper threshold value for limit-count.
I have considered generating independent consumers based on the {consumer}-{route} pair to address this issue. For example, the above scenario would require configuring 4 consumers as follows:
Consumer c1-r1: limit-count 50
Consumer c1-r2: limit-count 100
Consumer c2-r1: limit-count 100
Consumer c2-r2: limit-count 200
However, this approach leads to a rapid increase in the number of consumers, making the client configuration more cumbersome. Is there a more reasonable and elegant solution?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My demand scenario is as follows:
There are the following consumers: c1, c2.
There are the following routes: r1, r2.
I hope to configure different consumer count values for the limit-count plugin when accessing different routes.
For example:
Consumer c1 has a limit of 50 requests every 60 seconds when accessing route r1 and a limit of 100 requests when accessing r2.
Consumer c2 has a limit of 100 requests every 60 seconds when accessing route r1 and a limit of 200 requests when accessing r2.
Currently, the plugin configuration only allows setting one upper threshold value for limit-count.
I have considered generating independent consumers based on the {consumer}-{route} pair to address this issue. For example, the above scenario would require configuring 4 consumers as follows:
However, this approach leads to a rapid increase in the number of consumers, making the client configuration more cumbersome. Is there a more reasonable and elegant solution?
Beta Was this translation helpful? Give feedback.
All reactions