changeset 1566:0ca33afb461b

Added the http2 module.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 15 Sep 2015 21:00:27 +0300
parents 300349b7aef3
children 695999bdd4a5
files xml/en/GNUmakefile xml/en/docs/http/ngx_http_limit_conn_module.xml xml/en/docs/http/ngx_http_spdy_module.xml xml/en/docs/http/ngx_http_v2_module.xml xml/en/docs/index.xml xml/en/index.xml xml/ru/docs/http/ngx_http_limit_conn_module.xml xml/ru/docs/http/ngx_http_spdy_module.xml xml/ru/docs/index.xml xml/ru/index.xml
diffstat 10 files changed, 208 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/GNUmakefile
+++ b/xml/en/GNUmakefile
@@ -83,6 +83,7 @@ REFS =									\
 		http/ngx_http_upstream_conf_module			\
 		http/ngx_http_userid_module				\
 		http/ngx_http_uwsgi_module				\
+		http/ngx_http_v2_module					\
 		http/ngx_http_xslt_module				\
 		mail/ngx_mail_auth_http_module				\
 		mail/ngx_mail_core_module				\
--- a/xml/en/docs/http/ngx_http_limit_conn_module.xml
+++ b/xml/en/docs/http/ngx_http_limit_conn_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_limit_conn_module"
         link="/en/docs/http/ngx_http_limit_conn_module.html"
         lang="en"
-        rev="5">
+        rev="6">
 
 <section id="summary">
 
