comparison xml/en/docs/http/ngx_http_upstream_module.xml @ 1241:2246339a6a93

Upstream: added IDs for "server" and "health_check" params.
author Yaroslav Zhuravlev <yar@nginx.com>
date Wed, 02 Jul 2014 21:19:50 +0400
parents def99e640654
children 954dcc02cb63
comparison
equal deleted inserted replaced
1240:019f8273ee24 1241:2246339a6a93
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="26"> 13 rev="27">
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
143 143
144 <para> 144 <para>
145 The following parameters can be defined: 145 The following parameters can be defined:
146 <list type="tag"> 146 <list type="tag">
147 147
148 <tag-name><literal>weight</literal>=<value>number</value></tag-name> 148 <tag-name id="weight">
149 <literal>weight</literal>=<value>number</value>
150 </tag-name>
149 <tag-desc> 151 <tag-desc>
150 sets the weight of the server, by default, 1. 152 sets the weight of the server, by default, 1.
151 </tag-desc> 153 </tag-desc>
152 154
153 <tag-name><literal>max_fails</literal>=<value>number</value></tag-name> 155 <tag-name id="max_fails">
156 <literal>max_fails</literal>=<value>number</value>
157 </tag-name>
154 <tag-desc> 158 <tag-desc>
155 sets the number of unsuccessful attempts to communicate with the server 159 sets the number of unsuccessful attempts to communicate with the server
156 that should happen in the duration set by the <literal>fail_timeout</literal> 160 that should happen in the duration set by the <literal>fail_timeout</literal>
157 parameter to consider the server unavailable for a duration also set by the 161 parameter to consider the server unavailable for a duration also set by the
158 <literal>fail_timeout</literal> parameter. 162 <literal>fail_timeout</literal> parameter.
165 <link doc="ngx_http_scgi_module.xml" id="scgi_next_upstream"/>, and 169 <link doc="ngx_http_scgi_module.xml" id="scgi_next_upstream"/>, and
166 <link doc="ngx_http_memcached_module.xml" id="memcached_next_upstream"/> 170 <link doc="ngx_http_memcached_module.xml" id="memcached_next_upstream"/>
167 directives. 171 directives.
168 </tag-desc> 172 </tag-desc>
169 173
170 <tag-name><literal>fail_timeout</literal>=<value>time</value></tag-name> 174 <tag-name id="fail_timeout">
175 <literal>fail_timeout</literal>=<value>time</value>
176 </tag-name>
171 <tag-desc> 177 <tag-desc>
172 sets 178 sets
173 <list type="bullet"> 179 <list type="bullet">
174 180
175 <listitem> 181 <listitem>
183 189
184 </list> 190 </list>
185 By default, the parameter is set to 10 seconds. 191 By default, the parameter is set to 10 seconds.
186 </tag-desc> 192 </tag-desc>
187 193
188 <tag-name><literal>backup</literal></tag-name> 194 <tag-name id="backup">
195 <literal>backup</literal>
196 </tag-name>
189 <tag-desc> 197 <tag-desc>
190 marks the server as a backup server. 198 marks the server as a backup server.
191 It will be passed requests when the primary servers are unavailable. 199 It will be passed requests when the primary servers are unavailable.
192 </tag-desc> 200 </tag-desc>
193 201
194 <tag-name><literal>down</literal></tag-name> 202 <tag-name id="down">
203 <literal>down</literal>
204 </tag-name>
195 <tag-desc> 205 <tag-desc>
196 marks the server as permanently unavailable; used along with 206 marks the server as permanently unavailable; used along with
197 the <link id="ip_hash"/> directive. 207 the <link id="ip_hash"/> directive.
198 </tag-desc> 208 </tag-desc>
199 209
241 } 251 }
242 </example> 252 </example>
243 </para> 253 </para>
244 </tag-desc> 254 </tag-desc>
245 255
246 <tag-name><literal>route</literal>=<value>string</value></tag-name> 256 <tag-name id="route">
257 <literal>route</literal>=<value>string</value>
258 </tag-name>
247 <tag-desc> 259 <tag-desc>
248 sets the server route name. 260 sets the server route name.
249 </tag-desc> 261 </tag-desc>
250 262
251 <tag-name><literal>slow_start</literal>=<value>time</value></tag-name> 263 <tag-name id="slow_start">
264 <literal>slow_start</literal>=<value>time</value>
265 </tag-name>
252 <tag-desc> 266 <tag-desc>
253 sets the <value>time</value> during which the server will recover its weight 267 sets the <value>time</value> during which the server will recover its weight
254 from zero to a nominal value, when unhealthy server becomes 268 from zero to a nominal value, when unhealthy server becomes
255 <link id="health_check">healthy</link>, 269 <link id="health_check">healthy</link>,
256 or when the server becomes available after a period of time 270 or when the server becomes available after a period of time
257 it was considered unavailable. 271 it was considered <link id="fail_timeout">unavailable</link>.
258 Default value is zero, i.e. slow start is disabled. 272 Default value is zero, i.e. slow start is disabled.
259 </tag-desc> 273 </tag-desc>
260 274
261 </list> 275 </list>
262 </para> 276 </para>
514 528
515 </directive> 529 </directive>
516 530
517 531
518 <directive name="health_check"> 532 <directive name="health_check">
519 <syntax> 533 <syntax>[<value>parameters</value>]</syntax>
520 [<literal>interval=</literal><value>time</value>]
521 <!--
522 [<literal>jitter=</literal><value>time</value>]
523 -->
524 [<literal>fails=</literal><value>number</value>]
525 [<literal>passes=</literal><value>number</value>]
526 [<literal>uri=</literal><value>uri</value>]
527 [<literal>match=</literal><value>name</value>]</syntax>
528
529 <default/> 534 <default/>
530 <context>location</context> 535 <context>location</context>
531 536
532 <para> 537 <para>
533 Enables periodic health checks of the servers in a 538 Enables periodic health checks of the servers in a
534 <link id="upstream">group</link> referenced in the surrounding location. 539 <link id="upstream">group</link> referenced in the surrounding location.
535 </para> 540 </para>
536 541
537 <para> 542 <para>
538 The following optional parameters are supported: 543 The following optional parameters are supported:
539 <list type="bullet"> 544 <list type="tag">
540 545
541 <listitem> 546 <tag-name id="interval">
542 <literal>interval</literal> 547 <literal>interval</literal>=<value>time</value>
548 </tag-name>
549 <tag-desc>
543 sets the interval between two consecutive health checks, 550 sets the interval between two consecutive health checks,
544 by default, 5 seconds; 551 by default, 5 seconds;
545 </listitem> 552 </tag-desc>
546 553
547 <listitem> 554 <tag-name id="fails">
548 <literal>fails</literal> 555 <literal>fails</literal>=<value>number</value>
556 </tag-name>
557 <tag-desc>
549 sets the number of consecutive failed health checks of a particular server 558 sets the number of consecutive failed health checks of a particular server
550 after which this server will be considered unhealthy, 559 after which this server will be considered unhealthy,
551 by default, 1; 560 by default, 1;
552 </listitem> 561 </tag-desc>
553 562
554 <listitem> 563 <tag-name id="passes">
555 <literal>passes</literal> 564 <literal>passes</literal>=<value>number</value>
565 </tag-name>
566 <tag-desc>
556 sets the number of consecutive passed health checks of a particular server 567 sets the number of consecutive passed health checks of a particular server
557 after which the server will be considered healthy, 568 after which the server will be considered healthy,
558 by default, 1; 569 by default, 1;
559 </listitem> 570 </tag-desc>
560 571
561 <listitem> 572 <tag-name id="uri">
562 <literal>uri</literal> 573 <literal>uri</literal>=<value>uri</value>
574 </tag-name>
575 <tag-desc>
563 defines the URI used in health check requests, 576 defines the URI used in health check requests,
564 by default, “<literal>/</literal>”; 577 by default, “<literal>/</literal>”;
565 </listitem> 578 </tag-desc>
566 579
567 <listitem> 580 <tag-name id="hc_match">
568 <literal>match</literal> 581 <literal>match</literal>=<value>name</value>
582 </tag-name>
583 <tag-desc>
569 specifies the <literal>match</literal> block configuring the tests that a 584 specifies the <literal>match</literal> block configuring the tests that a
570 response should pass in order for a health check to pass; 585 response should pass in order for a health check to pass;
571 by default, the response should have status code 2xx or 3xx. 586 by default, the response should have status code 2xx or 3xx.
572 </listitem> 587 </tag-desc>
573 588
574 </list> 589 </list>
575 </para> 590 </para>
576 591
577 <para> 592 <para>