changeset 1699:6c96a644b0b3

Corrected description of $binary_remote_addr and saved state.
author Yaroslav Zhuravlev <yar@nginx.com>
date Thu, 05 May 2016 14:43:40 +0300
parents 2052ffb3529a
children 1dbef8ab47c7
files xml/en/docs/http/ngx_http_core_module.xml xml/en/docs/http/ngx_http_limit_conn_module.xml xml/en/docs/http/ngx_http_limit_req_module.xml xml/en/docs/stream/ngx_stream_limit_conn_module.xml xml/ru/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_limit_conn_module.xml xml/ru/docs/http/ngx_http_limit_req_module.xml xml/ru/docs/stream/ngx_stream_limit_conn_module.xml
diffstat 8 files changed, 31 insertions(+), 20 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="55">
+        rev="56">
 
 <section id="directives" name="Directives">
 
@@ -2863,6 +2863,7 @@ arguments in the request line
 <tag-name id="var_binary_remote_addr"><var>$binary_remote_addr</var></tag-name>
 <tag-desc>
 client address in a binary form, value’s length is always 4 bytes
+for IPv4 addresses or 16 bytes for IPv6 addresses
 </tag-desc>
 
 <tag-name id="var_body_bytes_sent"><var>$body_bytes_sent</var></tag-name>
--- 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="8">
+        rev="9">
 
 <section id="summary">
 
@@ -173,8 +173,8 @@ The stored state occupies either
 32 or 64 bytes of memory on 32-bit platforms and always 64
 bytes on 64-bit platforms.
 The <var>$binary_remote_addr</var> variable’s size
-is always 4 bytes.
-The stored state always occupies 32 bytes
+is always 4 bytes for IPv4 addresses or 16 bytes for IPv6 addresses.
+The stored state always occupies 32 or 64 bytes
 on 32-bit platforms and 64 bytes on 64-bit platforms.
 One megabyte zone can keep about 32 thousand 32-byte states
 or about 16 thousand 64-byte states.
--- a/xml/en/docs/http/ngx_http_limit_req_module.xml
+++ b/xml/en/docs/http/ngx_http_limit_req_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_limit_req_module"
         link="/en/docs/http/ngx_http_limit_req_module.html"
         lang="en"
-        rev="5">
+        rev="6">
 
 <section id="summary">
 
@@ -191,9 +191,13 @@ 1 request per second.
 <para>
 A client IP address serves as a key.
 Note that instead of <var>$remote_addr</var>, the
-<var>$binary_remote_addr</var> variable is used here,
-that allows decreasing the state size down to 64 bytes.
-One megabyte zone can keep about 16 thousand 64-byte states.
+<var>$binary_remote_addr</var> variable is used here.
+The <var>$binary_remote_addr</var> variable’s size
+is always 4 bytes for IPv4 addresses or 16 bytes for IPv6 addresses.
+The stored state always occupies
+64 bytes on 32-bit platforms and 128 bytes on 64-bit platforms.
+One megabyte zone can keep about 16 thousand 64-byte states
+or about 8 thousand 128-byte states.
 If the zone storage is exhausted, the server will return the
 <http-status code="503" text="Service Temporarily Unavailable"/>
 error to all further requests.
--- a/xml/en/docs/stream/ngx_stream_limit_conn_module.xml
+++ b/xml/en/docs/stream/ngx_stream_limit_conn_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_stream_limit_conn_module"
         link="/en/docs/stream/ngx_stream_limit_conn_module.html"
         lang="en"
-        rev="1">
+        rev="2">
 
 <section id="summary">
 
@@ -125,8 +125,8 @@ limit_conn_zone $binary_remote_addr zone
 Here, the key is a client IP address set by the
 <literal>$binary_remote_addr</literal> key.
 The size of <literal>$binary_remote_addr</literal>
