Mercurial > hg > nginx-site
changeset 1493:9faa78768252
Documented the "reuseport" option of the "listen" directive.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Mon, 25 May 2015 20:48:34 +0300 |
parents | 9b8df6c3cf3e |
children | 7ef6df8b652e |
files | xml/en/docs/http/ngx_http_core_module.xml xml/en/docs/stream/ngx_stream_core_module.xml xml/ru/docs/http/ngx_http_core_module.xml |
diffstat | 3 files changed, 54 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_core_module.xml +++ b/xml/en/docs/http/ngx_http_core_module.xml @@ -10,7 +10,7 @@ <module name="Module ngx_http_core_module" link="/en/docs/http/ngx_http_core_module.html" lang="en" - rev="39"> + rev="40"> <section id="directives" name="Directives"> @@ -1129,6 +1129,7 @@ The “wait-read-ignore” cycle is repeated, but no longer than specified by the [<literal>deferred</literal>] [<literal>bind</literal>] [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] + [<literal>reuseport</literal>] [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax> <syntax> <value>port</value> @@ -1145,6 +1146,7 @@ The “wait-read-ignore” cycle is repeated, but no longer than specified by the [<literal>deferred</literal>] [<literal>bind</literal>] [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] + [<literal>reuseport</literal>] [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax> <syntax> <literal>unix:</literal><value>path</value> @@ -1366,6 +1368,21 @@ in effect for the socket. </tag-desc> <tag-name> +<literal>reuseport</literal> +</tag-name> +<tag-desc> +this parameter (1.9.1) instructs to create an individual listening socket +for each worker process +(using the <c-def>SO_REUSEPORT</c-def> socket option), allowing a kernel +to distribute incoming connections between worker processes more effectively. +This currently works only on Linux and DragonFly BSD. +<note> +Inappropriate use of this option may have its security +<link url="http://man7.org/linux/man-pages/man7/socket.7.html">implications</link>. +</note> +</tag-desc> + +<tag-name> <literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>] </tag-name> <tag-desc>
--- a/xml/en/docs/stream/ngx_stream_core_module.xml +++ b/xml/en/docs/stream/ngx_stream_core_module.xml @@ -9,7 +9,7 @@ <module name="Module ngx_stream_core_module" link="/en/docs/stream/ngx_stream_core_module.html" lang="en" - rev="3"> + rev="4"> <section id="summary"> @@ -67,6 +67,7 @@ stream { [<literal>ssl</literal>] [<literal>bind</literal>] [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] + [<literal>reuseport</literal>] [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax> <default/> <context>server</context> @@ -138,6 +139,21 @@ It can only be set once on start. </tag-desc> <tag-name> +<literal>reuseport</literal> +</tag-name> +<tag-desc> +this parameter (1.9.1) instructs to create an individual listening socket +for each worker process +(using the <c-def>SO_REUSEPORT</c-def> socket option), allowing a kernel +to distribute incoming connections between worker processes more effectively. +This currently works only on Linux and DragonFly BSD. +<note> +Inappropriate use of this option may have its security +<link url="http://man7.org/linux/man-pages/man7/socket.7.html">implications</link>. +</note> +</tag-desc> + +<tag-name> <literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>] </tag-name> <tag-desc>
--- a/xml/ru/docs/http/ngx_http_core_module.xml +++ b/xml/ru/docs/http/ngx_http_core_module.xml @@ -10,7 +10,7 @@ <module name="Модуль ngx_http_core_module" link="/ru/docs/http/ngx_http_core_module.html" lang="ru" - rev="39"> + rev="40"> <section id="directives" name="Директивы"> @@ -1124,6 +1124,7 @@ location /flv/ { [<literal>deferred</literal>] [<literal>bind</literal>] [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] + [<literal>reuseport</literal>] [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax> <syntax> <value>порт</value> @@ -1140,6 +1141,7 @@ location /flv/ { [<literal>deferred</literal>] [<literal>bind</literal>] [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] + [<literal>reuseport</literal>] [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax> <syntax> <literal>unix:</literal><value>путь</value> @@ -1361,6 +1363,22 @@ FreeBSD и Mac OS X, и 511 для других платформ. </tag-desc> <tag-name> +<literal>reuseport</literal> +</tag-name> +<tag-desc> +этот параметр (1.9.1) указывает, что нужно создавать отдельный слушающий сокет +для каждого рабочего процесса +(через параметр сокета <c-def>SO_REUSEPORT</c-def>), позволяя ядру +эффективнее распределять входящие соединения между рабочими процессами. +В настоящий момент это работает только на Linux и DragonFly BSD. +<note> +Ненадлежащее использование параметра может иметь +<link url="http://man7.org/linux/man-pages/man7/socket.7.html">последствия</link> +в плане безопасности. +</note> +</tag-desc> + +<tag-name> <literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>] </tag-name> <tag-desc>