# HG changeset patch # User Yaroslav Zhuravlev # Date 1474461335 -10800 # Node ID be868c8f6e9c94bf27922e2e135face941c3330d # Parent 1d576e8d6ead2ed828eff7367a0eaccc4c008949 Added article about processing TCP/UDP sessions. diff --git a/xml/en/GNUmakefile b/xml/en/GNUmakefile --- a/xml/en/GNUmakefile +++ b/xml/en/GNUmakefile @@ -108,6 +108,7 @@ REFS = \ stream/ngx_stream_split_clients_module \ stream/ngx_stream_ssl_module \ stream/ngx_stream_upstream_module \ + stream/stream_processing \ TOP = \ download \ diff --git a/xml/en/docs/index.xml b/xml/en/docs/index.xml --- a/xml/en/docs/index.xml +++ b/xml/en/docs/index.xml @@ -8,7 +8,7 @@
@@ -86,6 +86,14 @@ + + + + + + + + Chapter “nginx” in “The Architecture of Open Source Applications” diff --git a/xml/en/docs/stream/stream_processing.xml b/xml/en/docs/stream/stream_processing.xml new file mode 100644 --- /dev/null +++ b/xml/en/docs/stream/stream_processing.xml @@ -0,0 +1,90 @@ + + + + +
+ +
+ + +A TCP/UDP session from a client is processed +in successive steps called phases: + + + + +Post-accept + + +The first phase after accepting a client connection. +The ngx_stream_realip_module +module is invoked at this phase. + + + +Pre-access + + +Preliminary check for access. +The ngx_stream_limit_conn_module +module is invoked at this phase. + + + +Access + + +Client access limitation before actual data processing. +The ngx_stream_access_module +module is invoked at this phase. + + + +SSL + + +TLS/SSL termination. +The ngx_stream_ssl_module +module is invoked at this phase. + + + +Preread + + +Reading initial bytes of data into the preread buffer +to allow analyzing the data before its processing. + + + +Content + + +Mandatory phase where data is actually processed, usually +proxied to +upstream servers, +or a specified value +is returned to a client. + + + +Log + + +The final phase +where the result of a client session processing is recorded. +The ngx_stream_log_module +module is invoked at this phase. + + + + + +
+ +
diff --git a/xml/ru/GNUmakefile b/xml/ru/GNUmakefile --- a/xml/ru/GNUmakefile +++ b/xml/ru/GNUmakefile @@ -96,6 +96,7 @@ REFS = \ stream/ngx_stream_split_clients_module \ stream/ngx_stream_ssl_module \ stream/ngx_stream_upstream_module \ + stream/stream_processing \ TOP = \ download \ diff --git a/xml/ru/docs/index.xml b/xml/ru/docs/index.xml --- a/xml/ru/docs/index.xml +++ b/xml/ru/docs/index.xml @@ -8,7 +8,7 @@
@@ -87,6 +87,14 @@ + + + + + + + + Глава “nginx” из книги “The Architecture of Open Source Applications” [en] diff --git a/xml/ru/docs/stream/stream_processing.xml b/xml/ru/docs/stream/stream_processing.xml new file mode 100644 --- /dev/null +++ b/xml/ru/docs/stream/stream_processing.xml @@ -0,0 +1,91 @@ + + + + +
+ +
+ + +Обработка клиентской TCP/UDP-сессии происходит +последовательными фазами: + + + + +Post-accept + + +Первая фаза после принятия клиентского соединения. +В этой фазе выполняется модуль +ngx_stream_realip_module. + + + +Pre-access + + +Предварительная проверка доступа. +В этой фазе выполняется модуль +ngx_stream_limit_conn_module. + + + +Access + + +Ограничение доступа для клиента перед обработкой данных. +В этой фазе выполняется модуль +ngx_stream_access_module. + + + +SSL + + + +Терминирование TLS/SSL. +В этой фазе выполняется модуль +ngx_stream_ssl_module. + + + +Preread + + +Чтение первых байт данных в буфер предварительного чтения +для анализа перед их обработкой + + + +Content + + +Обязательная фаза, в которой происходит обработка данных, как правило +проксирование на +группу серверов +или отправка клиенту +заданного значения. + + + +Log + + +Заключительная фаза, +в которой записывается результат обработки клиентской сессии. +В этой фазе выполняется модуль +ngx_stream_log_module. + + + + + +
+ +