Mercurial > hg > nginx-site
annotate xml/ru/docs/stream/ngx_stream_limit_conn_module.xml @ 2838:2a4bd6782451
Updated with Netcraft March 2022 Web Server Survey stats.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Mon, 04 Apr 2022 18:34:46 +0100 |
parents | eeed494bba51 |
children | 9eadb98ec770 |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
207
diff
changeset
|
1 <?xml version="1.0"?> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
7 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
9 |
1517
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
10 <module name="Модуль ngx_stream_limit_conn_module" |
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
11 link="/ru/docs/stream/ngx_stream_limit_conn_module.html" |
589 | 12 lang="ru" |
2593
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
2495
diff
changeset
|
13 rev="7"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
14 |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
15 <section id="summary"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
17 <para> |
1517
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
18 Модуль <literal>ngx_stream_limit_conn_module</literal> (1.9.3) позволяет |
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
19 ограничить |
966 | 20 число соединений по заданному ключу, в частности, число соединений с одного |
21 IP-адреса. | |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
22 </para> |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
23 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
24 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
25 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
26 |
365 | 27 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
28 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
29 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
30 <example> |
1517
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
31 stream { |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
32 limit_conn_zone $binary_remote_addr zone=addr:10m; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
33 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 ... |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
35 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
36 server { |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
37 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
38 ... |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
39 |
1517
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
40 limit_conn addr 1; |
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
41 limit_conn_log_level error; |
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
42 } |
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
43 } |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
44 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
45 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
46 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
47 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
48 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
49 |
365 | 50 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
51 |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
52 <directive name="limit_conn"> |
271 | 53 <syntax><value>зона</value> <value>число</value></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
54 <default/> |
1517
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
55 <context>stream</context> |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
56 <context>server</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
57 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
58 <para> |
575
ebcb351d9eb3
Consistently using the term "shared memory zone".
Ruslan Ermilov <ru@nginx.com>
parents:
390
diff
changeset
|
59 Задаёт зону разделяемой памяти и максимально допустимое число соединений |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
60 для одного значения ключа. |
1517
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
61 При превышении этого числа сервер закроет соединение. |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
62 Например, директивы |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
63 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
64 limit_conn_zone $binary_remote_addr zone=addr:10m; |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
65 |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
66 server { |
1517
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
67 ... |
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
68 limit_conn addr 1; |
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
69 } |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
70 </example> |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
71 разрешают одновременно обрабатывать не более одного соединения с одного |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
72 IP-адреса. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
73 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
74 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
75 <para> |
271 | 76 Допустимо одновременное указание нескольких директив |
77 <literal>limit_conn</literal>, | |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
78 при этом будет срабатывать любое из ограничений. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
79 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
80 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
81 <para> |
2593
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
2495
diff
changeset
|
82 Директивы наследуются с предыдущего уровня конфигурации при условии, что |
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
2495
diff
changeset
|
83 на данном уровне не описаны свои директивы <literal>limit_conn</literal>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
84 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
85 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
86 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
87 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
88 |
2464
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
89 <directive name="limit_conn_dry_run"> |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
90 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
91 <default>off</default> |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
92 <context>stream</context> |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
93 <context>server</context> |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
94 <appeared-in>1.17.6</appeared-in> |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
95 |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
96 <para> |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
97 Включает режим пробного запуска. |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
98 В данном режиме число соединений не ограничивается, однако |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
99 в зоне разделяемой памяти текущее число избыточных соединений учитывается |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
100 как обычно. |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
101 </para> |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
102 |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
103 </directive> |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
104 |
5d7fd7d9a2b6
Documented limit_conn_dry_run for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
105 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
106 <directive name="limit_conn_log_level"> |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
107 <syntax> |
271 | 108 <literal>info</literal> | |
109 <literal>notice</literal> | | |
110 <literal>warn</literal> | | |
111 <literal>error</literal></syntax> | |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
112 <default>error</default> |
1517
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
113 <context>stream</context> |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
114 <context>server</context> |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
115 |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
116 <para> |
380 | 117 Задаёт желаемый уровень записи в лог случаев ограничения |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
118 числа соединений. |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
119 </para> |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
120 |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
121 </directive> |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
122 |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
123 |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
124 <directive name="limit_conn_zone"> |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
125 <syntax> |
1320
f15a983cac66
Limit conn/req: key is no longer limited to only one variable.
Ruslan Ermilov <ru@nginx.com>
parents:
1312
diff
changeset
|
126 <value>ключ</value> |
271 | 127 <literal>zone</literal>=<value>название</value>:<value>размер</value></syntax> |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
128 <default/> |
1517
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
129 <context>stream</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
130 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
131 <para> |
575
ebcb351d9eb3
Consistently using the term "shared memory zone".
Ruslan Ermilov <ru@nginx.com>
parents:
390
diff
changeset
|
132 Задаёт параметры зоны разделяемой памяти, которая хранит состояние |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
133 для разных значений ключа. |
966 | 134 Состояние в частности содержит текущее число соединений. |
1744
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1699
diff
changeset
|
135 В качестве <value>ключа</value> может использоваться текст, переменные |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1699
diff
changeset
|
136 и их комбинации (1.11.2). |
1320
f15a983cac66
Limit conn/req: key is no longer limited to only one variable.
Ruslan Ermilov <ru@nginx.com>
parents:
1312
diff
changeset
|
137 Запросы с пустым значением ключа не учитываются. |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
138 Пример использования: |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
139 <example> |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
140 limit_conn_zone $binary_remote_addr zone=addr:10m; |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
141 </example> |
1517
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
142 Здесь в качестве ключа используется IP-адрес клиента, |
1744
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1699
diff
changeset
|
143 задаваемый переменной <literal>$binary_remote_addr</literal>. |
1517
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
144 Длина значения <literal>$binary_remote_addr</literal> |
1699
6c96a644b0b3
Corrected description of $binary_remote_addr and saved state.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1517
diff
changeset
|
145 равна 4 байтам для IPv4-адресов или 16 байтам для IPv6-адресов. |
6c96a644b0b3
Corrected description of $binary_remote_addr and saved state.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1517
diff
changeset
|
146 При этом размер состояния всегда равен 32 или 64 байтам |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
147 на 32-битных платформах и 64 байтам на 64-битных. |
367
f4033b9bc4ec
- Removed unnecessary instances of unbreakable space.
Ruslan Ermilov <ru@nginx.com>
parents:
365
diff
changeset
|
148 В зоне размером 1 мегабайт может разместиться около 32 тысяч состояний |
966 | 149 размером 32 байта или 16 тысяч состояний размером 64 байта. |
1517
53ae63cb4cfa
Added the limit_conn module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1347
diff
changeset
|
150 При переполнении зоны сервер закроет соединение. |
179
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
151 </para> |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
152 |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
153 </directive> |
8cc01e2179a9
- Reflected recent changes made to ngx_http_limit_conn_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
154 |
2495
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
155 <para> |
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
156 <note> |
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
157 Дополнительно, как часть |
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
158 <commercial_version>коммерческой подписки</commercial_version>, |
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
159 <link doc="../http/ngx_http_api_module.xml" id="stream_limit_conns_">информацию о состоянии</link> |
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
160 каждой такой зоны разделяемой памяти можно |
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
161 <link doc="../http/ngx_http_api_module.xml" id="getStreamLimitConnZone">получить</link> или |
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
162 <link doc="../http/ngx_http_api_module.xml" id="deleteStreamLimitConnZoneStat">сбросить</link> |
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
163 при помощи <link doc="../http/ngx_http_api_module.xml">API</link> |
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
164 начиная с версии 1.17.7. |
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
165 </note> |
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
166 </para> |
e4332b7580bb
Mentioned API in limit_conn_zone and limit_req_zone.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2465
diff
changeset
|
167 |
2465
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
168 </section> |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
169 |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
170 |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
171 <section id="variables" name="Встроенные переменные"> |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
172 |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
173 <para> |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
174 <list type="tag"> |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
175 |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
176 <tag-name id="var_limit_conn_status"><var>$limit_conn_status</var></tag-name> |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
177 <tag-desc> |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
178 хранит результат ограничения числа соединений (1.17.6): |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
179 <literal>PASSED</literal>, |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
180 <literal>REJECTED</literal> или |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
181 <literal>REJECTED_DRY_RUN</literal> |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
182 </tag-desc> |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
183 |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
184 </list> |
07c4f2c66c97
Documented $limit_conn_status for http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2464
diff
changeset
|
185 </para> |
365 | 186 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
187 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
188 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
189 </module> |