Mercurial > hg > nginx-site
diff 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 |
line wrap: on
line diff
--- a/xml/en/docs/stream/ngx_stream_upstream_module.xml Tue Jun 19 20:43:33 2018 +0300 +++ b/xml/en/docs/stream/ngx_stream_upstream_module.xml Fri Jun 08 13:58:05 2018 +0300 @@ -9,7 +9,7 @@ <module name="Module ngx_stream_upstream_module" link="/en/docs/stream/ngx_stream_upstream_module.html" lang="en" - rev="27"> + rev="28"> <section id="summary"> @@ -497,6 +497,32 @@ </directive> + +<directive name="random"> +<syntax>[<literal>two</literal> [<value>method</value>]]</syntax> +<default/> +<context>upstream</context> +<appeared-in>1.15.1</appeared-in> + +<para> +Specifies that a group should use a load balancing method where a connection +is passed to a randomly selected server, taking into account weights +of servers. +</para> + +<para> +The optional <literal>two</literal> parameter +instructs nginx to randomly select +<link url="http://www.eecs.harvard.edu/~michaelm/postscripts/handbook2001.pdf">two</link> +servers and then choose a server +using the specified <literal>method</literal>. +The default method is <literal>least_conn</literal> +which passes a connection to a server +with the least number of active connections. +</para> + +</directive> + </section>