annotate xml/en/docs/stream/ngx_stream_upstream_hc_module.xml @ 1950:ef22a80a2696

Described the "checking" state in "health_check mandatory"
author Yaroslav Zhuravlev <yar@nginx.com>
date Thu, 30 Mar 2017 21:26:44 +0300
parents 8f9c685dfabd
children f069d4b7a8df
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3 <!--
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
4 Copyright (C) Nginx, Inc.
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
5 -->
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
6
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8
1947
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
9 <module name="Module ngx_stream_upstream_hc_module"
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
10 link="/en/docs/stream/ngx_stream_upstream_hc_module.html"
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11 lang="en"
1950
ef22a80a2696 Described the "checking" state in "health_check mandatory"
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1949
diff changeset
12 rev="4">
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>
1947
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
17 The <literal>ngx_stream_upstream_hc_module</literal> module (1.9.0)
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
18 allows enabling periodic health checks of the servers in a
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
19 <link doc="ngx_stream_upstream_module.xml" id="upstream">group</link>.
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
20 The server group must reside in the
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
21 <link doc="ngx_stream_upstream_module.xml" id="zone">shared memory</link>.
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
22 </para>
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
23
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
24 <para>
1948
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
25 If a health check fails, the server will be considered unhealthy.
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
26 If several health checks are defined for the same group of servers,
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
27 a single failure of any check will make the corresponding server be
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
28 considered unhealthy.
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
29 Client connections are not passed to unhealthy servers
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
30 and servers in the “checking” state.
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
31 </para>
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
32
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
33 <para>
1947
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
34 <note>
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
35 This module is available as part of our
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
36 <commercial_version>commercial subscription</commercial_version>.
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
37 </note>
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38 </para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40 </section>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
43 <section id="example" name="Example Configuration">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
45 <para>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
46 <example>
1947
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
47 upstream tcp {
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
48 zone upstream_tcp 64k;
1462
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
49
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
50 server backend1.example.com:12345 weight=5;
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
51 server backend2.example.com:12345 fail_timeout=5s slow_start=30s;
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
52 server 192.0.2.1:12345 max_fails=3;
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
53
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
54 server backup1.example.com:12345 backup;
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
55 server backup2.example.com:12345 backup;
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
56 }
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
57
e69e4dbcc760 Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents: 1450
diff changeset
58 server {
1947
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
59 listen 12346;
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
60 proxy_pass tcp;
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
61 health_check;
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
62 }
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
63 </example>
1948
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
64 With this configuration, nginx
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
65 will check the ability to establish a TCP connection to each server
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
66 in the <literal>tcp</literal> group every five seconds.
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
67 When a connection to the server cannot be established,
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
68 the health check will fail, and the server will
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
69 be considered unhealthy.
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
70 </para>
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
71
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
72 <para>
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
73 Health checks can also be configured to test data obtained from the server.
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
74 Tests are configured separately using the <link id="match"/> directive
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
75 and referenced in the <literal>match</literal> parameter
25962922969a Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1947
diff changeset
76 of the <link id="health_check"/> directive.
1367
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 </section>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
80
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
82 <section id="directives" name="Directives">
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
83
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
84 <directive name="health_check">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
85 <syntax>[<value>parameters</value>]</syntax>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
86 <default/>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
87 <context>server</context>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
88
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
89 <para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
90 Enables periodic health checks of the servers in a
1947
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
91 <link doc="ngx_stream_upstream_module.xml" id="upstream">group</link>.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
92 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
93
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
94 <para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
95 The following optional parameters are supported:
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
96 <list type="tag">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
97
1949
8f9c685dfabd Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1948
diff changeset
98 <tag-name id="health_check_interval">
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
99 <literal>interval</literal>=<value>time</value>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
100 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
101 <tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
102 sets the interval between two consecutive health checks,
1891
6225d50b3cba Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1866
diff changeset
103 by default, 5 seconds.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
104 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
105
1866
6f2c5a36b4d1 Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1817
diff changeset
106 <tag-name id="health_check_jitter">
6f2c5a36b4d1 Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1817
diff changeset
107 <literal>jitter</literal>=<value>time</value>
6f2c5a36b4d1 Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1817
diff changeset
108 </tag-name>
6f2c5a36b4d1 Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1817
diff changeset
109 <tag-desc>
6f2c5a36b4d1 Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1817
diff changeset
110 sets the time within which
6f2c5a36b4d1 Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1817
diff changeset
111 each health check will be randomly delayed,
1891
6225d50b3cba Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1866
diff changeset
112 by default, there is no delay.
1866
6f2c5a36b4d1 Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1817
diff changeset
113 </tag-desc>
6f2c5a36b4d1 Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1817
diff changeset
114
1949
8f9c685dfabd Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1948
diff changeset
115 <tag-name id="health_check_fails">
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
116 <literal>fails</literal>=<value>number</value>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
117 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
118 <tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
119 sets the number of consecutive failed health checks of a particular server
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
120 after which this server will be considered unhealthy,
1891
6225d50b3cba Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1866
diff changeset
121 by default, 1.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
122 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
123
1949
8f9c685dfabd Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1948
diff changeset
124 <tag-name id="health_check_passes">
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
125 <literal>passes</literal>=<value>number</value>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
126 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
127 <tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
128 sets the number of consecutive passed health checks of a particular server
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
129 after which the server will be considered healthy,
1891
6225d50b3cba Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1866
diff changeset
130 by default, 1.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
131 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
132
1925
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
133 <tag-name id="health_check_mandatory">
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
134 <literal>mandatory</literal>
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
135 </tag-name>
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
136 <tag-desc>
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
137 sets the initial “checking” state for a server
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
138 until the first health check is completed (1.11.7).
1950
ef22a80a2696 Described the "checking" state in "health_check mandatory"
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1949
diff changeset
139 Client connections are not passed to servers in the “checking” state.
1925
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
140 If the parameter is not specified,
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
141 the server will be initially considered healthy.
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
142 </tag-desc>
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
143
1949
8f9c685dfabd Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1948
diff changeset
144 <tag-name id="health_check_match">
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
145 <literal>match</literal>=<value>name</value>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
146 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
147 <tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
148 specifies the <literal>match</literal> block configuring the tests that a
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
149 successful connection should pass in order for a health check to pass.
1925
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
150 By default, for TCP, only the ability
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
151 to establish a TCP connection with the server is checked.
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
152 For <link id="health_check_udp">UDP</link>, the absence of
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
153 ICMP “<literal>Destination Unreachable</literal>” message is expected
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
154 in reply to the sent string “<literal>nginx health check</literal>”.
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
155 <note>
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
156 Prior to version 1.11.7, by default, UDP health check
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
157 required a <link id="hc_match">match</link> block with the
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
158 <link id="match_send">send</link> and <link id="match_expect">expect</link>
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
159 parameters.
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
160 </note>
1636
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
161 </tag-desc>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
162
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
163 <tag-name id="health_check_port">
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
164 <literal>port</literal>=<value>number</value>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
165 </tag-name>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
166 <tag-desc>
44c4323144c5 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1581
diff changeset
167 defines the port used when connecting to a server
1891
6225d50b3cba Replaced semicolon with dot in health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1866
diff changeset
168 to perform a health check (1.9.7).
1947
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
169 By default, equals the
6b6d0e844bf7 Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1925
diff changeset
170 <link doc="ngx_stream_upstream_module.xml" id="server"/> port.
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
171 </tag-desc>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
172
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
173 <tag-name id="health_check_udp">
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
174 <literal>udp</literal>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
175 </tag-name>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
176 <tag-desc>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
177 specifies that the <literal>UDP</literal> protocol should be used for
1925
a58b35cc0823 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1891
diff changeset
178 health checks instead of the default <literal>TCP</literal> protocol (1.9.13).
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
179 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
180
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
181 </list>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
182 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
183
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
184 </directive>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
185
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
186
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
187 <directive name="health_check_timeout">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
188 <syntax><value>timeout</value></syntax>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
189 <default>5s</default>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
190 <context>stream</context>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
191 <context>server</context>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
192
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
193 <para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
194 Overrides the
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
195 <link doc="ngx_stream_proxy_module.xml" id="proxy_timeout"/>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
196 value for health checks.
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
197 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
198
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
199 </directive>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
200
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
201
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
202 <directive name="match">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
203 <syntax block="yes"><value>name</value> </syntax>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
204 <default/>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
205 <context>stream</context>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
206
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
207 <para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
208 Defines the named test set used to verify server responses to health checks.
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
209 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
210
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
211 <para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
212 The following parameters can be configured:
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
213 <list type="tag">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
214
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
215 <tag-name id="match_send">
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
216 <literal>send</literal> <value>string</value>;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
217 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
218 <tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
219 sends a <value>string</value> to the server;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
220 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
221
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
222 <tag-name id="match_expect">
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
223 <literal>expect</literal> <value>string</value> |
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
224 <literal>~</literal> <value>regex</value>;
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
225 </tag-name>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
226 <tag-desc>
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
227 a literal string (1.9.12) or a regular expression
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
228 that the data obtained from the server should match.
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
229 The regular expression is specified with the preceding
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
230 “<literal>~*</literal>” modifier (for case-insensitive matching), or the
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
231 “<literal>~</literal>” modifier (for case-sensitive matching).
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
232 </tag-desc>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
233
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
234 </list>
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
235 Both <literal>send</literal> and <literal>expect</literal> parameters
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
236 can contain hexadecimal literals with the prefix “<literal>\x</literal>”
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
237 followed by two hex digits, for example, “<literal>\x80</literal>” (1.9.12).
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
238 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
239
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
240 <para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
241 Health check is passed if:
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
242 <list type="bullet">
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
243 <listitem>
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
244 the TCP connection was successfully established;
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
245 </listitem>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
246
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
247 <listitem>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
248 the <value>string</value> from the <literal>send</literal> parameter,
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
249 if specified, was sent;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
250 </listitem>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
251
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
252 <listitem>
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1654
diff changeset
253 the data obtained from the server matched the string or regular expression
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
254 from the <literal>expect</literal> parameter, if specified;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
255 </listitem>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
256
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
257 <listitem>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
258 the time elapsed does not exceed the value specified
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
259 in the <link id="health_check_timeout"/> directive.
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
260 </listitem>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
261
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
262 </list>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
263 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
264
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
265 <para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
266 Example:
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
267 <example>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
268 upstream backend {
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
269 zone upstream_backend 10m;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
270 server 127.0.0.1:12345;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
271 }
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
272
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
273 match http {
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
274 send "GET / HTTP/1.0\r\nHost: localhost\r\n\r\n";
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
275 expect ~ "200 OK";
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
276 }
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
277
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
278 server {
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
279 listen 12346;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
280 proxy_pass backend;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
281 health_check match=http;
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
282 }
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
283 </example>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
284 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
285
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
286 <para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
287 <note>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
288 Only the first
1654
f5dcf57c5eb5 Corrected note in the stream "match" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
289 <link doc="ngx_stream_proxy_module.xml" id="proxy_buffer_size"/>
1450
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
290 bytes of data obtained from the server are examined.
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
291 </note>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
292 </para>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
293
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
294 </directive>
f5b5eefc43cb Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents: 1410
diff changeset
295
1367
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
296 </section>
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
297
f1e14d87d833 Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
298 </module>