Welcome! Log In Create A New Profile

Advanced

Re: bandwidth limit for specific server

Paul
December 24, 2021 11:44AM
On 2021-12-22 8:53 p.m., huiming wrote:
> Francis Daly,
>
>  extremely appreciative of your feedback.
>
>      Any suggestion for third-party module that does some form of
> internal bandwidth limiting?

Disclaimer: this is not a specific nginx reply. And it's not
third-party. You can profile all uses of bandwidth within a linux
environment using tc (please see
https://man7.org/linux/man-pages/man8/tc.8.html)

Season's greetings to all on list,
Paul
---
Tired old sys-admin.


>
> thanks
> huiming
>
>
> ------------------ Original ------------------
> *From:* "nginx" <francis@daoine.org>;
> *Date:* Thu, Dec 23, 2021 07:47 AM
> *To:* "nginx"<nginx@nginx.org>;
> *Subject:* Re: bandwidth limit for specific server
>
> On Sat, Dec 18, 2021 at 01:37:11PM +0800, huiming wrote:
>
> Hi there,
>
> >   Is it possible to limit total bandwidth for server?
>
> Using only stock nginx, I believe the answer is "yes, but not in a way
> that you would want; so effectively no".
>
> You can limit the number of concurrent (active) connections; you can
> limit the rate of requests that nginx will process; and you can limit
> the response bandwidth for each request.
>
> By combining those, you can put an upper limit on the response bandwidth;
> but I suspect that it is unlikely to be useful for you.
>
>
>
> You might be happier looking for a third-party module that does some
> form of internal bandwidth limiting; or use something outside of nginx
> to limit the bandwidth.
>
> The latter would probably be simpler if your chosen server_name was
> the only one this nginx handled; or if the IP address were dedicated to
> this server_name -- in those cases, the external thing would not need to
> know much (or anything?) about what nginx is doing; it could just handle
> "traffic from this process group", or "traffic from this IP address".
>
> >   server {
> >     listen   443 ssl;
> >     server_name x.x.x.x.x;
> >
> >
> >     is it possible to limit total bandwidth for this server to for
> example 5M ? not to limit TCP connection bandwidth. need total bandwidth.
>
> It is using the TCP connection bandwidth limit; but if you were to
> "limit_rate" to 1m and "limit_req" to 5 r/s, then you would not use
> more than 5M (bps) -- but you would probably normally end up using less
> than that; because individual requests would not use 5, while multiple
> requests would probably lead to lots of small failure responses.
>
> Good luck with it,
>
> f
> --
> Francis Daly        francis@daoine.org
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>


\\\||//
(@ @)
ooO_(_)_Ooo__________________________________
|______|_____|_____|_____|_____|_____|_____|_____|
|___|____|_____|_____|_____|_____|_____|_____|____|
|_____|_____| mailto:paul@stormy.ca _|____|____|
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

bandwidth limit for specific server

huiming December 18, 2021 04:58AM

Re: bandwidth limit for specific server

Francis Daly December 22, 2021 06:48PM

Re: bandwidth limit for specific server

huiming December 23, 2021 01:16AM

Re: bandwidth limit for specific server

Francis Daly December 24, 2021 08:24AM

Re: bandwidth limit for specific server

Nicolas Franck December 24, 2021 09:28AM

Re: bandwidth limit for specific server

Paul December 24, 2021 11:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 77
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready