Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_upstream_module.xml @ 968:fa19bacf6e1e
Unified upstream server up/down state terminology.
The "down" word is reserved for usage with the flag of the same name, that
marks server as permanently unavailable.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Thu, 15 Aug 2013 15:54:23 +0400 |
parents | 95c3c3bbf1ce |
children | 7c542520b8f7 |
comparison
equal
deleted
inserted
replaced
967:81717ad0a9c9 | 968:fa19bacf6e1e |
---|---|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
9 | 9 |
10 <module name="Module ngx_http_upstream_module" | 10 <module name="Module ngx_http_upstream_module" |
11 link="/en/docs/http/ngx_http_upstream_module.html" | 11 link="/en/docs/http/ngx_http_upstream_module.html" |
12 lang="en" | 12 lang="en" |
13 rev="7"> | 13 rev="8"> |
14 | 14 |
15 <section id="summary"> | 15 <section id="summary"> |
16 | 16 |
17 <para> | 17 <para> |
18 The <literal>ngx_http_upstream_module</literal> module | 18 The <literal>ngx_http_upstream_module</literal> module |
147 | 147 |
148 <tag-name><literal>max_fails</literal>=<value>number</value></tag-name> | 148 <tag-name><literal>max_fails</literal>=<value>number</value></tag-name> |
149 <tag-desc> | 149 <tag-desc> |
150 sets the number of unsuccessful attempts to communicate with the server | 150 sets the number of unsuccessful attempts to communicate with the server |
151 that should happen in the duration set by the <literal>fail_timeout</literal> | 151 that should happen in the duration set by the <literal>fail_timeout</literal> |
152 parameter to consider the server down for a duration also set by the | 152 parameter to consider the server unavailable for a duration also set by the |
153 <literal>fail_timeout</literal> parameter. | 153 <literal>fail_timeout</literal> parameter. |
154 By default, the number of unsuccessful attempts is set to 1. | 154 By default, the number of unsuccessful attempts is set to 1. |
155 The zero value disables the accounting of attempts. | 155 The zero value disables the accounting of attempts. |
156 What is considered an unsuccessful attempt is defined by the | 156 What is considered an unsuccessful attempt is defined by the |
157 <link doc="ngx_http_proxy_module.xml" id="proxy_next_upstream"/>, | 157 <link doc="ngx_http_proxy_module.xml" id="proxy_next_upstream"/>, |
165 sets | 165 sets |
166 <list type="bullet"> | 166 <list type="bullet"> |
167 | 167 |
168 <listitem> | 168 <listitem> |
169 the time during which the specified number of unsuccessful attempts to | 169 the time during which the specified number of unsuccessful attempts to |
170 communicate with the server should happen to consider the server down; | 170 communicate with the server should happen to consider the server unavailable; |
171 </listitem> | 171 </listitem> |
172 | 172 |
173 <listitem> | 173 <listitem> |
174 and the period of time the server will be considered down. | 174 and the period of time the server will be considered unavailable. |
175 </listitem> | 175 </listitem> |
176 | 176 |
177 </list> | 177 </list> |
178 By default, the parameter is set to 10 seconds. | 178 By default, the parameter is set to 10 seconds. |
179 </tag-desc> | 179 </tag-desc> |
182 <tag-desc> | 182 <tag-desc> |
183 sets the <value>time</value> during which the server will recover its weight | 183 sets the <value>time</value> during which the server will recover its weight |
184 from zero to a nominal value, when unhealthy server becomes | 184 from zero to a nominal value, when unhealthy server becomes |
185 <link id="health_check">healthy</link>, | 185 <link id="health_check">healthy</link>, |
186 or when the server becomes available after a period of time | 186 or when the server becomes available after a period of time |
187 it was considered down. | 187 it was considered unavailable. |
188 Default value is zero, i.e. slow start is disabled. | 188 Default value is zero, i.e. slow start is disabled. |
189 <note> | 189 <note> |
190 This functionality is available as part of our <commercial_version/> only. | 190 This functionality is available as part of our <commercial_version/> only. |
191 </note> | 191 </note> |
192 </tag-desc> | 192 </tag-desc> |
193 | 193 |
194 <tag-name><literal>backup</literal></tag-name> | 194 <tag-name><literal>backup</literal></tag-name> |
195 <tag-desc> | 195 <tag-desc> |
196 marks the server as a backup server. | 196 marks the server as a backup server. |
197 It will be passed requests when the primary servers are down. | 197 It will be passed requests when the primary servers are unavailable. |
198 </tag-desc> | 198 </tag-desc> |
199 | 199 |
200 <tag-name><literal>down</literal></tag-name> | 200 <tag-name><literal>down</literal></tag-name> |
201 <tag-desc> | 201 <tag-desc> |
202 marks the server as permanently down; used along with | 202 marks the server as permanently unavailable; used along with |
203 the <link id="ip_hash"/> directive. | 203 the <link id="ip_hash"/> directive. |
204 </tag-desc> | 204 </tag-desc> |
205 | 205 |
206 </list> | 206 </list> |
207 </para> | 207 </para> |
255 Specifies that a group should use a load balancing method where requests | 255 Specifies that a group should use a load balancing method where requests |
256 are distributed between servers based on client IP addresses. | 256 are distributed between servers based on client IP addresses. |
257 The first three octets of the client IPv4 address, or the entire IPv6 address, | 257 The first three octets of the client IPv4 address, or the entire IPv6 address, |
258 are used as a hashing key. | 258 are used as a hashing key. |
259 The method ensures that requests from the same client will always be | 259 The method ensures that requests from the same client will always be |
260 passed to the same server except when this server is considered down. | 260 passed to the same server except when this server is unavailable. |
261 In the latter case client requests will be passed to another server. | 261 In the latter case client requests will be passed to another server. |
262 Most probably, it will always be the same server as well. | 262 Most probably, it will always be the same server as well. |
263 <note> | 263 <note> |
264 IPv6 addresses are supported starting from versions 1.3.2 and 1.2.2. | 264 IPv6 addresses are supported starting from versions 1.3.2 and 1.2.2. |
265 </note> | 265 </note> |
934 http://127.0.0.1/upstream_conf?add=&upstream=appservers&backup=&server=127.0.0.1:8080 | 934 http://127.0.0.1/upstream_conf?add=&upstream=appservers&backup=&server=127.0.0.1:8080 |
935 </example> | 935 </example> |
936 | 936 |
937 To add a new primary server to the group, | 937 To add a new primary server to the group, |
938 set its parameters to non-default values | 938 set its parameters to non-default values |
939 and mark it as “<literal>down</literal>” by sending: | 939 and mark it as “<literal>down</literal>”, send: |
940 <example> | 940 <example> |
941 http://127.0.0.1/upstream_conf?add=&upstream=appservers&server=127.0.0.1:8080&weight=2&max_fails=3&fail_timeout=3s&down= | 941 http://127.0.0.1/upstream_conf?add=&upstream=appservers&server=127.0.0.1:8080&weight=2&max_fails=3&fail_timeout=3s&down= |
942 </example> | 942 </example> |
943 </para> | 943 </para> |
944 | 944 |