comparison xml/en/docs/http/ngx_http_limit_req_module.xml @ 1629:7945dac7ad47

Documented multiple limit_req support and inheritance rules.
author Ruslan Ermilov <ru@nginx.com>
date Sat, 12 Dec 2015 01:06:27 +0300
parents f15a983cac66
children 6c96a644b0b3
comparison
equal deleted inserted replaced
1628:d846df055f03 1629:7945dac7ad47
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
9 9
10 <module name="Module ngx_http_limit_req_module" 10 <module name="Module ngx_http_limit_req_module"
11 link="/en/docs/http/ngx_http_limit_req_module.html" 11 link="/en/docs/http/ngx_http_limit_req_module.html"
12 lang="en" 12 lang="en"
13 rev="4"> 13 rev="5">
14 14
15 <section id="summary"> 15 <section id="summary">
16 16
17 <para> 17 <para>
18 The <literal>ngx_http_limit_req_module</literal> module (0.7.21) is used 18 The <literal>ngx_http_limit_req_module</literal> module (0.7.21) is used
89 <example> 89 <example>
90 limit_req zone=one burst=5 nodelay; 90 limit_req zone=one burst=5 nodelay;
91 </example> 91 </example>
92 </para> 92 </para>
93 93
94 <para>
95 There could be several <literal>limit_req</literal> directives.
96 For example, the following configuration will limit the processing rate
97 of requests coming from a single IP address and, at the same time,
98 the request processing rate by the virtual server:
99 <example>
100 limit_req_zone $binary_remote_addr zone=perip:10m rate=1r/s;
101 limit_req_zone $server_name zone=perserver:10m rate=10r/s;
102
103 server {
104 ...
105 limit_req zone=perip burst=5 nodelay;
106 limit_req zone=perserver burst=10;
107 }
108 </example>
109
110 </para>
111
112 <para>
113 These directives are inherited from the previous level if and
114 only if there are no
115 <literal>limit_req</literal>
116 directives on the current level.
117 </para>
118
94 </directive> 119 </directive>
95 120
96 121
97 <directive name="limit_req_log_level"> 122 <directive name="limit_req_log_level">
98 <syntax> 123 <syntax>