Syntax: | limit_rate |
---|---|
Default: | limit_rate 0; |
Context: | http , server , location , if in location |
Limits the rate of response transmission to a client. The rate
is specified in bytes per second. The zero value disables rate limiting. The limit is set per a request, and so if a client simultaneously opens two connections, the overall rate will be twice as much as the specified limit.
Rate limit can also be set in the $limit_rate
variable. It may be useful in cases where rate should be limited depending on a certain condition:
server { if ($slow) { set $limit_rate 4k; } ... }
Rate limit can also be set in the “X-Accel-Limit-Rate” header field of a proxied server response. This capability can be disabled using the proxy_ignore_headers, fastcgi_ignore_headers, uwsgi_ignore_headers, and scgi_ignore_headers directives.
Please login to continue.