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