Mercurial > hg > nginx-site
annotate xml/ru/docs/stream/ngx_stream_upstream_module.xml @ 3094:f7e9bd7de0f9 default tip
freenginx-1.27.3
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 13 Aug 2024 17:45:23 +0300 |
parents | 9eadb98ec770 |
children |
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" |
3043
9eadb98ec770
Free nginx: removed commercial version documentation.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2914
diff
changeset
|
12 rev="40"> |
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 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 </section> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
51 <section id="directives" name="Директивы"> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 <directive name="upstream"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
54 <syntax block="yes"><value>название</value></syntax> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 <context>stream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
59 Описывает группу серверов. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
60 Серверы могут слушать на разных портах. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
61 Кроме того, можно одновременно использовать серверы, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
62 слушающие на TCP- и UNIX-сокетах. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
66 Пример: |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 <example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 upstream backend { |
1406
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
69 server backend1.example.com:12345 weight=5; |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
70 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
|
71 server unix:/tmp/backend2; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
72 server backend3.example.com:12345 resolve; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 |
1406
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
74 server backup1.example.com:12345 backup; |
1367
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 </example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
80 По умолчанию соединения распределяются по серверам циклически |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
81 (в режиме round-robin) с учётом весов серверов. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
82 В вышеприведённом примере каждые 7 соединений будут распределены так: |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
83 5 соединений на <literal>backend1.example.com:12345</literal> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
84 и по одному соединению на второй и третий серверы. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
85 Если при попытке работы с сервером происходит ошибка, то соединение |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
86 передаётся следующему серверу, и так далее до тех пор, пока не будут опробованы |
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 Если связь с серверами не удалась, соединение будет закрыто. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 </directive> |
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 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 <directive name="server"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
95 <syntax><value>адрес</value> [<value>параметры</value>]</syntax> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 <context>upstream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
100 Задаёт <value>адрес</value> и другие <value>параметры</value> |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
101 сервера. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
102 Адрес может быть указан в виде доменного имени или IP-адреса, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
103 и обязательного порта, или в виде пути UNIX-сокета, который |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
104 указывается после префикса “<literal>unix:</literal>”. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
105 Доменное имя, которому соответствует несколько IP-адресов, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
106 задаёт сразу несколько серверов. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
107 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
108 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
109 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
110 Могут быть заданы следующие параметры: |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
111 <list type="tag"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
112 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 <tag-name id="weight"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
114 <literal>weight</literal>=<value>число</value> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
115 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
117 задаёт вес сервера, по умолчанию 1. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
118 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
119 |
1800
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
120 <tag-name id="max_conns"> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
121 <literal>max_conns</literal>=<value>число</value> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
122 </tag-name> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
123 <tag-desc> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
124 ограничивает максимальное <value>число</value> одновременных |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
125 соединений к проксируемому серверу (1.11.5). |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
126 Значение по умолчанию равно 0 и означает, что ограничения нет. |
1801
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
127 Если группа не находится в <link id="zone">зоне разделяемой памяти</link>, |
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
128 то ограничение работает отдельно для каждого рабочего процесса. |
1800
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
129 </tag-desc> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1799
diff
changeset
|
130 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 <tag-name id="max_fails"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
132 <literal>max_fails</literal>=<value>число</value> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
133 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
134 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
135 задаёт число неудачных попыток работы с сервером, которые должны произойти |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
136 в течение времени, заданного параметром <literal>fail_timeout</literal>, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
137 чтобы сервер считался недоступным на период времени, также заданный |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
138 параметром <literal>fail_timeout</literal>. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
139 По умолчанию число попыток устанавливается равным 1. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
140 Нулевое значение отключает учёт попыток. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
141 В данном случае неудачной попыткой считается ошибка или таймаут |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
142 при установке соединения с сервером. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
143 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
144 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 <tag-name id="fail_timeout"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
146 <literal>fail_timeout</literal>=<value>время</value> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
147 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
149 задаёт |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
150 <list type="bullet"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
151 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
152 <listitem> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
153 время, в течение которого должно произойти заданное число неудачных |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
154 попыток работы с сервером для того, чтобы сервер считался недоступным; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
155 </listitem> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
156 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
157 <listitem> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
158 и время, в течение которого сервер будет считаться недоступным. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
159 </listitem> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
160 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
161 </list> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
162 По умолчанию параметр равен 10 секундам. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
163 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
164 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
165 <tag-name id="backup"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
166 <literal>backup</literal> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
167 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
168 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
169 помечает сервер как запасной сервер. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
170 На него будут передаваться соединения в случае, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
171 если не работают основные серверы. |
2434
a1f61586779b
Listed not supported load balancing methods in upstream backup.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2418
diff
changeset
|
172 <note> |
a1f61586779b
Listed not supported load balancing methods in upstream backup.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2418
diff
changeset
|
173 Параметр нельзя использовать совместно с |
a1f61586779b
Listed not supported load balancing methods in upstream backup.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2418
diff
changeset
|
174 методами балансировки нагрузки <link id="hash"/> и <link id="random"/>. |
a1f61586779b
Listed not supported load balancing methods in upstream backup.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2418
diff
changeset
|
175 </note> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
176 </tag-desc> |
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 <tag-name id="down"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
179 <literal>down</literal> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
180 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
181 <tag-desc> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
182 помечает сервер как постоянно недоступный. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
183 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
184 |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
185 </list> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
186 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
187 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
188 <para> |
1817
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
189 <note> |
3043
9eadb98ec770
Free nginx: removed commercial version documentation.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2914
diff
changeset
|
190 Если в группе только один сервер, |
9eadb98ec770
Free nginx: removed commercial version documentation.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2914
diff
changeset
|
191 параметры <literal>max_fails</literal> и <literal>fail_timeout</literal> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
192 игнорируются и такой сервер никогда не будет считаться недоступным. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
193 </note> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
194 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
195 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
196 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
197 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
198 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
199 <directive name="zone"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
200 <syntax><value>имя</value> [<value>размер</value>]</syntax> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
201 <default/> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
202 <context>upstream</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
203 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
204 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
205 Задаёт <value>имя</value> и <value>размер</value> зоны разделяемой памяти, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
206 в которой хранятся конфигурация группы и её рабочее состояние, |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
207 разделяемые между рабочими процессами. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
208 В одной и той же зоне могут быть сразу несколько групп. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
209 В этом случае достаточно указать <value>размер</value> только один раз. |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
210 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
211 |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
212 </directive> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
213 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
214 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
215 <directive name="hash"> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
216 <syntax><value>ключ</value> [<literal>consistent</literal>]</syntax> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
217 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
218 <context>upstream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
219 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
220 <para> |
1728
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 соответствие клиента серверу определяется при помощи |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
223 хэшированного значения <value>ключа</value>. |
1744
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
224 В качестве <value>ключа</value> может использоваться текст, переменные |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
225 и их комбинации (1.11.2). |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
226 Пример использования: |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
227 <example> |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
228 hash $remote_addr; |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1728
diff
changeset
|
229 </example> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
230 Следует отметить, что любое добавление или удаление серверов в группе |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
231 может привести к перераспределению большинства ключей на другие серверы. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
232 Метод совместим с библиотекой Perl |
2275
d93c8c32df75
Updated links to CPAN search interface.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2274
diff
changeset
|
233 <link url="https://metacpan.org/pod/Cache::Memcached">Cache::Memcached</link>. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
234 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
235 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
236 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
237 Если задан параметр <literal>consistent</literal>, то вместо |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
238 вышеописанного метода будет использоваться метод консистентного хэширования |
2274
e28e3d0f0d20
Updated link in the "hash" directive.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2230
diff
changeset
|
239 <link url="https://www.metabrew.com/article/libketama-consistent-hashing-algo-memcached-clients">ketama</link>. |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
240 Метод гарантирует, что при добавлении сервера в группу или его удалении |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
241 на другие серверы будет перераспределено минимальное число ключей. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
242 Применение метода для кэширующих серверов обеспечивает |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
243 больший процент попаданий в кэш. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
244 Метод совместим с библиотекой Perl |
2275
d93c8c32df75
Updated links to CPAN search interface.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2274
diff
changeset
|
245 <link url="https://metacpan.org/pod/Cache::Memcached::Fast">Cache::Memcached::Fast</link> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
246 при значении параметра <value>ketama_points</value> равным 160. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
247 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
248 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
249 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
250 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
251 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
252 <directive name="least_conn"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
253 <syntax/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
254 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
255 <context>upstream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
256 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
257 <para> |
1728
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
258 Задаёт для группы метод балансировки нагрузки, при котором соединение |
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 с учётом весов серверов. |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
261 Если подходит сразу несколько серверов, они выбираются циклически |
f93a5aadad2c
Translated the stream upstream module into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
262 (в режиме round-robin) с учётом их весов. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
263 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
264 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
265 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
266 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
267 |
2191
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
268 <directive name="random"> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
269 <syntax>[<literal>two</literal> [<value>метод</value>]]</syntax> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
270 <default/> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
271 <context>upstream</context> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
272 <appeared-in>1.15.1</appeared-in> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
273 |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
274 <para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
275 Задаёт для группы метод балансировки нагрузки, при котором соединение |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
276 передаётся случайно выбранному серверу, с учётом весов |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
277 серверов. |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
278 </para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
279 |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
280 <para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
281 Если указан необязательный параметр <literal>two</literal>, |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
282 то nginx случайным образом выбирает |
2197
03f8a9c5e8ae
Updated link in the "random" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2196
diff
changeset
|
283 <link url="https://homes.cs.washington.edu/~karlin/papers/balls.pdf">два</link> |
2191
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
284 сервера, из которых выбирает сервер, |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
285 используя указанный <literal>метод</literal>. |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
286 Методом по умолчанию является <literal>least_conn</literal>, |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
287 при котором соединение передаётся на сервер |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
288 с наименьшим количеством активных соединений. |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
289 </para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
290 |
2469
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
291 </directive> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
292 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
293 </section> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
294 |
1772
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
295 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
296 <section id="variables" name="Встроенные переменные"> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
297 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
298 <para> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
299 Модуль <literal>ngx_stream_upstream_module</literal> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
300 поддерживает следующие встроенные переменные: |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
301 <list type="tag"> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
302 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
303 <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
|
304 <tag-desc> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
305 хранит IP-адрес и порт или путь к UNIX-сокету сервера группы (1.11.4). |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
306 Если при проксировании были сделаны обращения к нескольким серверам, |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
307 то их адреса разделяются запятой, например |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
308 “<literal>192.168.1.1:12345, 192.168.1.2:12345, unix:/tmp/sock</literal>”. |
2058
eb58ee50561d
Documented upstream name in $upstream_addr.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1947
diff
changeset
|
309 Если сервер не может быть выбран, |
eb58ee50561d
Documented upstream name in $upstream_addr.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1947
diff
changeset
|
310 то переменная хранит имя группы серверов. |
1772
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
311 </tag-desc> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
312 |
2308
956685eb1d43
Reordered $upstream_bytes_ variables aphabetically in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2283
diff
changeset
|
313 <tag-name id="var_upstream_bytes_received"><var>$upstream_bytes_received</var></tag-name> |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
314 <tag-desc> |
2308
956685eb1d43
Reordered $upstream_bytes_ variables aphabetically in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2283
diff
changeset
|
315 число байт, полученных от сервера группы (1.11.4). |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
316 Значения нескольких соединений |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
317 разделяются запятыми подобно адресам в переменной |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
318 <link id="var_upstream_addr">$upstream_addr</link>. |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
319 </tag-desc> |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
320 |
2308
956685eb1d43
Reordered $upstream_bytes_ variables aphabetically in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2283
diff
changeset
|
321 <tag-name id="var_upstream_bytes_sent"><var>$upstream_bytes_sent</var></tag-name> |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
322 <tag-desc> |
2308
956685eb1d43
Reordered $upstream_bytes_ variables aphabetically in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2283
diff
changeset
|
323 число байт, переданных на сервер группы (1.11.4). |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
324 Значения нескольких соединений |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
325 разделяются запятыми подобно адресам в переменной |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
326 <link id="var_upstream_addr">$upstream_addr</link>. |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
327 </tag-desc> |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
328 |
1774
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
329 <tag-name id="var_upstream_connect_time"><var>$upstream_connect_time</var></tag-name> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
330 <tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
331 время установки соединения с сервером группы (1.11.4); |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
332 время хранится в секундах с точностью до миллисекунд. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
333 Времена нескольких соединений |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
334 разделяются запятыми подобно адресам в переменной |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
335 <link id="var_upstream_addr">$upstream_addr</link>. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
336 </tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
337 |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
338 <tag-name id="var_upstream_first_byte_time"><var>$upstream_first_byte_time</var></tag-name> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
339 <tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
340 время получения первого байта данных (1.11.4); |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
341 время хранится в секундах с точностью до миллисекунд. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
342 Времена нескольких соединений |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
343 разделяются запятыми подобно адресам в переменной |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
344 <link id="var_upstream_addr">$upstream_addr</link>. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
345 </tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
346 |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
347 <tag-name id="var_upstream_session_time"><var>$upstream_session_time</var></tag-name> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
348 <tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
349 длительность сессии в секундах с точностью до миллисекунд (1.11.4). |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
350 Времена нескольких соединений |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
351 разделяются запятыми подобно адресам в переменной |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
352 <link id="var_upstream_addr">$upstream_addr</link>. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
353 </tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
354 |
1772
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
355 </list> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
356 </para> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
357 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
358 </section> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
359 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
360 </module> |