[PATCH] Clarify meaning of limit_conn in SPDY connections

Gunnlaugur Thor Briem gunnlaugur at gmail.com
Tue Oct 14 16:58:20 UTC 2014


# HG changeset patch
# User Gunnlaugur Thor Briem <gunnlaugur at gmail.com>
# Date 1413305660 0
#      Tue Oct 14 16:54:20 2014 +0000
# Node ID 3674e10a9e22a622998b65badfe01da34579bb65
# Parent  2096ecf6de02bc9e8ae920c45c59bf6a4e2e38fb
Clarify meaning of limit_conn in SPDY connections

Be clear about limit_conn applying to concurrent requests, not connections.
The distinction matters for SPDY connections.

diff -r 2096ecf6de02 -r 3674e10a9e22 xml/en/docs/http/ngx_http_limit_conn_module.xml
--- a/xml/en/docs/http/ngx_http_limit_conn_module.xml	Mon Oct 13 17:32:03 2014 +0400
+++ b/xml/en/docs/http/ngx_http_limit_conn_module.xml	Tue Oct 14 16:54:20 2014 +0000
@@ -62,7 +62,7 @@
 
 <para>
 Sets the shared memory zone
-and the maximum allowed number of connections for a given key value.
+and the maximum allowed number of concurrent requests for a given key value.
 When this limit is exceeded, the server will return the
 <http-status code="503" text="Service Temporarily Unavailable"/>
 error in reply to a request.
@@ -75,15 +75,22 @@
         limit_conn addr 1;
     }
 </example>
-allow only one connection per an IP address at a time.
+allow only one request per an IP address at a time.
+<note>
+In SPDY connections, multiple requests may occur in parallel on the same
+connection; in that case, <literal>limit_conn</literal> applies to the number
+of parallel requests, not the number of connections (despite the name). In
+non-SPDY HTTP/HTTPS connections, there is only one request at a time per
+connection, so this distinction is not necessary.
+</note>
 </para>
 
 <para>
 When several <literal>limit_conn</literal> directives are specified,
 any configured limit will apply.
 For example, the following configuration will limit the number
-of connections to the server per a client IP and, at the same time,
-the total number of connections to the virtual host:
+of concurrent requests to the server per a client IP and, at the same time,
+the total number of concurrent requests to the virtual host:
 <example>
 limit_conn_zone $binary_remote_addr zone=perip:10m;
 limit_conn_zone $server_name zone=perserver:10m;



More information about the nginx-devel mailing list