You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/15 01:28:32 UTC

[GitHub] [apisix] XW512 opened a new issue #5065: request help: When different users access the same URL, the flow restriction is different

XW512 opened a new issue #5065:
URL: https://github.com/apache/apisix/issues/5065


   ### Issue description
   
   Hello, now the limit count policy seems to set a URL to consumer according to the key consumer_name can only limit one user. If I have multiple users and need different current limiting policies, how should I configure it? Thank you
   
   ### Environment
   
   - apisix version (cmd: `apisix version`): 2.9
   - OS (cmd: `uname -a`): centOS7
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): 1.19.9.1
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] shuaijinchao commented on issue #5065: request help: When different users access the same URL, the flow restriction is different

Posted by GitBox <gi...@apache.org>.
shuaijinchao commented on issue #5065:
URL: https://github.com/apache/apisix/issues/5065#issuecomment-919652610


   https://github.com/apache/apisix/blob/b7c1b5e8ce91323b14f80db8bdb4b63ca37bd6ef/docs/en/latest/plugins/limit-count.md#L42
   
   ---
   Can you choose other current limiting keys ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] XW512 commented on issue #5065: request help: When different users access the same URL, the flow restriction is different

Posted by GitBox <gi...@apache.org>.
XW512 commented on issue #5065:
URL: https://github.com/apache/apisix/issues/5065#issuecomment-921400248


   @shuaijinchao @spacewander Thank you for your reply,I'll try your way


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #5065: request help: When different users access the same URL, the flow restriction is different

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #5065:
URL: https://github.com/apache/apisix/issues/5065#issuecomment-919671923


   You can bind the configuration to the user, see http://apisix.apache.org/docs/apisix/admin-api#consumer
   
   ```
   $ curl http://127.0.0.1:9080/apisix/admin/consumers  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
       "username": "jack",
       "plugins": {
           "key-auth": {
               "key": "auth-one"
           },
           "limit-count": {
               "count": 2,
               "time_window": 60,
               "rejected_code": 503,
               "key": "remote_addr"
           }
       }
   }'
   HTTP/1.1 200 OK
   Date: Thu, 26 Dec 2019 08:17:49 GMT
   ...
   
   {"node":{"value":{"username":"jack","plugins":{"key-auth":{"key":"auth-one"},"limit-count":{"time_window":60,"count":2,"rejected_code":503,"key":"remote_addr","policy":"local"}}},"createdIndex":64,"key":"\/apisix\/consumers\/jack","modifiedIndex":64},"prevNode":{"value":"{\"username\":\"jack\",\"plugins\":{\"key-auth\":{\"key\":\"auth-one\"},\"limit-count\":{\"time_window\":60,\"count\":2,\"rejected_code\":503,\"key\":\"remote_addr\",\"policy\":\"local\"}}}","createdIndex":63,"key":"\/apisix\/consumers\/jack","modifiedIndex":63},"action":"set"}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander closed issue #5065: request help: When different users access the same URL, the flow restriction is different

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #5065:
URL: https://github.com/apache/apisix/issues/5065


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org