-is 4 bytes.
-The stored state always occupies 32 bytes
+is 4 bytes for IPv4 addresses or 16 bytes for IPv6 addresses.
+The stored state always occupies 32 or 64 bytes
 on 32-bit platforms and 64 bytes on 64-bit platforms.
 One megabyte zone can keep about 32 thousand 32-byte states
 or about 16 thousand 64-byte states.
--- 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="55">
+        rev="56">
 
 <section id="directives" name="Директивы">
 
@@ -2863,6 +2863,7 @@ location /download/ {
 <tag-name id="var_binary_remote_addr"><var>$binary_remote_addr</var></tag-name>
 <tag-desc>
 адрес клиента в бинарном виде, длина значения всегда 4 байта
+для IPv4-адресов или 16 байт для IPv6-адресов
 </tag-desc>
 
 <tag-name id="var_body_bytes_sent"><var>$body_bytes_sent</var></tag-name>
--- 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="8">
+        rev="9">
 
 <section id="summary">
 
@@ -169,7 +169,8 @@ limit_conn_zone $binary_remote_addr zone
 либо 32, либо 64 байта на 32-битных платформах и всегда 64
 байта на 64-битных.
 Длина значения переменной <var>$binary_remote_addr</var> всегда
-равна 4 байтам, при этом размер состояния всегда равен 32 байтам
+равна 4 байтам для IPv4-адресов или 16 байтам для IPv6-адресов.
+При этом размер состояния всегда равен 32 или 64 байтам
 на 32-битных платформах и 64 байтам на 64-битных.
 В зоне размером 1 мегабайт может разместиться около 32 тысяч состояний
 размером 32 байта или 16 тысяч состояний размером 64 байта.
--- a/xml/ru/docs/http/ngx_http_limit_req_module.xml
+++ b/xml/ru/docs/http/ngx_http_limit_req_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_limit_req_module"
         link="/ru/docs/http/ngx_http_limit_req_module.html"
         lang="ru"
-        rev="5">
+        rev="6">
 
 <section id="summary">
 
@@ -188,10 +188,13 @@ 1 запроса в секунду.
 <para>
 В качестве ключа используется IP-адрес клиента.
 Обратите внимание, что вместо переменной <var>$remote_addr</var> используется
-переменная <var>$binary_remote_addr</var>, позволяющая уменьшить
-размер состояния до 64 байт.
+переменная <var>$binary_remote_addr</var>.
+Длина значения переменной <var>$binary_remote_addr</var> всегда
+равна 4 байтам для IPv4-адресов или 16 байтам для IPv6-адресов.
+При этом размер состояния всегда равен
+64 байтам на 32-битных платформах и 128 байтам на 64-битных платформах.
 В зоне размером 1 мегабайт может разместиться около 16 тысяч состояний
-размером 64 байта.
+размером 64 байта или около 8 тысяч состояний размером 128 байт.
 При переполнении зоны в ответ на последующие запросы сервер будет
 возвращать ошибку
 <http-status code="503" text="Service Temporarily Unavailable"/>.
--- a/xml/ru/docs/stream/ngx_stream_limit_conn_module.xml
+++ b/xml/ru/docs/stream/ngx_stream_limit_conn_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_stream_limit_conn_module"
         link="/ru/docs/stream/ngx_stream_limit_conn_module.html"
         lang="ru"
-        rev="1">
+        rev="2">
 
 <section id="summary">
 
@@ -126,7 +126,8 @@ limit_conn_zone $binary_remote_addr zone
 Здесь в качестве ключа используется IP-адрес клиента,
 задаваемый ключом <literal>$binary_remote_addr</literal>.
 Длина значения <literal>$binary_remote_addr</literal>
-равна 4 байтам, при этом размер состояния всегда равен 32 байтам
+равна 4 байтам для IPv4-адресов или 16 байтам для IPv6-адресов.
+При этом размер состояния всегда равен 32 или 64 байтам
 на 32-битных платформах и 64 байтам на 64-битных.
 В зоне размером 1 мегабайт может разместиться около 32 тысяч состояний
 размером 32 байта или 16 тысяч состояний размером 64 байта.