changeset 526:4f907cde0382

1.3.1 changes: ip_hash+weight, least_conn.
author Ruslan Ermilov <ru@nginx.com>
date Tue, 05 Jun 2012 21:42:57 +0000
parents 1dca638da1eb
children 58d79f8c412d
files xml/en/docs/http/ngx_http_upstream_module.xml xml/ru/docs/http/ngx_http_upstream_module.xml
diffstat 2 files changed, 51 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_upstream_module.xml	Tue Jun 05 14:35:31 2012 +0000
+++ b/xml/en/docs/http/ngx_http_upstream_module.xml	Tue Jun 05 21:42:57 2012 +0000
@@ -60,8 +60,6 @@
 </para>
 
 <para>
-It is not possible to specify a weight for servers using the
-<literal>ip_hash</literal> balancing method.
 If one of the servers needs to be temporarily removed, it should
 be marked with the <literal>down</literal> parameter in
 order to preserve the current hashing of client IP addresses.
@@ -81,6 +79,13 @@
 </example>
 </para>
 
+<para>
+<note>
+Until version 1.3.1 it was not possible to specify a weight for
+servers using the <literal>ip_hash</literal> balancing method.
+</note>
+</para>
+
 </directive>
 
 
@@ -204,6 +209,23 @@
 </directive>
 
 
+<directive name="least_conn">
+<syntax/>
+<default/>
+<context>upstream</context>
+<appeared-in>1.3.1</appeared-in>
+
+<para>
+Specifies that a group should use a balancing method where a request
+is passed to the server with the least number of active connections,
+taking into account weights of servers.
+If there are several such servers, they are tried in a
+weighted round-robin fashion.
+</para>
+
+</directive>
+
+
 <directive name="server">
 <syntax><value>name</value> [<value>parameters</value>]</syntax>
 <default/>
@@ -311,8 +333,8 @@
 </para>
 
 <para>
-Requests are distributed between servers in a round-robin fashion,
-taking into account the weights of servers.
+Requests are distributed between servers in a
+weighted round-robin fashion.
 In the above example, each 7 requests will be distributed as follows:
 5 requests to <literal>backend1.example.com</literal>
 and one request to each of second and third servers.
--- a/xml/ru/docs/http/ngx_http_upstream_module.xml	Tue Jun 05 14:35:31 2012 +0000
+++ b/xml/ru/docs/http/ngx_http_upstream_module.xml	Tue Jun 05 21:42:57 2012 +0000
@@ -63,8 +63,6 @@
 </para>
 
 <para>
-Для серверов, использующих метод распределения <literal>ip_hash</literal>,
-нельзя задать вес.
 Если один из серверов нужно убрать на некоторое время, то для сохранения
 текущего хэширования IP-адресов клиентов этот сервер нужно пометить
 параметром <literal>down</literal>.
@@ -84,6 +82,13 @@
 </example>
 </para>
 
+<para>
+<note>
+До версии 1.3.1 для серверов, использующих метод распределения
+<literal>ip_hash</literal>, нельзя было задать вес.
+</note>
+</para>
+
 </directive>
 
 
@@ -207,8 +212,25 @@
 </directive>
 
 
+<directive name="least_conn">
+<syntax/>
+<default/>
+<context>upstream</context>
+<appeared-in>1.3.1</appeared-in>
+
+<para>
+Задаёт для группы метод распределения запросов по серверам, при
+котором запрос передаётся серверу с наименьшим числом активных соединений,
+с учётом весов серверов.
+Если подходит сразу несколько серверов, они выбираются циклически
+(в режиме round-robin) с учётом их весов.
+</para>
+
+</directive>
+
+
 <directive name="server">
-<syntax><value>название</value> [<value>параметры</value>]</syntax>
+<syntax><value>имя</value> [<value>параметры</value>]</syntax>
 <default/>
 <context>upstream</context>