Mercurial > hg > nginx-site
comparison xml/en/docs/stream/ngx_stream_upstream_module.xml @ 1925:a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 08 Mar 2017 18:05:46 +0300 |
parents | 6225d50b3cba |
children | 6b6d0e844bf7 |
comparison
equal
deleted
inserted
replaced
1924:237a10fb98d2 | 1925:a58b35cc0823 |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Module ngx_stream_upstream_module" | 9 <module name="Module ngx_stream_upstream_module" |
10 link="/en/docs/stream/ngx_stream_upstream_module.html" | 10 link="/en/docs/stream/ngx_stream_upstream_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="23"> | 12 rev="24"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The <literal>ngx_stream_upstream_module</literal> module (1.9.0) | 17 The <literal>ngx_stream_upstream_module</literal> module (1.9.0) |
449 | 449 |
450 </directive> | 450 </directive> |
451 | 451 |
452 | 452 |
453 <directive name="least_time"> | 453 <directive name="least_time"> |
454 <syntax><literal>connect</literal> | | 454 <syntax> |
455 <literal>first_byte</literal> | | 455 <literal>connect</literal> | |
456 <literal>last_byte</literal></syntax> | 456 <literal>first_byte</literal> | |
457 <literal>last_byte</literal> | |
458 [<literal>inflight</literal>]</syntax> | |
457 <default/> | 459 <default/> |
458 <context>upstream</context> | 460 <context>upstream</context> |
459 | 461 |
460 <para> | 462 <para> |
461 Specifies that a group should use a load balancing method where a connection | 463 Specifies that a group should use a load balancing method where a connection |
470 time to connect to the upstream server is used. | 472 time to connect to the upstream server is used. |
471 If the <literal>first_byte</literal> parameter is specified, | 473 If the <literal>first_byte</literal> parameter is specified, |
472 time to receive the first byte of data is used. | 474 time to receive the first byte of data is used. |
473 If the <literal>last_byte</literal> is specified, | 475 If the <literal>last_byte</literal> is specified, |
474 time to receive the last byte of data is used. | 476 time to receive the last byte of data is used. |
477 If the <literal>inflight</literal> parameter is specified (1.11.6), | |
478 incomplete connections are also taken into account. | |
479 <note> | |
480 Prior to version 1.11.6, | |
481 incomplete connections were taken into account by default. | |
482 </note> | |
475 </para> | 483 </para> |
476 | 484 |
477 <para> | 485 <para> |
478 <note> | 486 <note> |
479 This directive is available as part of our | 487 This directive is available as part of our |
531 sets the number of consecutive passed health checks of a particular server | 539 sets the number of consecutive passed health checks of a particular server |
532 after which the server will be considered healthy, | 540 after which the server will be considered healthy, |
533 by default, 1. | 541 by default, 1. |
534 </tag-desc> | 542 </tag-desc> |
535 | 543 |
544 <tag-name id="health_check_mandatory"> | |
545 <literal>mandatory</literal> | |
546 </tag-name> | |
547 <tag-desc> | |
548 sets the initial “checking” state for a server | |
549 until the first health check is completed (1.11.7). | |
550 If the parameter is not specified, | |
551 the server will be initially considered healthy. | |
552 </tag-desc> | |
553 | |
536 <tag-name id="hc_match"> | 554 <tag-name id="hc_match"> |
537 <literal>match</literal>=<value>name</value> | 555 <literal>match</literal>=<value>name</value> |
538 </tag-name> | 556 </tag-name> |
539 <tag-desc> | 557 <tag-desc> |
540 specifies the <literal>match</literal> block configuring the tests that a | 558 specifies the <literal>match</literal> block configuring the tests that a |
541 successful connection should pass in order for a health check to pass. | 559 successful connection should pass in order for a health check to pass. |
542 By default, | 560 By default, for TCP, only the ability |
543 only the ability to establish a TCP connection with the server is checked. | 561 to establish a TCP connection with the server is checked. |
562 For <link id="health_check_udp">UDP</link>, the absence of | |
563 ICMP “<literal>Destination Unreachable</literal>” message is expected | |
564 in reply to the sent string “<literal>nginx health check</literal>”. | |
565 <note> | |
566 Prior to version 1.11.7, by default, UDP health check | |
567 required a <link id="hc_match">match</link> block with the | |
568 <link id="match_send">send</link> and <link id="match_expect">expect</link> | |
569 parameters. | |
570 </note> | |
544 </tag-desc> | 571 </tag-desc> |
545 | 572 |
546 <tag-name id="health_check_port"> | 573 <tag-name id="health_check_port"> |
547 <literal>port</literal>=<value>number</value> | 574 <literal>port</literal>=<value>number</value> |
548 </tag-name> | 575 </tag-name> |
555 <tag-name id="health_check_udp"> | 582 <tag-name id="health_check_udp"> |
556 <literal>udp</literal> | 583 <literal>udp</literal> |
557 </tag-name> | 584 </tag-name> |
558 <tag-desc> | 585 <tag-desc> |
559 specifies that the <literal>UDP</literal> protocol should be used for | 586 specifies that the <literal>UDP</literal> protocol should be used for |
560 health checks instead of the default <literal>TCP</literal> protocol (1.9.13); | 587 health checks instead of the default <literal>TCP</literal> protocol (1.9.13). |
561 requires a <link id="hc_match">match</link> block with the | |
562 <link id="match_send">send</link> and <link id="match_expect">expect</link> | |
563 parameters. | |
564 </tag-desc> | 588 </tag-desc> |
565 | 589 |
566 </list> | 590 </list> |
567 </para> | 591 </para> |
568 | 592 |
577 will check the ability to establish a TCP connection to each server | 601 will check the ability to establish a TCP connection to each server |
578 in the <literal>backend</literal> group every five seconds. | 602 in the <literal>backend</literal> group every five seconds. |
579 When a connection to the server cannot be established, | 603 When a connection to the server cannot be established, |
580 the health check will fail, and the server will | 604 the health check will fail, and the server will |
581 be considered unhealthy. | 605 be considered unhealthy. |
582 Client connections are not passed to unhealthy servers. | 606 Client connections are not passed to unhealthy servers |
607 and servers in the “checking” state. | |
583 </para> | 608 </para> |
584 | 609 |
585 <para> | 610 <para> |
586 Health checks can also be configured to test data obtained from the server. | 611 Health checks can also be configured to test data obtained from the server. |
587 Tests are configured separately using the <link id="match"/> directive | 612 Tests are configured separately using the <link id="match"/> directive |