comparison xml/en/docs/http/ngx_http_limit_req_module.xml @ 1320:f15a983cac66

Limit conn/req: key is no longer limited to only one variable.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 01 Oct 2014 21:56:23 +0400
parents ac131944d349
children 7945dac7ad47
comparison
equal deleted inserted replaced
1319:c365080bd00a 1320:f15a983cac66
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="3"> 13 rev="4">
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
134 </directive> 134 </directive>
135 135
136 136
137 <directive name="limit_req_zone"> 137 <directive name="limit_req_zone">
138 <syntax> 138 <syntax>
139 <value>$variable</value> 139 <value>key</value>
140 <literal>zone</literal>=<value>name</value>:<value>size</value> 140 <literal>zone</literal>=<value>name</value>:<value>size</value>
141 <literal>rate</literal>=<value>rate</value></syntax> 141 <literal>rate</literal>=<value>rate</value></syntax>
142 <default/> 142 <default/>
143 <context>http</context> 143 <context>http</context>
144 144
145 <para> 145 <para>
146 Sets parameters for a shared memory zone 146 Sets parameters for a shared memory zone
147 that will keep states for various keys. 147 that will keep states for various keys.
148 In particular, the state stores the current number of excessive requests. 148 In particular, the state stores the current number of excessive requests.
149 The key is any non-empty value of the specified variable 149 The <value>key</value> can contain text, variables, and their combination.
150 (empty values are not accounted). 150 Requests with an empty key value are not accounted.
151 <note>
152 Prior to version 1.7.6, a <value>key</value> could contain exactly one variable.
153 </note>
151 Usage example: 154 Usage example:
152 <example> 155 <example>
153 limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; 156 limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
154 </example> 157 </example>
155 </para> 158 </para>