changeset 869:ade81792bdaa

Documented SPDY support. New SPDY module added and the "listen" directive description is updated.
author Homutov Vladimir <vl@nginx.com>
date Wed, 20 Mar 2013 15:00:06 +0400
parents 17d0c825f098
children 6087d3fa6919
files xml/en/GNUmakefile xml/en/docs/http/ngx_http_core_module.xml xml/en/docs/http/ngx_http_spdy_module.xml xml/en/docs/index.xml xml/ru/GNUmakefile xml/ru/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_spdy_module.xml xml/ru/docs/index.xml
diffstat 8 files changed, 298 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/GNUmakefile
+++ b/xml/en/GNUmakefile
@@ -61,6 +61,7 @@ REFS =									\
 		http/ngx_http_referer_module				\
 		http/ngx_http_rewrite_module				\
 		http/ngx_http_secure_link_module			\
+		http/ngx_http_spdy_module				\
 		http/ngx_http_split_clients_module			\
 		http/ngx_http_ssi_module				\
 		http/ngx_http_ssl_module				\
--- 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="17">
+        rev="18">
 
 <section id="directives" name="Directives">
 
@@ -1102,6 +1102,8 @@ The “wait-read-ignore” cycle is repeated, but no longer than specified by the
 <syntax>
     <value>address</value>[:<value>port</value>]
     [<literal>default_server</literal>]
+    [<literal>ssl</literal>]
+    [<literal>spdy</literal>]
     [<literal>setfib</literal>=<value>number</value>]
     [<literal>backlog</literal>=<value>number</value>]
     [<literal>rcvbuf</literal>=<value>size</value>]
@@ -1110,11 +1112,12 @@ 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>ssl</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>
     [<literal>default_server</literal>]
+    [<literal>ssl</literal>]
+    [<literal>spdy</literal>]
     [<literal>setfib</literal>=<value>number</value>]
     [<literal>backlog</literal>=<value>number</value>]
     [<literal>rcvbuf</literal>=<value>size</value>]
@@ -1123,18 +1126,18 @@ 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>ssl</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>
     [<literal>default_server</literal>]
+    [<literal>ssl</literal>]
+    [<literal>spdy</literal>]
     [<literal>backlog</literal>=<value>number</value>]
     [<literal>rcvbuf</literal>=<value>size</value>]
     [<literal>sndbuf</literal>=<value>size</value>]
     [<literal>accept_filter</literal>=<value>filter</value>]
     [<literal>deferred</literal>]
     [<literal>bind</literal>]
