Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_limit_req_module.xml @ 271:4c6d2c614d2c
Cleaned up XML tag mess:
- all of <parameter> and <code>, and some of <dirname>, <value>,
and <command> were replaced by <literal>;
- the rest of <dirname> were replaced by links;
- <argument> were replaced by <value>;
- <value> is now rendered in HTML in italic;
- <literal> and <path> can now contain <value>.
Cleaned up terminology mess:
- directives take "parameters".
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Fri, 23 Dec 2011 17:29:59 +0000 |
parents | 945d7299c26c |
children | b33d3f3cd8ca |
comparison
equal
deleted
inserted
replaced
270:945d7299c26c | 271:4c6d2c614d2c |
---|---|
7 lang="en"> | 7 lang="en"> |
8 | 8 |
9 <section id="summary"> | 9 <section id="summary"> |
10 | 10 |
11 <para> | 11 <para> |
12 The <code>ngx_http_limit_req_module</code> module (0.7.21) allows | 12 The <literal>ngx_http_limit_req_module</literal> module (0.7.21) allows |
13 to limit the number | 13 to limit the number |
14 of requests per defined key, in particular, the number of requests | 14 of requests per defined key, in particular, the number of requests |
15 from a single IP address. | 15 from a single IP address. |
16 The limitation is done using the “leaky bucket” method. | 16 The limitation is done using the “leaky bucket” method. |
17 </para> | 17 </para> |
43 | 43 |
44 <section id="directives" name="Directives"> | 44 <section id="directives" name="Directives"> |
45 | 45 |
46 <directive name="limit_req"> | 46 <directive name="limit_req"> |
47 <syntax> | 47 <syntax> |
48 <parameter>zone</parameter>=<argument>name</argument> | 48 <literal>zone</literal>=<value>name</value> |
49 [<parameter>burst</parameter>=<argument>number</argument>] | 49 [<literal>burst</literal>=<value>number</value>] |
50 [<parameter>nodelay</parameter>]</syntax> | 50 [<literal>nodelay</literal>]</syntax> |
51 <default/> | 51 <default/> |
52 <context>http</context> | 52 <context>http</context> |
53 <context>server</context> | 53 <context>server</context> |
54 <context>location</context> | 54 <context>location</context> |
55 | 55 |
77 with bursts not exceeding 5 requests. | 77 with bursts not exceeding 5 requests. |
78 </para> | 78 </para> |
79 | 79 |
80 <para> | 80 <para> |
81 If delaying of excessive requests while requests are being limited is not | 81 If delaying of excessive requests while requests are being limited is not |
82 desired, the parameter <parameter>nodelay</parameter> should be used: | 82 desired, the parameter <literal>nodelay</literal> should be used: |
83 <example> | 83 <example> |
84 limit_req zone=one burst=5 nodelay; | 84 limit_req zone=one burst=5 nodelay; |
85 </example> | 85 </example> |
86 </para> | 86 </para> |
87 | 87 |
88 </directive> | 88 </directive> |
89 | 89 |
90 | 90 |
91 <directive name="limit_req_log_level"> | 91 <directive name="limit_req_log_level"> |
92 <syntax> | 92 <syntax> |
93 <value>info</value> | | 93 <literal>info</literal> | |
94 <value>notice</value> | | 94 <literal>notice</literal> | |
95 <value>warn</value> | | 95 <literal>warn</literal> | |
96 <value>error</value></syntax> | 96 <literal>error</literal></syntax> |
97 <default>error</default> | 97 <default>error</default> |
98 <context>http</context> | 98 <context>http</context> |
99 <context>server</context> | 99 <context>server</context> |
100 <context>location</context> | 100 <context>location</context> |
101 <appeared-in>0.8.18</appeared-in> | 101 <appeared-in>0.8.18</appeared-in> |
102 | 102 |
103 <para> | 103 <para> |
104 Sets the desired logging level for cases when the server limits | 104 Sets the desired logging level for cases when the server limits |
105 the number of requests, or delays request processing. | 105 the number of requests, or delays request processing. |
106 Delays are logged with the level one less than limits; for example, | 106 Delays are logged with the level one less than limits; for example, |
107 if <command>limit_req_log_level notice</command> is specified, | 107 if “<literal>limit_req_log_level notice</literal>” is specified, |
108 delays are logged with the <value>info</value> level. | 108 delays are logged with the <literal>info</literal> level. |
109 </para> | 109 </para> |
110 | 110 |
111 </directive> | 111 </directive> |
112 | 112 |
113 | 113 |
114 <directive name="limit_req_zone"> | 114 <directive name="limit_req_zone"> |
115 <syntax> | 115 <syntax> |
116 <argument>$variable</argument> | 116 <value>$variable</value> |
117 <parameter>zone</parameter>=<argument>name</argument>:<argument>size</argument> | 117 <literal>zone</literal>=<value>name</value>:<value>size</value> |
118 <parameter>rate</parameter>=<argument>rate</argument></syntax> | 118 <literal>rate</literal>=<value>rate</value></syntax> |
119 <default/> | 119 <default/> |
120 <context>http</context> | 120 <context>http</context> |
121 | 121 |
122 <para> | 122 <para> |
123 Sets the parameters for a zone that keeps states for various keys. | 123 Sets the parameters for a zone that keeps states for various keys. |