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 2022/01/25 07:36:05 UTC

[GitHub] [apisix] 123libohan opened a new issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

123libohan opened a new issue #6197:
URL: https://github.com/apache/apisix/issues/6197


   ### Issue description
   
   How to current limit both in minutes and day  by using plugin limit-count?
   current,the plugin limit-count only Set a traffic limiting mode, Second or minute,If I want to set seconds and minutes at the same time,plugin not support,Because what you set later overwrites what you set earlier,Is there a better solution to this problem?thank you
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - 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] HelloBug0 commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   Sorry, I am not quite clear [minutes and day] in limit-count plugin. Do you mean the time_window parameter in minutes or in day?


-- 
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] wilson-1024 commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

Posted by GitBox <gi...@apache.org>.
wilson-1024 commented on issue #6197:
URL: https://github.com/apache/apisix/issues/6197#issuecomment-1061410386


   I want  to write a new plugin to implement this function.  can it be assigned to me?


-- 
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] wilson-1024 commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

Posted by GitBox <gi...@apache.org>.
wilson-1024 commented on issue #6197:
URL: https://github.com/apache/apisix/issues/6197#issuecomment-1061443999


   I can try it


-- 
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] HelloBug0 commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   > We should also deal with redis backend too?
   I think we could do that just as we do now.


-- 
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] HelloBug0 commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   @123libohan 


-- 
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 #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   In the future, we can implement it via https://github.com/openresty/lua-resty-limit-traffic/blob/master/lib/resty/limit/traffic.md#combine?


-- 
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] HelloBug0 edited a comment on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

Posted by GitBox <gi...@apache.org>.
HelloBug0 edited a comment on issue #6197:
URL: https://github.com/apache/apisix/issues/6197#issuecomment-1038539923


   > We should also deal with redis backend too?
   
   I think we could do that just as we do now.


-- 
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 #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   +1,I also want to know if there is a solution


-- 
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 #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   +1,I also want to know if there is a solution


-- 
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] xuminwlt commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   See https://zhangge.net/5158.html
   May help u.


-- 
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 #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   Can it be done in this plugin?


-- 
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] HelloBug0 commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   > > Sorry, I am not quite clear [minutes and day] in limit-count plugin. Do you mean the time_window parameter in minutes or in day?
   > 
   > Yes ,I mean the time_window, for an example , I want to limit access on one cunsumer 30 times per minute and 1000 times per day together
   
   I see. Thanks for your reply.


-- 
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] HelloBug0 edited a comment on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

Posted by GitBox <gi...@apache.org>.
HelloBug0 edited a comment on issue #6197:
URL: https://github.com/apache/apisix/issues/6197#issuecomment-1038539923


   > We should also deal with redis backend too?
   
   I think we could do that just as we do now.


-- 
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] 123libohan commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

Posted by GitBox <gi...@apache.org>.
123libohan commented on issue #6197:
URL: https://github.com/apache/apisix/issues/6197#issuecomment-1061606010


   > Can it be done in this plugin?
   
   Thanks,I think it can be done  in this plugin.
   In addition, is it possible to place the configuration in the same Redis key? In this way, the query of the  limit-count only needs to be performed once, and the time consuming will not be affected by the multiple query of Redis.


-- 
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] 123libohan commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

Posted by GitBox <gi...@apache.org>.
123libohan commented on issue #6197:
URL: https://github.com/apache/apisix/issues/6197#issuecomment-1021080305


   > See https://zhangge.net/5158.html May help u.
   
   Thank you but this plugin also can not limit both in minutes and day on one cunsumer at the same time.
   
   > See https://zhangge.net/5158.html May help u.
   
   Thank you but this plugin also can not limit both in minutes and day on one cunsumer at the same time.


-- 
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 #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   We should also deal with redis backend too?


-- 
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] tokers commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   Currently, the only way that you can run a plugin twice is through the global rule and per-requests' route level plugins.


-- 
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] xuminwlt commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   See https://zhangge.net/5158.html
   May help u.


-- 
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] 123libohan commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

Posted by GitBox <gi...@apache.org>.
123libohan commented on issue #6197:
URL: https://github.com/apache/apisix/issues/6197#issuecomment-1022108535


   > In the future, we can implement it via https://github.com/openresty/lua-resty-limit-traffic/blob/master/lib/resty/limit/traffic.md#combine?
   
   Ok thank you very much. When will it be available in the official 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] HelloBug0 commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   Is it a good idea if we organize some parameters of schema properties, like count, time_window, key, rejected_code, etd to a array? Than we cann deal with all these limiters as a array using lua-resty-limit-traffic. And it seems that other plugins like limit-req could do the same change. @spacewander 


-- 
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] 123libohan commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

Posted by GitBox <gi...@apache.org>.
123libohan commented on issue #6197:
URL: https://github.com/apache/apisix/issues/6197#issuecomment-1034760757


   > Sorry, I am not quite clear [minutes and day] in limit-count plugin. Do you mean the time_window parameter in minutes or in day?
   
   Yes ,I mean the time_window, for an example , I want to limit access on one cunsumer 30 times per minute and 1000 times per day together


-- 
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] HelloBug0 commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   > We should also deal with redis backend too?
   I think we could do that just as we do now.


-- 
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] 123libohan commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

Posted by GitBox <gi...@apache.org>.
123libohan commented on issue #6197:
URL: https://github.com/apache/apisix/issues/6197#issuecomment-1021080305


   > See https://zhangge.net/5158.html May help u.
   
   Thank you but this plugin also can not limit both in minutes and day on one cunsumer at the same time.
   
   > See https://zhangge.net/5158.html May help u.
   
   Thank you but this plugin also can not limit both in minutes and day on one cunsumer at the same time.


-- 
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] tokers commented on issue #6197: request help: How to current limit both in minutes and day by using plugin limit-count

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


   Currently, the only way that you can run a plugin twice is through the global rule and per-requests' route level plugins.


-- 
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