@@ -77,7 +77,7 @@ server {
 </example>
 allow only one connection per an IP address at a time.
 <note>
-In SPDY, each concurrent request is considered a separate connection.
+In HTTP/2 and SPDY, each concurrent request is considered a separate connection.
 </note>
 </para>
 
--- a/xml/en/docs/http/ngx_http_spdy_module.xml
+++ b/xml/en/docs/http/ngx_http_spdy_module.xml
@@ -9,7 +9,7 @@
 <module name="Module ngx_http_spdy_module"
         link="/en/docs/http/ngx_http_spdy_module.html"
         lang="en"
-        rev="7">
+        rev="8">
 
 <section id="summary">
 
@@ -34,7 +34,9 @@ configuration parameter.
 
 <para>
 <note>
-This module is not available in the <literal>nginx-plus-http2</literal> package.
+This module was superseded by the
+<link doc="ngx_http_v2_module.xml">ngx_http_v2_module</link> module
+in 1.9.5.
 </note>
 </para>
 
new file mode 100644
--- /dev/null
+++ b/xml/en/docs/http/ngx_http_v2_module.xml
@@ -0,0 +1,164 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright (C) Nginx, Inc.
+  -->
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Module ngx_http_v2_module"
+        link="/en/docs/http/ngx_http_v2_module.html"
+        lang="en"
+        rev="1">
+
+<section id="summary">
+
+<para>
+The <literal>ngx_http_v2_module</literal> module (1.9.5) provides
+support for <link url="https://tools.ietf.org/html/rfc7540">HTTP/2</link>
+and supersedes the
+<link doc="ngx_http_spdy_module.xml">ngx_http_spdy_module</link> module.
+</para>
+
+<para>
+This module is not built by default, it should be enabled with
+the <literal>--with-http_v2_module</literal>
+configuration parameter.
+</para>
+
+<para>
+<note>
+This module is also available as part of our
+<commercial_version>commercial subscription</commercial_version>
+in the <literal>nginx-plus-http2</literal> package of NGINX Plus
+<link url="https://www.nginx.com/blog/nginx-plus-r7-released/">release 7</link>.
+</note>
+</para>
+
+</section>
+
+
+<section id="example" name="Example Configuration">
+
+<para>
+<example>
+server {
+    listen 443 ssl http2;
+
+    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 HTTP/2 connections
+simultaneously on the same port, the
+<link url="http://www.openssl.org">OpenSSL</link> library used should support
+the “Application-Layer Protocol Negotiation” (ALPN) TLS extension
+available only since OpenSSL version 1.0.2.
+Accepting both types of connections with the
+“Next Protocol Negotiation” (NPN) TLS extension available since OpenSSL
+version 1.0.1 is possible but not guaranteed.
+</note>
+</para>
+
+</section>
+
+
+<section id="directives" name="Directives">
+
+<directive name="http2_chunk_size">
+<syntax><value>size</value></syntax>
+<default>8k</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+Sets the maximum size of chunks
+into which the response body is sliced.
+A too low value results in higher overhead.
+A too high value impairs prioritization due to
+<link url="http://en.wikipedia.org/wiki/Head-of-line_blocking">
+HOL blocking</link>.
+</para>
+
+</directive>
+
+
+<directive name="http2_idle_timeout">
+<syntax><value>time</value></syntax>
+<default>3m</default>
+<context>http</context>
+<context>server</context>
+
+<para>
+Sets the timeout of inactivity after which the connection is closed.
+</para>
+
+</directive>
+
+
+<directive name="http2_max_concurrent_streams">
+<syntax><value>number</value></syntax>
+<default>128</default>
+<context>http</context>
+<context>server</context>
+
+<para>
+Sets the maximum number of concurrent HTTP/2 streams
+in a connection.
+</para>
+
+</directive>
+
+
+<directive name="http2_recv_buffer_size">
+<syntax><value>size</value></syntax>
+<default>256k</default>
+<context>http</context>
+
+<para>
+Sets the size of the per worker input buffer.
+</para>
+
+</directive>
+
+
+<directive name="http2_recv_timeout">
+<syntax><value>time</value></syntax>
+<default>30s</default>
+<context>http</context>
+<context>server</context>
+
+<para>
+Sets the timeout for expecting more data from the client,
+after which the connection is closed.
+</para>
+
+</directive>
+
+</section>
+
+
+<section id="variables" name="Embedded Variables">
+
+<para>
+The <literal>ngx_http_v2_module</literal> module
+supports the following embedded variables:
+<list type="tag" compact="no">
+
+<tag-name id="var_http2"><var>$http2</var></tag-name>
+<tag-desc>
+negotiated protocol identifier:
+“<literal>h2</literal>” for HTTP/2 over TLS,
+“<literal>h2c</literal>” for HTTP/2 over cleartext TCP,
+or an empty string otherwise.
+</tag-desc>
+
+</list>
+</para>
+
+</section>
+
+</module>
--- a/xml/en/docs/index.xml
+++ b/xml/en/docs/index.xml
@@ -8,7 +8,7 @@
 <article name="nginx documentation"
          link="/en/docs/"
          lang="en"
-         rev="22"
+         rev="23"
          toc="no">
 
 
@@ -420,6 +420,11 @@ ngx_http_uwsgi_module</link>
 </listitem>
 
 <listitem>
+<link doc="http/ngx_http_v2_module.xml">
+ngx_http_v2_module</link>
+</listitem>
+
+<listitem>
 <link doc="http/ngx_http_xslt_module.xml">
 ngx_http_xslt_module</link>
 </listitem>
--- a/xml/en/index.xml
+++ b/xml/en/index.xml
@@ -8,7 +8,7 @@
 <article name="nginx"
          link="/en/"
          lang="en"
-         rev="43">
+         rev="44">
 
 
 <section>
@@ -94,7 +94,12 @@ parallel if they are handled by proxied 
 
 <listitem>
 <link doc="docs/http/ngx_http_ssl_module.xml">SSL and
-TLS SNI support</link>.
+TLS SNI support</link>;
+</listitem>
+
+<listitem>
+Support for <link doc="docs/http/ngx_http_v2_module.xml">HTTP/2</link>
+with weighted and dependency-based prioritization.
 </listitem>
 
 </list>
--- a/xml/ru/docs/http/ngx_http_limit_conn_module.xml
+++ b/xml/ru/docs/http/ngx_http_limit_conn_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_limit_conn_module"
         link="/ru/docs/http/ngx_http_limit_conn_module.html"
         lang="ru"
-        rev="5">
+        rev="6">
 
 <section id="summary">
 
@@ -76,7 +76,7 @@ server {
 разрешают одновременно обрабатывать не более одного соединения с одного
 IP-адреса.
 <note>
-В SPDY каждый параллельный запрос считается отдельным соединением.
+В HTTP/2 и SPDY каждый параллельный запрос считается отдельным соединением.
 </note>
 </para>
 
--- a/xml/ru/docs/http/ngx_http_spdy_module.xml
+++ b/xml/ru/docs/http/ngx_http_spdy_module.xml
@@ -9,7 +9,7 @@
 <module name="Модуль ngx_http_spdy_module"
         link="/ru/docs/http/ngx_http_spdy_module.html"
         lang="ru"
-        rev="6">
+        rev="8">
 
 <section id="summary">
 
@@ -32,6 +32,14 @@ 2</link> протокола SPDY.
 <literal>--with-http_spdy_module</literal>.
 </para>
 
+<para>
+<note>
+Этот модуль был заменён модулем
+<link doc="http/ngx_http_v2_module.xml">ngx_http_v2_module</link>
+в версии 1.9.5.
+</note>
+</para>
+
 </section>
 
 
--- a/xml/ru/docs/index.xml
+++ b/xml/ru/docs/index.xml
@@ -8,7 +8,7 @@
 <article name="nginx: документация"
          link="/ru/docs/"
          lang="ru"
-         rev="22"
+         rev="23"
          toc="no">
 
 
@@ -424,6 +424,11 @@ ngx_http_uwsgi_module</link>
 </listitem>
 
 <listitem>
+<link doc="http/ngx_http_v2_module.xml">
+ngx_http_v2_module</link> [en]
+</listitem>
+
+<listitem>
 <link doc="http/ngx_http_xslt_module.xml">
 ngx_http_xslt_module</link>
 </listitem>
--- a/xml/ru/index.xml
+++ b/xml/ru/index.xml
@@ -8,7 +8,7 @@
 <article name="nginx"
          link="/ru/"
          lang="ru"
-         rev="43">
+         rev="44">
 
 
 <section>
@@ -95,7 +95,12 @@ chunked ответы,
 
 <listitem>
 <link doc="docs/http/ngx_http_ssl_module.xml">Поддержка SSL и
-расширения TLS SNI</link>.
+расширения TLS SNI</link>;
+</listitem>
+
+<listitem>
+Поддержка <link doc="docs/http/ngx_http_v2_module.xml">HTTP/2</link>
+с приоритизацией на основе весов и зависимостей.
 </listitem>
 
 </list>