comparison xml/ru/docs/http/ngx_http_limit_zone_module.xml @ 76:4a4caa566120

Russian documentation import. Changes in module.dtd: <example> now allowed to contain <value> and <emphasis> elements (we need this to show important parts in examples), less strict checking of <directive> syntax (we don't want to fully document some directives, notably deprecated ones). Known issues: 1. <syntax> elements are preserved as is, they will require manual conversion (likely to some not-yet-existed format a la DocBook cmdsynopsis, as currently used one seems to be incomplete); 2. <value> no longer corresponds to replaceable content, and it's use in examples isn't correct; 3. <link doc="document#fragment"> doesn't work with current xslt, either should be supported or changed to <link doc="document" id="fragment">. The following files are intentionally omitted: maillists.xml (support.xml should be used instead), experimental.xml (obsolete), faq.xml (conflicts with existing one, needs discussion). Not yet linked to site.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 11 Oct 2011 12:57:50 +0000
parents
children 1d315ef37215
comparison
equal deleted inserted replaced
75:2bf4cd2787c5 76:4a4caa566120
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
4
5 <module name="Директивы модуля ngx_http_limit_zone_module"
6 link="/ru/docs/http/ngx_http_limit_zone_module.html"
7 lang="ru">
8
9 <section name="" id="summary">
10
11 <para>
12 Модуль ngx_http_limit_zone_module позволяет ограничить число одновременных
13 соединений для заданной сессии или, как частный случай, с одного адреса.
14 </para>
15
16 </section>
17
18
19 <section name="Пример конфигурации" id="example">
20
21 <para>
22 <example>
23 http {
24 limit_zone one $binary_remote_addr 10m;
25
26 ...
27
28 server {
29
30 ...
31
32 location /download/ {
33 limit_conn one 1;
34 }
35 </example>
36 </para>
37
38 </section>
39
40
41 <section name="Директивы" id="directives">
42
43 <directive name="limit_zone">
44 <syntax>limit_zone <value>название $переменная размер</value></syntax>
45 <default>нет</default>
46 <context>http</context>
47
48 <para>
49 Директива описывает зону, в которой хранятся состояния сессий.
50 Значения сессий определяется заданной переменной.
51 Пример использования:
52 <example>
53 limit_zone one $binary_remote_addr 10m;
54 </example>
55 </para>
56
57 <para>
58 В качестве сессии используется адрес клиента.
59 Обратите внимание, что вместо переменной $remote_addr используется
60 переменная $binary_remote_addr.
61 Длина значений переменной $remote_addr может быть от 7 до 15 байт,
62 поэтому размер состоянии равен 32 или 64 байтам.
63 Длина всех значений переменной $binary_remote_addr всегда 4 байта
64 и размер состояния всегда 32 байта.
65 В зоне размером 1 мегабайт может разместиться около 32 000 состояний
66 размером 32 байта.
67 </para>
68
69 </directive>
70
71
72 <directive name="limit_conn">
73 <syntax>limit_conn <value>зона число</value></syntax>
74 <default>нет</default>
75 <context>http, server, location</context>
76
77 <para>
78 Директива задаёт максимальное число одновременных соединений для одной сессии.
79 При превышении этого числа запрос завершается кодом "Service unavailable" (503).
80 Например, директивы
81 <example>
82 limit_zone one $binary_remote_addr 10m;
83
84 server {
85 location /download/ {
86 limit_conn one 1;
87 }
88
89 </example>
90 позволяют не более одного одновременного соединения с одного адреса.
91 </para>
92
93 </directive>
94
95
96 <directive name="limit_conn_log_level">
97 <syntax>limit_conn_log_level <value>[info|notice|warn|error]</value></syntax>
98 <default>limit_conn_log_level error</default>
99 <context>http, server, location</context>
100
101 <para>
102 Директива (0.8.18) задаёт уровень логирования случаев ограничения
103 числа соединений.
104 </para>
105
106 </directive>
107
108 </section>
109
110 </module>