-    [<literal>ssl</literal>]
     [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax>
 <default>*:80 | *:8000</default>
 <context>server</context>
@@ -1189,6 +1192,22 @@ In versions prior to 0.8.21 this paramet
 </para>
 
 <para>
+The <literal>ssl</literal> parameter (0.7.14) allows to specify that all
+connections accepted on this port should work in SSL mode.
+This allows for a more compact <link doc="configuring_https_servers.xml"
+id="single_http_https_server">configuration</link> for the server that
+handles both HTTP and HTTPS requests.
+</para>
+
+<para>
+The <literal>spdy</literal> parameter (1.3.15) allows to accept
+<link doc="ngx_http_spdy_module.xml">SPDY</link> connections on this port.
+Normally, for this to work the <literal>ssl</literal> parameter should be
+specified as well, but nginx can also be configured to accept SPDY
+connections without SSL.
+</para>
+
+<para>
 A <literal>listen</literal> directive
 can have several additional parameters specific to socket-related system calls.
 They can be specified in any
@@ -1301,18 +1320,6 @@ in effect for the socket.
 </tag-desc>
 
 <tag-name>
-<literal>ssl</literal>
-</tag-name>
-<tag-desc>
-this parameter (0.7.14) does not relate to socket-related system calls,
-but allows to specify that all connections accepted on this port
-should work in SSL mode.
-This allows for a more compact <link doc="configuring_https_servers.xml"
-id="single_http_https_server">configuration</link> for the server that
-handles both HTTP and HTTPS requests.
-</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>
new file mode 100644
--- /dev/null
+++ b/xml/en/docs/http/ngx_http_spdy_module.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright (C) Nginx, Inc.
+  -->
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Module ngx_http_spdy_module"
+        link="/en/docs/http/ngx_http_spdy_module.html"
+        lang="en"
+        rev="1">
+
+<section id="summary">
+
+<para>
+The <literal>ngx_http_spdy_module</literal> module provides experimental
+support for <link url="http://www.chromium.org/spdy/spdy-protocol">SPDY</link>.
+Currently,
+<link url="http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2">draft
+2</link> of SPDY protocol is implemented.
+</para>
+
+<para>
+This module is not built by default, it should be enabled with
+the <literal>--with-http_spdy_module</literal>
+configuration parameter.
+</para>
+
+</section>
+
+
+<section id="bugs" name="Known Bugs">
+
+<para>
+The module is experimental, caveat emptor applies.
+</para>
+
+<para>
+Current implementation of SPDY protocol does not support “server push”.
+</para>
+
+<para>
+Processing of requests from SPDY connections cannot be rate
+<link doc="ngx_http_limit_req_module.xml">limited</link>.
+</para>
+
+</section>
+
+
+<section id="example" name="Example Configuration">
+
+<para>
+<example>
+server {
+    listen 443 ssl spdy;
+
+    ssl_certificate server.crt;
+    ssl_certificate_key server.key;
+    ...
+}
+</example>
+<note>
+Note that in order to accept both
+<link doc="ngx_http_ssl_module.xml">HTTPS</link> and SPDY connections
+simultaneously on the same port,
+<link url="http://www.openssl.org">OpenSSL</link> library used should support
+“Next Protocol Negotiation” TLS extension, available since OpenSSL
+version 1.0.1.
+</note>
+</para>
+
+</section>
+
+
+<section id="directives" name="Directives">
+
+<directive name="spdy_headers_comp">
+<syntax><value>level</value></syntax>
+<default>0</default>
+<context>http</context>
+<context>server</context>
+
+<para>
+Sets a header compression <value>level</value> of a response in a range from
+1 (fastest, less compression) to 9 (slowest, best compression).
+The special value 0 turns off header compression.
+</para>
+
+</directive>
+
+</section>
+
+
+<section id="variables" name="Embedded Variables">
+
+<para>
+The <literal>ngx_http_spdy_module</literal> module
+supports the following embedded variables:
+<list type="tag" compact="no">
+
+<tag-name id="var_spdy"><var>$spdy</var></tag-name>
+<tag-desc>
+SPDY protocol version for SPDY connections,
+or an empty string otherwise;
+</tag-desc>
+
+<tag-name id="var_spdy_request_priority"><var>$spdy_request_priority</var>
+</tag-name>
+<tag-desc>
+request priority for SPDY connections,
+or an empty string otherwise.
+</tag-desc>
+
+</list>
+</para>
+
+</section>
+
+</module>
--- a/xml/en/docs/index.xml
+++ b/xml/en/docs/index.xml
@@ -288,6 +288,11 @@ ngx_http_secure_link_module</link>
 </listitem>
 
 <listitem>
+<link doc="http/ngx_http_spdy_module.xml">
+ngx_http_spdy_module</link>
+</listitem>
+
+<listitem>
 <link doc="http/ngx_http_split_clients_module.xml">
 ngx_http_split_clients_module</link>
 </listitem>
--- a/xml/ru/GNUmakefile
+++ b/xml/ru/GNUmakefile
@@ -53,6 +53,7 @@ REFS =									\
 		http/ngx_http_referer_module				\
 		http/ngx_http_rewrite_module				\
 		http/ngx_http_secure_link_module			\
+		http/ngx_http_spdy_module				\
 		http/ngx_http_split_clients_module			\
 		http/ngx_http_ssi_module				\
 		http/ngx_http_ssl_module				\
--- 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="17">
+        rev="18">
 
 <section id="directives" name="Директивы">
 
@@ -1088,6 +1088,8 @@ location /flv/ {
 <syntax>
     <value>адрес</value>[:<value>порт</value>]
     [<literal>default_server</literal>]
+    [<literal>ssl</literal>]
+    [<literal>spdy</literal>]
     [<literal>setfib</literal>=<value>число</value>]
     [<literal>backlog</literal>=<value>число</value>]
     [<literal>rcvbuf</literal>=<value>размер</value>]
@@ -1096,11 +1098,12 @@ location /flv/ {
     [<literal>deferred</literal>]
     [<literal>bind</literal>]
     [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>]
-    [<literal>ssl</literal>]
     [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax>
 <syntax>
     <value>порт</value>
     [<literal>default_server</literal>]
+    [<literal>ssl</literal>]
+    [<literal>spdy</literal>]
     [<literal>setfib</literal>=<value>число</value>]
     [<literal>backlog</literal>=<value>число</value>]
     [<literal>rcvbuf</literal>=<value>размер</value>]
@@ -1109,18 +1112,18 @@ location /flv/ {
     [<literal>deferred</literal>]
     [<literal>bind</literal>]
     [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>]
-    [<literal>ssl</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>
     [<literal>default_server</literal>]
+    [<literal>ssl</literal>]
+    [<literal>spdy</literal>]
     [<literal>backlog</literal>=<value>число</value>]
     [<literal>rcvbuf</literal>=<value>размер</value>]
     [<literal>sndbuf</literal>=<value>размер</value>]
     [<literal>accept_filter</literal>=<value>фильтр</value>]
     [<literal>deferred</literal>]
     [<literal>bind</literal>]
-    [<literal>ssl</literal>]
     [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax>
 <default>*:80 | *:8000</default>
 <context>server</context>
@@ -1174,6 +1177,22 @@ listen unix:/var/run/nginx.sock;
 </para>
 
 <para>
+Параметр <literal>ssl</literal>(0.7.14) позволяет указать, что все соединения,
+принимаемые на этом порту, должны работать в режиме SSL.
+Это позволяет задать компактную <link doc="configuring_https_servers.xml"
+id="single_http_https_server">конфигурацию</link> для сервера,
+работающего сразу в двух режимах — HTTP и HTTPS.
+</para>
+
+<para>
+Параметр <literal>spdy</literal> (1.3.15) позволяет принимать на этом порту
+<link doc="ngx_http_spdy_module.xml">SPDY</link>-соединения.
+Обычно, чтобы это работало, следует также указать параметр
+<literal>ssl</literal>, однако nginx можно также настроить и на приём
+SPDY-соединений без SSL.
+</para>
+
+<para>
 В директиве <literal>listen</literal> можно также указать несколько
 дополнительных параметров, специфичных для связанных с сокетами
 системных вызовов.
@@ -1285,18 +1304,6 @@ FreeBSD и Mac OS X, и 511 для других платформ.
 </tag-desc>
 
 <tag-name>
-<literal>ssl</literal>
-</tag-name>
-<tag-desc>
-этот параметр (0.7.14) не имеет отношения к связанным с сокетами системным
-вызовам, а позволяет указать, что все соединения, принимаемые на этом порту,
-должны работать в режиме SSL.
-Это позволяет задать компактную <link doc="configuring_https_servers.xml"
-id="single_http_https_server">конфигурацию</link> для сервера,
-работающего сразу в двух режимах — HTTP и HTTPS.
-</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>
new file mode 100644
--- /dev/null
+++ b/xml/ru/docs/http/ngx_http_spdy_module.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright (C) Nginx, Inc.
+  -->
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Модуль ngx_http_spdy_module"
+        link="/ru/docs/http/ngx_http_spdy_module.html"
+        lang="ru"
+        rev="1">
+
+<section id="summary">
+
+<para>
+Модуль <literal>ngx_http_spdy_module</literal> обеспечивает экспериментальную
+поддержку <link url="http://www.chromium.org/spdy/spdy-protocol">SPDY</link>.
+В настоящий момент реализован
+<link url="http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2">draft
+2</link> протокола SPDY.
+</para>
+
+<para>
+По умолчанию этот модуль не собирается, его сборку необходимо
+разрешить с помощью конфигурационного параметра
+<literal>--with-http_spdy_module</literal>.
+</para>
+
+</section>
+
+
+<section id="bugs" name="Известные проблемы">
+
+<para>
+Модуль экспериментальный, поэтому возможно всё.
+</para>
+
+<para>
+Текущая реализация протокола SPDY не поддерживает server push.
+</para>
+
+<para>
+Скорость обработки запросов в SPDY-соединении не может быть
+<link doc="ngx_http_limit_req_module.xml">ограничена</link>.
+</para>
+
+</section>
+
+
+<section id="example" name="Пример конфигурации">
+
+<para>
+<example>
+server {
+    listen 443 ssl spdy;
+
+    ssl_certificate server.crt;
+    ssl_certificate_key server.key;
+    ...
+}
+</example>
+<note>
+Для того чтобы одновременно принимать
+<link doc="ngx_http_ssl_module.xml">HTTPS</link> и
+SPDY соединения на том же порту,
+используемая библиотека <link url="http://www.openssl.org">OpenSSL</link>
+должна поддерживать расширение Next Protocol Negotiation протокола TLS,
+доступное с версии OpenSSL 1.0.1.
+</note>
+</para>
+
+</section>
+
+
+<section id="directives" name="Директивы">
+
+<directive name="spdy_headers_comp">
+<syntax><value>степень</value></syntax>
+<default>0</default>
+<context>http</context>
+<context>server</context>
+
+<para>
+Устанавливает <value>степень</value> сжатия заголовков ответа
+в диапазоне от 1 (быстрее, но хуже сжатие) до 9 (медленнее, лучшее сжатие).
+Специальное значение 0 отключает сжатие заголовков.
+</para>
+
+</directive>
+
+</section>
+
+
+<section id="variables" name="Встроенные переменные">
+
+<para>
+Модуль <literal>ngx_http_spdy_module</literal>
+поддерживает следующие встроенные переменные:
+<list type="tag" compact="no">
+
+<tag-name id="var_spdy"><var>$spdy</var></tag-name>
+<tag-desc>
+версия протокола SPDY для SPDY-соединений,
+либо пустая строка;
+</tag-desc>
+
+<tag-name id="var_spdy_request_priority"><var>$spdy_request_priority</var>
+</tag-name>
+<tag-desc>
+приоритет запроса для SPDY-соединений,
+либо пустая строка.
+</tag-desc>
+
+</list>
+</para>
+
+</section>
+
+</module>
--- a/xml/ru/docs/index.xml
+++ b/xml/ru/docs/index.xml
@@ -276,6 +276,11 @@ ngx_http_secure_link_module</link>
 </listitem>
 
 <listitem>
+<link doc="http/ngx_http_spdy_module.xml">
+ngx_http_spdy_module</link>
+</listitem>
+
+<listitem>
 <link doc="http/ngx_http_split_clients_module.xml">
 ngx_http_split_clients_module</link>
 </listitem>