Mercurial > hg > nginx-site
annotate xml/en/docs/stream/stream_processing.xml @ 2903:44f3b52c0679
Documented the $proxy_protocol_tlv_ variable.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Wed, 19 Oct 2022 12:33:55 +0100 |
parents | 4959250ba429 |
children |
rev | line source |
---|---|
1797
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
1 <!-- |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
2 Copyright (C) Nginx, Inc. |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
3 --> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
4 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
5 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
6 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
7 <article name="How nginx processes a TCP/UDP session" |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
8 link="/en/docs/stream/stream_processing.html" |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
9 lang="en" |
2883
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
10 rev="4"> |
1797
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
11 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
12 <section> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
13 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
14 <para> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
15 A TCP/UDP session from a client is processed |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
16 in successive steps called <b>phases</b>: |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
17 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
18 <list type="tag"> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
19 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
20 <tag-name id="postaccept_phase"> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
21 <literal>Post-accept</literal> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
22 </tag-name> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
23 <tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
24 The first phase after accepting a client connection. |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
25 The <link doc="ngx_stream_realip_module.xml">ngx_stream_realip_module</link> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
26 module is invoked at this phase. |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
27 </tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
28 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
29 <tag-name id="preaccess_phase"> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
30 <literal>Pre-access</literal> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
31 </tag-name> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
32 <tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
33 Preliminary check for access. |
2600
2fd28cd4f2f8
Added set module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1798
diff
changeset
|
34 The |
2fd28cd4f2f8
Added set module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1798
diff
changeset
|
35 <link doc="ngx_stream_limit_conn_module.xml">ngx_stream_limit_conn_module</link> |
2fd28cd4f2f8
Added set module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1798
diff
changeset
|
36 and |
2fd28cd4f2f8
Added set module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1798
diff
changeset
|
37 <link doc="ngx_stream_set_module.xml">ngx_stream_set_module</link> |
2fd28cd4f2f8
Added set module for stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1798
diff
changeset
|
38 modules are invoked at this phase. |
1797
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
39 </tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
40 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
41 <tag-name id="access_phase"> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
42 <literal>Access</literal> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
43 </tag-name> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
44 <tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
45 Client access limitation before actual data processing. |
2883
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
46 At this phase, |
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
47 the <link doc="ngx_stream_access_module.xml">ngx_stream_access_module</link> |
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
48 module is invoked, |
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
49 for <link doc="../njs/index.xml">njs</link>, |
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
50 the <link doc="ngx_stream_js_module.xml" id="js_access"/> directive |
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
51 is invoked. |
1797
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
52 </tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
53 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
54 <tag-name id="ssl_phase"> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
55 <literal>SSL</literal> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
56 </tag-name> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
57 <tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
58 TLS/SSL termination. |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
59 The <link doc="ngx_stream_ssl_module.xml">ngx_stream_ssl_module</link> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
60 module is invoked at this phase. |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
61 </tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
62 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
63 <tag-name id="preread_phase"> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
64 <literal>Preread</literal> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
65 </tag-name> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
66 <tag-desc> |
1798
59d1f512c3a0
Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1797
diff
changeset
|
67 Reading initial bytes of data into the |
59d1f512c3a0
Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1797
diff
changeset
|
68 <link doc="ngx_stream_core_module.xml" id="preread_buffer_size">preread buffer</link> |
59d1f512c3a0
Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1797
diff
changeset
|
69 to allow modules such as |
59d1f512c3a0
Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1797
diff
changeset
|
70 <link doc="ngx_stream_ssl_preread_module.xml">ngx_stream_ssl_preread_module</link> |
59d1f512c3a0
Documented the ngx_stream_ssl_preread_module module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1797
diff
changeset
|
71 analyze the data before its processing. |
2883
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
72 For <link doc="../njs/index.xml">njs</link>, |
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
73 the <link doc="ngx_stream_js_module.xml" id="js_preread"/> directive |
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
74 is invoked at this phase. |
1797
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
75 </tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
76 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
77 <tag-name id="content_phase"> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
78 <literal>Content</literal> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
79 </tag-name> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
80 <tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
81 Mandatory phase where data is actually processed, usually |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
82 <link doc="ngx_stream_proxy_module.xml">proxied</link> to |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
83 <link doc="ngx_stream_upstream_module.xml">upstream</link> servers, |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
84 or a specified value |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
85 is <link doc="ngx_stream_return_module.xml">returned</link> to a client. |
2883
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
86 For <link doc="../njs/index.xml">njs</link>, |
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
87 the <link doc="ngx_stream_js_module.xml" id="js_filter"/> directive |
4959250ba429
Added links to njs directives in "Stream Processing".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2600
diff
changeset
|
88 is invoked at this phase. |
1797
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
89 </tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
90 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
91 <tag-name id="log_phase"> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
92 <literal>Log</literal> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
93 </tag-name> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
94 <tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
95 The final phase |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
96 where the result of a client session processing is recorded. |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
97 The <link doc="ngx_stream_log_module.xml">ngx_stream_log_module</link> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
98 module is invoked at this phase. |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
99 </tag-desc> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
100 </list> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
101 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
102 </para> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
103 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
104 </section> |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
105 |
be868c8f6e9c
Added article about processing TCP/UDP sessions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
106 </article> |