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/11/23 01:29:45 UTC

[GitHub] [apisix] wfgydbu opened a new issue #2820: request help: how to apply bandwidth control in apisix?

wfgydbu opened a new issue #2820:
URL: https://github.com/apache/apisix/issues/2820


   ### Issue description
   Does APISIX support bandwidth control right now?
   
   Consider this scenario, Using APISIX as a gateway to handle all traffics, and expecting the gateway to limit the bandwidth (all traffics) to, say no more than 5G. because we have to keep some bandwidth for inner user, i.e. for managerment.
   
   Is this possible? Do we have this feature or any solutions now?
   
   Thanks.
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): any version > 1.2, preferably 2.0
   * OS: Centos 7.6
   


----------------------------------------------------------------
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] [apisix] spacewander edited a comment on issue #2820: request help: how to apply bandwidth control in apisix?

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






----------------------------------------------------------------
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] [apisix] wfgydbu closed issue #2820: request help: how to apply bandwidth control in apisix?

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


   


----------------------------------------------------------------
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] [apisix] spacewander commented on issue #2820: request help: how to apply bandwidth control in apisix?

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


   Because Nginx doesn't provide a mechanism to limit ingress traffic.


----------------------------------------------------------------
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] [apisix] wfgydbu edited a comment on issue #2820: request help: how to apply bandwidth control in apisix?

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


   > There is not such a feature. But you can write your plugin works on body_filter and do the egress limitation, then apply it to global rule. There is not way to archive an ingress bandwidth control yet.
   > Personally speaking, I will suggest you to do this at the level of router instead of the API gateway.
   
   Could you please explain a bit more why we cannot limit egress traffic but not ingress traffic with apisix? Thanks a lot! @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.

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



[GitHub] [apisix] wfgydbu commented on issue #2820: request help: how to apply bandwidth control in apisix?

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


   Cool 😭,Thanks!


----------------------------------------------------------------
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] [apisix] spacewander commented on issue #2820: request help: how to apply bandwidth control in apisix?

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


   There is not such a feature. But you can write your plugin works on body_filter and do the limitation. There is not way to archive an ingress bandwidth control yet.
   Personally speaking, I will suggest you to do this at the level of router instead of the API gateway.


----------------------------------------------------------------
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] [apisix] wfgydbu commented on issue #2820: request help: how to apply bandwidth control in apisix?

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


   Thanks for comments. 
   
   Seems we need to re-discuss out plan here, thanks! 


----------------------------------------------------------------
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] [apisix] wfgydbu closed issue #2820: request help: how to apply bandwidth control in apisix?

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


   


----------------------------------------------------------------
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] [apisix] tokers commented on issue #2820: request help: how to apply bandwidth control in apisix?

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


   @wfgydbu If the granularity of bandwidth limitation is the whole gateway instance, i think it's better to do it in a low level, just as @spacewander said.
   
   If you want to do it per request level, now you can modify the `apisix/cli/ngx_tpl.lua` (the nginx.conf configuration template), add `limit_rate` directive to use the rate limiting feature of Nginx itself.


----------------------------------------------------------------
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] [apisix] wfgydbu commented on issue #2820: request help: how to apply bandwidth control in apisix?

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


   > There is not such a feature. But you can write your plugin works on body_filter and do the egress limitation, then apply it to global rule. There is not way to archive an ingress bandwidth control yet.
   > Personally speaking, I will suggest you to do this at the level of router instead of the API gateway.
   
   Could you please explain a bit why we cannot limit egress traffic but not ingress traffic with apisix? Thanks a lot! @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.

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