Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_upstream_hc_module.xml @ 2647:0085d9f7dc3f
Minor corrections in njs reference.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 02 Feb 2021 12:37:28 +0000 |
parents | 52500ccb82c1 |
children | efb3d27dfa23 |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
135
diff
changeset
|
1 <?xml version="1.0"?> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
5 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
6 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 |
1945
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
9 <module name="Модуль ngx_http_upstream_hc_module" |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
10 link="/ru/docs/http/ngx_http_upstream_hc_module.html" |
589 | 11 lang="ru" |
2359
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
12 rev="5"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
13 |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
108
diff
changeset
|
14 <section id="summary"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
15 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 <para> |
1945
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
17 Модуль <literal>ngx_http_upstream_hc_module</literal> |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
18 позволяет активировать периодические проверки работоспособности серверов в |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
19 <link doc="ngx_http_upstream_module.xml" id="upstream">группе</link>, |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
20 указанной в содержащем location. |
1946
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
21 Группа должна находиться в |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
22 <link doc="ngx_http_upstream_module.xml" id="zone">зоне разделяемой памяти</link>. |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
23 </para> |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
24 |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
25 <para> |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
26 Если проверка работоспособности была неуспешной, |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
27 то сервер признаётся неработоспособным. |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
28 Если для группы задано несколько проверок, |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
29 то при любой неуспешной проверке соответствующий сервер будет |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
30 считаться неработоспособным. |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
31 На неработоспособные серверы и серверы в состоянии “checking” |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
32 клиентские запросы передаваться не будут. |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
33 </para> |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
34 |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
35 <para> |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
36 <note> |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
37 Обратите внимание, что при использовании проверок |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
38 большинство переменных имеют пустые значения. |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
39 </note> |
1945
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
40 </para> |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
41 |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
42 <para> |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
43 <note> |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
44 Модуль доступен как часть |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
45 <commercial_version>коммерческой подписки</commercial_version>. |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
46 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
47 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
48 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
49 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
50 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
51 |
292 | 52 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
53 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
54 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
55 <example> |
1945
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
56 upstream dynamic { |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
57 zone upstream_dynamic 64k; |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
58 |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
59 server backend1.example.com weight=5; |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
60 server backend2.example.com:8080 fail_timeout=5s slow_start=30s; |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
61 server 192.0.2.1 max_fails=3; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
62 |
1259
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
63 server backup1.example.com:8080 backup; |
954dcc02cb63
Upstream: "session learn" sticky method and upstream_conf changes.
Ruslan Ermilov <ru@nginx.com>
parents:
1243
diff
changeset
|
64 server backup2.example.com:8080 backup; |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
65 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
66 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
67 server { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
68 location / { |
1945
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
69 proxy_pass http://dynamic; |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
70 health_check; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
71 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
72 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
73 </example> |
1946
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
74 Каждому серверу группы <literal>backend</literal> |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
75 с интервалом в 5 секунд посылаются запросы “<literal>/</literal>”. |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
76 Если происходит ошибка или таймаут при работе с сервером, или |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
77 код ответа проксируемого сервера не равен |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
78 2xx или 3xx, проверка считается неуспешной и сервер |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
79 признаётся неработоспособным. |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
80 </para> |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
81 |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
82 <para> |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
83 Проверки работоспособности могут тестировать код ответа, |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
84 наличие или отсутствие определённых полей заголовка и их значений, |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
85 а также содержимое тела ответа. |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
86 Тесты настраиваются отдельно при помощи директивы <link id="match"/> |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
87 и указываются в параметре <literal>match</literal>. |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
88 Например: |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
89 <example> |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
90 http { |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
91 server { |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
92 ... |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
93 location / { |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
94 proxy_pass http://backend; |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
95 health_check match=welcome; |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
96 } |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
97 } |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
98 |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
99 match welcome { |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
100 status 200; |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
101 header Content-Type = text/html; |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
102 body ~ "Welcome to nginx!"; |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
103 } |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
104 } |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
105 </example> |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
106 В такой конфигурации успешный ответ на проверочный запрос |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
107 должен иметь код 200, тип содержимого “<literal>text/html</literal>” |
37df1535ea91
Moved info from http "health_check" and "match" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1945
diff
changeset
|
108 и “<literal>Welcome to nginx!</literal>” в теле ответа. |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
109 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
110 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
111 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
112 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
113 |
292 | 114 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
115 |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
116 <directive name="health_check"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
117 <syntax>[<value>параметры</value>]</syntax> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
118 <default/> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
119 <context>location</context> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
120 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
121 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
122 Активирует периодические проверки работоспособности серверов в |
1945
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
123 <link doc="ngx_http_upstream_module.xml" id="upstream">группе</link>, |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
124 указанной в содержащем location. |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
125 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
126 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
127 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
128 Могут быть заданы следующие необязательные параметры: |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
129 <list type="tag"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
130 |
1949
8f9c685dfabd
Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1946
diff
changeset
|
131 <tag-name id="health_check_interval"> |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
132 <literal>interval</literal>=<value>время</value> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
133 </tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
134 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
135 задаёт интервал между двумя последовательными проверками, |
1891
6225d50b3cba
Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1866
diff
changeset
|
136 по умолчанию 5 секунд. |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
137 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
138 |
1866
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1854
diff
changeset
|
139 <tag-name id="health_check_jitter"> |
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1854
diff
changeset
|
140 <literal>jitter</literal>=<value>время</value> |
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1854
diff
changeset
|
141 </tag-name> |
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1854
diff
changeset
|
142 <tag-desc> |
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1854
diff
changeset
|
143 задаёт время, в пределах которого |
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1854
diff
changeset
|
144 случайным образом задерживается каждая проверка, |
1891
6225d50b3cba
Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1866
diff
changeset
|
145 по умолчанию задержки нет. |
1866
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1854
diff
changeset
|
146 </tag-desc> |
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1854
diff
changeset
|
147 |
1949
8f9c685dfabd
Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1946
diff
changeset
|
148 <tag-name id="health_check_fails"> |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
149 <literal>fails</literal>=<value>число</value> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
150 </tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
151 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
152 задаёт число последовательных неуспешных проверок для определённого сервера, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
153 после которых сервер будет считаться неработоспособным, |
1891
6225d50b3cba
Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1866
diff
changeset
|
154 по умолчанию 1. |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
155 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
156 |
1949
8f9c685dfabd
Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1946
diff
changeset
|
157 <tag-name id="health_check_passes"> |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
158 <literal>passes</literal>=<value>число</value> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
159 </tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
160 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
161 задаёт число последовательных успешных проверок для определённого сервера, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
162 после которых сервер будет считаться работоспособным, |
1891
6225d50b3cba
Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1866
diff
changeset
|
163 по умолчанию 1. |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
164 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
165 |
1949
8f9c685dfabd
Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1946
diff
changeset
|
166 <tag-name id="health_check_uri"> |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
167 <literal>uri</literal>=<value>uri</value> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
168 </tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
169 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
170 задаёт URI, используемый в запросах, проверяющих работоспособность, |
1891
6225d50b3cba
Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1866
diff
changeset
|
171 по умолчанию “<literal>/</literal>”. |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
172 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
173 |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
174 <tag-name id="health_check_mandatory"> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
175 <literal>mandatory</literal> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
176 </tag-name> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
177 <tag-desc> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
178 устанавливает исходное состояние “checking” для сервера |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
179 до завершения первой проверки работоспособности (1.11.7). |
1950
ef22a80a2696
Described the "checking" state in "health_check mandatory"
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1949
diff
changeset
|
180 На серверы в состоянии “checking” клиентские запросы передаваться не будут. |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
181 Если параметр не указан, |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
182 то исходно сервер будет считаться работоспособным. |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
183 </tag-desc> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
184 |
1949
8f9c685dfabd
Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1946
diff
changeset
|
185 <tag-name id="health_check_match"> |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
186 <literal>match</literal>=<value>имя</value> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
187 </tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
188 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
189 указывает на блок <literal>match</literal> с условиями, которым должен |
1891
6225d50b3cba
Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1866
diff
changeset
|
190 удовлетворять ответ, чтобы результат проверки считался успешным. |
6225d50b3cba
Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1866
diff
changeset
|
191 По умолчанию код ответа должен быть 2xx или 3xx. |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
192 </tag-desc> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
193 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
194 <tag-name id="health_check_port"> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
195 <literal>port</literal>=<value>число</value> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
196 </tag-name> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
197 <tag-desc> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1625
diff
changeset
|
198 задаёт порт, используемый при подключении к серверу |
1891
6225d50b3cba
Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1866
diff
changeset
|
199 для проверки его работоспособности (1.9.7). |
1945
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
200 По умолчанию совпадает с портом |
88477c5d2751
Moved "health_check" and "match" to ngx_http_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
201 <link doc="ngx_http_upstream_module.xml" id="server">сервера</link>. |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
202 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
203 |
2632
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
204 <tag-name id="health_check_grpc"> |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
205 <literal>type</literal>=<literal>grpc</literal> |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
206 [<literal>grpc_service</literal>=<value>имя</value>] |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
207 [<literal>grpc_status</literal>=<value>код</value>] |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
208 </tag-name> |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
209 <tag-desc> |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
210 активирует периодические |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
211 <link url="https://github.com/grpc/grpc/blob/master/doc/health-checking.md#grpc-health-checking-protocol">проверки |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
212 работоспособности</link> gRPC-сервера |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
213 или службы gRPC, указанной при помощи необязательного |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
214 параметра <literal>grpc_service</literal> (1.19.5). |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
215 Если сервер не поддерживает протокол проверки работоспособности gRPC, |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
216 то можно использовать необязательный параметр <literal>grpc_status</literal> |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
217 для указания |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
218 <link url="https://github.com/grpc/grpc/blob/master/doc/statuscodes.md#status-codes-and-their-use-in-grpc">статуса</link> |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
219 (например |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
220 статус “<literal>12</literal>” / “<literal>UNIMPLEMENTED</literal>”) |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
221 при получении которого сервер признаётся работоспособным: |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
222 <example> |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
223 health_check mandatory type=grpc grpc_status=12; |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
224 </example> |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
225 Параметр <literal>type</literal>=<literal>grpc</literal> |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
226 должен быть указан после остальных параметров директивы, |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
227 <literal>grpc_service</literal> и <literal>grpc_status</literal> |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
228 должны быть указаны после <literal>type</literal>=<literal>grpc</literal>. |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
229 Параметр несовместим с параметрами |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
230 <link id="health_check_uri"><literal>uri</literal></link> и |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
231 <link id="health_check_match"><literal>match</literal></link>. |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
232 </tag-desc> |
52500ccb82c1
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2359
diff
changeset
|
233 |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
234 </list> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
235 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
236 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
237 </directive> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
238 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
239 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
240 <directive name="match"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
241 <syntax block="yes"><value>имя</value></syntax> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
242 <default/> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
243 <context>http</context> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
244 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
245 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
246 Задаёт именованный набор тестов для анализа ответов |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
247 на запросы проверки работоспособности. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
248 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
249 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
250 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
251 В ответе могут быть протестированы следующие объекты: |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
252 <list type="tag"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
253 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
254 <tag-name><literal>status 200;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
255 <tag-desc>код ответа равен 200</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
256 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
257 <tag-name><literal>status ! 500;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
258 <tag-desc>код ответа не равен 500</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
259 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
260 <tag-name><literal>status 200 204;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
261 <tag-desc>код ответа равен 200 или 204</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
262 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
263 <tag-name><literal>status ! 301 302;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
264 <tag-desc>код ответа не равен ни 301, ни 302</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
265 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
266 <tag-name><literal>status 200-399;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
267 <tag-desc>код ответа находится в диапазоне от 200 до 399</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
268 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
269 <tag-name><literal>status ! 400-599;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
270 <tag-desc>код ответа находится вне диапазона от 400 до 599</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
271 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
272 <tag-name><literal>status 301-303 307;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
273 <tag-desc>код ответа равен 301, 302, 303 или 307</tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
274 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
275 </list> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
276 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
277 <list type="tag"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
278 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
279 <tag-name><literal>header Content-Type = text/html;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
280 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
281 заголовок содержит <header>Content-Type</header> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
282 со значением <literal>text/html</literal> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
283 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
284 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
285 <tag-name><literal>header Content-Type != text/html;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
286 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
287 заголовок содержит <header>Content-Type</header> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
288 со значением, отличным от <literal>text/html</literal> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
289 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
290 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
291 <tag-name><literal>header Connection ~ close;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
292 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
293 заголовок содержит <header>Connection</header> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
294 со значением, совпадающим с регулярным выражением <literal>close</literal> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
295 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
296 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
297 <tag-name><literal>header Connection !~ close;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
298 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
299 заголовок содержит <header>Connection</header> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
300 со значением, не совпадающим с регулярным выражением <literal>close</literal> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
301 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
302 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
303 <tag-name><literal>header Host;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
304 <tag-desc>заголовок содержит <header>Host</header></tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
305 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
306 <tag-name><literal>header ! X-Accel-Redirect;</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
307 <tag-desc>заголовок не содержит <header>X-Accel-Redirect</header></tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
308 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
309 </list> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
310 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
311 <list type="tag"> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
312 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
313 <tag-name><literal>body ~ "Welcome to nginx!";</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
314 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
315 тело ответа совпадает с регулярным выражением |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
316 “<literal>Welcome to nginx!</literal>” |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
317 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
318 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
319 <tag-name><literal>body !~ "Welcome to nginx!";</literal></tag-name> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
320 <tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
321 тело ответа не совпадает с регулярным выражением |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
322 “<literal>Welcome to nginx!</literal>” |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
323 </tag-desc> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
324 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
325 </list> |
2359
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
326 |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
327 <list type="tag"> |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
328 |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
329 <tag-name id="match_require"><literal>require</literal> |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
330 <value>$переменная</value> |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
331 <literal>...;</literal></tag-name> |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
332 <tag-desc> |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
333 все указанные переменные непустые и не равны “0” (1.15.9). |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
334 </tag-desc> |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
335 |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
336 </list> |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
337 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
338 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
339 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
340 Если задано несколько тестов, |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
341 то ответ должен удовлетворять всем тестам. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
342 <note> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
343 Проверяются только первые 256 Кбайт тела ответа. |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
344 </note> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
345 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
346 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
347 <para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
348 Примеры: |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
349 <example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
350 # код ответа 200, тип содержимого "text/html" |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
351 # и тело ответа содержит "Welcome to nginx!" |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
352 match welcome { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
353 status 200; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
354 header Content-Type = text/html; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
355 body ~ "Welcome to nginx!"; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
356 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
357 </example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
358 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
359 <example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
360 # код ответа не равен 301, 302, 303 и 307 и заголовок не содержит "Refresh:" |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
361 match not_redirect { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
362 status ! 301-303 307; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
363 header ! Refresh; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
364 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
365 </example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
366 |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
367 <example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
368 # код ответа успешный и сервер не в сервисном режиме |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
369 match server_ok { |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
370 status 200-399; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
371 body !~ "maintenance mode"; |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
372 } |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
373 </example> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
374 |
2359
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
375 <example> |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
376 # код ответа равен 200 или 204 |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
377 map $upstream_status $good_status { |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
378 200 1; |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
379 204 1; |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
380 } |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
381 |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
382 match server_ok { |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
383 require $good_status; |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
384 } |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
385 </example> |
d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1950
diff
changeset
|
386 |
1242
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
387 </para> |
935fe5eb82c4
Upstream: translated the "health_check" and "match" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1241
diff
changeset
|
388 |
1237
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
389 </directive> |
e0a1a929a458
Upstream: translated the sticky_cookie_insert directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1234
diff
changeset
|
390 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
391 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
392 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
393 </module> |