Mercurial > hg > nginx-site
annotate xml/ru/docs/stream/ngx_stream_upstream_module.xml @ 2470:504536999408
Added upstream resolver info to upstream server resolve parameter.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Wed, 04 Dec 2019 15:36:40 +0300 |
parents | 98fd810c13e0 |
children | 4add6ae1296f |
rev | line source |
---|---|
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 <!-- |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 --> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
9 <module name="Модуль ngx_stream_upstream_module" |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
10 link="/ru/docs/stream/ngx_stream_upstream_module.html" |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
11 lang="ru" |
2470
504536999408
Added upstream resolver info to upstream server resolve parameter.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2469
diff
changeset
|
12 rev="39"> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 <section id="summary"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
17 Модуль <literal>ngx_stream_upstream_module</literal> (1.9.0) |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
18 позволяет описывать группы серверов, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
19 которые могут использоваться в директиве |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
20 <link doc="ngx_stream_proxy_module.xml" id="proxy_pass"/>. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 </section> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
26 <section id="example" name="Пример конфигурации"> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 <example> |
1406
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
30 upstream <emphasis>backend</emphasis> { |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
31 hash $remote_addr consistent; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
33 server backend1.example.com:12345 weight=5; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
34 server backend2.example.com:12345; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
35 server unix:/tmp/backend3; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
36 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
37 server backup1.example.com:12345 backup; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
38 server backup2.example.com:12345 backup; |
1406
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
39 } |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
40 |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
41 server { |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
42 listen 12346; |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
43 proxy_pass <emphasis>backend</emphasis>; |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
44 } |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
45 </example> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
46 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
47 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
48 <para> |
1947
6b6d0e844bf7
Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
49 Динамически настраиваемая группа |
6b6d0e844bf7
Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
50 с периодическими |
6b6d0e844bf7
Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
51 <link doc="ngx_stream_upstream_hc_module.xml">проверками работоспособности</link> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
52 доступна как часть |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
53 <commercial_version>коммерческой подписки</commercial_version>: |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
54 <example> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
55 resolver 10.0.0.1; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
56 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
57 upstream <emphasis>dynamic</emphasis> { |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
58 zone upstream_dynamic 64k; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
59 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
60 server backend1.example.com:12345 weight=5; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
61 server backend2.example.com:12345 fail_timeout=5s slow_start=30s; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
62 server 192.0.2.1:12345 max_fails=3; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
63 server backend3.example.com:12345 resolve; |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
64 server backend4.example.com service=http resolve; |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
65 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
66 server backup1.example.com:12345 backup; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
67 server backup2.example.com:12345 backup; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
68 } |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
69 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
70 server { |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
71 listen 12346; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
72 proxy_pass <emphasis>dynamic</emphasis>; |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
73 health_check; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 } |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 </example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 </section> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
81 <section id="directives" name="Директивы"> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 <directive name="upstream"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
84 <syntax block="yes"><value>название</value></syntax> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 <context>stream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
89 Описывает группу серверов. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
90 Серверы могут слушать на разных портах. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
91 Кроме того, можно одновременно использовать серверы, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
92 слушающие на TCP- и UNIX-сокетах. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
96 Пример: |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 <example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 upstream backend { |
1406
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
99 server backend1.example.com:12345 weight=5; |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
100 server 127.0.0.1:12345 max_fails=3 fail_timeout=30s; |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
101 server unix:/tmp/backend2; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
102 server backend3.example.com:12345 resolve; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 |
1406
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
104 server backup1.example.com:12345 backup; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 } |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
106 </example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
107 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
108 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
109 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
110 По умолчанию соединения распределяются по серверам циклически |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
111 (в режиме round-robin) с учётом весов серверов. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
112 В вышеприведённом примере каждые 7 соединений будут распределены так: |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
113 5 соединений на <literal>backend1.example.com:12345</literal> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
114 и по одному соединению на второй и третий серверы. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
115 Если при попытке работы с сервером происходит ошибка, то соединение |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
116 передаётся следующему серверу, и так далее до тех пор, пока не будут опробованы |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
117 все работающие серверы. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
118 Если связь с серверами не удалась, соединение будет закрыто. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
119 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
122 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
124 <directive name="server"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
125 <syntax><value>адрес</value> [<value>параметры</value>]</syntax> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
126 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
127 <context>upstream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
128 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
129 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
130 Задаёт <value>адрес</value> и другие <value>параметры</value> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
131 сервера. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
132 Адрес может быть указан в виде доменного имени или IP-адреса, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
133 и обязательного порта, или в виде пути UNIX-сокета, который |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
134 указывается после префикса “<literal>unix:</literal>”. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
135 Доменное имя, которому соответствует несколько IP-адресов, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
136 задаёт сразу несколько серверов. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
137 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
138 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
139 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
140 Могут быть заданы следующие параметры: |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
141 <list type="tag"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
142 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
143 <tag-name id="weight"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
144 <literal>weight</literal>=<value>число</value> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
146 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
147 задаёт вес сервера, по умолчанию 1. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
149 |
1800
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
150 <tag-name id="max_conns"> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
151 <literal>max_conns</literal>=<value>число</value> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
152 </tag-name> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
153 <tag-desc> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
154 ограничивает максимальное <value>число</value> одновременных |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
155 соединений к проксируемому серверу (1.11.5). |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
156 Значение по умолчанию равно 0 и означает, что ограничения нет. |
1801
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
157 Если группа не находится в <link id="zone">зоне разделяемой памяти</link>, |
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
158 то ограничение работает отдельно для каждого рабочего процесса. |
1800
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
159 <note> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
160 До версии 1.11.5 этот параметр был доступен как часть |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
161 <commercial_version>коммерческой подписки</commercial_version>. |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
162 </note> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
163 </tag-desc> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
164 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
165 <tag-name id="max_fails"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
166 <literal>max_fails</literal>=<value>число</value> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
167 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
168 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
169 задаёт число неудачных попыток работы с сервером, которые должны произойти |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
170 в течение времени, заданного параметром <literal>fail_timeout</literal>, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
171 чтобы сервер считался недоступным на период времени, также заданный |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
172 параметром <literal>fail_timeout</literal>. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
173 По умолчанию число попыток устанавливается равным 1. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
174 Нулевое значение отключает учёт попыток. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
175 В данном случае неудачной попыткой считается ошибка или таймаут |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
176 при установке соединения с сервером. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
177 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
178 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
179 <tag-name id="fail_timeout"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
180 <literal>fail_timeout</literal>=<value>время</value> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
181 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
182 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
183 задаёт |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
184 <list type="bullet"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
185 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
186 <listitem> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
187 время, в течение которого должно произойти заданное число неудачных |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
188 попыток работы с сервером для того, чтобы сервер считался недоступным; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
189 </listitem> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
190 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
191 <listitem> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
192 и время, в течение которого сервер будет считаться недоступным. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
193 </listitem> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
194 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
195 </list> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
196 По умолчанию параметр равен 10 секундам. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
197 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
198 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
199 <tag-name id="backup"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
200 <literal>backup</literal> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
201 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
202 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
203 помечает сервер как запасной сервер. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
204 На него будут передаваться соединения в случае, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
205 если не работают основные серверы. |
2434
a1f61586779b
Listed not supported load balancing methods in upstream backup.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2418
diff
changeset
|
206 <note> |
a1f61586779b
Listed not supported load balancing methods in upstream backup.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2418
diff
changeset
|
207 Параметр нельзя использовать совместно с |
a1f61586779b
Listed not supported load balancing methods in upstream backup.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2418
diff
changeset
|
208 методами балансировки нагрузки <link id="hash"/> и <link id="random"/>. |
a1f61586779b
Listed not supported load balancing methods in upstream backup.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2418
diff
changeset
|
209 </note> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
210 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
211 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
212 <tag-name id="down"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
213 <literal>down</literal> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
214 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
215 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
216 помечает сервер как постоянно недоступный. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
217 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
218 |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
219 </list> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
220 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
221 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
222 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
223 Кроме того, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
224 следующие параметры доступны как часть |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
225 <commercial_version>коммерческой подписки</commercial_version>: |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
226 <list type="tag"> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
227 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
228 <tag-name id="resolve"> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
229 <literal>resolve</literal> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
230 </tag-name> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
231 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
232 отслеживает изменения IP-адресов, соответствующих доменному имени сервера, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
233 и автоматически изменяет конфигурацию группы |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
234 без необходимости перезапуска nginx. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
235 Группа должна находиться в <link id="zone">зоне разделяемой памяти</link>. |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
236 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
237 Для работы этого параметра |
2470
504536999408
Added upstream resolver info to upstream server resolve parameter.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2469
diff
changeset
|
238 директива <literal>resolver</literal> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
239 должна быть задана в блоке |
2470
504536999408
Added upstream resolver info to upstream server resolve parameter.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2469
diff
changeset
|
240 <link doc="ngx_stream_core_module.xml" id="resolver">stream</link> |
504536999408
Added upstream resolver info to upstream server resolve parameter.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2469
diff
changeset
|
241 или в соответствующем блоке <link id="resolver">upstream</link>. |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
242 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
243 </tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
244 |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
245 <tag-name id="service"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
246 <literal>service</literal>=<value>имя</value> |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
247 </tag-name> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
248 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
249 включает преобразование |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
250 <link url="https://tools.ietf.org/html/rfc2782">SRV</link>-записей |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
251 DNS и задаёт <value>имя</value> сервиса (1.9.13). |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
252 Для работы параметра необходимо указать |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
253 параметр <link id="resolve"/> для сервера |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
254 и не указывать порт сервера. |
1700
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
255 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
256 Если имя сервиса не содержит точку (“<literal>.</literal>”), то |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
257 имя составляется в соответствии с |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
258 <link url="https://tools.ietf.org/html/rfc2782">RFC</link> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
259 и в префикс службы добавляется протокол TCP. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
260 Например, для получения |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
261 SRV-записи <literal>_http._tcp.backend.example.com</literal> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
262 необходимо указать директиву: |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
263 <example> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
264 server backend.example.com service=http resolve; |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
265 </example> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
266 Если имя сервиса содержит одну и более точек, то имя составляется |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
267 при помощи соединения префикса службы и имени сервера. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
268 Например, для получения SRV-записей |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
269 <literal>_http._tcp.backend.example.com</literal> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
270 и <literal>server1.backend.example.com</literal> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
271 необходимо указать директивы: |
1700
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
272 <example> |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
273 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
|
274 server example.com service=server1.backend resolve; |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
275 </example> |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
276 </para> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
277 |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
278 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
279 SRV-записи с наивысшим приоритетом |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
280 (записи с одинаковым наименьшим значением приоритета) |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
281 преобразуются в основные серверы, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
282 остальные SRV-записи преобразуются в запасные серверы. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
283 Если в конфигурации сервера указан параметр <link id="backup"/>, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
284 высокоприоритетные SRV-записи преобразуются в запасные серверы, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
285 остальные SRV-записи игнорируются. |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
286 </para> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
287 </tag-desc> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
288 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
289 <tag-name id="slow_start"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
290 <literal>slow_start</literal>=<value>время</value> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
291 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
292 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
293 задаёт <value>время</value>, в течение которого вес сервера |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
294 восстановится от нуля до своего номинального значения в ситуации, когда |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
295 неработоспособный (unhealthy) сервер вновь становится работоспособным |
2283
81e2cd93a2ce
Fixed broken links in the stream upstream module.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2275
diff
changeset
|
296 (<link doc="ngx_stream_upstream_hc_module.xml" id="health_check">healthy</link>) |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
297 или когда сервер становится доступным по прошествии времени, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
298 в течение которого он считался <link id="fail_timeout">недоступным</link>. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
299 Значение по умолчанию равно нулю и означает, что медленный старт выключен. |
1817
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
300 <note> |
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
301 Параметр нельзя использовать совместно с |
2418
7e1af2148946
Updated note in slow_start with random load balancing method.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2308
diff
changeset
|
302 методами балансировки нагрузки <link id="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
|
303 </note> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
304 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
305 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
306 </list> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
307 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
308 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
309 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
310 <note> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
311 Если в группе только один сервер, параметры <literal>max_fails</literal>, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
312 <literal>fail_timeout</literal> и <literal>slow_start</literal> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
313 игнорируются и такой сервер никогда не будет считаться недоступным. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
314 </note> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
315 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
316 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
317 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
318 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
319 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
320 <directive name="zone"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
321 <syntax><value>имя</value> [<value>размер</value>]</syntax> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
322 <default/> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
323 <context>upstream</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
324 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
325 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
326 Задаёт <value>имя</value> и <value>размер</value> зоны разделяемой памяти, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
327 в которой хранятся конфигурация группы и её рабочее состояние, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
328 разделяемые между рабочими процессами. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
329 В одной и той же зоне могут быть сразу несколько групп. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
330 В этом случае достаточно указать <value>размер</value> только один раз. |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
331 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
332 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
333 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
334 Дополнительно, как часть |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
335 <commercial_version>коммерческой подписки</commercial_version>, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
336 в таких группах для изменения состава группы |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
337 или настроек отдельных серверов |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
338 нет необходимости перезапускать nginx. |
2097
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
339 Конфигурация доступна через |
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
340 модуль <link doc="../http/ngx_http_api_module.xml">API</link> (1.13.3). |
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
341 <note> |
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
342 До версии 1.13.3 |
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
343 конфигурация была доступна только через специальный location, |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
344 в котором указана директива |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
345 <link doc="../http/ngx_http_upstream_conf_module.xml" id="upstream_conf"/>. |
2097
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
346 </note> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
347 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
348 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
349 </directive> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
350 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
351 |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
352 <directive name="state"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
353 <syntax><value>файл</value></syntax> |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
354 <default/> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
355 <context>upstream</context> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
356 <appeared-in>1.9.7</appeared-in> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
357 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
358 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
359 Задаёт <value>файл</value>, в котором хранится состояние |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
360 динамически настраиваемой группы. |
1809
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
361 </para> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
362 |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
363 <para> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
364 Примеры: |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
365 <example> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
366 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
|
367 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
|
368 </example> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
369 </para> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
370 |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
371 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
372 В данный момент состояние ограничено списком серверов с их параметрами. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
373 Файл читается при парсинге конфигурации и обновляется каждый раз при |
2283
81e2cd93a2ce
Fixed broken links in the stream upstream module.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2275
diff
changeset
|
374 <link doc="../http/ngx_http_api_module.xml" id="stream_upstreams_stream_upstream_name_servers_">изменении</link> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
375 конфигурации группы. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
376 Изменение содержимого файла напрямую не рекомендуется. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
377 Директиву нельзя использовать |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
378 совместно с директивой <link id="server"/>. |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
379 </para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
380 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
381 <para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
382 <note> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
383 Изменения, совершённые в момент |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
384 <link doc="../control.xml" id="reconfiguration">перезагрузки конфигурации</link> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
385 или <link doc="../control.xml" id="upgrade">обновления бинарного файла</link>, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
386 могут быть потеряны. |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
387 </note> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
388 </para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
389 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
390 <para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
391 <note> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
392 Эта директива доступна как часть |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
393 <commercial_version>коммерческой подписки</commercial_version>. |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
394 </note> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
395 </para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
396 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
397 </directive> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
398 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
399 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
400 <directive name="hash"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
401 <syntax><value>ключ</value> [<literal>consistent</literal>]</syntax> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
402 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
403 <context>upstream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
404 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
405 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
406 Задаёт метод балансировки нагрузки для группы, при котором |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
407 соответствие клиента серверу определяется при помощи |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
408 хэшированного значения <value>ключа</value>. |
1744
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
409 В качестве <value>ключа</value> может использоваться текст, переменные |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
410 и их комбинации (1.11.2). |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
411 Пример использования: |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
412 <example> |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
413 hash $remote_addr; |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
414 </example> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
415 Следует отметить, что любое добавление или удаление серверов в группе |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
416 может привести к перераспределению большинства ключей на другие серверы. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
417 Метод совместим с библиотекой Perl |
2275
d93c8c32df75
Updated links to CPAN search interface.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2274
diff
changeset
|
418 <link url="https://metacpan.org/pod/Cache::Memcached">Cache::Memcached</link>. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
419 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
420 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
421 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
422 Если задан параметр <literal>consistent</literal>, то вместо |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
423 вышеописанного метода будет использоваться метод консистентного хэширования |
2274
e28e3d0f0d20
Updated link in the "hash" directive.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2230
diff
changeset
|
424 <link url="https://www.metabrew.com/article/libketama-consistent-hashing-algo-memcached-clients">ketama</link>. |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
425 Метод гарантирует, что при добавлении сервера в группу или его удалении |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
426 на другие серверы будет перераспределено минимальное число ключей. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
427 Применение метода для кэширующих серверов обеспечивает |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
428 больший процент попаданий в кэш. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
429 Метод совместим с библиотекой Perl |
2275
d93c8c32df75
Updated links to CPAN search interface.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2274
diff
changeset
|
430 <link url="https://metacpan.org/pod/Cache::Memcached::Fast">Cache::Memcached::Fast</link> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
431 при значении параметра <value>ketama_points</value> равным 160. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
432 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
433 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
434 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
435 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
436 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
437 <directive name="least_conn"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
438 <syntax/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
439 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
440 <context>upstream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
441 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
442 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
443 Задаёт для группы метод балансировки нагрузки, при котором соединение |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
444 передаётся серверу с наименьшим числом активных соединений, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
445 с учётом весов серверов. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
446 Если подходит сразу несколько серверов, они выбираются циклически |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
447 (в режиме round-robin) с учётом их весов. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
448 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
449 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
450 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
451 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
452 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
453 <directive name="least_time"> |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
454 <syntax> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
455 <literal>connect</literal> | |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
456 <literal>first_byte</literal> | |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
457 <literal>last_byte</literal> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
458 [<literal>inflight</literal>]</syntax> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
459 <default/> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
460 <context>upstream</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
461 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
462 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
463 Задаёт для группы метод балансировки нагрузки, при котором соединение |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
464 передаётся серверу с наименьшими средним временем ответа и |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
465 числом активных соединений с учётом весов серверов. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
466 Если подходит сразу несколько серверов, то они выбираются циклически |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
467 (в режиме round-robin) с учётом их весов. |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
468 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
469 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
470 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
471 Если указан параметр <literal>connect</literal>, |
2196
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
472 то учитывается время |
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
473 <link id="var_upstream_connect_time">соединения</link> с сервером группы. |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
474 Если указан параметр <literal>first_byte</literal>, |
2196
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
475 то учитывается время получения |
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
476 <link id="var_upstream_first_byte_time">первого байта</link> данных. |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
477 Если указан параметр <literal>last_byte</literal>, |
2196
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
478 то учитывается время получения |
2230
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
479 <link id="var_upstream_session_time">последнего байта</link> данных. |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
480 Если указан параметр <literal>inflight</literal> (1.11.6), |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
481 то также учитываются незавершённые соединения. |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
482 <note> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
483 До версии 1.11.6 |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
484 незавершённые соединения учитывались по умолчанию. |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
485 </note> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
486 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
487 |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
488 <para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
489 <note> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
490 Эта директива доступна как часть |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
491 <commercial_version>коммерческой подписки</commercial_version>. |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
492 </note> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
493 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
494 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
495 </directive> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
496 |
2191
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
497 |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
498 <directive name="random"> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
499 <syntax>[<literal>two</literal> [<value>метод</value>]]</syntax> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
500 <default/> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
501 <context>upstream</context> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
502 <appeared-in>1.15.1</appeared-in> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
503 |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
504 <para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
505 Задаёт для группы метод балансировки нагрузки, при котором соединение |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
506 передаётся случайно выбранному серверу, с учётом весов |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
507 серверов. |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
508 </para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
509 |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
510 <para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
511 Если указан необязательный параметр <literal>two</literal>, |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
512 то nginx случайным образом выбирает |
2197
03f8a9c5e8ae
Updated link in the "random" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2196
diff
changeset
|
513 <link url="https://homes.cs.washington.edu/~karlin/papers/balls.pdf">два</link> |
2191
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
514 сервера, из которых выбирает сервер, |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
515 используя указанный <literal>метод</literal>. |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
516 Методом по умолчанию является <literal>least_conn</literal>, |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
517 при котором соединение передаётся на сервер |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
518 с наименьшим количеством активных соединений. |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
519 </para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
520 |
2230
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
521 <para id="random_least_time"> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
522 Если указан метод <literal>least_time</literal>, то соединение передаётся |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
523 серверу |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
524 с наименьшими средним временем ответа и числом активных соединений. |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
525 Если указан <literal>least_time=connect</literal>, |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
526 то учитывается время |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
527 <link id="var_upstream_connect_time">соединения</link> с сервером группы. |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
528 Если указан <literal>least_time=first_byte</literal>, |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
529 то учитывается время получения |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
530 <link id="var_upstream_first_byte_time">первого байта</link> данных. |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
531 Если указан <literal>least_time=last_byte</literal>, |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
532 то учитывается время получения |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
533 <link id="var_upstream_session_time">последнего байта</link> данных. |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
534 <note> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
535 Метод <literal>least_time</literal> доступен как часть |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
536 <commercial_version>коммерческой подписки</commercial_version>. |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
537 </note> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
538 </para> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
539 |
2191
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
540 </directive> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
541 |
2469
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
542 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
543 <directive name="resolver"> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
544 <syntax> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
545 <value>адрес</value> ... |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
546 [<literal>valid</literal>=<value>время</value>] |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
547 [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>] |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
548 [<literal>status_zone</literal>=<value>зона</value>]</syntax> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
549 <default/> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
550 <context>upstream</context> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
551 <appeared-in>1.17.5</appeared-in> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
552 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
553 <para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
554 Задаёт серверы DNS, используемые для преобразования имён вышестоящих серверов |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
555 в адреса, например: |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
556 <example> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
557 resolver 127.0.0.1 [::1]:5353; |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
558 </example> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
559 Адрес может быть указан в виде доменного имени или IP-адреса, |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
560 и необязательного порта. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
561 Если порт не указан, используется порт 53. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
562 Серверы DNS опрашиваются циклически. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
563 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
564 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
565 <para id="resolver_ipv6"> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
566 По умолчанию nginx будет искать как IPv4-, так и IPv6-адреса |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
567 при преобразовании имён в адреса. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
568 Если поиск IPv6-адресов нежелателен, |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
569 можно указать параметр <literal>ipv6=off</literal>. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
570 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
571 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
572 <para id="resolver_valid"> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
573 По умолчанию nginx кэширует ответы, используя значение TTL из ответа. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
574 Необязательный параметр <literal>valid</literal> позволяет это |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
575 переопределить: |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
576 <example> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
577 resolver 127.0.0.1 [::1]:5353 valid=30s; |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
578 </example> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
579 <note> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
580 Для предотвращения DNS-спуфинга рекомендуется |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
581 использовать DNS-серверы в защищённой доверенной локальной сети. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
582 </note> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
583 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
584 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
585 <para id="resolver_status_zone"> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
586 Необязательный параметр <literal>status_zone</literal> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
587 включает |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
588 <link doc="../http/ngx_http_api_module.xml" id="resolvers_">сбор информации</link> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
589 о запросах и ответах сервера DNS |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
590 в указанной <value>зоне</value>. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
591 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
592 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
593 <para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
594 <note> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
595 Эта директива доступна как часть |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
596 <commercial_version>коммерческой подписки</commercial_version>. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
597 </note> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
598 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
599 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
600 </directive> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
601 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
602 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
603 <directive name="resolver_timeout"> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
604 <syntax><value>время</value></syntax> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
605 <default>30s</default> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
606 <context>upstream</context> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
607 <appeared-in>1.17.5</appeared-in> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
608 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
609 <para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
610 Задаёт таймаут для преобразования имени в адрес, например: |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
611 <example> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
612 resolver_timeout 5s; |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
613 </example> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
614 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
615 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
616 <para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
617 <note> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
618 Эта директива доступна как часть |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
619 <commercial_version>коммерческой подписки</commercial_version>. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
620 </note> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
621 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
622 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
623 </directive> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
624 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
625 </section> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
626 |
1772
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
627 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
628 <section id="variables" name="Встроенные переменные"> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
629 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
630 <para> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
631 Модуль <literal>ngx_stream_upstream_module</literal> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
632 поддерживает следующие встроенные переменные: |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
633 <list type="tag"> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
634 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
635 <tag-name id="var_upstream_addr"><var>$upstream_addr</var></tag-name> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
636 <tag-desc> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
637 хранит IP-адрес и порт или путь к UNIX-сокету сервера группы (1.11.4). |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
638 Если при проксировании были сделаны обращения к нескольким серверам, |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
639 то их адреса разделяются запятой, например |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
640 “<literal>192.168.1.1:12345, 192.168.1.2:12345, unix:/tmp/sock</literal>”. |
2058
eb58ee50561d
Documented upstream name in $upstream_addr.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1947
diff
changeset
|
641 Если сервер не может быть выбран, |
eb58ee50561d
Documented upstream name in $upstream_addr.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1947
diff
changeset
|
642 то переменная хранит имя группы серверов. |
1772
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
643 </tag-desc> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
644 |
2308
956685eb1d43
Reordered $upstream_bytes_ variables aphabetically in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2283
diff
changeset
|
645 <tag-name id="var_upstream_bytes_received"><var>$upstream_bytes_received</var></tag-name> |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
646 <tag-desc> |
2308
956685eb1d43
Reordered $upstream_bytes_ variables aphabetically in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2283
diff
changeset
|
647 число байт, полученных от сервера группы (1.11.4). |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
648 Значения нескольких соединений |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
649 разделяются запятыми подобно адресам в переменной |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
650 <link id="var_upstream_addr">$upstream_addr</link>. |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
651 </tag-desc> |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
652 |
2308
956685eb1d43
Reordered $upstream_bytes_ variables aphabetically in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2283
diff
changeset
|
653 <tag-name id="var_upstream_bytes_sent"><var>$upstream_bytes_sent</var></tag-name> |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
654 <tag-desc> |
2308
956685eb1d43
Reordered $upstream_bytes_ variables aphabetically in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2283
diff
changeset
|
655 число байт, переданных на сервер группы (1.11.4). |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
656 Значения нескольких соединений |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
657 разделяются запятыми подобно адресам в переменной |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
658 <link id="var_upstream_addr">$upstream_addr</link>. |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
659 </tag-desc> |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
660 |
1774
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
661 <tag-name id="var_upstream_connect_time"><var>$upstream_connect_time</var></tag-name> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
662 <tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
663 время установки соединения с сервером группы (1.11.4); |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
664 время хранится в секундах с точностью до миллисекунд. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
665 Времена нескольких соединений |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
666 разделяются запятыми подобно адресам в переменной |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
667 <link id="var_upstream_addr">$upstream_addr</link>. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
668 </tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
669 |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
670 <tag-name id="var_upstream_first_byte_time"><var>$upstream_first_byte_time</var></tag-name> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
671 <tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
672 время получения первого байта данных (1.11.4); |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
673 время хранится в секундах с точностью до миллисекунд. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
674 Времена нескольких соединений |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
675 разделяются запятыми подобно адресам в переменной |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
676 <link id="var_upstream_addr">$upstream_addr</link>. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
677 </tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
678 |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
679 <tag-name id="var_upstream_session_time"><var>$upstream_session_time</var></tag-name> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
680 <tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
681 длительность сессии в секундах с точностью до миллисекунд (1.11.4). |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
682 Времена нескольких соединений |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
683 разделяются запятыми подобно адресам в переменной |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
684 <link id="var_upstream_addr">$upstream_addr</link>. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
685 </tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
686 |
1772
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
687 </list> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
688 </para> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
689 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
690 </section> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
691 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
692 </module> |