changeset 1951:f069d4b7a8df

Added udp example to stream_upstream_hc_module.
author Yaroslav Zhuravlev <yar@nginx.com>
date Fri, 24 Mar 2017 19:55:54 +0300
parents ef22a80a2696
children 3be7279397c8
files xml/en/docs/stream/ngx_stream_upstream_hc_module.xml xml/ru/docs/stream/ngx_stream_upstream_hc_module.xml
diffstat 2 files changed, 49 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/stream/ngx_stream_upstream_hc_module.xml	Thu Mar 30 21:26:44 2017 +0300
+++ b/xml/en/docs/stream/ngx_stream_upstream_hc_module.xml	Fri Mar 24 19:55:54 2017 +0300
@@ -9,7 +9,7 @@
 <module name="Module ngx_stream_upstream_hc_module"
         link="/en/docs/stream/ngx_stream_upstream_hc_module.html"
         lang="en"
-        rev="4">
+        rev="5">
 
 <section id="summary">
 
@@ -70,6 +70,29 @@
 </para>
 
 <para>
+Health checks can be configured for the UDP protocol:
+<example>
+upstream dns_upstream {
+
+    zone   dns_zone 64k;
+
+    server dns1.example.com:53;
+    server dns2.example.com:53;
+    server dns3.example.com:53;
+}
+
+server {
+    listen       53 udp;
+    proxy_pass   dns_upstream;
+    health_check udp;
+}
+</example>
+In this case, the absence of
+ICMP “<literal>Destination Unreachable</literal>” message is expected
+in reply to the sent string “<literal>nginx health check</literal>”.
+</para>
+
+<para>
 Health checks can also be configured to test data obtained from the server.
 Tests are configured separately using the <link id="match"/> directive
 and referenced in the <literal>match</literal> parameter
--- a/xml/ru/docs/stream/ngx_stream_upstream_hc_module.xml	Thu Mar 30 21:26:44 2017 +0300
+++ b/xml/ru/docs/stream/ngx_stream_upstream_hc_module.xml	Fri Mar 24 19:55:54 2017 +0300
@@ -9,7 +9,7 @@
 <module name="Модуль ngx_stream_upstream_hc_module"
         link="/ru/docs/stream/ngx_stream_upstream_hc_module.html"
         lang="ru"
-        rev="4">
+        rev="5">
 
 <section id="summary">
 
@@ -62,7 +62,7 @@
     health_check;
 }
 </example>
-Для каждого сервера группы <literal>backend</literal>
+Для каждого сервера группы <literal>tcp</literal>
 с интервалом в 5 секунд проверяется возможность установки TCP-соединения.
 Если соединение с сервером не может быть установлено,
 проверка считается неуспешной и сервер
@@ -70,6 +70,29 @@
 </para>
 
 <para>
+Проверки работоспособности можно настроить для протокола UDP:
+<example>
+upstream dns_upstream {
+
+    zone   dns_zone 64k;
+
+    server dns1.example.com:53;
+    server dns2.example.com:53;
+    server dns3.example.com:53;
+}
+
+server {
+    listen       53 udp;
+    proxy_pass   dns_upstream;
+    health_check udp;
+}
+</example>
+В этом случае проверяется отсутствие
+сообщения ICMP “<literal>Destination Unreachable</literal>”
+в ответ на отправленную строку “<literal>nginx health check</literal>”.
+</para>
+
+<para>
 Проверки работоспособности могут тестировать данные, полученные от сервера.
 Тесты настраиваются отдельно при помощи директивы <link id="match"/>
 и указываются в параметре <literal>match</literal> директивы