Mercurial > hg > nginx-site
comparison xml/en/docs/stream/ngx_stream_limit_conn_module.xml @ 1744:ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 05 Jul 2016 17:58:34 +0300 |
parents | 6c96a644b0b3 |
children | 5d7fd7d9a2b6 |
comparison
equal
deleted
inserted
replaced
1743:3d686cb47c2c | 1744:ab56dcd73af2 |
---|---|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
9 | 9 |
10 <module name="Module ngx_stream_limit_conn_module" | 10 <module name="Module ngx_stream_limit_conn_module" |
11 link="/en/docs/stream/ngx_stream_limit_conn_module.html" | 11 link="/en/docs/stream/ngx_stream_limit_conn_module.html" |
12 lang="en" | 12 lang="en" |
13 rev="2"> | 13 rev="3"> |
14 | 14 |
15 <section id="summary"> | 15 <section id="summary"> |
16 | 16 |
17 <para> | 17 <para> |
18 The <literal>ngx_stream_limit_conn_module</literal> module (1.9.3) is used to | 18 The <literal>ngx_stream_limit_conn_module</literal> module (1.9.3) is used to |
112 | 112 |
113 <para> | 113 <para> |
114 Sets parameters for a shared memory zone | 114 Sets parameters for a shared memory zone |
115 that will keep states for various keys. | 115 that will keep states for various keys. |
116 In particular, the state includes the current number of connections. | 116 In particular, the state includes the current number of connections. |
117 Currently, the supported value for the <value>key</value> is | 117 The <value>key</value> can contain text, variables, |
118 the client address in the binary form specified as | 118 and their combinations (1.11.2). |
119 <literal>$binary_remote_addr</literal>. | |
120 Connections with an empty key value are not accounted. | 119 Connections with an empty key value are not accounted. |
121 Usage example: | 120 Usage example: |
122 <example> | 121 <example> |
123 limit_conn_zone $binary_remote_addr zone=addr:10m; | 122 limit_conn_zone $binary_remote_addr zone=addr:10m; |
124 </example> | 123 </example> |
125 Here, the key is a client IP address set by the | 124 Here, the key is a client IP address set by the |
126 <literal>$binary_remote_addr</literal> key. | 125 <literal>$binary_remote_addr</literal> variable. |
127 The size of <literal>$binary_remote_addr</literal> | 126 The size of <literal>$binary_remote_addr</literal> |
128 is 4 bytes for IPv4 addresses or 16 bytes for IPv6 addresses. | 127 is 4 bytes for IPv4 addresses or 16 bytes for IPv6 addresses. |
129 The stored state always occupies 32 or 64 bytes | 128 The stored state always occupies 32 or 64 bytes |
130 on 32-bit platforms and 64 bytes on 64-bit platforms. | 129 on 32-bit platforms and 64 bytes on 64-bit platforms. |
131 One megabyte zone can keep about 32 thousand 32-byte states | 130 One megabyte zone can keep about 32 thousand 32-byte states |