Mercurial > hg > nginx-site
annotate xml/ru/docs/stream/ngx_stream_upstream_module.xml @ 2254:d765ffffd08c
Documented proxy_socket_keepalive and friends.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 09 Oct 2018 19:56:33 +0300 |
parents | 283b1e67eaa6 |
children | e28e3d0f0d20 |
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" |
2230
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
12 rev="32"> |
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 если не работают основные серверы. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
206 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
207 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
208 <tag-name id="down"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
209 <literal>down</literal> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
210 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
211 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
212 помечает сервер как постоянно недоступный. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
213 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
214 |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
215 </list> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
216 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
217 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
218 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
219 Кроме того, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
220 следующие параметры доступны как часть |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
221 <commercial_version>коммерческой подписки</commercial_version>: |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
222 <list type="tag"> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
223 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
224 <tag-name id="resolve"> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
225 <literal>resolve</literal> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
226 </tag-name> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
227 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
228 отслеживает изменения IP-адресов, соответствующих доменному имени сервера, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
229 и автоматически изменяет конфигурацию группы |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
230 без необходимости перезапуска nginx. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
231 Группа должна находиться в <link id="zone">зоне разделяемой памяти</link>. |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
232 <para> |
1728
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 директива <link doc="ngx_stream_core_module.xml" id="resolver"/> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
235 должна быть задана в блоке |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
236 <link doc="ngx_stream_core_module.xml" id="stream"/>. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
237 Пример: |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
238 <example> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
239 stream { |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
240 resolver 10.0.0.1; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
241 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
242 upstream u { |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
243 zone ...; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
244 ... |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
245 server example.com:12345 resolve; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
246 } |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
247 } |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
248 </example> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
249 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
250 </tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
251 |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
252 <tag-name id="service"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
253 <literal>service</literal>=<value>имя</value> |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
254 </tag-name> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
255 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
256 включает преобразование |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
257 <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
|
258 DNS и задаёт <value>имя</value> сервиса (1.9.13). |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
259 Для работы параметра необходимо указать |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
260 параметр <link id="resolve"/> для сервера |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
261 и не указывать порт сервера. |
1700
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
262 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
263 Если имя сервиса не содержит точку (“<literal>.</literal>”), то |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
264 имя составляется в соответствии с |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
265 <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
|
266 и в префикс службы добавляется протокол TCP. |
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-записи <literal>_http._tcp.backend.example.com</literal> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
269 необходимо указать директиву: |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
270 <example> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
271 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
|
272 </example> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
273 Если имя сервиса содержит одну и более точек, то имя составляется |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
274 при помощи соединения префикса службы и имени сервера. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
275 Например, для получения SRV-записей |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
276 <literal>_http._tcp.backend.example.com</literal> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
277 и <literal>server1.backend.example.com</literal> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
278 необходимо указать директивы: |
1700
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
279 <example> |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
280 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
|
281 server example.com service=server1.backend resolve; |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
282 </example> |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
283 </para> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
284 |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
285 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
286 SRV-записи с наивысшим приоритетом |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
287 (записи с одинаковым наименьшим значением приоритета) |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
288 преобразуются в основные серверы, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
289 остальные SRV-записи преобразуются в запасные серверы. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
290 Если в конфигурации сервера указан параметр <link id="backup"/>, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
291 высокоприоритетные SRV-записи преобразуются в запасные серверы, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
292 остальные SRV-записи игнорируются. |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
293 </para> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
294 </tag-desc> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
295 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
296 <tag-name id="slow_start"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
297 <literal>slow_start</literal>=<value>время</value> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
298 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
299 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
300 задаёт <value>время</value>, в течение которого вес сервера |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
301 восстановится от нуля до своего номинального значения в ситуации, когда |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
302 неработоспособный (unhealthy) сервер вновь становится работоспособным |
1947
6b6d0e844bf7
Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
303 (<link doc="ngx_http_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
|
304 или когда сервер становится доступным по прошествии времени, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
305 в течение которого он считался <link id="fail_timeout">недоступным</link>. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
306 Значение по умолчанию равно нулю и означает, что медленный старт выключен. |
1817
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
307 <note> |
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
308 Параметр нельзя использовать совместно с |
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
309 методом балансировки нагрузки <link id="hash"/>. |
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
310 </note> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
311 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
312 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
313 </list> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
314 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
315 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
316 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
317 <note> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
318 Если в группе только один сервер, параметры <literal>max_fails</literal>, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
319 <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
|
320 игнорируются и такой сервер никогда не будет считаться недоступным. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
321 </note> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
322 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
323 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
324 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
325 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
326 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
327 <directive name="zone"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
328 <syntax><value>имя</value> [<value>размер</value>]</syntax> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
329 <default/> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
330 <context>upstream</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
331 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
332 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
333 Задаёт <value>имя</value> и <value>размер</value> зоны разделяемой памяти, |
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 разделяемые между рабочими процессами. |
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 В этом случае достаточно указать <value>размер</value> только один раз. |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
338 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
339 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
340 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
341 Дополнительно, как часть |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
342 <commercial_version>коммерческой подписки</commercial_version>, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
343 в таких группах для изменения состава группы |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
344 или настроек отдельных серверов |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
345 нет необходимости перезапускать nginx. |
2097
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
346 Конфигурация доступна через |
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
347 модуль <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
|
348 <note> |
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
349 До версии 1.13.3 |
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
350 конфигурация была доступна только через специальный location, |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
351 в котором указана директива |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
352 <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
|
353 </note> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
354 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
355 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
356 </directive> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
357 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
358 |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
359 <directive name="state"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
360 <syntax><value>файл</value></syntax> |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
361 <default/> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
362 <context>upstream</context> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
363 <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
|
364 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
365 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
366 Задаёт <value>файл</value>, в котором хранится состояние |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
367 динамически настраиваемой группы. |
1809
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
368 </para> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
369 |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
370 <para> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
371 Примеры: |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
372 <example> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
373 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
|
374 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
|
375 </example> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
376 </para> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
377 |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
378 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
379 В данный момент состояние ограничено списком серверов с их параметрами. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
380 Файл читается при парсинге конфигурации и обновляется каждый раз при |
2222
0974dc0a6209
Changed link from upstream_conf to api in "state".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2197
diff
changeset
|
381 <link doc="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
|
382 конфигурации группы. |
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 Директиву нельзя использовать |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
385 совместно с директивой <link id="server"/>. |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
386 </para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
387 |
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 <note> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
390 Изменения, совершённые в момент |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
391 <link doc="../control.xml" id="reconfiguration">перезагрузки конфигурации</link> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
392 или <link doc="../control.xml" id="upgrade">обновления бинарного файла</link>, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
393 могут быть потеряны. |
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 <para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
398 <note> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
399 Эта директива доступна как часть |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
400 <commercial_version>коммерческой подписки</commercial_version>. |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
401 </note> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
402 </para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
403 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
404 </directive> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
405 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
406 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
407 <directive name="hash"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
408 <syntax><value>ключ</value> [<literal>consistent</literal>]</syntax> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
409 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
410 <context>upstream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
411 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
412 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
413 Задаёт метод балансировки нагрузки для группы, при котором |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
414 соответствие клиента серверу определяется при помощи |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
415 хэшированного значения <value>ключа</value>. |
1744
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
416 В качестве <value>ключа</value> может использоваться текст, переменные |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
417 и их комбинации (1.11.2). |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
418 Пример использования: |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
419 <example> |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
420 hash $remote_addr; |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
421 </example> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
422 Следует отметить, что любое добавление или удаление серверов в группе |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
423 может привести к перераспределению большинства ключей на другие серверы. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
424 Метод совместим с библиотекой Perl |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
425 <link url="http://search.cpan.org/perldoc?Cache%3A%3AMemcached">Cache::Memcached</link>. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
426 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
427 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
428 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
429 Если задан параметр <literal>consistent</literal>, то вместо |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
430 вышеописанного метода будет использоваться метод консистентного хэширования |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
431 <link url="http://www.last.fm/user/RJ/journal/2007/04/10/392555/">ketama</link>. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
432 Метод гарантирует, что при добавлении сервера в группу или его удалении |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
433 на другие серверы будет перераспределено минимальное число ключей. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
434 Применение метода для кэширующих серверов обеспечивает |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
435 больший процент попаданий в кэш. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
436 Метод совместим с библиотекой Perl |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
437 <link url="http://search.cpan.org/perldoc?Cache%3A%3AMemcached%3A%3AFast">Cache::Memcached::Fast</link> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
438 при значении параметра <value>ketama_points</value> равным 160. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
439 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
440 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
441 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
442 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
443 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
444 <directive name="least_conn"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
445 <syntax/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
446 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
447 <context>upstream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
448 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
449 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
450 Задаёт для группы метод балансировки нагрузки, при котором соединение |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
451 передаётся серверу с наименьшим числом активных соединений, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
452 с учётом весов серверов. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
453 Если подходит сразу несколько серверов, они выбираются циклически |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
454 (в режиме round-robin) с учётом их весов. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
455 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
456 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
457 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
458 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
459 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
460 <directive name="least_time"> |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
461 <syntax> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
462 <literal>connect</literal> | |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
463 <literal>first_byte</literal> | |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
464 <literal>last_byte</literal> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
465 [<literal>inflight</literal>]</syntax> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
466 <default/> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
467 <context>upstream</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
468 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
469 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
470 Задаёт для группы метод балансировки нагрузки, при котором соединение |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
471 передаётся серверу с наименьшими средним временем ответа и |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
472 числом активных соединений с учётом весов серверов. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
473 Если подходит сразу несколько серверов, то они выбираются циклически |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
474 (в режиме round-robin) с учётом их весов. |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
475 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
476 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
477 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
478 Если указан параметр <literal>connect</literal>, |
2196
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
479 то учитывается время |
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
480 <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
|
481 Если указан параметр <literal>first_byte</literal>, |
2196
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
482 то учитывается время получения |
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
483 <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
|
484 Если указан параметр <literal>last_byte</literal>, |
2196
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
485 то учитывается время получения |
2230
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
486 <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
|
487 Если указан параметр <literal>inflight</literal> (1.11.6), |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
488 то также учитываются незавершённые соединения. |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
489 <note> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
490 До версии 1.11.6 |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
491 незавершённые соединения учитывались по умолчанию. |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
492 </note> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
493 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
494 |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
495 <para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
496 <note> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
497 Эта директива доступна как часть |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
498 <commercial_version>коммерческой подписки</commercial_version>. |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
499 </note> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
500 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
501 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
502 </directive> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
503 |
2191
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
504 |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
505 <directive name="random"> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
506 <syntax>[<literal>two</literal> [<value>метод</value>]]</syntax> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
507 <default/> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
508 <context>upstream</context> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
509 <appeared-in>1.15.1</appeared-in> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
510 |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
511 <para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
512 Задаёт для группы метод балансировки нагрузки, при котором соединение |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
513 передаётся случайно выбранному серверу, с учётом весов |
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 </para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
516 |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
517 <para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
518 Если указан необязательный параметр <literal>two</literal>, |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
519 то nginx случайным образом выбирает |
2197
03f8a9c5e8ae
Updated link in the "random" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2196
diff
changeset
|
520 <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
|
521 сервера, из которых выбирает сервер, |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
522 используя указанный <literal>метод</literal>. |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
523 Методом по умолчанию является <literal>least_conn</literal>, |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
524 при котором соединение передаётся на сервер |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
525 с наименьшим количеством активных соединений. |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
526 </para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
527 |
2230
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
528 <para id="random_least_time"> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
529 Если указан метод <literal>least_time</literal>, то соединение передаётся |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
530 серверу |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
531 с наименьшими средним временем ответа и числом активных соединений. |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
532 Если указан <literal>least_time=connect</literal>, |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
533 то учитывается время |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
534 <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
|
535 Если указан <literal>least_time=first_byte</literal>, |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
536 то учитывается время получения |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
537 <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
|
538 Если указан <literal>least_time=last_byte</literal>, |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
539 то учитывается время получения |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
540 <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
|
541 <note> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
542 Метод <literal>least_time</literal> доступен как часть |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
543 <commercial_version>коммерческой подписки</commercial_version>. |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
544 </note> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
545 </para> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
546 |
2191
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
547 </directive> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
548 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
549 </section> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
550 |
1772
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
551 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
552 <section id="variables" name="Встроенные переменные"> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
553 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
554 <para> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
555 Модуль <literal>ngx_stream_upstream_module</literal> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
556 поддерживает следующие встроенные переменные: |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
557 <list type="tag"> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
558 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
559 <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
|
560 <tag-desc> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
561 хранит IP-адрес и порт или путь к UNIX-сокету сервера группы (1.11.4). |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
562 Если при проксировании были сделаны обращения к нескольким серверам, |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
563 то их адреса разделяются запятой, например |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
564 “<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
|
565 Если сервер не может быть выбран, |
eb58ee50561d
Documented upstream name in $upstream_addr.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1947
diff
changeset
|
566 то переменная хранит имя группы серверов. |
1772
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
567 </tag-desc> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
568 |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
569 <tag-name id="var_upstream_bytes_sent"><var>$upstream_bytes_sent</var></tag-name> |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
570 <tag-desc> |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
571 число байт, переданных на сервер группы (1.11.4). |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
572 Значения нескольких соединений |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
573 разделяются запятыми подобно адресам в переменной |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
574 <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
|
575 </tag-desc> |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
576 |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
577 <tag-name id="var_upstream_bytes_received"><var>$upstream_bytes_received</var></tag-name> |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
578 <tag-desc> |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
579 число байт, полученных от сервера группы (1.11.4). |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
580 Значения нескольких соединений |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
581 разделяются запятыми подобно адресам в переменной |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
582 <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
|
583 </tag-desc> |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
584 |
1774
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
585 <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
|
586 <tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
587 время установки соединения с сервером группы (1.11.4); |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
588 время хранится в секундах с точностью до миллисекунд. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
589 Времена нескольких соединений |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
590 разделяются запятыми подобно адресам в переменной |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
591 <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
|
592 </tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
593 |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
594 <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
|
595 <tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
596 время получения первого байта данных (1.11.4); |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
597 время хранится в секундах с точностью до миллисекунд. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
598 Времена нескольких соединений |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
599 разделяются запятыми подобно адресам в переменной |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
600 <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
|
601 </tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
602 |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
603 <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
|
604 <tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
605 длительность сессии в секундах с точностью до миллисекунд (1.11.4). |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
606 Времена нескольких соединений |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
607 разделяются запятыми подобно адресам в переменной |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
608 <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
|
609 </tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
610 |
1772
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
611 </list> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
612 </para> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
613 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
614 </section> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
615 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
616 </module> |