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 2020/06/14 15:17:20 UTC

[GitHub] [incubator-apisix] sshniro opened a new issue #1712: Rate limit API calls based on consumers

sshniro opened a new issue #1712:
URL: https://github.com/apache/incubator-apisix/issues/1712


   ### Issue description
   Is it possible to perform rate limiting based on consumers/users, in order to implement monetization for the APIs?
   
   Example:
   ```shell
   {
       "username": "jack"
       "quotas": [
       	{
               "route_id": "1",
               "limit": 10,
               "window": "1 week"
           },
           {
               "route_id": "2",
               "limit": 150,
               "window": "1 week"
           }
   }
   ```


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

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



[GitHub] [incubator-apisix] membphis commented on issue #1712: Rate limit API calls based on consumers

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1712:
URL: https://github.com/apache/incubator-apisix/issues/1712#issuecomment-651468873


   @houshunwei you can take a look at: https://github.com/apache/incubator-apisix/blob/master/doc/plugins/limit-req.md#attributes


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

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



[GitHub] [incubator-apisix] membphis commented on issue #1712: Rate limit API calls based on consumers

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1712:
URL: https://github.com/apache/incubator-apisix/issues/1712#issuecomment-646114417


   You understand right


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

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



[GitHub] [incubator-apisix] membphis commented on issue #1712: Rate limit API calls based on consumers

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1712:
URL: https://github.com/apache/incubator-apisix/issues/1712#issuecomment-643875323


   The consumer object is allowed to bind the plug-in, and the configuration priority of this plug-in is the highest.
   
   https://github.com/apache/incubator-apisix/blob/master/doc/admin-api.md#consumer


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

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



[GitHub] [incubator-apisix] sshniro commented on issue #1712: Rate limit API calls based on consumers

Posted by GitBox <gi...@apache.org>.
sshniro commented on issue #1712:
URL: https://github.com/apache/incubator-apisix/issues/1712#issuecomment-644593976


   Thank you, If I understood correctly this can feature can be implemented via creating a consumer with a `limit plugin` and assign the consumer to a `route`.
   
   I guess the doc can be reworded to easily identify such features.


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

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



[GitHub] [incubator-apisix] houshunwei commented on issue #1712: Rate limit API calls based on consumers

Posted by GitBox <gi...@apache.org>.
houshunwei commented on issue #1712:
URL: https://github.com/apache/incubator-apisix/issues/1712#issuecomment-650889044


   > The consumer object is allowed to bind the plug-in, and the configuration priority of this plug-in is the highest.
   > 
   > https://github.com/apache/incubator-apisix/blob/master/doc/admin-api.md#consumer
   
   when using limit-req in consumer,limit-req limits by consumer or only by limit-req's key(ip or others)?
   for example:
   
   "limit-req": {
               "rate": 1,
               "burst": 0,
               "rejected_code": 429,
              "key":"**consumer**"
           }


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

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