Welcome! Log In Create A New Profile

Advanced

Rate-limiting across connections

B.R.
November 14, 2014 02:34PM
Hello,

The limit_rate
<http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate>
directive documentation clearly states that it is applied on a per-request
basis.
How would one rate-limit a client over N connections?

1. Count all N simultaneous connections from a single client
2. Set a rate capped to maxRate/N for each n (connection)

The second part would be a simple recipe, applied through the use of
$limit_rate
<http://nginx.org/en/docs/http/ngx_http_core_module.html#var_limit_rate> to
dynamically set it, provided the information of the first part was
available.

I see variables such as $connection
<http://nginx.org/en/docs/http/ngx_http_core_module.html#var_connection> or
$connection_requests
<http://nginx.org/en/docs/http/ngx_http_core_module.html#var_connection_requests>,
but everything available is connection-based.
Would it be possible to have cross-connection information/states about
clients or is it a limitation due to how nginx operates?
---
*B. R.*
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Rate-limiting across connections

B.R. November 14, 2014 02:34PM

Re: Rate-limiting across connections

Yichun Zhang (agentzh) November 14, 2014 04:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 90
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready