Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_limit_req_module.xml @ 2013:469aebbd94d0
Limit_req/limit_conn may return not only 503 on failure.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 08 Aug 2017 09:23:25 +0300 |
parents | 6c96a644b0b3 |
children | 6e66487c5756 |
comparison
equal
deleted
inserted
replaced
2012:e1d9e51fd1ce | 2013:469aebbd94d0 |
---|---|
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="6"> | 13 rev="7"> |
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 |
65 If the requests rate exceeds the rate configured for a zone, | 65 If the requests rate exceeds the rate configured for a zone, |
66 their processing is delayed such that requests are processed | 66 their processing is delayed such that requests are processed |
67 at a defined rate. | 67 at a defined rate. |
68 Excessive requests are delayed until their number exceeds the | 68 Excessive requests are delayed until their number exceeds the |
69 maximum burst size | 69 maximum burst size |
70 in which case the request is terminated with an error | 70 in which case the request is terminated with an |
71 <http-status code="503" text="Service Temporarily Unavailable"/>. | 71 <link id="limit_req_status">error</link>. |
72 By default, the maximum burst size is equal to zero. | 72 By default, the maximum burst size is equal to zero. |
73 For example, the directives | 73 For example, the directives |
74 <example> | 74 <example> |
75 limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; | 75 limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; |
76 | 76 |
197 The stored state always occupies | 197 The stored state always occupies |
198 64 bytes on 32-bit platforms and 128 bytes on 64-bit platforms. | 198 64 bytes on 32-bit platforms and 128 bytes on 64-bit platforms. |
199 One megabyte zone can keep about 16 thousand 64-byte states | 199 One megabyte zone can keep about 16 thousand 64-byte states |
200 or about 8 thousand 128-byte states. | 200 or about 8 thousand 128-byte states. |
201 If the zone storage is exhausted, the server will return the | 201 If the zone storage is exhausted, the server will return the |
202 <http-status code="503" text="Service Temporarily Unavailable"/> | 202 <link id="limit_req_status">error</link> |
203 error to all further requests. | 203 to all further requests. |
204 </para> | 204 </para> |
205 | 205 |
206 <para> | 206 <para> |
207 The rate is specified in requests per second (r/s). | 207 The rate is specified in requests per second (r/s). |
208 If a rate of less than one request per second is desired, | 208 If a rate of less than one request per second is desired, |