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