Mercurial > hg > nginx-site
comparison xml/en/docs/stream/ngx_stream_core_module.xml @ 1450:f5b5eefc43cb
Updated commercial docs for the upcoming release.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 09 Apr 2015 19:18:54 +0300 |
parents | 4569719f4247 |
children | e69e4dbcc760 |
comparison
equal
deleted
inserted
replaced
1449:c79501e16e26 | 1450:f5b5eefc43cb |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Module ngx_stream_core_module" | 9 <module name="Module ngx_stream_core_module" |
10 link="/en/docs/stream/ngx_stream_core_module.html" | 10 link="/en/docs/stream/ngx_stream_core_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="1"> | 12 rev="2"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 <note> | 17 <note> |
61 <section id="directives" name="Directives"> | 61 <section id="directives" name="Directives"> |
62 | 62 |
63 <directive name="listen"> | 63 <directive name="listen"> |
64 <syntax> | 64 <syntax> |
65 <value>address</value>:<value>port</value> | 65 <value>address</value>:<value>port</value> |
66 [<literal>ssl</literal>] | |
66 [<literal>bind</literal>] | 67 [<literal>bind</literal>] |
67 [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] | 68 [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] |
68 [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax> | 69 [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax> |
69 <default/> | 70 <default/> |
70 <context>server</context> | 71 <context>server</context> |
92 </example> | 93 </example> |
93 | 94 |
94 </para> | 95 </para> |
95 | 96 |
96 <para> | 97 <para> |
97 The directive supports the following parameters: | 98 The <literal>ssl</literal> parameter (1.7.10) allows specifying that all |
98 | 99 connections accepted on this port should work in SSL mode. |
100 </para> | |
101 | |
102 <para> | |
103 The <literal>listen</literal> directive | |
104 can have several additional parameters specific to socket-related system calls. | |
99 <list type="tag"> | 105 <list type="tag"> |
100 | 106 |
101 <tag-name id="bind"> | 107 <tag-name> |
102 <literal>bind</literal> | 108 <literal>bind</literal> |
103 </tag-name> | 109 </tag-name> |
104 <tag-desc> | 110 <tag-desc> |
105 this parameter instructs to make a separate <c-func>bind</c-func> | 111 this parameter instructs to make a separate <c-func>bind</c-func> |
106 call for a given address:port pair. | 112 call for a given address:port pair. |
116 are used then for a given | 122 are used then for a given |
117 <value>address</value>:<value>port</value> pair | 123 <value>address</value>:<value>port</value> pair |
118 a separate <c-func>bind</c-func> call will always be made. | 124 a separate <c-func>bind</c-func> call will always be made. |
119 </tag-desc> | 125 </tag-desc> |
120 | 126 |
121 <tag-name id="ipv6only"> | 127 <tag-name> |
122 <literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal> | 128 <literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal> |
123 </tag-name> | 129 </tag-name> |
124 <tag-desc> | 130 <tag-desc> |
125 this parameter determines | 131 this parameter determines |
126 (via the <c-def>IPV6_V6ONLY</c-def> socket option) | 132 (via the <c-def>IPV6_V6ONLY</c-def> socket option) |
128 will accept only IPv6 connections or both IPv6 and IPv4 connections. | 134 will accept only IPv6 connections or both IPv6 and IPv4 connections. |
129 This parameter is turned on by default. | 135 This parameter is turned on by default. |
130 It can only be set once on start. | 136 It can only be set once on start. |
131 </tag-desc> | 137 </tag-desc> |
132 | 138 |
133 <tag-name id="so_keepalive"> | 139 <tag-name> |
134 <literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>] | 140 <literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>] |
135 </tag-name> | 141 </tag-name> |
136 <tag-desc> | 142 <tag-desc> |
137 this parameter configures the “TCP keepalive” behavior | 143 this parameter configures the “TCP keepalive” behavior |
138 for the listening socket. | 144 for the listening socket. |
155 <example>so_keepalive=30m::10</example> | 161 <example>so_keepalive=30m::10</example> |
156 will set the idle timeout (<c-def>TCP_KEEPIDLE</c-def>) to 30 minutes, | 162 will set the idle timeout (<c-def>TCP_KEEPIDLE</c-def>) to 30 minutes, |
157 leave the probe interval (<c-def>TCP_KEEPINTVL</c-def>) at its system default, | 163 leave the probe interval (<c-def>TCP_KEEPINTVL</c-def>) at its system default, |
158 and set the probes count (<c-def>TCP_KEEPCNT</c-def>) to 10 probes. | 164 and set the probes count (<c-def>TCP_KEEPCNT</c-def>) to 10 probes. |
159 </tag-desc> | 165 </tag-desc> |
166 | |
160 </list> | 167 </list> |
161 </para> | 168 </para> |
162 | 169 |
163 <para> | 170 <para> |
164 Different servers must listen on different | 171 Different servers must listen on different |
166 </para> | 173 </para> |
167 | 174 |
168 </directive> | 175 </directive> |
169 | 176 |
170 | 177 |
178 <directive name="resolver"> | |
179 <syntax> | |
180 <value>address</value> ... | |
181 [<literal>valid</literal>=<value>time</value>] | |
182 [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>]</syntax> | |
183 <default/> | |
184 <context>stream</context> | |
185 <context>server</context> | |
186 <appeared-in>1.7.10</appeared-in> | |
187 | |
188 <para> | |
189 Configures name servers used to resolve names of upstream servers | |
190 into addresses, for example: | |
191 <example> | |
192 resolver 127.0.0.1 [::1]:5353; | |
193 </example> | |
194 An address can be specified as a domain name or IP address, | |
195 and an optional port. | |
196 If port is not specified, the port 53 is used. | |
197 Name servers are queried in a round-robin fashion. | |
198 </para> | |
199 | |
200 <para> | |
201 By default, nginx will look up both IPv4 and IPv6 addresses while resolving. | |
202 If looking up of IPv6 addresses is not desired, | |
203 the <literal>ipv6=off</literal> parameter can be specified. | |
204 </para> | |
205 | |
206 <para> | |
207 By default, nginx caches answers using the TTL value of a response. | |
208 The optional <literal>valid</literal> parameter allows overriding it: | |
209 <example> | |
210 resolver 127.0.0.1 [::1]:5353 valid=30s; | |
211 </example> | |
212 </para> | |
213 | |
214 </directive> | |
215 | |
216 | |
217 <directive name="resolver_timeout"> | |
218 <syntax><value>time</value></syntax> | |
219 <default>30s</default> | |
220 <context>stream</context> | |
221 <context>server</context> | |
222 <appeared-in>1.7.10</appeared-in> | |
223 | |
224 <para> | |
225 Sets a timeout for name resolution, for example: | |
226 <example> | |
227 resolver_timeout 5s; | |
228 </example> | |
229 </para> | |
230 | |
231 </directive> | |
232 | |
233 | |
171 <directive name="server"> | 234 <directive name="server"> |
172 <syntax block="yes"/> | 235 <syntax block="yes"/> |
173 <default/> | 236 <default/> |
174 <context>stream</context> | 237 <context>stream</context> |
175 | 238 |