Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_upstream_module.xml @ 2021:03538fa2acfe
Corrected typo in the mirror module.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Wed, 09 Aug 2017 15:52:41 +0300 |
parents | 88477c5d2751 |
children | 5c55b7054b58 |
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" |
1945
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
13 rev="60"> |
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> |
1945
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
53 Динамически настраиваемая группа |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
54 с периодическими |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
55 <link doc="ngx_http_upstream_hc_module.xml">проверками работоспособности</link> |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
56 доступна как часть |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
57 <commercial_version>коммерческой подписки</commercial_version>: |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
58 <example> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
59 resolver 10.0.0.1; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
60 |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
61 upstream <emphasis>dynamic</emphasis> { |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
62 zone upstream_dynamic 64k; |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
63 |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
64 server backend1.example.com weight=5; |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
65 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
|
66 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
|
67 server backend3.example.com resolve; |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
68 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
|
69 |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
70 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
|
71 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
|
72 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
73 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
74 server { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
75 location / { |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
76 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
|
77 health_check; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
78 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
79 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
80 </example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
81 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
82 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
83 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
84 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
85 |
292 | 86 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
87 |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
88 <directive name="upstream"> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
89 <syntax block="yes"><value>название</value></syntax> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
90 <default/> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
91 <context>http</context> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
92 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
93 <para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
94 Описывает группу серверов. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
95 Серверы могут слушать на разных портах. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
96 Кроме того, можно одновременно использовать серверы, |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
97 слушающие на TCP- и UNIX-сокетах. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
98 </para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
99 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
100 <para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
101 Пример: |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
102 <example> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
103 upstream backend { |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
104 server backend1.example.com weight=5; |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
105 server 127.0.0.1:8080 max_fails=3 fail_timeout=30s; |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
106 server unix:/tmp/backend3; |
1126
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
107 |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
108 server backup1.example.com backup; |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
109 } |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
110 </example> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
111 </para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
112 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
113 <para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
114 По умолчанию запросы распределяются по серверам циклически |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
115 (в режиме round-robin) с учётом весов серверов. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
116 В вышеприведённом примере каждые 7 запросов будут распределены так: |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
117 5 запросов на <literal>backend1.example.com</literal> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
118 и по одному запросу на второй и третий серверы. |
966 | 119 Если при попытке работы с сервером происходит ошибка, то запрос |
120 передаётся следующему серверу, и так далее до тех пор, пока не будут опробованы | |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
121 все работающие серверы. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
122 Если не удастся получить успешный ответ |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
123 ни от одного из серверов, то клиенту будет возвращён результат работы |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
124 с последним сервером. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
125 </para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
126 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
127 </directive> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
128 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
129 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
130 <directive name="server"> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
131 <syntax><value>адрес</value> [<value>параметры</value>]</syntax> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
132 <default/> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
133 <context>upstream</context> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
134 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
135 <para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
136 Задаёт <value>адрес</value> и другие <value>параметры</value> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
137 сервера. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
138 Адрес может быть указан в виде доменного имени или IP-адреса, |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
139 и необязательного порта, или в виде пути UNIX-сокета, который |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
140 указывается после префикса “<literal>unix:</literal>”. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
141 Если порт не указан, используется порт 80. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
142 Доменное имя, которому соответствует несколько IP-адресов, |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
143 задаёт сразу несколько серверов. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
144 </para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
145 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
146 <para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
147 Могут быть заданы следующие параметры: |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
148 <list type="tag"> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
149 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
150 <tag-name id="weight"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
151 <literal>weight</literal>=<value>число</value> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
152 </tag-name> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
153 <tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
154 задаёт вес сервера, по умолчанию 1. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
155 </tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
156 |
1800
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
157 <tag-name id="max_conns"> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
158 <literal>max_conns</literal>=<value>число</value> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
159 </tag-name> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
160 <tag-desc> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
161 ограничивает максимальное <value>число</value> одновременных активных |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
162 соединений к проксируемому серверу (1.11.5). |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
163 Значение по умолчанию равно 0 и означает, что ограничения нет. |
1801
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
164 Если группа не находится в <link id="zone">зоне разделяемой памяти</link>, |
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
165 то ограничение работает отдельно для каждого рабочего процесса. |
1800
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
166 <note> |
1801
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
167 При включённых <link id="keepalive">неактивных постоянных</link> соединениях, |
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
168 нескольких |
1800
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
169 <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
|
170 и <link id="zone">зоне разделяемой памяти</link>, |
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
171 суммарное число активных и неактивных соединений с проксируемым сервером |
1800
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
172 может превышать значение <literal>max_conns</literal>. |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
173 </note> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
174 <note> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
175 Начиная с версии 1.5.9 и до версии 1.11.5 |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
176 этот параметр был доступен как часть |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
177 <commercial_version>коммерческой подписки</commercial_version>. |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
178 </note> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
179 </tag-desc> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1783
diff
changeset
|
180 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
181 <tag-name id="max_fails"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
182 <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
|
183 </tag-name> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
184 <tag-desc> |
966 | 185 задаёт число неудачных попыток работы с сервером, которые должны произойти |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
186 в течение времени, заданного параметром <literal>fail_timeout</literal>, |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
187 чтобы сервер считался недоступным на период времени, также заданный |
966 | 188 параметром <literal>fail_timeout</literal>. |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
189 По умолчанию число попыток устанавливается равным 1. |
966 | 190 Нулевое значение отключает учёт попыток. |
942
ba3d6ade3513
Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents:
917
diff
changeset
|
191 Что считается неудачной попыткой, определяется директивами |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
192 <link doc="ngx_http_proxy_module.xml" id="proxy_next_upstream"/>, |
1181 | 193 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_next_upstream"/>, |
1194 | 194 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_next_upstream"/>, |
1181 | 195 <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
|
196 <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
|
197 </tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
198 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
199 <tag-name id="fail_timeout"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
200 <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
|
201 </tag-name> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
202 <tag-desc> |
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 <list type="bullet"> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
205 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
206 <listitem> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
207 время, в течение которого должно произойти заданное число неудачных |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
208 попыток работы с сервером для того, чтобы сервер считался недоступным; |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
209 </listitem> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
210 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
211 <listitem> |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
212 и время, в течение которого сервер будет считаться недоступным. |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
213 </listitem> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
214 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
215 </list> |
966 | 216 По умолчанию параметр равен 10 секундам. |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
217 </tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
218 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
219 <tag-name id="backup"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
220 <literal>backup</literal> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
221 </tag-name> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
222 <tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
223 помечает сервер как запасной сервер. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
224 На него будут передаваться запросы в случае, если не работают основные серверы. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
225 </tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
226 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
227 <tag-name id="down"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
228 <literal>down</literal> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
229 </tag-name> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
230 <tag-desc> |
1410
f5dcc23b214f
Deleted info about hash and ip_hash from the down parameter.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1393
diff
changeset
|
231 помечает сервер как постоянно недоступный. |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
232 </tag-desc> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
233 |
1126
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
234 </list> |
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 |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
237 <para> |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
238 Кроме того, |
1128
1594ed379f1f
De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents:
1127
diff
changeset
|
239 следующие параметры доступны как часть |
1594ed379f1f
De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents:
1127
diff
changeset
|
240 <commercial_version>коммерческой подписки</commercial_version>: |
1126
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
241 <list type="tag"> |
2e28d1c4a0a2
Upstream: revised layout of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1125
diff
changeset
|
242 |
1124
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
243 <tag-name id="resolve"> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
244 <literal>resolve</literal> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
245 </tag-name> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
246 <tag-desc> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
247 отслеживает изменения IP-адресов, соответствующих доменному имени сервера, |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
248 и автоматически изменяет конфигурацию группы |
1127
948c853f5d22
Upstream: improved "server resolve".
Ruslan Ermilov <ru@nginx.com>
parents:
1126
diff
changeset
|
249 без необходимости перезапуска 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
|
250 Группа должна находиться в <link id="zone">зоне разделяемой памяти</link>. |
1124
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
251 <para> |
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="resolver"/> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
254 должна быть задана в блоке |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
255 <link doc="ngx_http_core_module.xml" id="http"/>. |
1127
948c853f5d22
Upstream: improved "server resolve".
Ruslan Ermilov <ru@nginx.com>
parents:
1126
diff
changeset
|
256 Пример: |
1124
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
257 <example> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
258 http { |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
259 resolver 10.0.0.1; |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
260 |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
261 upstream u { |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
262 zone ...; |
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 server example.com resolve; |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
265 } |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
266 } |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
267 </example> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
268 </para> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
269 </tag-desc> |
d790333947f4
Upstream: the "resolve" parameter of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1123
diff
changeset
|
270 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
271 <tag-name id="route"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
272 <literal>route</literal>=<value>строка</value> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
273 </tag-name> |
1240
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 задаёт имя маршрута к серверу. |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
276 </tag-desc> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
277 |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
278 <tag-name id="service"> |
1700
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
279 <literal>service</literal>=<value>имя</value> |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
280 </tag-name> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
281 <tag-desc> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
282 включает преобразование |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
283 <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
|
284 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
|
285 Для работы параметра необходимо указать |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
286 параметр <link id="resolve"/> для сервера |
1700
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
287 и не указывать порт сервера. |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
288 <para> |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
289 Если имя сервиса не содержит точку (“<literal>.</literal>”), то |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
290 имя составляется в соответствии с |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
291 <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
|
292 и в префикс службы добавляется протокол TCP. |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
293 Например, для получения |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
294 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
|
295 необходимо указать директиву: |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
296 <example> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
297 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
|
298 </example> |
1700
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
299 Если имя сервиса содержит одну и более точек, то имя составляется |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
300 при помощи соединения префикса службы и имени сервера. |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
301 Например, для получения SRV-записей |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
302 <literal>_http._tcp.backend.example.com</literal> |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
303 и <literal>server1.backend.example.com</literal> |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
304 необходимо указать директивы: |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
305 <example> |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
306 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
|
307 server example.com service=server1.backend resolve; |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
308 </example> |
1680
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 |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
311 <para> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
312 SRV-записи с наивысшим приоритетом |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
313 (записи с одинаковым наименьшим значением приоритета) |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
314 преобразуются в основные серверы, |
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 Если в конфигурации сервера указан параметр <link id="backup"/>, |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
317 высокоприоритетные SRV-записи преобразуются в запасные серверы, |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
318 остальные SRV-записи игнорируются. |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
319 </para> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
320 </tag-desc> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
321 |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
322 <tag-name id="slow_start"> |
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
323 <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
|
324 </tag-name> |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
325 <tag-desc> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
326 задаёт <value>время</value>, в течение которого вес сервера |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
327 восстановится от нуля до своего номинального значения в ситуации, когда |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
328 неработоспособный (unhealthy) сервер вновь становится работоспособным |
1945
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
329 (<link doc="ngx_http_upstream_hc_module.xml" id="health_check">healthy</link>) |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
330 или когда сервер становится доступным по прошествии времени, |
1241
2246339a6a93
Upstream: added IDs for "server" and "health_check" params.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1240
diff
changeset
|
331 в течение которого он считался <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
|
332 Значение по умолчанию равно нулю и означает, что медленный старт выключен. |
1817
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
333 <note> |
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
334 Параметр нельзя использовать совместно с |
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
335 методами балансировки нагрузки <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
|
336 </note> |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
337 </tag-desc> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
338 |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
339 </list> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
340 </para> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
341 |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
342 <para> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
343 <note> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
344 Если в группе только один сервер, параметры <literal>max_fails</literal>, |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
345 <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
|
346 игнорируются и такой сервер никогда не будет считаться недоступным. |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
347 </note> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
348 </para> |
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
349 |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
350 </directive> |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
351 |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
352 |
1123
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
353 <directive name="zone"> |
1495
8d134b482cc3
Documented zone usage with many upstreams.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1481
diff
changeset
|
354 <syntax><value>имя</value> [<value>размер</value>]</syntax> |
1123
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
355 <default/> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
356 <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
|
357 <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
|
358 |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
359 <para> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
360 Задаёт <value>имя</value> и <value>размер</value> зоны разделяемой памяти, |
1243
831215432a4f
Upstream: revised the Russian text of the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1242
diff
changeset
|
361 в которой хранятся конфигурация группы и её рабочее состояние, |
1123
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
362 разделяемые между рабочими процессами. |
1495
8d134b482cc3
Documented zone usage with many upstreams.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1481
diff
changeset
|
363 В одной и той же зоне могут быть сразу несколько групп. |
8d134b482cc3
Documented zone usage with many upstreams.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1481
diff
changeset
|
364 В этом случае достаточно указать <value>размер</value> только один раз. |
1461
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 <para> |
4e5cab61e548
Documented status of the zone directive in ngx_http_upstream module.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
368 Дополнительно, как часть |
4e5cab61e548
Documented status of the zone directive in ngx_http_upstream module.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
369 <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
|
370 в таких группах для изменения состава группы |
1243
831215432a4f
Upstream: revised the Russian text of the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1242
diff
changeset
|
371 или настроек отдельных серверов |
831215432a4f
Upstream: revised the Russian text of the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1242
diff
changeset
|
372 нет необходимости перезапускать nginx. |
1123
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
373 Конфигурация доступна через специальный location, |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
374 в котором указана директива |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
375 <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
|
376 </para> |
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 </directive> |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
379 |
9a9aa8e9d12c
Rephrased the "zone" directive, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1122
diff
changeset
|
380 |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
381 <directive name="state"> |
1720
b536cb3dbccf
Fixed Russian translation in the "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1700
diff
changeset
|
382 <syntax><value>файл</value></syntax> |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
383 <default/> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
384 <context>upstream</context> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
385 <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
|
386 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
387 <para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
388 Задаёт <value>файл</value>, в котором хранится состояние |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
389 динамически настраиваемой группы. |
1809
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 <para> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
393 Примеры: |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
394 <example> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
395 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
|
396 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
|
397 </example> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
398 </para> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
399 |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
400 <para> |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
401 В данный момент состояние ограничено списком серверов с их параметрами. |
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 <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
|
404 конфигурации группы. |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
405 Изменение содержимого файла напрямую не рекомендуется. |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
406 Директиву нельзя использовать |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
407 совместно с директивой <link id="server"/>. |
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 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
410 <para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
411 <note> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
412 Изменения, совершённые в момент |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
413 <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
|
414 или <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
|
415 могут быть потеряны. |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
416 </note> |
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 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
419 <para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
420 <note> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
421 Эта директива доступна как часть |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
422 <commercial_version>коммерческой подписки</commercial_version>. |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
423 </note> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
424 </para> |
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 </directive> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
427 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
428 |
1230
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
429 <directive name="hash"> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
430 <syntax><value>ключ</value> [<literal>consistent</literal>]</syntax> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
431 <default/> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
432 <context>upstream</context> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
433 <appeared-in>1.7.2</appeared-in> |
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 <para> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
436 Задаёт метод балансировки нагрузки для группы, при котором |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
437 соответствие клиента серверу определяется при помощи |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
438 хэшированного значения <value>ключа</value>. |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
439 В качестве <value>ключа</value> может использоваться |
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 Следует отметить, что любое добавление или удаление серверов в группе |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
442 может привести к перераспределению большинства ключей на другие серверы. |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
443 Метод совместим с библиотекой Perl |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
444 <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
|
445 </para> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
446 |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
447 <para> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
448 Если задан параметр <literal>consistent</literal>, то вместо |
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 <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
|
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 Применение метода для кэширующих серверов обеспечивает |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
454 больший процент попаданий в кэш. |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
455 Метод совместим с библиотекой Perl |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
456 <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
|
457 при значении параметра <value>ketama_points</value> равным 160. |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
458 </para> |
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 </directive> |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
461 |
6cc809881694
Upstream: added the "hash" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1194
diff
changeset
|
462 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
463 <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
|
464 <syntax/> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
79
diff
changeset
|
465 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
466 <context>upstream</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
467 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
468 <para> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
469 Задаёт для группы метод балансировки нагрузки, при котором запросы |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
470 распределяются по серверам на основе IP-адресов клиентов. |
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
471 В качестве ключа для хэширования используются первые три |
542
a9e6a8613534
Documented IPv6 support in ip_hash.
Ruslan Ermilov <ru@nginx.com>
parents:
533
diff
changeset
|
472 октета IPv4-адреса клиента или IPv6-адрес клиента целиком. |
292 | 473 Метод гарантирует, что запросы одного и того же клиента |
474 будут всегда передаваться на один и тот же сервер. | |
1240
019f8273ee24
Upstream: translated the missing parts of the "server" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1238
diff
changeset
|
475 Если же этот сервер будет считаться недоступным, |
292 | 476 то запросы этого клиента будут передаваться на другой сервер. |
477 С большой долей вероятности это также будет один и тот же сервер. | |
542
a9e6a8613534
Documented IPv6 support in ip_hash.
Ruslan Ermilov <ru@nginx.com>
parents:
533
diff
changeset
|
478 <note> |
566 | 479 IPv6-адреса поддерживаются начиная с версий 1.3.2 и 1.2.2. |
542
a9e6a8613534
Documented IPv6 support in ip_hash.
Ruslan Ermilov <ru@nginx.com>
parents:
533
diff
changeset
|
480 </note> |
76
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 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
483 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
484 Если один из серверов нужно убрать на некоторое время, то для сохранения |
292 | 485 текущего хэширования IP-адресов клиентов этот сервер нужно пометить |
486 параметром <literal>down</literal>. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
487 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
488 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
489 <para> |
292 | 490 Пример: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
491 <example> |
292 | 492 upstream backend { |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
493 ip_hash; |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
494 |
292 | 495 server backend1.example.com; |
496 server backend2.example.com; | |
497 server backend3.example.com <emphasis>down</emphasis>; | |
498 server backend4.example.com; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
499 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
500 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
501 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
502 |
526
4f907cde0382
1.3.1 changes: ip_hash+weight, least_conn.
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
503 <para> |
4f907cde0382
1.3.1 changes: ip_hash+weight, least_conn.
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
504 <note> |
566 | 505 До версий 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
|
506 <literal>ip_hash</literal>, нельзя было задать вес. |
4f907cde0382
1.3.1 changes: ip_hash+weight, least_conn.
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
507 </note> |
4f907cde0382
1.3.1 changes: ip_hash+weight, least_conn.
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
508 </para> |
4f907cde0382
1.3.1 changes: ip_hash+weight, least_conn.
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
509 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
510 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
511 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
512 |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
513 <directive name="keepalive"> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
514 <syntax><value>соединения</value></syntax> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
515 <default/> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
516 <context>upstream</context> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
517 <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
|
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 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
523 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
524 Параметр <value>соединения</value> устанавливает максимальное число |
654
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 сохраняться в кэше каждого рабочего процесса. |
841118e33f41
Refined the text about cache of connections to upstream servers.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
527 При превышении этого числа наиболее давно не используемые соединения |
841118e33f41
Refined the text about cache of connections to upstream servers.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
528 закрываются. |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
529 <note> |
654
841118e33f41
Refined the text about cache of connections to upstream servers.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
530 Следует особо отметить, что директива <literal>keepalive</literal> |
841118e33f41
Refined the text about cache of connections to upstream servers.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
531 не ограничивает общее число соединений с серверами группы, которые |
841118e33f41
Refined the text about cache of connections to upstream servers.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
532 рабочие процессы nginx могут открыть. |
966 | 533 Параметр <value>соединения</value> следует устанавливать достаточно |
534 консервативно, чтобы серверы группы по-прежнему могли обрабатывать | |
535 новые входящие соединения. | |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
536 </note> |
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 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
539 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
540 Пример конфигурации группы серверов memcached с постоянными соединениями: |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
541 <example> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
542 upstream memcached_backend { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
543 server 127.0.0.1:11211; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
544 server 10.0.0.2:11211; |
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 keepalive 32; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
547 } |
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 server { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
550 ... |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
551 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
552 location /memcached/ { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
553 set $memcached_key $uri; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
554 memcached_pass memcached_backend; |
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 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
557 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
558 </example> |
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 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
561 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
562 Для HTTP директиву |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
563 <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
|
564 следует установить в “<literal>1.1</literal>”, |
367
f4033b9bc4ec
- Removed unnecessary instances of unbreakable space.
Ruslan Ermilov <ru@nginx.com>
parents:
325
diff
changeset
|
565 а поле заголовка <header>Connection</header> — очистить: |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
566 <example> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
567 upstream http_backend { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
568 server 127.0.0.1:8080; |
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 keepalive 16; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
571 } |
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 server { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
574 ... |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
575 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
576 location /http/ { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
577 proxy_pass http://http_backend; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
578 proxy_http_version 1.1; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
579 proxy_set_header Connection ""; |
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 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
582 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
583 </example> |
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 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
586 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
587 <note> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
588 Хоть это и не рекомендуется, но также возможно использование постоянных |
966 | 589 соединений с HTTP/1.0, путём передачи поля заголовка |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
590 <header>Connection: Keep-Alive</header> серверу группы. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
591 </note> |
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 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
594 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
595 Для работы постоянных соединений с FastCGI-серверами потребуется |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
596 включить директиву |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
597 <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
|
598 <example> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
599 upstream fastcgi_backend { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
600 server 127.0.0.1:9000; |
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 keepalive 8; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
603 } |
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 server { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
606 ... |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
607 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
608 location /fastcgi/ { |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
609 fastcgi_pass fastcgi_backend; |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
610 fastcgi_keep_conn on; |
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 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
613 } |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
614 </example> |
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 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
617 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
618 <note> |
533
fb630c3c5039
Revamped the upstream documentation somewhat.
Ruslan Ermilov <ru@nginx.com>
parents:
526
diff
changeset
|
619 При использовании методов балансировки нагрузки, отличных |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
620 от стандартного round-robin, следует активировать их до |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
621 директивы <literal>keepalive</literal>. |
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 |
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 Протоколы SCGI и uwsgi не определяют семантику постоянных соединений. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
626 </note> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
627 </para> |
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 </directive> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
630 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
292
diff
changeset
|
631 |
1561
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
632 <directive name="ntlm"> |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
633 <syntax/> |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
634 <default/> |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
635 <context>upstream</context> |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
636 <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
|
637 |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
638 <para> |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
639 Позволяет проксировать запросы с |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
640 <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
|
641 подлинности NTLM</link>. |
1587
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
642 Соединение с сервером группы привязывается к клиентскому соединению |
1561
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
643 как только клиент отправляет запрос, в заголовке которого есть поле |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
644 <header>Authorization</header> со значением, |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
645 начинающимся с “<literal>Negotiate</literal>” или “<literal>NTLM</literal>”. |
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 с сервером группы, |
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> |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
650 |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
651 <para> |
1587
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
652 Для работы проверки подлинности NTLM |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
653 необходимо разрешить постоянные соединения с серверами группы. |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
654 Директиву <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
|
655 следует установить в “<literal>1.1</literal>”, |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
656 а поле заголовка <header>Connection</header> — очистить: |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
657 <example> |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
658 upstream http_backend { |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
659 server 127.0.0.1:8080; |
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 ntlm; |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
662 } |
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 server { |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
665 ... |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
666 |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
667 location /http/ { |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
668 proxy_pass http://http_backend; |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
669 proxy_http_version 1.1; |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
670 proxy_set_header Connection ""; |
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 } |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
673 } |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
674 </example> |
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 |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
677 <para> |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
678 <note> |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
679 При использовании методов балансировки нагрузки, отличных |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
680 от стандартного round-robin, следует активировать их до |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
681 директивы <literal>ntlm</literal>. |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
682 </note> |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
683 </para> |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
684 |
c2a0a18e65ba
Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1581
diff
changeset
|
685 <para> |
1561
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
686 <note> |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
687 Эта директива доступна как часть |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
688 <commercial_version>коммерческой подписки</commercial_version>. |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
689 </note> |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
690 </para> |
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 </directive> |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
693 |
ed420c318557
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1544
diff
changeset
|
694 |
1125
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
695 <directive name="least_conn"> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
696 <syntax/> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
697 <default/> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
698 <context>upstream</context> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
699 <appeared-in>1.3.1</appeared-in> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
700 <appeared-in>1.2.2</appeared-in> |
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 <para> |
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 с учётом весов серверов. |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
706 Если подходит сразу несколько серверов, они выбираются циклически |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
707 (в режиме round-robin) с учётом их весов. |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
708 </para> |
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 </directive> |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
711 |
9a95b9026a16
Upstream: reallocated the "queue" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
1124
diff
changeset
|
712 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
713 <directive name="least_time"> |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
714 <syntax> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
715 <literal>header</literal> | |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
716 <literal>last_byte</literal> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
717 [<literal>inflight</literal>]</syntax> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
718 <default/> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
719 <context>upstream</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
720 <appeared-in>1.7.10</appeared-in> |
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 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
723 Задаёт для группы метод балансировки нагрузки, при котором запрос |
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 числом активных соединений с учётом весов серверов. |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
726 Если подходит сразу несколько серверов, то они выбираются циклически |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
727 (в режиме round-robin) с учётом их весов. |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
728 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
729 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
730 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
731 Если указан параметр <literal>header</literal>, |
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 <link id="var_upstream_header_time">заголовка ответа</link>. |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
734 Если указан параметр <literal>last_byte</literal>, то учитывается |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
735 время получения <link id="var_upstream_response_time">всего ответа</link>. |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
736 Если указан параметр <literal>inflight</literal> (1.11.6), |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
737 то также учитываются незавершённые запросы. |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
738 <note> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
739 До версии 1.11.6 незавершённые запросы учитывались по умолчанию. |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
740 </note> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
741 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
742 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
743 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
744 <note> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
745 Эта директива доступна как часть |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
746 <commercial_version>коммерческой подписки</commercial_version>. |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
747 </note> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
748 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
749 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
750 </directive> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
751 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
752 |
1122
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
753 <directive name="queue"> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
754 <syntax> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
755 <value>число</value> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
756 [<literal>timeout</literal>=<value>время</value>]</syntax> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
757 <default/> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
758 <context>upstream</context> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
759 <appeared-in>1.5.12</appeared-in> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
760 |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
761 <para> |
1818
574c44d14837
Removed the "max_conns" condition from the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1817
diff
changeset
|
762 Если при обработке запроса невозможно сразу выбрать сервер группы, то |
1122
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
763 запрос будет помещён в очередь. |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
764 Директива задаёт максимальное число запросов, которые могут одновременно |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
765 находиться в очереди. |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
766 Если очередь переполнена |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
767 или за время, задаваемое параметром <literal>timeout</literal>, |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
768 так и не удастся выбрать сервер для передачи ему запроса, |
1625
0ba4b2e561bd
Added 502 error to the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1587
diff
changeset
|
769 клиенту будет возвращена ошибка |
0ba4b2e561bd
Added 502 error to the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1587
diff
changeset
|
770 <http-status code="502" text="Bad Gateway"/>. |
1122
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
771 </para> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
772 |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
773 <para> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
774 По умолчанию параметр <literal>timeout</literal> равен 60 секундам. |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
775 </para> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
776 |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
777 <para> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
778 <note> |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
779 При использовании методов балансировки нагрузки, отличных |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
780 от стандартного round-robin, следует активировать их до |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
781 директивы <literal>queue</literal>. |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
782 </note> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
783 |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
784 <note> |
1128
1594ed379f1f
De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents:
1127
diff
changeset
|
785 Эта директива доступна как часть |
1594ed379f1f
De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents:
1127
diff
changeset
|
786 <commercial_version>коммерческой подписки</commercial_version>. |
1122
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
787 </note> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
788 </para> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
789 |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
790 </directive> |
594093ef96b1
Upstream: documented the "queue" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1121
diff
changeset
|
791 |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
792 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
793 <directive name="sticky"> |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
794 <syntax> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
795 <literal>cookie</literal> <value>имя</value> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
796 [<literal>expires=</literal><value>время</value>] |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
797 [<literal>domain=</literal><value>домен</value>] |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
798 [<literal>httponly</literal>] |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
799 [<literal>secure</literal>] |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
800 [<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
|
801 <syntax> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
802 <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
|
803 <syntax> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
804 <literal>learn</literal> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
805 <literal>create=</literal><value>$переменная</value> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
806 <literal>lookup=</literal><value>$переменная</value> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
807 <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
|
808 [<literal>timeout=</literal><value>время</value>]</syntax> |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
809 <default/> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
810 <context>upstream</context> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
811 <appeared-in>1.5.7</appeared-in> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
812 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
813 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
814 Включает режим привязки сеансов, в котором запросы клиента |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
815 будут передаваться на один и тот же сервер группы. |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
816 Доступны три метода: |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
817 <list type="tag"> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
818 <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
|
819 <tag-desc> |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
820 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
821 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
822 При использовании метода <literal>cookie</literal> информация о |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
823 назначенном сервере передаётся в HTTP-куке: |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
824 <example> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
825 upstream backend { |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
826 server backend1.example.com; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
827 server backend2.example.com; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
828 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
829 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
|
830 } |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
831 </example> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
832 </para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
833 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
834 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
835 Запрос от клиента, ещё не привязанного к определённому серверу, |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
836 передаётся на сервер, выбранный согласно настроенному методу балансировки. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
837 Дальнейшие запросы от этого клиента передаются на тот же сервер. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
838 Если назначенный сервер не может обработать запрос, выбирается новый |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
839 сервер как если бы клиент не имел привязки к серверу. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
840 </para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
841 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
842 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
843 Первый параметр задаёт имя куки, которую необходимо установить или проверить. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
844 Дополнительные параметры могут быть следующими: |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
845 <list type="tag"> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
846 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
847 <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
|
848 <tag-desc> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
849 Задаёт <value>время</value>, в течение которого браузеру необходимо хранить куку. |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
850 Специальное значение <literal>max</literal> устанавливает срок хранения куки до |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
851 31 декабря 2037 года 23:55:55 GMT. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
852 Если параметр не указан, то время действия куки ограничивается сессией браузера. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
853 </tag-desc> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
854 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
855 <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
|
856 <tag-desc> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
857 Задаёт <value>домен</value>, для которого устанавливается кука. |
1825
56b6244ddadb
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1818
diff
changeset
|
858 В значении параметра можно использовать переменные (1.11.5). |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
859 </tag-desc> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
860 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
861 <tag-name><literal>httponly</literal></tag-name> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
862 <tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
863 Добавляет атрибут <literal>HttpOnly</literal> к куке (1.7.11). |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
864 </tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
865 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
866 <tag-name><literal>secure</literal></tag-name> |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
867 <tag-desc> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
868 Добавляет атрибут <literal>Secure</literal> к куке (1.7.11). |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
869 </tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
870 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
871 <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
|
872 <tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1418
diff
changeset
|
873 Задаёт <value>путь</value>, для которого устанавливается кука. |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
874 </tag-desc> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
875 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
876 </list> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
877 Если пропущен тот или иной параметр, то соответствующего поля в куке не будет. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
878 </para> |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
879 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
880 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
881 <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
|
882 <tag-desc> |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
883 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
884 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
885 При использовании метода <literal>route</literal> проксируемый сервер назначает |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
886 клиенту маршрут по получении первого запроса. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
887 Все последующие запросы от этого клиента будут содержать информацию о |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
888 маршруте в куке или URI. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
889 Эта информация сравнивается с параметром “<literal>route</literal>” директивы |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
890 <link id="server"/> для идентификации сервера, на который |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
891 следует проксировать запрос. |
1854
dca985318cfe
Documented default value for server route in sticky route.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1825
diff
changeset
|
892 Если параметр “<literal>route</literal>” не задан, то именем маршрута |
dca985318cfe
Documented default value for server route in sticky route.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1825
diff
changeset
|
893 будет являться MD5-хэш IP-адреса и порта |
dca985318cfe
Documented default value for server route in sticky route.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1825
diff
changeset
|
894 (или пути UNIX-сокета) в шестнадцатеричном виде. |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
895 Если назначенный сервер не может обработать запрос, выбирается новый сервер |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
896 согласно настроенному методу балансировки как если бы в запросе не было |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
897 информации о маршруте. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
898 </para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
899 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
900 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
901 Параметры метода <literal>route</literal> задают переменные, которые |
1238
763db729e6a4
Upstream: corrected translation in sticky route.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1237
diff
changeset
|
902 могут содержать информацию о маршруте. |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
903 Первая непустая переменная используется для поиска соответствующего сервера. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
904 </para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
905 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
906 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
907 Пример: |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
908 <example> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
909 map $cookie_jsessionid $route_cookie { |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
910 ~.+\.(?P<route>\w+)$ $route; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
911 } |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
912 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
913 map $request_uri $route_uri { |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
914 ~jsessionid=.+\.(?P<route>\w+)$ $route; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
915 } |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
916 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
917 upstream backend { |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
918 server backend1.example.com route=a; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
919 server backend2.example.com route=b; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
920 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
921 sticky route $route_cookie $route_uri; |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
922 } |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
923 </example> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
924 В этом примере маршрут берётся из куки “<literal>JSESSIONID</literal>”, |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
925 если она присутствует в запросе. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
926 В противном случае используется маршрут из URI. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
927 </para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
928 |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
929 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
930 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
931 <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
|
932 <tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
933 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
934 При использовании метода <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
|
935 анализирует ответы от вышестоящего сервера и запоминает |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
936 начатые им сессии, которые обычно передаются в HTTP-куке. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
937 <example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
938 upstream backend { |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
939 server backend1.example.com:8080; |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
940 server backend2.example.com:8081; |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
941 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
942 sticky learn |
1544
627a9309011c
Renamed cookie in the example of the sticky directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1504
diff
changeset
|
943 create=$upstream_cookie_examplecookie |
627a9309011c
Renamed cookie in the example of the sticky directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1504
diff
changeset
|
944 lookup=$cookie_examplecookie |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
945 zone=client_sessions:1m; |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
946 } |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
947 </example> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
948 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
949 В примере выше сервер группы создаёт сессию путём установки |
1544
627a9309011c
Renamed cookie in the example of the sticky directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1504
diff
changeset
|
950 куки “<literal>EXAMPLECOOKIE</literal>” в своём ответе. |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
951 Последующие запросы с этой кукой будут передаваться на этот же сервер. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
952 Если сервер не может обработать запрос, выбирается новый |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
953 сервер как если бы клиент не имел привязки к серверу. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
954 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
955 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
956 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
957 Параметры <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
|
958 задают переменные, в которых соответственно указывается способ |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
959 создания новых и поиска существующих сессий. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
960 Оба параметра могут быть указаны больше одного раза |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
961 (в этом случае используется первая непустая переменная). |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
962 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
963 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
964 <para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
965 Сессии хранятся в зоне разделяемой памяти, <value>имя</value> и |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
966 <value>размер</value> которой задаются параметром <literal>zone</literal>. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
967 Зоны размером в 1 мегабайт достаточно для хранения около 8 тысяч сессий |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
968 на 64-битной платформе. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
969 Сессии, к которым не было обращений в течение времени, заданного параметром |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
970 <literal>timeout</literal>, удаляются из зоны. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
971 По умолчанию <literal>timeout</literal> равен 10 минутам. |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
972 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
973 |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
974 </tag-desc> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
975 </list> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
976 </para> |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
977 |
1234
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
978 <para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
979 <note> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
980 Эта директива доступна как часть |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
981 <commercial_version>коммерческой подписки</commercial_version>. |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
982 </note> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
983 </para> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
984 |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
985 </directive> |
314801ed88e7
Upstream: translated the "sticky" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1230
diff
changeset
|
986 |
1237
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
987 |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
988 <directive name="sticky_cookie_insert"> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
989 <syntax><value>имя</value> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
990 [<literal>expires=</literal><value>время</value>] |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
991 [<literal>domain=</literal><value>домен</value>] |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
992 [<literal>path=</literal><value>путь</value>]</syntax> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
993 <default/> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
994 <context>upstream</context> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
995 |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
996 <para> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
997 Эта директива устарела начиная с версии 1.5.7. |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
998 Вместо неё следует использовать аналогичную директиву |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
999 <link id="sticky"/> с изменённым синтаксисом: |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1000 <note> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1001 <literal>sticky cookie</literal> <value>имя</value> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1002 [<literal>expires=</literal><value>время</value>] |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1003 [<literal>domain=</literal><value>домен</value>] |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1004 [<literal>path=</literal><value>путь</value>]; |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1005 </note> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1006 </para> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1007 |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1008 </directive> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
1009 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1010 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1011 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1012 |
292 | 1013 <section id="variables" name="Встроенные переменные"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1014 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1015 <para> |
292 | 1016 Модуль <literal>ngx_http_upstream_module</literal> |
1017 поддерживает следующие встроенные переменные: | |
1018 <list type="tag"> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1019 |
1155
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1020 <tag-name id="var_upstream_addr"><var>$upstream_addr</var></tag-name> |
292 | 1021 <tag-desc> |
1391
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1022 хранит IP-адрес и порт или путь к UNIX-сокету сервера группы. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1023 Если при обработке запроса были сделаны обращения к нескольким серверам, |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1024 то их адреса разделяются запятой, например, |
292 | 1025 “<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
|
1026 Если произошло внутреннее перенаправление от одной группы серверов на другую |
c78b2d6fe261
Use another term for "redirect".
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1027 с помощью |
292 | 1028 <header>X-Accel-Redirect</header> или |
1029 <link doc="ngx_http_core_module.xml" id="error_page"/>, | |
966 | 1030 то адреса, соответствующие разным группам серверов, разделяются двоеточием, |
1031 например, | |
292 | 1032 “<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>”. |
1033 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1034 |
1783
031566771bbd
Documented $upstream_bytes_received for http upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1720
diff
changeset
|
1035 <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
|
1036 <tag-desc> |
031566771bbd
Documented $upstream_bytes_received for http upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1720
diff
changeset
|
1037 число байт, полученных от сервера группы (1.11.4). |
031566771bbd
Documented $upstream_bytes_received for http upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1720
diff
changeset
|
1038 Значения нескольких соединений |
031566771bbd
Documented $upstream_bytes_received for http upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1720
diff
changeset
|
1039 разделяются запятыми и двоеточиями подобно адресам в переменной |
031566771bbd
Documented $upstream_bytes_received for http upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1720
diff
changeset
|
1040 <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
|
1041 </tag-desc> |
031566771bbd
Documented $upstream_bytes_received for http upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1720
diff
changeset
|
1042 |
1155
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1043 <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
|
1044 </tag-name> |
731
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1045 <tag-desc> |
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1046 хранит статус доступа к кэшу ответов (0.8.3). |
1075
6c021feec587
Removed unjustified non-breakable spaces.
Ruslan Ermilov <ru@nginx.com>
parents:
1016
diff
changeset
|
1047 Статус может быть одним из “<literal>MISS</literal>”, |
731
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1048 “<literal>BYPASS</literal>”, “<literal>EXPIRED</literal>”, |
1016
2d8269d8fea8
Translated documentation on cache revalidation into russian.
Vladimir Homutov <vl@nginx.com>
parents:
966
diff
changeset
|
1049 “<literal>STALE</literal>”, “<literal>UPDATING</literal>”, |
2d8269d8fea8
Translated documentation on cache revalidation into russian.
Vladimir Homutov <vl@nginx.com>
parents:
966
diff
changeset
|
1050 “<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
|
1051 </tag-desc> |
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1052 |
1481
f29398a167d0
Documented the upstream_connect_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1461
diff
changeset
|
1053 <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
|
1054 </tag-name> |
f29398a167d0
Documented the upstream_connect_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1461
diff
changeset
|
1055 <tag-desc> |
f29398a167d0
Documented the upstream_connect_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1461
diff
changeset
|
1056 хранит время, затраченное на установление соединения с сервером группы (1.9.1); |
f29398a167d0
Documented the upstream_connect_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1461
diff
changeset
|
1057 время хранится в секундах с точностью до миллисекунд. |
f29398a167d0
Documented the upstream_connect_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1461
diff
changeset
|
1058 В случае SSL, включает в себя время, потраченное на handshake. |
f29398a167d0
Documented the upstream_connect_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1461
diff
changeset
|
1059 Времена нескольких соединений |
f29398a167d0
Documented the upstream_connect_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1461
diff
changeset
|
1060 разделяются запятыми и двоеточиями подобно адресам в переменной |
f29398a167d0
Documented the upstream_connect_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1461
diff
changeset
|
1061 <link id="var_upstream_addr">$upstream_addr</link>. |
f29398a167d0
Documented the upstream_connect_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1461
diff
changeset
|
1062 </tag-desc> |
f29398a167d0
Documented the upstream_connect_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1461
diff
changeset
|
1063 |
1391
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1064 <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
|
1065 </tag-name> |
1186
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1066 <tag-desc> |
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1067 кука с указанным <value>именем</value>, переданная сервером группы |
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1068 в поле <header>Set-Cookie</header> заголовка ответа (1.7.1). |
1391
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1069 Необходимо иметь в виду, что куки запоминаются только из ответа |
1186
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1070 последнего сервера. |
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1071 </tag-desc> |
8125bec5c7a1
Upstream: documented the $upstream_cookie_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1181
diff
changeset
|
1072 |
1393
15e8779f0ceb
Documented the $upstream_header_time variable.
Ruslan Ermilov <ru@nginx.com>
parents:
1392
diff
changeset
|
1073 <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
|
1074 </tag-name> |
15e8779f0ceb
Documented the $upstream_header_time variable.
Ruslan Ermilov <ru@nginx.com>
parents:
1392
diff
changeset
|
1075 <tag-desc> |
15e8779f0ceb
Documented the $upstream_header_time variable.
Ruslan Ermilov <ru@nginx.com>
parents:
1392
diff
changeset
|
1076 хранит время, |
15e8779f0ceb
Documented the $upstream_header_time variable.
Ruslan Ermilov <ru@nginx.com>
parents:
1392
diff
changeset
|
1077 затраченное на получение заголовка ответа от сервера группы (1.7.10); |
15e8779f0ceb
Documented the $upstream_header_time variable.
Ruslan Ermilov <ru@nginx.com>
parents:
1392
diff
changeset
|
1078 время хранится в секундах с точностью до миллисекунд. |
15e8779f0ceb
Documented the $upstream_header_time variable.
Ruslan Ermilov <ru@nginx.com>
parents:
1392
diff
changeset
|
1079 Времена нескольких ответов |
15e8779f0ceb
Documented the $upstream_header_time variable.
Ruslan Ermilov <ru@nginx.com>
parents:
1392
diff
changeset
|
1080 разделяются запятыми и двоеточиями подобно адресам в переменной |
15e8779f0ceb
Documented the $upstream_header_time variable.
Ruslan Ermilov <ru@nginx.com>
parents:
1392
diff
changeset
|
1081 <link id="var_upstream_addr">$upstream_addr</link>. |
15e8779f0ceb
Documented the $upstream_header_time variable.
Ruslan Ermilov <ru@nginx.com>
parents:
1392
diff
changeset
|
1082 </tag-desc> |
15e8779f0ceb
Documented the $upstream_header_time variable.
Ruslan Ermilov <ru@nginx.com>
parents:
1392
diff
changeset
|
1083 |
1392
82e62822abe8
Sorted upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1391
diff
changeset
|
1084 <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
|
1085 <tag-desc> |
82e62822abe8
Sorted upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1391
diff
changeset
|
1086 хранят поля заголовка ответа сервера. |
82e62822abe8
Sorted upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1391
diff
changeset
|
1087 Например, поле заголовка ответа <header>Server</header> |
82e62822abe8
Sorted upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1391
diff
changeset
|
1088 доступно в переменной <var>$upstream_http_server</var>. |
82e62822abe8
Sorted upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1391
diff
changeset
|
1089 Правила преобразования имён полей заголовка ответа в имена переменных |
82e62822abe8
Sorted upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1391
diff
changeset
|
1090 такие же, как для переменных с префиксом |
82e62822abe8
Sorted upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1391
diff
changeset
|
1091 “<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
|
1092 Необходимо иметь в виду, что поля заголовка запоминаются только из ответа |
82e62822abe8
Sorted upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1391
diff
changeset
|
1093 последнего сервера. |
82e62822abe8
Sorted upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1391
diff
changeset
|
1094 </tag-desc> |
82e62822abe8
Sorted upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1391
diff
changeset
|
1095 |
1155
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1096 <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
|
1097 </tag-name> |
731
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1098 <tag-desc> |
1391
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1099 хранит длину ответа, полученного от сервера группы (0.7.27); |
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1100 длина хранится в байтах. |
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1101 Длины нескольких ответов |
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1102 разделяются запятыми и двоеточиями подобно адресам в переменной |
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1103 <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
|
1104 </tag-desc> |
f62328124e5b
Documented $upstream_cache_status and $upstream_response_length variables.
Vladimir Homutov <vl@nginx.com>
parents:
654
diff
changeset
|
1105 |
1155
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1106 <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
|
1107 </tag-name> |
292 | 1108 <tag-desc> |
1391
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1109 хранит время, затраченное на получение ответа от сервера группы; |
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1110 время хранится в секундах с точностью до миллисекунд. |
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1111 Времена нескольких ответов |
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1112 разделяются запятыми и двоеточиями подобно адресам в переменной |
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1113 <link id="var_upstream_addr">$upstream_addr</link>. |
292 | 1114 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1115 |
1155
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1128
diff
changeset
|
1116 <tag-name id="var_upstream_status"><var>$upstream_status</var></tag-name> |
292 | 1117 <tag-desc> |
1391
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1118 хранит статус ответа, полученного от сервера группы. |
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1119 Статусы нескольких ответов |
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1120 разделяются запятыми и двоеточиями подобно адресам в переменной |
0702cc081c63
Revised descriptions of upstream module variables.
Ruslan Ermilov <ru@nginx.com>
parents:
1386
diff
changeset
|
1121 <link id="var_upstream_addr">$upstream_addr</link>. |
292 | 1122 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1123 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1124 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1125 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1126 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1127 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1128 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1129 </module> |