Mastering Nginx

(Ron) #1
Appendix A

[ 235 ]

Directive Explanation Context/Default


limit_req Sets a limit with bursting


capability on the number of
requests for a specific key in a
shared memory store (configured
with limit_req_zone). The
burst may be specified with
the second parameter. If there
shouldn't be a delay in between
requests up to the burst, a third
parameter nodelay needs to be
configured.

Valid context: http,
server, location
Default value: -

limit_req_log_level When NGINX limits the number


of requests due to the limit_req
directive, this directive specifies
at which log level that limitation
is reported. A delay is logged
at a level one less than the one
indicated here.

Valid contexts: http,
server, location
Default value: -

limit_req_zone Specifies the key to be limited in
limit_req as the first parameter.
The second parameter, zone,
indicates the name of the shared
memory zone used to store
the key and current number of
requests per key and the size of
that zone (name:size). The third
parameter, rate, configures the
number of requests per second
(r/s) or per minute (r/m) before
the limit is imposed.


Valid context: http
Default value: -

limit_zone Deprecated. Use limitconn
zone instead.


Valid context: http
Default value: -

lingering_close This directive specifies how a
client connection will be kept open
for more data.


Valid contexts: http,
server, location
Default value: on

lingering_time In connection with the
lingering_close directive, this
directive will specify how long a
client connection will be kept open
for processing more data.


Valid contexts: http,
server, location
Default value: 30s
Free download pdf