annotate xml/ru/docs/stream/ngx_stream_upstream_module.xml @ 1772:536dc1885e24

Documented the $upstream_addr variable in stream.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 06 Sep 2016 18:32:42 +0300
parents ab56dcd73af2
children 9c48a717e001
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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"
1772
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
12 rev="15">
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>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
49 Динамически настраиваемая группа,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
50 доступна как часть
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
51 <commercial_version>коммерческой подписки</commercial_version>:
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
52 <example>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
53 resolver 10.0.0.1;
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
54
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
55 upstream <emphasis>dynamic</emphasis> {
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
56 zone upstream_dynamic 64k;
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
57
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
58 server backend1.example.com:12345 weight=5;
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
59 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
60 server 192.0.2.1:12345 max_fails=3;
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
61 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
62 server backend4.example.com service=http resolve;
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
63
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
64 server backup1.example.com:12345 backup;
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
65 server backup2.example.com:12345 backup;
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
66 }
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
67
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
68 server {
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
69 listen 12346;
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
70 proxy_pass <emphasis>dynamic</emphasis>;
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
71 health_check;
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
72 }
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
73 </example>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
74 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
75
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
76 </section>
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
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
79 <section id="directives" name="Директивы">
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
80
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81 <directive name="upstream">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
82 <syntax block="yes"><value>название</value></syntax>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
83 <default/>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
84 <context>stream</context>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
85
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
86 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
87 Описывает группу серверов.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
88 Серверы могут слушать на разных портах.
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 слушающие на TCP- и UNIX-сокетах.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
91 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
92
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
93 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
94 Пример:
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
95 <example>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
96 upstream backend {
1406
ea73cd9d4cdb Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1405
diff changeset
97 server backend1.example.com:12345 weight=5;
ea73cd9d4cdb Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1405
diff changeset
98 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
99 server unix:/tmp/backend2;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
100 server backend3.example.com:12345 resolve;
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
101
1406
ea73cd9d4cdb Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1405
diff changeset
102 server backup1.example.com:12345 backup;
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
103 }
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
104 </example>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
105 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
106
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
108 По умолчанию соединения распределяются по серверам циклически
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
109 (в режиме round-robin) с учётом весов серверов.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
110 В вышеприведённом примере каждые 7 соединений будут распределены так:
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
111 5 соединений на <literal>backend1.example.com:12345</literal>
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
112 и по одному соединению на второй и третий серверы.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
113 Если при попытке работы с сервером происходит ошибка, то соединение
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 Если связь с серверами не удалась, соединение будет закрыто.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
117 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119 </directive>
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
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122 <directive name="server">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
123 <syntax><value>адрес</value> [<value>параметры</value>]</syntax>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
124 <default/>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
125 <context>upstream</context>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
126
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
128 Задаёт <value>адрес</value> и другие <value>параметры</value>
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
129 сервера.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
130 Адрес может быть указан в виде доменного имени или IP-адреса,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
131 и обязательного порта, или в виде пути UNIX-сокета, который
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
132 указывается после префикса “<literal>unix:</literal>”.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
133 Доменное имя, которому соответствует несколько IP-адресов,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
134 задаёт сразу несколько серверов.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
135 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
136
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
137 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
138 Могут быть заданы следующие параметры:
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
139 <list type="tag">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
140
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
141 <tag-name id="weight">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
142 <literal>weight</literal>=<value>число</value>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
143 </tag-name>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
144 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
145 задаёт вес сервера, по умолчанию 1.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
146 </tag-desc>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
147
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
148 <tag-name id="max_fails">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
149 <literal>max_fails</literal>=<value>число</value>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
150 </tag-name>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
151 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
152 задаёт число неудачных попыток работы с сервером, которые должны произойти
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
153 в течение времени, заданного параметром <literal>fail_timeout</literal>,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
154 чтобы сервер считался недоступным на период времени, также заданный
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
155 параметром <literal>fail_timeout</literal>.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
156 По умолчанию число попыток устанавливается равным 1.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
157 Нулевое значение отключает учёт попыток.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
158 В данном случае неудачной попыткой считается ошибка или таймаут
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
159 при установке соединения с сервером.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
160 </tag-desc>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
161
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
162 <tag-name id="fail_timeout">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
163 <literal>fail_timeout</literal>=<value>время</value>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
164 </tag-name>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
165 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
166 задаёт
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
167 <list type="bullet">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
168
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
169 <listitem>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
170 время, в течение которого должно произойти заданное число неудачных
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
171 попыток работы с сервером для того, чтобы сервер считался недоступным;
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
172 </listitem>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
173
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
174 <listitem>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
175 и время, в течение которого сервер будет считаться недоступным.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
176 </listitem>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
177
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
178 </list>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
179 По умолчанию параметр равен 10 секундам.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
180 </tag-desc>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
181
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
182 <tag-name id="backup">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
183 <literal>backup</literal>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
184 </tag-name>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
185 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
186 помечает сервер как запасной сервер.
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 </tag-desc>
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 <tag-name id="down">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
192 <literal>down</literal>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
193 </tag-name>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
194 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
195 помечает сервер как постоянно недоступный.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
196 </tag-desc>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
197
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
198 </list>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
199 </para>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
200
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
201 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
202 Кроме того,
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 <commercial_version>коммерческой подписки</commercial_version>:
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
205 <list type="tag">
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
206
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
207 <tag-name id="max_conns">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
208 <literal>max_conns</literal>=<value>число</value>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
209 </tag-name>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
210 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
211 ограничивает максимальное <value>число</value> одновременных
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
212 соединений к проксируемому серверу.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
213 Значение по умолчанию равно 0 и означает, что ограничения нет.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
214 </tag-desc>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
215
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
216 <tag-name id="resolve">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
217 <literal>resolve</literal>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
218 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
219 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
220 отслеживает изменения IP-адресов, соответствующих доменному имени сервера,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
221 и автоматически изменяет конфигурацию группы
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
222 без необходимости перезапуска nginx.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
223 Группа должна находиться в <link id="zone">зоне разделяемой памяти</link>.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
224 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
225 Для работы этого параметра
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
226 директива <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
227 должна быть задана в блоке
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
228 <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
229 Пример:
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
230 <example>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
231 stream {
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
232 resolver 10.0.0.1;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
233
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
234 upstream u {
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
235 zone ...;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
236 ...
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
237 server example.com:12345 resolve;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
238 }
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
239 }
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
240 </example>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
241 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
242 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
243
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
244 <tag-name id="service">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
245 <literal>service</literal>=<value>имя</value>
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
246 </tag-name>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
247 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
248 включает преобразование
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
249 <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
250 DNS и задаёт <value>имя</value> сервиса (1.9.13).
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
251 Для работы параметра необходимо указать
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
252 параметр <link id="resolve"/> для сервера
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
253 и не указывать порт сервера.
1700
1dbef8ab47c7 Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1680
diff changeset
254 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
255 Если имя сервиса не содержит точку (“<literal>.</literal>”), то
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">RFC</link>
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
258 и в префикс службы добавляется протокол TCP.
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 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
261 необходимо указать директиву:
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
262 <example>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
263 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
264 </example>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
265 Если имя сервиса содержит одну и более точек, то имя составляется
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
266 при помощи соединения префикса службы и имени сервера.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
267 Например, для получения SRV-записей
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
268 <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 и <literal>server1.backend.example.com</literal>
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
270 необходимо указать директивы:
1700
1dbef8ab47c7 Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1680
diff changeset
271 <example>
1dbef8ab47c7 Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1680
diff changeset
272 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
273 server example.com service=server1.backend resolve;
1dbef8ab47c7 Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1680
diff changeset
274 </example>
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
275 </para>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
276
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
277 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
278 SRV-записи с наивысшим приоритетом
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
279 (записи с одинаковым наименьшим значением приоритета)
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
280 преобразуются в основные серверы,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
281 остальные SRV-записи преобразуются в запасные серверы.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
282 Если в конфигурации сервера указан параметр <link id="backup"/>,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
283 высокоприоритетные SRV-записи преобразуются в запасные серверы,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
284 остальные SRV-записи игнорируются.
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
285 </para>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
286 </tag-desc>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
287
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
288 <tag-name id="slow_start">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
289 <literal>slow_start</literal>=<value>время</value>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
290 </tag-name>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
291 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
292 задаёт <value>время</value>, в течение которого вес сервера
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
293 восстановится от нуля до своего номинального значения в ситуации, когда
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
294 неработоспособный (unhealthy) сервер вновь становится работоспособным
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
295 (<link id="health_check">healthy</link>)
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
296 или когда сервер становится доступным по прошествии времени,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
297 в течение которого он считался <link id="fail_timeout">недоступным</link>.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
298 Значение по умолчанию равно нулю и означает, что медленный старт выключен.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
299 </tag-desc>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
300
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
301 </list>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
302 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
303
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
304 <para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
305 <note>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
306 Если в группе только один сервер, параметры <literal>max_fails</literal>,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
307 <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
308 игнорируются и такой сервер никогда не будет считаться недоступным.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
309 </note>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
310 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
311
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
312 </directive>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
313
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
314
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
315 <directive name="zone">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
316 <syntax><value>имя</value> [<value>размер</value>]</syntax>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
317 <default/>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
318 <context>upstream</context>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
319
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
320 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
321 Задаёт <value>имя</value> и <value>размер</value> зоны разделяемой памяти,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
322 в которой хранятся конфигурация группы и её рабочее состояние,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
323 разделяемые между рабочими процессами.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
324 В одной и той же зоне могут быть сразу несколько групп.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
325 В этом случае достаточно указать <value>размер</value> только один раз.
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
326 </para>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
327
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
328 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
329 Дополнительно, как часть
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
330 <commercial_version>коммерческой подписки</commercial_version>,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
331 в таких группах для изменения состава группы
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
332 или настроек отдельных серверов
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
333 нет необходимости перезапускать nginx.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
334 Конфигурация доступна через специальный location,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
335 в котором указана директива
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
336 <link doc="../http/ngx_http_upstream_conf_module.xml" id="upstream_conf"/>.
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
337 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
338
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
339 </directive>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
340
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
341
1636
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
342 <directive name="state">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
343 <syntax><value>файл</value></syntax>
1636
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
344 <default/>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
345 <context>upstream</context>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
346 <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
347
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
348 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
349 Задаёт <value>файл</value>, в котором хранится состояние
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
350 динамически настраиваемой группы.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
351 В данный момент состояние ограничено списком серверов с их параметрами.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
352 Файл читается при парсинге конфигурации и обновляется каждый раз при
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
353 <link doc="ngx_http_upstream_conf_module.xml" id="upstream_conf">изменении</link>
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
354 конфигурации группы.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
355 Изменение содержимого файла напрямую не рекомендуется.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
356 Директиву нельзя использовать
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
357 совместно с директивой <link id="server"/>.
1636
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
358 </para>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
359
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
360 <para>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
361 <note>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
362 Изменения, совершённые в момент
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
363 <link doc="../control.xml" id="reconfiguration">перезагрузки конфигурации</link>
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
364 или <link doc="../control.xml" id="upgrade">обновления бинарного файла</link>,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
365 могут быть потеряны.
1636
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
366 </note>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
367 </para>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
368
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
369 <para>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
370 <note>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
371 Эта директива доступна как часть
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
372 <commercial_version>коммерческой подписки</commercial_version>.
1636
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
373 </note>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
374 </para>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
375
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
376 </directive>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
377
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
378
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
379 <directive name="hash">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
380 <syntax><value>ключ</value> [<literal>consistent</literal>]</syntax>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
381 <default/>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
382 <context>upstream</context>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
383
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
384 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
385 Задаёт метод балансировки нагрузки для группы, при котором
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
386 соответствие клиента серверу определяется при помощи
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
387 хэшированного значения <value>ключа</value>.
1744
ab56dcd73af2 Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1728
diff changeset
388 В качестве <value>ключа</value> может использоваться текст, переменные
ab56dcd73af2 Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1728
diff changeset
389 и их комбинации (1.11.2).
ab56dcd73af2 Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1728
diff changeset
390 Пример использования:
ab56dcd73af2 Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1728
diff changeset
391 <example>
ab56dcd73af2 Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1728
diff changeset
392 hash $remote_addr;
ab56dcd73af2 Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1728
diff changeset
393 </example>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
394 Следует отметить, что любое добавление или удаление серверов в группе
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
395 может привести к перераспределению большинства ключей на другие серверы.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
396 Метод совместим с библиотекой Perl
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
397 <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
398 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
399
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
400 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
401 Если задан параметр <literal>consistent</literal>, то вместо
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
402 вышеописанного метода будет использоваться метод консистентного хэширования
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
403 <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
404 Метод гарантирует, что при добавлении сервера в группу или его удалении
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
405 на другие серверы будет перераспределено минимальное число ключей.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
406 Применение метода для кэширующих серверов обеспечивает
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
407 больший процент попаданий в кэш.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
408 Метод совместим с библиотекой Perl
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
409 <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
410 при значении параметра <value>ketama_points</value> равным 160.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
411 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
412
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
413 </directive>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
414
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
415
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
416 <directive name="least_conn">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
417 <syntax/>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
418 <default/>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
419 <context>upstream</context>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
420
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
421 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
422 Задаёт для группы метод балансировки нагрузки, при котором соединение
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 с учётом весов серверов.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
425 Если подходит сразу несколько серверов, они выбираются циклически
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
426 (в режиме round-robin) с учётом их весов.
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
427 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
428
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
429 </directive>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
430
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
431
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
432 <directive name="least_time">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
433 <syntax><literal>connect</literal> |
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
434 <literal>first_byte</literal> |
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
435 <literal>last_byte</literal></syntax>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
436 <default/>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
437 <context>upstream</context>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
438
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
439 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
440 Задаёт для группы метод балансировки нагрузки, при котором соединение
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
441 передаётся серверу с наименьшими средним временем ответа и
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
442 числом активных соединений с учётом весов серверов.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
443 Если подходит сразу несколько серверов, то они выбираются циклически
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
444 (в режиме round-robin) с учётом их весов.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
445 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
446
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
447 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
448 Если указан параметр <literal>connect</literal>,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
449 то учитывается время соединения с сервером группы.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
450 Если указан параметр <literal>first_byte</literal>,
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 Если указан параметр <literal>last_byte</literal>,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
453 то учитывается время получения ответа.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
454 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
455
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
456 <para>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
457 <note>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
458 Эта директива доступна как часть
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
459 <commercial_version>коммерческой подписки</commercial_version>.
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
460 </note>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
461 </para>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
462
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
463 </directive>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
464
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
465
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
466 <directive name="health_check">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
467 <syntax>[<value>параметры</value>]</syntax>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
468 <default/>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
469 <context>server</context>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
470
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
471 <para>
1728
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 <link id="upstream">группе</link>.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
474 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
475
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
476 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
477 Могут быть заданы следующие необязательные параметры:
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
478 <list type="tag">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
479
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
480 <tag-name id="interval">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
481 <literal>interval</literal>=<value>время</value>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
482 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
483 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
484 задаёт интервал между двумя последовательными проверками,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
485 по умолчанию 5 секунд;
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
486 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
487
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
488 <tag-name id="fails">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
489 <literal>fails</literal>=<value>число</value>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
490 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
491 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
492 задаёт число последовательных неуспешных проверок для определённого сервера,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
493 после которых сервер будет считаться неработоспособным,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
494 по умолчанию 1;
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
495 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
496
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
497 <tag-name id="passes">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
498 <literal>passes</literal>=<value>число</value>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
499 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
500 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
501 задаёт число последовательных успешных проверок для определённого сервера,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
502 после которых сервер будет считаться работоспособным,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
503 по умолчанию 1;
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
504 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
505
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
506 <tag-name id="hc_match">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
507 <literal>match</literal>=<value>имя</value>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
508 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
509 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
510 указывает на блок <literal>match</literal> с условиями, которым должно
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
511 удовлетворять соединение, чтобы результат проверки считался успешным;
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
512 по умолчанию проверяется лишь возможность установки TCP-соединения с сервером;
1636
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
513 </tag-desc>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
514
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
515 <tag-name id="health_check_port">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
516 <literal>port</literal>=<value>число</value>
1636
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
517 </tag-name>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
518 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
519 задаёт порт, используемый при подключении к серверу
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
520 для проверки его работоспособности (1.9.7);
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
521 по умолчанию совпадает с портом <link id="server">сервера</link>.
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
522 </tag-desc>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
523
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
524 <tag-name id="health_check_udp">
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
525 <literal>udp</literal>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
526 </tag-name>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
527 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
528 указывает, что для проверки работоспособности будет использоваться протокол
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
529 <literal>UDP</literal>
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
530 вместо протокола <literal>TCP</literal>, используемого по умолчанию (1.9.13);
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
531 тебует наличия блока <link id="hc_match">match</link> с параметрами
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
532 <link id="match_send">send</link> и <link id="match_expect">expect</link>.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
533 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
534
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
535 </list>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
536 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
537
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
538 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
539 В примере
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
540 <example>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
541 server {
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
542 proxy_pass backend;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
543 health_check;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
544 }
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
545 </example>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
546 для каждого сервера группы <literal>backend</literal>
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
547 с интервалом в 5 секунд проверяется возможность установки TCP-соединения.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
548 Если соединение с сервером не может быть установлено,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
549 проверка считается неуспешной и сервер
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
550 признаётся неработоспособным.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
551 На неработоспособные серверы клиентские соединения передаваться не будут.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
552 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
553
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
554 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
555 Проверки работоспособности могут тестировать данные, полученные от сервера.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
556 Тесты настраиваются отдельно при помощи директивы <link id="match"/>
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
557 и указываются в параметре <literal>match</literal>.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
558 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
559
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
560 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
561 Группа должна находиться в <link id="zone">зоне разделяемой памяти</link>.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
562 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
563
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
564 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
565 Если для группы задано несколько проверок,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
566 то при любой неуспешной проверке соответствующий сервер будет
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
567 считаться неработоспособным.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
568 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
569
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
570 <para>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
571 <note>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
572 Эта директива доступна как часть
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
573 <commercial_version>коммерческой подписки</commercial_version>.
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
574 </note>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
575 </para>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
576
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
577 </directive>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
578
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
579
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
580 <directive name="health_check_timeout">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
581 <syntax><value>время</value></syntax>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
582 <default>5s</default>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
583 <context>stream</context>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
584 <context>server</context>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
585
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
586 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
587 Переопределяет значение
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
588 <link doc="ngx_stream_proxy_module.xml" id="proxy_timeout"/>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
589 для проверок работоспособности.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
590 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
591
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
592 <para>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
593 <note>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
594 Эта директива доступна как часть
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
595 <commercial_version>коммерческой подписки</commercial_version>.
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
596 </note>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
597 </para>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
598
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
599 </directive>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
600
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
601
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
602 <directive name="match">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
603 <syntax block="yes"><value>имя</value> </syntax>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
604 <default/>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
605 <context>stream</context>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
606
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
607 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
608 Задаёт именованный набор тестов для для анализа ответов сервера
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
609 на запросы проверки работоспособности.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
610 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
611
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
612 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
613 Могут быть заданы следующие параметры:
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
614 <list type="tag">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
615
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
616 <tag-name id="match_send">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
617 <literal>send</literal> <value>строка</value>;
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
618 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
619 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
620 отправляет <value>строку</value> на сервер;
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
621 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
622
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
623 <tag-name id="match_expect">
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
624 <literal>expect</literal> <value>стока</value> |
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
625 <literal>~</literal> <value>regex</value>;
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
626 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
627 <tag-desc>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
628 текстовая строка (1.9.12) или регулярное выражение,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
629 которым должны соответствовать данные, полученные с сервера.
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
630 Регулярное выражение задаётся либо с модификатором
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
631 “<literal>~*</literal>” (для поиска совпадения без учёта регистра символов),
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
632 либо с модификатором “<literal>~</literal>” (с учётом регистра).
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
633 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
634
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
635 </list>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
636 Параметры <literal>send</literal> и <literal>expect</literal>
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
637 могут содержать строки в шестнадцатеричном виде
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
638 с префиксом “<literal>\x</literal>”
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
639 и последующими двумя шестнадцатеричными цифрами,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
640 например “<literal>\x80</literal>” (1.9.12).
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
641 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
642
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
643 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
644 Проверка работоспособности считается успешной, если
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
645 <list type="bullet">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
646 <listitem>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
647 TCP-соединение успешно установлено;
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
648 </listitem>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
649
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
650 <listitem>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
651 <value>строка</value> из параметра <literal>send</literal>
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
652 была отправлена (если была задана);
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
653 </listitem>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
654
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
655 <listitem>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
656 данные, полученные от сервера, совпали со строкой или регулярным выражением
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
657 из параметра <literal>expect</literal> (если был задан);
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
658 </listitem>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
659
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
660 <listitem>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
661 истёкшее время не превышает значение, указанное
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
662 в директиве <link id="health_check_timeout"/>.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
663 </listitem>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
664
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
665 </list>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
666 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
667
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
668 <para>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
669 Пример:
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
670 <example>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
671 upstream backend {
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
672 zone upstream_backend 10m;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
673 server 127.0.0.1:12345;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
674 }
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
675
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
676 match http {
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
677 send "GET / HTTP/1.0\r\nHost: localhost\r\n\r\n";
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
678 expect ~ "200 OK";
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
679 }
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
680
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
681 server {
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
682 listen 12346;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
683 proxy_pass backend;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
684 health_check match=http;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
685 }
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
686 </example>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
687 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
688
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
689 <para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
690 <note>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
691 Проверяются лишь первые байты данных
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
692 <link doc="ngx_stream_proxy_module.xml" id="proxy_buffer_size"/>,
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
693 полученные от сервера.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
694 </note>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
695 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
696
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
697 <para>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
698 <note>
1728
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
699 Эта директива доступна как часть
f93a5aadad2c Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1727
diff changeset
700 <commercial_version>коммерческой подписки</commercial_version>.
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
701 </note>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
702 </para>
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
703
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
704 </directive>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
705
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
706 </section>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
707
1772
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
708
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
709 <section id="variables" name="Встроенные переменные">
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
710
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
711 <para>
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
712 Модуль <literal>ngx_stream_upstream_module</literal>
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
713 поддерживает следующие встроенные переменные:
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
714 <list type="tag">
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
715
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
716 <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
717 <tag-desc>
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
718 хранит IP-адрес и порт или путь к UNIX-сокету сервера группы (1.11.4).
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
719 Если при проксировании были сделаны обращения к нескольким серверам,
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
720 то их адреса разделяются запятой, например
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
721 “<literal>192.168.1.1:12345, 192.168.1.2:12345, unix:/tmp/sock</literal>”.
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
722 </tag-desc>
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
723
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
724 </list>
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
725 </para>
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
726
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
727 </section>
536dc1885e24 Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1744
diff changeset
728
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
729 </module>