Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_upstream_module.xml @ 1262:dbd80a96189d
Added missing links into the Russian index page.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Fri, 01 Aug 2014 14:26:28 +0400 |
parents | 954dcc02cb63 |
children | 5e45198fa991 |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
135
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:
566
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
566
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 |
292 | 10 <module name="Модуль ngx_http_upstream_module" |
135
edf8c90f8085
Renamed ngx_http_upstream to ngx_http_upstream_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
11 link="/ru/docs/http/ngx_http_upstream_module.html" |
589 | 12 lang="ru" |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
13 rev="28"> |
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:
108
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> |
292 | 18 Модуль <literal>ngx_http_upstream_module</literal> |
19 позволяет описывать группы серверов, | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
20 которые могут использоваться в директивах |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
21 <link doc="ngx_http_proxy_module.xml" id="proxy_pass"/>, |
1181 | 22 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>, |
1194 | 23 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_pass"/>, |
1181 | 24 <link doc="ngx_http_scgi_module.xml" id="scgi_pass"/> и |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
25 <link doc="ngx_http_memcached_module.xml" id="memcached_pass"/>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
26 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
27 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
28 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
29 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
30 |
292 | 31 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
32 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
33 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 <example> |
292 | 35 upstream <emphasis>backend</emphasis> { |
36 server backend1.example.com weight=5; | |
37 server backend2.example.com:8080; | |
38 server unix:/tmp/backend3; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
39 |
292 | 40 server backup1.example.com:8080 backup; |
41 server backup2.example.com:8080 backup; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
42 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
43 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
44 server { |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
45 location / { |
292 | 46 proxy_pass http://<emphasis>backend</emphasis>; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
47 } |
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 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
50 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
51 |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
52 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
53 Динамически настраиваемая группа, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
54 доступна как часть |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
55 <commercial_version>коммерческой подписки</commercial_version>: |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
56 <example> |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
57 upstream <emphasis>dynamic</emphasis> { |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
58 zone upstream_dynamic 64k; |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
59 |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
60 server backend1.example.com weight=5; |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
61 server backend2.example.com:8080 fail_timeout=5s slow_start=30s; |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
62 server 192.0.2.1 max_fails=3; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
63 |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
64 server backup1.example.com:8080 backup; |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
65 server backup2.example.com:8080 backup; |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
66 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
67 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
68 server { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
69 location / { |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
70 proxy_pass http://<emphasis>dynamic</emphasis>; |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
71 health_check; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
72 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
73 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
74 location /upstream_conf { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
75 upstream_conf; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
76 allow 127.0.0.1; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
77 deny all; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
78 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
79 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
80 </example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
81 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
82 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
83 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
84 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
85 |
292 | 86 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
87 |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
88 <directive name="upstream"> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
89 <syntax block="yes"><value>название</value></syntax> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
90 <default/> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
91 <context>http</context> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
92 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
93 <para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
94 Описывает группу серверов. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
95 Серверы могут слушать на разных портах. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
96 Кроме того, можно одновременно использовать серверы, |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
97 слушающие на TCP- и UNIX-сокетах. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
98 </para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
99 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
100 <para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
101 Пример: |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
102 <example> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
103 upstream backend { |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
104 server backend1.example.com weight=5; |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
105 server 127.0.0.1:8080 max_fails=3 fail_timeout=30s; |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
106 server unix:/tmp/backend3; |
1126
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
107 |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
108 server backup1.example.com backup; |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
109 } |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
110 </example> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
111 </para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
112 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
113 <para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
114 По умолчанию запросы распределяются по серверам циклически |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
115 (в режиме round-robin) с учётом весов серверов. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
116 В вышеприведённом примере каждые 7 запросов будут распределены так: |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
117 5 запросов на <literal>backend1.example.com</literal> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
118 и по одному запросу на второй и третий серверы. |
966 | 119 Если при попытке работы с сервером происходит ошибка, то запрос |
120 передаётся следующему серверу, и так далее до тех пор, пока не будут опробованы | |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
121 все работающие серверы. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
122 Если не удастся получить успешный ответ |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
123 ни от одного из серверов, то клиенту будет возвращён результат работы |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
124 с последним сервером. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
125 </para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
126 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
127 </directive> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
128 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
129 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
130 <directive name="server"> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
131 <syntax><value>адрес</value> [<value>параметры</value>]</syntax> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
132 <default/> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
133 <context>upstream</context> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
134 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
135 <para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
136 Задаёт <value>адрес</value> и другие <value>параметры</value> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
137 сервера. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
138 Адрес может быть указан в виде доменного имени или IP-адреса, |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
139 и необязательного порта, или в виде пути UNIX-сокета, который |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
140 указывается после префикса “<literal>unix:</literal>”. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
141 Если порт не указан, используется порт 80. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
142 Доменное имя, которому соответствует несколько IP-адресов, |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
143 задаёт сразу несколько серверов. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
144 </para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
145 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
146 <para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
147 Могут быть заданы следующие параметры: |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
148 <list type="tag"> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
149 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
150 <tag-name id="weight"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
151 <literal>weight</literal>=<value>число</value> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
152 </tag-name> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
153 <tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
154 задаёт вес сервера, по умолчанию 1. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
155 </tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
156 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
157 <tag-name id="max_fails"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
158 <literal>max_fails</literal>=<value>число</value> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
159 </tag-name> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
160 <tag-desc> |
966 | 161 задаёт число неудачных попыток работы с сервером, которые должны произойти |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
162 в течение времени, заданного параметром <literal>fail_timeout</literal>, |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
163 чтобы сервер считался недоступным на период времени, также заданный |
966 | 164 параметром <literal>fail_timeout</literal>. |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
165 По умолчанию число попыток устанавливается равным 1. |
966 | 166 Нулевое значение отключает учёт попыток. |
942
ba3d6ade3513
Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents:
917
diff
changeset
|
167 Что считается неудачной попыткой, определяется директивами |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
168 <link doc="ngx_http_proxy_module.xml" id="proxy_next_upstream"/>, |
1181 | 169 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_next_upstream"/>, |
1194 | 170 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_next_upstream"/>, |
1181 | 171 <link doc="ngx_http_scgi_module.xml" id="scgi_next_upstream"/> и |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
172 <link doc="ngx_http_memcached_module.xml" id="memcached_next_upstream"/>. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
173 </tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
174 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
175 <tag-name id="fail_timeout"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
176 <literal>fail_timeout</literal>=<value>время</value> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
177 </tag-name> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
178 <tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
179 задаёт |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
180 <list type="bullet"> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
181 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
182 <listitem> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
183 время, в течение которого должно произойти заданное число неудачных |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
184 попыток работы с сервером для того, чтобы сервер считался недоступным; |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
185 </listitem> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
186 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
187 <listitem> |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
188 и время, в течение которого сервер будет считаться недоступным. |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
189 </listitem> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
190 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
191 </list> |
966 | 192 По умолчанию параметр равен 10 секундам. |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
193 </tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
194 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
195 <tag-name id="backup"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
196 <literal>backup</literal> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
197 </tag-name> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
198 <tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
199 помечает сервер как запасной сервер. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
200 На него будут передаваться запросы в случае, если не работают основные серверы. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
201 </tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
202 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
203 <tag-name id="down"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
204 <literal>down</literal> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
205 </tag-name> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
206 <tag-desc> |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
207 помечает сервер как постоянно недоступный; используется |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
208 совместно с директивой <link id="ip_hash"/>. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
209 </tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
210 |
1126
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
211 </list> |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
212 </para> |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
213 |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
214 <para> |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
215 Кроме того, |
1128
1594ed379f1f
De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents:
1127
diff
changeset
|
216 следующие параметры доступны как часть |
1594ed379f1f
De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents:
1127
diff
changeset
|
217 <commercial_version>коммерческой подписки</commercial_version>: |
1126
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
218 <list type="tag"> |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
219 |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
220 <tag-name id="max_conns"> |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
221 <literal>max_conns</literal>=<value>число</value> |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
222 </tag-name> |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
223 <tag-desc> |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
224 ограничивает максимальное <value>число</value> одновременных соединений |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
225 к проксируемому серверу (1.5.9). |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
226 Значение по умолчанию равно 0 и означает, что ограничения нет. |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
227 </tag-desc> |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
228 |
1124
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
229 <tag-name id="resolve"> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
230 <literal>resolve</literal> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
231 </tag-name> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
232 <tag-desc> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
233 отслеживает изменения IP-адресов, соответствующих доменному имени сервера, |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
234 и автоматически изменяет конфигурацию группы |
1127
948c853f5d22
Upstream: improved "server resolve".
Ruslan Ermilov <ru@nginx.com>
parents:
1126
diff
changeset
|
235 без необходимости перезапуска nginx (1.5.12). |
1124
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
236 <para> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
237 Для работы этого параметра |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
238 директива <link doc="ngx_http_core_module.xml" id="resolver"/> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
239 должна быть задана в блоке |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
240 <link doc="ngx_http_core_module.xml" id="http"/>. |
1127
948c853f5d22
Upstream: improved "server resolve".
Ruslan Ermilov <ru@nginx.com>
parents:
1126
diff
changeset
|
241 Пример: |
1124
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
242 <example> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
243 http { |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
244 resolver 10.0.0.1; |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
245 |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
246 upstream u { |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
247 zone ...; |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
248 ... |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
249 server example.com resolve; |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
250 } |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
251 } |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
252 </example> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
253 </para> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
254 </tag-desc> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
255 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
256 <tag-name id="route"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
257 <literal>route</literal>=<value>строка</value> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
258 </tag-name> |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
259 <tag-desc> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
260 задаёт имя маршрута к серверу. |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
261 </tag-desc> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
262 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
263 <tag-name id="slow_start"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
264 <literal>slow_start</literal>=<value>время</value> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
265 </tag-name> |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
266 <tag-desc> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
267 задаёт <value>время</value>, в течение которого вес сервера |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
268 восстановится от нуля до своего номинального значения в ситуации, когда |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
269 неработоспособный (unhealthy) сервер вновь становится работоспособным |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
270 (<link id="health_check">healthy</link>) |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
271 или когда сервер становится доступным по прошествии времени, |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
272 в течение которого он считался <link id="fail_timeout">недоступным</link>. |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
273 Значение по умолчанию равно нулю и означает, что медленный старт выключен. |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
274 </tag-desc> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
275 |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
276 </list> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
277 </para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
278 |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
279 <para> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
280 <note> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
281 Если в группе только один сервер, параметры <literal>max_fails</literal>, |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
282 <literal>fail_timeout</literal> и <literal>slow_start</literal> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
283 игнорируются и такой сервер никогда не будет считаться недоступным. |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
284 </note> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
285 </para> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
286 |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
287 </directive> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
288 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
289 |
1123
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
290 <directive name="zone"> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
291 <syntax><value>имя</value> <value>размер</value></syntax> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
292 <default/> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
293 <context>upstream</context> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
294 |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
295 <para> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
296 Задаёт <value>имя</value> и <value>размер</value> зоны разделяемой памяти, |
1243
831215432a4f
Upstream: revised the Russian text of the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1242
diff
changeset
|
297 в которой хранятся конфигурация группы и её рабочее состояние, |
1123
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
298 разделяемые между рабочими процессами. |
1243
831215432a4f
Upstream: revised the Russian text of the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1242
diff
changeset
|
299 В таких группах для изменения состава группы |
831215432a4f
Upstream: revised the Russian text of the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1242
diff
changeset
|
300 или настроек отдельных серверов |
831215432a4f
Upstream: revised the Russian text of the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1242
diff
changeset
|
301 нет необходимости перезапускать nginx. |
1123
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
302 Конфигурация доступна через специальный location, |
1243
831215432a4f
Upstream: revised the Russian text of the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1242
diff
changeset
|
303 в котором указана директива <link id="upstream_conf"/>. |
1123
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
304 </para> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
305 |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
306 <para> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
307 <note> |
1128
1594ed379f1f
De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents:
1127
diff
changeset
|
308 Эта директива доступна как часть |
1594ed379f1f
De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents:
1127
diff
changeset
|
309 <commercial_version>коммерческой подписки</commercial_version>. |
1123
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
310 </note> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
311 </para> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
312 |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
313 </directive> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
314 |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
315 |
1230
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
316 <directive name="hash"> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
317 <syntax><value>ключ</value> [<literal>consistent</literal>]</syntax> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
318 <default/> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
319 <context>upstream</context> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
320 <appeared-in>1.7.2</appeared-in> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
321 |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
322 <para> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
323 Задаёт метод балансировки нагрузки для группы, при котором |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
324 соответствие клиента серверу определяется при помощи |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
325 хэшированного значения <value>ключа</value>. |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
326 В качестве <value>ключа</value> может использоваться |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
327 текст, переменные и их комбинации. |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
328 Следует отметить, что любое добавление или удаление серверов в группе |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
329 может привести к перераспределению большинства ключей на другие серверы. |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
330 Метод совместим с библиотекой Perl |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
331 <link url="http://search.cpan.org/perldoc?Cache%3A%3AMemcached">Cache::Memcached</link>. |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
332 </para> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
333 |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
334 <para> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
335 Если задан параметр <literal>consistent</literal>, то вместо |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
336 вышеописанного метода будет использоваться метод консистентного хэширования |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
337 <link url="http://www.last.fm/user/RJ/journal/2007/04/10/392555/">ketama</link>. |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
338 Метод гарантирует, что при добавлении сервера в группу или его удалении |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
339 на другие серверы будет перераспределено минимальное число ключей. |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
340 Применение метода для кэширующих серверов обеспечивает |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
341 больший процент попаданий в кэш. |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
342 Метод совместим с библиотекой Perl |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
343 <link url="http://search.cpan.org/perldoc?Cache%3A%3AMemcached%3A%3AFast">Cache::Memcached::Fast</link> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
344 при значении параметра <value>ketama_points</value> равным 160. |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
345 </para> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
346 |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
347 </directive> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
348 |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
349 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
350 <directive name="ip_hash"> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
351 <syntax/> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
79
diff
changeset
|
352 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
353 <context>upstream</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
354 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
355 <para> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
356 Задаёт для группы метод балансировки нагрузки, при котором запросы |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
357 распределяются по серверам на основе IP-адресов клиентов. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
358 В качестве ключа для хэширования используются первые три |
542
a9e6a8613534
Documented IPv6 support in ip_hash.
Ruslan Ermilov <ru@nginx.com>
parents:
533
diff
changeset
|
359 октета IPv4-адреса клиента или IPv6-адрес клиента целиком. |
292 | 360 Метод гарантирует, что запросы одного и того же клиента |
361 будут всегда передаваться на один и тот же сервер. | |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
362 Если же этот сервер будет считаться недоступным, |
292 | 363 то запросы этого клиента будут передаваться на другой сервер. |
364 С большой долей вероятности это также будет один и тот же сервер. | |
542
a9e6a8613534
Documented IPv6 support in ip_hash.
Ruslan Ermilov <ru@nginx.com>
parents:
533
diff
changeset
|
365 <note> |
566 | 366 IPv6-адреса поддерживаются начиная с версий 1.3.2 и 1.2.2. |
542
a9e6a8613534
Documented IPv6 support in ip_hash.
Ruslan Ermilov <ru@nginx.com>
parents:
533
diff
changeset
|
367 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
368 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
369 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
370 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
371 Если один из серверов нужно убрать на некоторое время, то для сохранения |
292 | 372 текущего хэширования IP-адресов клиентов этот сервер нужно пометить |
373 параметром <literal>down</literal>. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
374 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
375 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
376 <para> |
292 | 377 Пример: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
378 <example> |
292 | 379 upstream backend { |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
380 ip_hash; |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
381 |
292 | 382 server backend1.example.com; |
383 server backend2.example.com; | |
384 server backend3.example.com <emphasis>down</emphasis>; | |
385 server backend4.example.com; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
386 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
387 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
388 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
389 |
526
4f907cde0382
1.3.1 changes: ip_hash+weight, least_conn.
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
390 <para> |
4f907cde0382
1.3.1 changes: ip_hash+weight, least_conn.
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
391 <note> |
566 | 392 До версий 1.3.1 и 1.2.2 для серверов, использующих метод балансировки нагрузки |
526
4f907cde0382
1.3.1 changes: ip_hash+weight, least_conn.
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
393 <literal>ip_hash</literal>, нельзя было задать вес. |
4f907cde0382
1.3.1 changes: ip_hash+weight, least_conn.
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
394 </note> |
4f907cde0382
1.3.1 changes: ip_hash+weight, least_conn.
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
395 </para> |
4f907cde0382
1.3.1 changes: ip_hash+weight, least_conn.
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
396 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
397 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
398 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
399 |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
400 <directive name="keepalive"> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
401 <syntax><value>соединения</value></syntax> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
402 <default/> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
403 <context>upstream</context> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
404 <appeared-in>1.1.4</appeared-in> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
405 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
406 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
407 Задействует кэш соединений для группы серверов. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
408 </para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
409 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
410 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
411 Параметр <value>соединения</value> устанавливает максимальное число |
654
841118e33f41
Refined the text about cache of connections to upstream servers.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
412 неактивных постоянных соединений с серверами группы, которые будут |
841118e33f41
Refined the text about cache of connections to upstream servers.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
413 сохраняться в кэше каждого рабочего процесса. |
841118e33f41
Refined the text about cache of connections to upstream servers.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
414 При превышении этого числа наиболее давно не используемые соединения |
841118e33f41
Refined the text about cache of connections to upstream servers.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
415 закрываются. |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
416 <note> |
654
841118e33f41
Refined the text about cache of connections to upstream servers.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
417 Следует особо отметить, что директива <literal>keepalive</literal> |
841118e33f41
Refined the text about cache of connections to upstream servers.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
418 не ограничивает общее число соединений с серверами группы, которые |
841118e33f41
Refined the text about cache of connections to upstream servers.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
419 рабочие процессы nginx могут открыть. |
966 | 420 Параметр <value>соединения</value> следует устанавливать достаточно |
421 консервативно, чтобы серверы группы по-прежнему могли обрабатывать | |
422 новые входящие соединения. | |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
423 </note> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
424 </para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
425 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
426 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
427 Пример конфигурации группы серверов memcached с постоянными соединениями: |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
428 <example> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
429 upstream memcached_backend { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
430 server 127.0.0.1:11211; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
431 server 10.0.0.2:11211; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
432 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
433 keepalive 32; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
434 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
435 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
436 server { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
437 ... |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
438 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
439 location /memcached/ { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
440 set $memcached_key $uri; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
441 memcached_pass memcached_backend; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
442 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
443 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
444 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
445 </example> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
446 </para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
447 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
448 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
449 Для HTTP директиву |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
450 <link doc="ngx_http_proxy_module.xml" id="proxy_http_version"/> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
451 следует установить в “<literal>1.1</literal>”, |
367
f4033b9bc4ec
- Removed unnecessary instances of unbreakable space.
Ruslan Ermilov <ru@nginx.com>
parents:
325
diff
changeset
|
452 а поле заголовка <header>Connection</header> — очистить: |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
453 <example> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
454 upstream http_backend { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
455 server 127.0.0.1:8080; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
456 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
457 keepalive 16; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
458 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
459 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
460 server { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
461 ... |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
462 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
463 location /http/ { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
464 proxy_pass http://http_backend; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
465 proxy_http_version 1.1; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
466 proxy_set_header Connection ""; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
467 ... |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
468 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
469 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
470 </example> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
471 </para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
472 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
473 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
474 <note> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
475 Хоть это и не рекомендуется, но также возможно использование постоянных |
966 | 476 соединений с HTTP/1.0, путём передачи поля заголовка |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
477 <header>Connection: Keep-Alive</header> серверу группы. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
478 </note> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
479 </para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
480 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
481 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
482 Для работы постоянных соединений с FastCGI-серверами потребуется |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
483 включить директиву |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
484 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_keep_conn"/>: |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
485 <example> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
486 upstream fastcgi_backend { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
487 server 127.0.0.1:9000; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
488 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
489 keepalive 8; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
490 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
491 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
492 server { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
493 ... |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
494 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
495 location /fastcgi/ { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
496 fastcgi_pass fastcgi_backend; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
497 fastcgi_keep_conn on; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
498 ... |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
499 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
500 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
501 </example> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
502 </para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
503 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
504 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
505 <note> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
506 При использовании методов балансировки нагрузки, отличных |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
507 от стандартного round-robin, следует активировать их до |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
508 директивы <literal>keepalive</literal>. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
509 </note> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
510 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
511 <note> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
512 Протоколы SCGI и uwsgi не определяют семантику постоянных соединений. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
513 </note> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
514 </para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
515 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
516 </directive> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
517 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
518 |
1125
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
519 <directive name="least_conn"> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
520 <syntax/> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
521 <default/> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
522 <context>upstream</context> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
523 <appeared-in>1.3.1</appeared-in> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
524 <appeared-in>1.2.2</appeared-in> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
525 |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
526 <para> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
527 Задаёт для группы метод балансировки нагрузки, при котором запрос |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
528 передаётся серверу с наименьшим числом активных соединений, |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
529 с учётом весов серверов. |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
530 Если подходит сразу несколько серверов, они выбираются циклически |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
531 (в режиме round-robin) с учётом их весов. |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
532 </para> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
533 |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
534 </directive> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
535 |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
536 |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
537 <directive name="health_check"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
538 <syntax>[<value>параметры</value>]</syntax> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
539 <default/> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
540 <context>location</context> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
541 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
542 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
543 Активирует периодические проверки работоспособности серверов в |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
544 <link id="upstream">группе</link>, указанной в содержащем location. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
545 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
546 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
547 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
548 Могут быть заданы следующие необязательные параметры: |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
549 <list type="tag"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
550 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
551 <tag-name id="interval"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
552 <literal>interval</literal>=<value>время</value> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
553 </tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
554 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
555 задаёт интервал между двумя последовательными проверками, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
556 по умолчанию 5 секунд; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
557 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
558 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
559 <tag-name id="fails"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
560 <literal>fails</literal>=<value>число</value> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
561 </tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
562 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
563 задаёт число последовательных неуспешных проверок для определённого сервера, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
564 после которых сервер будет считаться неработоспособным, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
565 по умолчанию 1; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
566 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
567 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
568 <tag-name id="passes"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
569 <literal>passes</literal>=<value>число</value> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
570 </tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
571 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
572 задаёт число последовательных успешных проверок для определённого сервера, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
573 после которых сервер будет считаться работоспособным, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
574 по умолчанию 1; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
575 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
576 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
577 <tag-name id="uri"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
578 <literal>uri</literal>=<value>uri</value> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
579 </tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
580 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
581 задаёт URI, используемый в запросах, проверяющих работоспособность, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
582 по умолчанию “<literal>/</literal>”; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
583 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
584 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
585 <tag-name id="hc_match"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
586 <literal>match</literal>=<value>имя</value> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
587 </tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
588 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
589 указывает на блок <literal>match</literal> с условиями, которым должен |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
590 удовлетворять ответ, чтобы результат проверки считался успешным; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
591 по умолчанию код ответа должен быть 2xx или 3xx. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
592 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
593 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
594 </list> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
595 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
596 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
597 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
598 В примере |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
599 <example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
600 location / { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
601 proxy_pass http://backend; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
602 health_check; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
603 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
604 </example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
605 каждому серверу группы <literal>backend</literal> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
606 с интервалом в 5 секунд посылаются запросы “<literal>/</literal>”. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
607 Если происходит ошибка или таймаут при работе с сервером, или |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
608 код ответа проксируемого сервера не равен |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
609 2xx или 3xx, проверка считается неуспешной и сервер |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
610 признаётся неработоспособным. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
611 На неработоспособные серверы клиентские запросы передаваться не будут. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
612 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
613 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
614 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
615 Проверки работоспособности могут тестировать код ответа, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
616 наличие или отсутствие определённых полей заголовка и их значений, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
617 а также содержимое тела ответа. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
618 Тесты настраиваются отдельно при помощи директивы <link id="match"/> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
619 и указываются в параметре <literal>match</literal>. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
620 Например: |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
621 <example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
622 http { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
623 server { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
624 ... |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
625 location / { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
626 proxy_pass http://backend; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
627 health_check match=welcome; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
628 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
629 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
630 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
631 match welcome { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
632 status 200; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
633 header Content-Type = text/html; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
634 body ~ "Welcome to nginx!"; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
635 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
636 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
637 </example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
638 В такой конфигурации успешный ответ на проверочный запрос |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
639 должен иметь код 200, тип содержимого “<literal>text/html</literal>” |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
640 и “<literal>Welcome to nginx!</literal>” в теле ответа. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
641 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
642 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
643 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
644 Группа должна находиться в <link id="zone">зоне разделяемой памяти</link>. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
645 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
646 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
647 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
648 Если для группы задано несколько проверок, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
649 то при любой неуспешной проверке соответствующий сервер будет |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
650 считаться неработоспособным. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
651 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
652 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
653 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
654 <note> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
655 Эта директива доступна как часть |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
656 <commercial_version>коммерческой подписки</commercial_version>. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
657 </note> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
658 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
659 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
660 </directive> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
661 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
662 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
663 <directive name="match"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
664 <syntax block="yes"><value>имя</value></syntax> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
665 <default/> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
666 <context>http</context> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
667 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
668 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
669 Задаёт именованный набор тестов для анализа ответов |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
670 на запросы проверки работоспособности. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
671 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
672 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
673 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
674 В ответе могут быть протестированы следующие объекты: |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
675 <list type="tag"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
676 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
677 <tag-name><literal>status 200;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
678 <tag-desc>код ответа равен 200</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
679 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
680 <tag-name><literal>status ! 500;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
681 <tag-desc>код ответа не равен 500</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
682 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
683 <tag-name><literal>status 200 204;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
684 <tag-desc>код ответа равен 200 или 204</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
685 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
686 <tag-name><literal>status ! 301 302;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
687 <tag-desc>код ответа не равен ни 301, ни 302</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
688 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
689 <tag-name><literal>status 200-399;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
690 <tag-desc>код ответа находится в диапазоне от 200 до 399</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
691 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
692 <tag-name><literal>status ! 400-599;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
693 <tag-desc>код ответа находится вне диапазона от 400 до 599</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
694 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
695 <tag-name><literal>status 301-303 307;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
696 <tag-desc>код ответа равен 301, 302, 303 или 307</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
697 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
698 </list> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
699 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
700 <list type="tag"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
701 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
702 <tag-name><literal>header Content-Type = text/html;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
703 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
704 заголовок содержит <header>Content-Type</header> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
705 со значением <literal>text/html</literal> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
706 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
707 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
708 <tag-name><literal>header Content-Type != text/html;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
709 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
710 заголовок содержит <header>Content-Type</header> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
711 со значением, отличным от <literal>text/html</literal> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
712 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
713 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
714 <tag-name><literal>header Connection ~ close;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
715 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
716 заголовок содержит <header>Connection</header> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
717 со значением, совпадающим с регулярным выражением <literal>close</literal> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
718 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
719 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
720 <tag-name><literal>header Connection !~ close;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
721 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
722 заголовок содержит <header>Connection</header> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
723 со значением, не совпадающим с регулярным выражением <literal>close</literal> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
724 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
725 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
726 <tag-name><literal>header Host;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
727 <tag-desc>заголовок содержит <header>Host</header></tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
728 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
729 <tag-name><literal>header ! X-Accel-Redirect;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
730 <tag-desc>заголовок не содержит <header>X-Accel-Redirect</header></tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
731 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
732 </list> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
733 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
734 <list type="tag"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
735 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
736 <tag-name><literal>body ~ "Welcome to nginx!";</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
737 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
738 тело ответа совпадает с регулярным выражением |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
739 “<literal>Welcome to nginx!</literal>” |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
740 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
741 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
742 <tag-name><literal>body !~ "Welcome to nginx!";</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
743 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
744 тело ответа не совпадает с регулярным выражением |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
745 “<literal>Welcome to nginx!</literal>” |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
746 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
747 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
748 </list> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
749 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
750 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
751 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
752 Если задано несколько тестов, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
753 то ответ должен удовлетворять всем тестам. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
754 <note> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
755 Проверяются только первые 256 Кбайт тела ответа. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
756 </note> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
757 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
758 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
759 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
760 Примеры: |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
761 <example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
762 # код ответа 200, тип содержимого "text/html" |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
763 # и тело ответа содержит "Welcome to nginx!" |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
764 match welcome { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
765 status 200; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
766 header Content-Type = text/html; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
767 body ~ "Welcome to nginx!"; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
768 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
769 </example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
770 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
771 <example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
772 # код ответа не равен 301, 302, 303 и 307 и заголовок не содержит "Refresh:" |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
773 match not_redirect { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
774 status ! 301-303 307; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
775 header ! Refresh; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
776 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
777 </example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
778 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
779 <example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
780 # код ответа успешный и сервер не в сервисном режиме |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
781 match server_ok { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
782 status 200-399; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
783 body !~ "maintenance mode"; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
784 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
785 </example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
786 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
787 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
788 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
789 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
790 <note> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
791 Эта директива доступна как часть |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
792 <commercial_version>коммерческой подписки</commercial_version>. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
793 </note> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
794 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
795 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
796 </directive> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
797 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
798 |
1122
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
799 <directive name="queue"> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
800 <syntax> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
801 <value>число</value> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
802 [<literal>timeout</literal>=<value>время</value>]</syntax> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
803 <default/> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
804 <context>upstream</context> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
805 <appeared-in>1.5.12</appeared-in> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
806 |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
807 <para> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
808 Если при обработке запроса невозможно сразу выбрать сервер группы |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
809 и в группе есть серверы, у которых число соединений достигло |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
810 ограничения <link id="max_conns"/>, |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
811 запрос будет помещён в очередь. |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
812 Директива задаёт максимальное число запросов, которые могут одновременно |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
813 находиться в очереди. |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
814 Если очередь переполнена |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
815 или за время, задаваемое параметром <literal>timeout</literal>, |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
816 так и не удастся выбрать сервер для передачи ему запроса, |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
817 клиенту будет возвращена ошибка. |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
818 </para> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
819 |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
820 <para> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
821 По умолчанию параметр <literal>timeout</literal> равен 60 секундам. |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
822 </para> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
823 |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
824 <para> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
825 <note> |
1128
1594ed379f1f
De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents:
1127
diff
changeset
|
826 Эта директива доступна как часть |
1594ed379f1f
De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents:
1127
diff
changeset
|
827 <commercial_version>коммерческой подписки</commercial_version>. |
1122
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
828 </note> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
829 </para> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
830 |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
831 </directive> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
832 |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
833 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
834 <directive name="sticky"> |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
835 <syntax> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
836 <literal>cookie</literal> <value>имя</value> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
837 [<literal>expires=</literal><value>время</value>] |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
838 [<literal>domain=</literal><value>домен</value>] |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
839 [<literal>path=</literal><value>путь</value>]</syntax> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
840 <syntax> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
841 <literal>route</literal> <value>переменная</value> ...</syntax> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
842 <syntax> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
843 <literal>learn</literal> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
844 <literal>create=</literal><value>$переменная</value> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
845 <literal>lookup=</literal><value>$переменная</value> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
846 <literal>zone=</literal><value>имя</value>:<value>размер</value> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
847 [<literal>timeout=</literal><value>время</value>]</syntax> |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
848 <default/> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
849 <context>upstream</context> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
850 <appeared-in>1.5.7</appeared-in> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
851 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
852 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
853 Включает режим привязки сеансов, в котором запросы клиента |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
854 будут передаваться на один и тот же сервер группы. |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
855 Доступны три метода: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
856 <list type="tag"> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
857 <tag-name id="sticky_cookie"><literal>cookie</literal></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
858 <tag-desc> |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
859 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
860 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
861 При использовании метода <literal>cookie</literal> информация о |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
862 назначенном сервере передаётся в HTTP-куке: |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
863 <example> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
864 upstream backend { |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
865 server backend1.example.com; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
866 server backend2.example.com; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
867 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
868 sticky cookie srv_id expires=1h domain=.example.com path=/; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
869 } |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
870 </example> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
871 </para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
872 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
873 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
874 Запрос от клиента, ещё не привязанного к определённому серверу, |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
875 передаётся на сервер, выбранный согласно настроенному методу балансировки. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
876 Дальнейшие запросы от этого клиента передаются на тот же сервер. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
877 Если назначенный сервер не может обработать запрос, выбирается новый |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
878 сервер как если бы клиент не имел привязки к серверу. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
879 </para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
880 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
881 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
882 Первый параметр задаёт имя куки, которую необходимо установить или проверить. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
883 Дополнительные параметры могут быть следующими: |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
884 <list type="tag"> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
885 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
886 <tag-name><literal>expires</literal></tag-name> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
887 <tag-desc> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
888 Задаёт время, в течение которого браузеру необходимо хранить куку. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
889 Специальное значение <literal>max</literal> устанавливает срок хранения куки до |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
890 31 декабря 2037 года 23:55:55 GMT. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
891 Если параметр не указан, то время действия куки ограничивается сессией браузера. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
892 </tag-desc> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
893 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
894 <tag-name><literal>domain</literal></tag-name> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
895 <tag-desc> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
896 Задаёт домен, для которого устанавливается кука. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
897 </tag-desc> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
898 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
899 <tag-name><literal>path</literal></tag-name> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
900 <tag-desc> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
901 Задаёт путь, для которого устанавливается кука. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
902 </tag-desc> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
903 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
904 </list> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
905 Если пропущен тот или иной параметр, то соответствующего поля в куке не будет. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
906 </para> |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
907 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
908 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
909 <tag-name id="sticky_route"><literal>route</literal></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
910 <tag-desc> |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
911 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
912 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
913 При использовании метода <literal>route</literal> проксируемый сервер назначает |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
914 клиенту маршрут по получении первого запроса. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
915 Все последующие запросы от этого клиента будут содержать информацию о |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
916 маршруте в куке или URI. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
917 Эта информация сравнивается с параметром “<literal>route</literal>” директивы |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
918 <link id="server"/> для идентификации сервера, на который |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
919 следует проксировать запрос. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
920 Если назначенный сервер не может обработать запрос, выбирается новый сервер |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
921 согласно настроенному методу балансировки как если бы в запросе не было |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
922 информации о маршруте. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
923 </para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
924 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
925 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
926 Параметры метода <literal>route</literal> задают переменные, которые |
1238
763db729e6a4
Upstream: corrected translation in sticky route.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1237
diff
changeset
|
927 могут содержать информацию о маршруте. |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
928 Первая непустая переменная используется для поиска соответствующего сервера. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
929 </para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
930 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
931 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
932 Пример: |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
933 <example> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
934 map $cookie_jsessionid $route_cookie { |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
935 ~.+\.(?P<route>\w+)$ $route; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
936 } |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
937 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
938 map $request_uri $route_uri { |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
939 ~jsessionid=.+\.(?P<route>\w+)$ $route; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
940 } |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
941 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
942 upstream backend { |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
943 server backend1.example.com route=a; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
944 server backend2.example.com route=b; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
945 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
946 sticky route $route_cookie $route_uri; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
947 } |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
948 </example> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
949 В этом примере маршрут берётся из куки “<literal>JSESSIONID</literal>”, |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
950 если она присутствует в запросе. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
951 В противном случае используется маршрут из URI. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
952 </para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
953 |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
954 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
955 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
956 <tag-name id="sticky_learn"><literal>learn</literal></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
957 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
958 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
959 При использовании метода <literal>learn</literal> (1.7.1) nginx |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
960 анализирует ответы от вышестоящего сервера и запоминает |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
961 начатые им сессии, которые обычно передаются в HTTP-куке. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
962 <example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
963 upstream backend { |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
964 server backend1.example.com:8080; |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
965 server backend2.example.com:8081; |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
966 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
967 sticky learn |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
968 create=$upstream_cookie_sessionid |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
969 lookup=$cookie_sessionid |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
970 zone=client_sessions:1m; |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
971 } |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
972 </example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
973 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
974 В примере выше сервер группы создаёт сессию путём установки |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
975 куки “<literal>SESSIONID</literal>” в своём ответе. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
976 Последующие запросы с этой кукой будут передаваться на этот же сервер. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
977 Если сервер не может обработать запрос, выбирается новый |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
978 сервер как если бы клиент не имел привязки к серверу. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
979 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
980 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
981 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
982 Параметры <literal>create</literal> и <literal>lookup</literal> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
983 задают переменные, в которых соответственно указывается способ |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
984 создания новых и поиска существующих сессий. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
985 Оба параметра могут быть указаны больше одного раза |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
986 (в этом случае используется первая непустая переменная). |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
987 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
988 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
989 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
990 Сессии хранятся в зоне разделяемой памяти, <value>имя</value> и |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
991 <value>размер</value> которой задаются параметром <literal>zone</literal>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
992 Зоны размером в 1 мегабайт достаточно для хранения около 8 тысяч сессий |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
993 на 64-битной платформе. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
994 Сессии, к которым не было обращений в течение времени, заданного параметром |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
995 <literal>timeout</literal>, удаляются из зоны. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
996 По умолчанию <literal>timeout</literal> равен 10 минутам. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
997 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
998 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
999 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1000 </list> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1001 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1002 |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
1003 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
1004 <note> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
1005 Эта директива доступна как часть |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
1006 <commercial_version>коммерческой подписки</commercial_version>. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
1007 </note> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
1008 </para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
1009 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
1010 </directive> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
1011 |
1237
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1012 |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1013 <directive name="sticky_cookie_insert"> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1014 <syntax><value>имя</value> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1015 [<literal>expires=</literal><value>время</value>] |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1016 [<literal>domain=</literal><value>домен</value>] |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1017 [<literal>path=</literal><value>путь</value>]</syntax> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1018 <default/> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1019 <context>upstream</context> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1020 |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1021 <para> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1022 Эта директива устарела начиная с версии 1.5.7. |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1023 Вместо неё следует использовать аналогичную директиву |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1024 <link id="sticky"/> с изменённым синтаксисом: |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1025 <note> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1026 <literal>sticky cookie</literal> <value>имя</value> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1027 [<literal>expires=</literal><value>время</value>] |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1028 [<literal>domain=</literal><value>домен</value>] |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1029 [<literal>path=</literal><value>путь</value>]; |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1030 </note> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1031 </para> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1032 |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1033 </directive> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1034 |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1035 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1036 <directive name="upstream_conf"> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1037 <syntax/> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1038 <default/> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1039 <context>location</context> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1040 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1041 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1042 Активирует HTTP-интерфейс для настройки групп серверов в содержащем location. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1043 Доступ в location следует |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1044 <link doc="ngx_http_core_module.xml" id="satisfy">ограничить</link>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1045 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1046 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1047 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1048 С помощью команд настройки можно: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1049 <list type="bullet"> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1050 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1051 <listitem>просматривать конфигурацию группы;</listitem> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1052 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1053 <listitem> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1054 просматривать или изменять конфигурацию, а также |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1055 удалять отдельные серверы; |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1056 </listitem> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1057 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1058 <listitem>добавлять новые серверы.</listitem> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1059 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1060 </list> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1061 <note> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1062 Поскольку адреса в группе не обязаны быть уникальными, |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1063 обращение к отдельным серверам в группе осуществляется по их идентификаторам. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1064 Идентификаторы назначаются автоматически и показываются при добавлении сервера |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1065 или просмотре конфигурации группы. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1066 </note> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1067 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1068 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1069 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1070 Команда настройки состоит из параметров, передаваемых в аргументах запроса, |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1071 например: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1072 <example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1073 http://127.0.0.1/upstream_conf?upstream=dynamic |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1074 </example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1075 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1076 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1077 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1078 Поддерживаются следующие параметры: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1079 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1080 <list type="tag" compact="no"> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1081 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1082 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1083 <literal>upstream=</literal><value>имя</value></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1084 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1085 Выбирает группу серверов для работы. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1086 Параметр является обязательным. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1087 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1088 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1089 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1090 <literal>id=</literal><value>число</value></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1091 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1092 Выбирает отдельный сервер для просмотра, изменения или удаления. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1093 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1094 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1095 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1096 <literal>remove=</literal></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1097 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1098 Удаляет выбранный сервер из группы. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1099 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1100 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1101 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1102 <literal>add=</literal></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1103 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1104 Добавляет новый сервер в группу. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1105 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1106 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1107 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1108 <literal>backup=</literal></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1109 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1110 Необходим для добавления запасного сервера. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1111 <note> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1112 До версии 1.7.2 параметр <literal>backup=</literal> требовался |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1113 также для просмотра, изменения или удаления существующих запасных серверов. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1114 </note> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1115 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1116 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1117 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1118 <literal>server=</literal><value>адрес</value></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1119 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1120 То же, что и параметр “<literal>адрес</literal>” |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1121 директивы <link id="server"/>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1122 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1123 При добавлении сервер можно задать в виде доменного имени. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1124 В этом случае любые изменения IP-адресов, соответствующих доменному имени |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1125 сервера, отслеживаются и автоматически применяются к конфигурации группы |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1126 без необходимости перезапуска nginx (1.7.2). |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1127 Для этого в блоке <link doc="ngx_http_core_module.xml" id="http"/> должна |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1128 быть задана директива <link doc="ngx_http_core_module.xml" id="resolver"/>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1129 См. также параметр |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1130 <link id="resolve"/> директивы <link id="server"/>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1131 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1132 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1133 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1134 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1135 <literal>weight=</literal><value>число</value></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1136 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1137 То же, что и параметр “<literal>weight</literal>” |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1138 директивы <link id="server"/>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1139 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1140 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1141 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1142 <literal>max_fails=</literal><value>число</value></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1143 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1144 То же, что и параметр “<literal>max_fails</literal>” |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1145 директивы <link id="server"/>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1146 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1147 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1148 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1149 <literal>fail_timeout=</literal><value>время</value></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1150 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1151 То же, что и параметр “<literal>fail_timeout</literal>” |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1152 директивы <link id="server"/>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1153 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1154 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1155 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1156 <literal>slow_start=</literal><value>время</value></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1157 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1158 То же, что и параметр “<literal>slow_start</literal>” |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1159 директивы <link id="server"/>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1160 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1161 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1162 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1163 <literal>down=</literal></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1164 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1165 То же, что и параметр “<literal>down</literal>” |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1166 директивы <link id="server"/>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1167 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1168 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1169 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1170 <literal>up=</literal></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1171 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1172 Параметр, обратный по значению параметру “<literal>down</literal>” |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1173 директивы <link id="server"/>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1174 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1175 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1176 <tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1177 <literal>route=</literal><value>строка</value></tag-name> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1178 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1179 То же, что и параметр “<literal>route</literal>” |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1180 директивы <link id="server"/>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1181 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1182 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1183 </list> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1184 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1185 Первые два параметра выбирают объект. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1186 Объектом может быть либо группа серверов, либо отдельный сервер. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1187 Если остальные параметры не указаны, то показывается конфигурация выбранной |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1188 группы или сервера. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1189 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1190 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1191 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1192 Например, команда для просмотра конфигурации всей группы |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1193 выглядит следующим образом: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1194 <example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1195 http://127.0.0.1/upstream_conf?upstream=dynamic |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1196 </example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1197 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1198 Для просмотра конфигурации отдельного сервера следует указать его идентификатор: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1199 <example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1200 http://127.0.0.1/upstream_conf?upstream=dynamic&id=42 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1201 </example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1202 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1203 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1204 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1205 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1206 Для добавления нового сервера в группу |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1207 следует указать его адрес в параметре “<literal>server=</literal>”. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1208 Если остальные параметры не указаны, то при добавлении сервера |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1209 их значения будут установлены по умолчанию (см. директиву <link id="server"/>). |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1210 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1211 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1212 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1213 Например, команда для добавления нового основного сервера в группу |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1214 выглядит следующим образом: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1215 <example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1216 http://127.0.0.1/upstream_conf?add=&upstream=dynamic&server=127.0.0.1:8080 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1217 </example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1218 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1219 Добавление нового запасного сервера происходит следующим образом: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1220 <example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1221 http://127.0.0.1/upstream_conf?add=&upstream=dynamic&backup=&server=127.0.0.1:8080 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1222 </example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1223 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1224 Добавление нового основного сервера с нестандартными |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1225 значениями параметров и с пометкой его как постоянно недоступного |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1226 (“<literal>down</literal>”) происходит следующим образом: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1227 <example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1228 http://127.0.0.1/upstream_conf?add=&upstream=dynamic&server=127.0.0.1:8080&weight=2&down= |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1229 </example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1230 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1231 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1232 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1233 Для удаления сервера следует указать его идентификатор: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1234 <example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1235 http://127.0.0.1/upstream_conf?remove=&upstream=dynamic&id=42 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1236 </example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1237 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1238 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1239 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1240 Пометка существующего сервера как постоянно недоступного |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1241 (“<literal>down</literal>”) происходит следующим образом: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1242 <example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1243 http://127.0.0.1/upstream_conf?upstream=dynamic&id=42&down= |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1244 </example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1245 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1246 Изменение адреса существующего сервера происходит следующим образом: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1247 <example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1248 http://127.0.0.1/upstream_conf?upstream=dynamic&id=42&server=192.0.2.3:8123 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1249 </example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1250 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1251 Изменение других параметров существующего сервера происходит следующим образом: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1252 <example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1253 http://127.0.0.1/upstream_conf?upstream=dynamic&id=42&max_fails=3&weight=4 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1254 </example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1255 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1256 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1257 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1258 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1259 <note> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1260 Эта директива доступна как часть |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1261 <commercial_version>коммерческой подписки</commercial_version>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1262 </note> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1263 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1264 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1265 </directive> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
1266 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1267 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1268 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1269 |
292 | 1270 <section id="variables" name="Встроенные переменные"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1271 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1272 <para> |
292 | 1273 Модуль <literal>ngx_http_upstream_module</literal> |
1274 поддерживает следующие встроенные переменные: | |
1275 <list type="tag"> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1276 |
1155
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1277 <tag-name id="var_upstream_addr"><var>$upstream_addr</var></tag-name> |
292 | 1278 <tag-desc> |
1279 хранит IP-адрес и порт сервера или путь к UNIX-сокету. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1280 Если при обработке запроса были сделаны обращения к нескольким серверам, |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1281 то их адреса разделяются запятой, например, |
292 | 1282 “<literal>192.168.1.1:80, 192.168.1.2:80, unix:/tmp/sock</literal>”. |
256
c78b2d6fe261
Use another term for "redirect".
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1283 Если произошло внутреннее перенаправление от одной группы серверов на другую |
c78b2d6fe261
Use another term for "redirect".
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1284 с помощью |
292 | 1285 <header>X-Accel-Redirect</header> или |
1286 <link doc="ngx_http_core_module.xml" id="error_page"/>, | |
966 | 1287 то адреса, соответствующие разным группам серверов, разделяются двоеточием, |
1288 например, | |
292 | 1289 “<literal>192.168.1.1:80, 192.168.1.2:80, unix:/tmp/sock : 192.168.10.1:80, 192.168.10.2:80</literal>”. |
1290 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1291 |
1155
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1292 <tag-name id="var_upstream_cache_status"><var>$upstream_cache_status</var> |
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1293 </tag-name> |
731
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1294 <tag-desc> |
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1295 хранит статус доступа к кэшу ответов (0.8.3). |
1075
6c021feec587
Removed unjustified non-breakable spaces.
Ruslan Ermilov <ru@nginx.com>
parents:
1016
diff
changeset
|
1296 Статус может быть одним из “<literal>MISS</literal>”, |
731
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1297 “<literal>BYPASS</literal>”, “<literal>EXPIRED</literal>”, |
1016
2d8269d8fea8
Translated documentation on cache revalidation into russian.
Vladimir Homutov <vl@nginx.com>
parents:
966
diff
changeset
|
1298 “<literal>STALE</literal>”, “<literal>UPDATING</literal>”, |
2d8269d8fea8
Translated documentation on cache revalidation into russian.
Vladimir Homutov <vl@nginx.com>
parents:
966
diff
changeset
|
1299 “<literal>REVALIDATED</literal>” или “<literal>HIT</literal>”. |
731
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1300 </tag-desc> |
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1301 |
1186
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1302 <tag-name id="var_upstream_cookie_"><var>$upstream_cookie_</var><value>имя</value></tag-name> |
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1303 <tag-desc> |
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1304 кука с указанным <value>именем</value>, переданная сервером группы |
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1305 в поле <header>Set-Cookie</header> заголовка ответа (1.7.1). |
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1306 Необходимо иметь в виду, что запоминаются поля заголовка только из ответа |
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1307 последнего сервера. |
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1308 </tag-desc> |
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1309 |
1155
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1310 <tag-name id="var_upstream_response_length"><var>$upstream_response_length</var> |
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1311 </tag-name> |
731
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1312 <tag-desc> |
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1313 хранит длины ответов, полученных от серверов группы (0.7.27); |
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1314 длины хранятся в байтах. |
966 | 1315 Длины нескольких ответов разделяются запятыми и двоеточиями |
1316 подобно адресам в переменной <var>$upstream_addr</var>. | |
731
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1317 </tag-desc> |
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1318 |
1155
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1319 <tag-name id="var_upstream_response_time"><var>$upstream_response_time</var> |
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1320 </tag-name> |
292 | 1321 <tag-desc> |
731
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1322 хранит времена ответов, полученных от серверов группы; |
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1323 времена хранятся в секундах с точностью до миллисекунд. |
966 | 1324 Времена нескольких ответов разделяются запятыми и двоеточиями |
1325 подобно адресам в переменной <var>$upstream_addr</var>. | |
292 | 1326 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1327 |
1155
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1328 <tag-name id="var_upstream_status"><var>$upstream_status</var></tag-name> |
292 | 1329 <tag-desc> |
731
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1330 хранит коды ответов, полученных от серверов группы. |
966 | 1331 Коды нескольких ответов разделяются запятыми и двоеточиями |
1332 подобно адресам в переменной <var>$upstream_addr</var>. | |
292 | 1333 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1334 |
1186
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1335 <tag-name id="var_upstream_http_"><var>$upstream_http_</var><value>имя</value></tag-name> |
292 | 1336 <tag-desc> |
1337 хранят поля заголовка ответа сервера. | |
1338 Например, поле заголовка ответа <header>Server</header> | |
1339 доступно в переменной <var>$upstream_http_server</var>. | |
731
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1340 Правила преобразования имён полей заголовка ответа в имена переменных |
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1341 такие же, как для переменных с префиксом |
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1342 “<link doc="ngx_http_core_module.xml" id="variables">$http_</link>”. |
966 | 1343 Необходимо иметь в виду, что запоминаются поля заголовка только из ответа |
292 | 1344 последнего сервера. |
1345 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1346 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1347 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1348 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1349 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1350 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1351 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1352 </module> |