comparison xml/en/docs/stream/ngx_stream_upstream_module.xml @ 2191:2c56f91c304a

Documented the "random" directive.
author Vladimir Homutov <vl@nginx.com>
date Fri, 08 Jun 2018 13:58:05 +0300
parents 27c53e1cb4b6
children 5ad35130cc7f
comparison
equal deleted inserted replaced
2190:dfc49994218c 2191:2c56f91c304a
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="27"> 12 rev="28">
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)
495 </note> 495 </note>
496 </para> 496 </para>
497 497
498 </directive> 498 </directive>
499 499
500
501 <directive name="random">
502 <syntax>[<literal>two</literal> [<value>method</value>]]</syntax>
503 <default/>
504 <context>upstream</context>
505 <appeared-in>1.15.1</appeared-in>
506
507 <para>
508 Specifies that a group should use a load balancing method where a connection
509 is passed to a randomly selected server, taking into account weights
510 of servers.
511 </para>
512
513 <para>
514 The optional <literal>two</literal> parameter
515 instructs nginx to randomly select
516 <link url="http://www.eecs.harvard.edu/~michaelm/postscripts/handbook2001.pdf">two</link>
517 servers and then choose a server
518 using the specified <literal>method</literal>.
519 The default method is <literal>least_conn</literal>
520 which passes a connection to a server
521 with the least number of active connections.
522 </para>
523
524 </directive>
525
500 </section> 526 </section>
501 527
502 528
503 <section id="variables" name="Embedded Variables"> 529 <section id="variables" name="Embedded Variables">
504 530