diff xml/en/docs/http/ngx_http_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 f6e578b1b02d
children 03f8a9c5e8ae
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_upstream_module.xml	Tue Jun 19 20:43:33 2018 +0300
+++ b/xml/en/docs/http/ngx_http_upstream_module.xml	Fri Jun 08 13:58:05 2018 +0300
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_upstream_module"
         link="/en/docs/http/ngx_http_upstream_module.html"
         lang="en"
-        rev="70">
+        rev="71">
 
 <section id="summary">
 
@@ -804,6 +804,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 request
+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 request to a server
+with the least number of active connections.
+</para>
+
+</directive>
+
+
 <directive name="sticky">
 <syntax>
     <literal>cookie</literal> <value>name</value>