Mercurial > hg > nginx-site
annotate xml/en/docs/stream/ngx_stream_upstream_hc_module.xml @ 2769:16f6fa718be2
Updated TLSv1.3 support notes.
Previous notes described some early development snapshot of OpenSSL 1.1.1
with disabled TLSv1.3 by default. It was then enabled in the first alpha.
Further, the updated text covers later major releases such as OpenSSL 3.0.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 30 Sep 2021 16:29:20 +0300 |
parents | 9dd8c203a54a |
children |
rev | line source |
---|---|
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 <!-- |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 --> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
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" |
2768
9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1951
diff
changeset
|
12 rev="6"> |
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> |
1951
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
73 Health checks can be configured for the UDP protocol: |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
74 <example> |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
75 upstream dns_upstream { |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
76 |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
77 zone dns_zone 64k; |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
78 |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
79 server dns1.example.com:53; |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
80 server dns2.example.com:53; |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
81 server dns3.example.com:53; |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
82 } |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
83 |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
84 server { |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
85 listen 53 udp; |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
86 proxy_pass dns_upstream; |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
87 health_check udp; |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
88 } |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
89 </example> |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
90 In this case, the absence of |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
91 ICMP “<literal>Destination Unreachable</literal>” message is expected |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
92 in reply to the sent string “<literal>nginx health check</literal>”. |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
93 </para> |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
94 |
f069d4b7a8df
Added udp example to stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1950
diff
changeset
|
95 <para> |
1948
25962922969a
Moved info from stream "health_check" to intro.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1947
diff
changeset
|
96 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
|
97 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
|
98 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
|
99 of the <link id="health_check"/> directive. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
100 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
101 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 </section> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 <section id="directives" name="Directives"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
106 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
107 <directive name="health_check"> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
108 <syntax>[<value>parameters</value>]</syntax> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
109 <default/> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
110 <context>server</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
111 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
112 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
113 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
|
114 <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
|
115 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
116 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
117 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
118 The following optional parameters are supported: |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
119 <list type="tag"> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
120 |
1949
8f9c685dfabd
Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1948
diff
changeset
|
121 <tag-name id="health_check_interval"> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
122 <literal>interval</literal>=<value>time</value> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
123 </tag-name> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
124 <tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
125 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
|
126 by default, 5 seconds. |
1450
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 |
1866
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1817
diff
changeset
|
129 <tag-name id="health_check_jitter"> |
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1817
diff
changeset
|
130 <literal>jitter</literal>=<value>time</value> |
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1817
diff
changeset
|
131 </tag-name> |
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1817
diff
changeset
|
132 <tag-desc> |
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1817
diff
changeset
|
133 sets the time within which |
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1817
diff
changeset
|
134 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
|
135 by default, there is no delay. |
1866
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1817
diff
changeset
|
136 </tag-desc> |
6f2c5a36b4d1
Documented the "jitter" parameter for health_check.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1817
diff
changeset
|
137 |
1949
8f9c685dfabd
Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1948
diff
changeset
|
138 <tag-name id="health_check_fails"> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
139 <literal>fails</literal>=<value>number</value> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
140 </tag-name> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
141 <tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
142 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
|
143 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
|
144 by default, 1. |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
145 </tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
146 |
1949
8f9c685dfabd
Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1948
diff
changeset
|
147 <tag-name id="health_check_passes"> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
148 <literal>passes</literal>=<value>number</value> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
149 </tag-name> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
150 <tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
151 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
|
152 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
|
153 by default, 1. |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
154 </tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
155 |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
156 <tag-name id="health_check_mandatory"> |
2768
9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1951
diff
changeset
|
157 <literal>mandatory</literal> [<literal>persistent</literal>] |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
158 </tag-name> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
159 <tag-desc> |
2768
9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1951
diff
changeset
|
160 <para> |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
161 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
|
162 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
|
163 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
|
164 If the parameter is not specified, |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
165 the server will be initially considered healthy. |
2768
9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1951
diff
changeset
|
166 </para> |
9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1951
diff
changeset
|
167 |
9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1951
diff
changeset
|
168 <para id="health_check_persistent"> |
9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1951
diff
changeset
|
169 The <literal>persistent</literal> parameter (1.21.1) |
9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1951
diff
changeset
|
170 sets the initial “up” state for a server after reload |
9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1951
diff
changeset
|
171 if the server was considered healthy before reload. |
9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1951
diff
changeset
|
172 </para> |
9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1951
diff
changeset
|
173 |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
174 </tag-desc> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
175 |
1949
8f9c685dfabd
Updated IDs in "health_check" directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1948
diff
changeset
|
176 <tag-name id="health_check_match"> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
177 <literal>match</literal>=<value>name</value> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
178 </tag-name> |
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 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
|
181 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
|
182 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
|
183 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
|
184 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
|
185 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
|
186 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
|
187 <note> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
188 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
|
189 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
|
190 <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
|
191 parameters. |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
192 </note> |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
193 </tag-desc> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
194 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
195 <tag-name id="health_check_port"> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
196 <literal>port</literal>=<value>number</value> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
197 </tag-name> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
198 <tag-desc> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
199 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
|
200 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
|
201 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
|
202 <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
|
203 </tag-desc> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
204 |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
205 <tag-name id="health_check_udp"> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
206 <literal>udp</literal> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
207 </tag-name> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
208 <tag-desc> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
209 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
|
210 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
|
211 </tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
212 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
213 </list> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
214 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
215 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
216 </directive> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
217 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
218 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
219 <directive name="health_check_timeout"> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
220 <syntax><value>timeout</value></syntax> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
221 <default>5s</default> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
222 <context>stream</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
223 <context>server</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
224 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
225 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
226 Overrides the |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
227 <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
|
228 value for health checks. |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
229 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
230 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
231 </directive> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
232 |
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 <directive name="match"> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
235 <syntax block="yes"><value>name</value> </syntax> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
236 <default/> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
237 <context>stream</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
238 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
239 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
240 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
|
241 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
242 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
243 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
244 The following parameters can be configured: |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
245 <list type="tag"> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
246 |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
247 <tag-name id="match_send"> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
248 <literal>send</literal> <value>string</value>; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
249 </tag-name> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
250 <tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
251 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
|
252 </tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
253 |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
254 <tag-name id="match_expect"> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
255 <literal>expect</literal> <value>string</value> | |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
256 <literal>~</literal> <value>regex</value>; |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
257 </tag-name> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
258 <tag-desc> |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
259 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
|
260 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
|
261 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
|
262 “<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
|
263 “<literal>~</literal>” modifier (for case-sensitive matching). |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
264 </tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
265 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
266 </list> |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
267 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
|
268 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
|
269 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
|
270 </para> |
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 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
273 Health check is passed if: |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
274 <list type="bullet"> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
275 <listitem> |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
276 the TCP connection was successfully established; |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
277 </listitem> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
278 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
279 <listitem> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
280 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
|
281 if specified, was sent; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
282 </listitem> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
283 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
284 <listitem> |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
285 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
|
286 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
|
287 </listitem> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
288 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
289 <listitem> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
290 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
|
291 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
|
292 </listitem> |
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 </list> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
295 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
296 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
297 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
298 Example: |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
299 <example> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
300 upstream backend { |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
301 zone upstream_backend 10m; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
302 server 127.0.0.1:12345; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
303 } |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
304 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
305 match http { |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
306 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
|
307 expect ~ "200 OK"; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
308 } |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
309 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
310 server { |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
311 listen 12346; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
312 proxy_pass backend; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
313 health_check match=http; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
314 } |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
315 </example> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
316 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
317 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
318 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
319 <note> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
320 Only the first |
1654
f5dcf57c5eb5
Corrected note in the stream "match" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1636
diff
changeset
|
321 <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
|
322 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
|
323 </note> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
324 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
325 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
326 </directive> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
327 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
328 </section> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
329 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
330 </module> |