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?
- Count all N simultaneous connections from a single client
- 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.