changeset 1122:594093ef96b1

Upstream: documented the "queue" directive.
author Yaroslav Zhuravlev <yar@nginx.com>
date Fri, 14 Mar 2014 14:17:07 +0000
parents 7d3d2bf39190
children 9a9aa8e9d12c
files xml/en/docs/http/ngx_http_upstream_module.xml xml/ru/docs/http/ngx_http_upstream_module.xml
diffstat 2 files changed, 73 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_upstream_module.xml	Fri Mar 14 09:30:57 2014 +0000
+++ b/xml/en/docs/http/ngx_http_upstream_module.xml	Fri Mar 14 14:17:07 2014 +0000
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_upstream_module"
         link="/en/docs/http/ngx_http_upstream_module.html"
         lang="en"
-        rev="13">
+        rev="14">
 
 <section id="summary">
 
@@ -191,7 +191,9 @@
 </note>
 </tag-desc>
 
-<tag-name><literal>max_conns</literal>=<value>number</value></tag-name>
+<tag-name id="max_conns">
+<literal>max_conns</literal>=<value>number</value>
+</tag-name>
 <tag-desc>
 limits the maximum <value>number</value> of simultaneous connections to the
 proxied server (1.5.9).
@@ -852,6 +854,41 @@
 </directive>
 
 
+<directive name="queue">
+<syntax>
+<value>number</value>
+[<literal>timeout</literal>=<value>time</value>]</syntax>
+<default/>
+<context>upstream</context>
+<appeared-in>1.5.12</appeared-in>
+
+<para>
+If an upstream server cannot be selected immediately
+while processing a request,
+and there are the servers in the group that have reached the
+<link id="max_conns"/> limit,
+the request will be placed into the queue.
+The directive specifies the maximum number of requests that can be in the queue
+at the same time.
+If the queue is filled up,
+or the server to pass the request to cannot been selected within
+the time period specified in the <literal>timeout</literal> parameter,
+an error will be returned to the client.
+</para>
+
+<para>
+The default value of the <literal>timeout</literal> parameter is 60 seconds.
+</para>
+
+<para>
+<note>
+This directive is available as part of our <commercial_version/>.
+</note>
+</para>
+
+</directive>
+
+
 <directive name="upstream_conf">
 <syntax/>
 <default/>
--- a/xml/ru/docs/http/ngx_http_upstream_module.xml	Fri Mar 14 09:30:57 2014 +0000
+++ b/xml/ru/docs/http/ngx_http_upstream_module.xml	Fri Mar 14 14:17:07 2014 +0000
@@ -361,6 +361,40 @@
 </directive>
 
 
+<directive name="queue">
+<syntax>
+<value>число</value>
+[<literal>timeout</literal>=<value>время</value>]</syntax>
+<default/>
+<context>upstream</context>
+<appeared-in>1.5.12</appeared-in>
+
+<para>
+Если при обработке запроса невозможно сразу выбрать сервер группы
+и в группе есть серверы, у которых число соединений достигло
+ограничения <link id="max_conns"/>,
+запрос будет помещён в очередь.
+Директива задаёт максимальное число запросов, которые могут одновременно
+находиться в очереди.
+Если очередь переполнена
+или за время, задаваемое параметром <literal>timeout</literal>,
+так и не удастся выбрать сервер для передачи ему запроса,
+клиенту будет возвращена ошибка.
+</para>
+
+<para>
+По умолчанию параметр <literal>timeout</literal> равен 60 секундам.
+</para>
+
+<para>
+<note>
+Эта директива доступна как часть <commercial_version/>.
+</note>
+</para>
+
+</directive>
+
+
 <directive name="least_conn">
 <syntax/>
 <default/>