Mercurial > hg > nginx-site
annotate xml/en/docs/stream/ngx_stream_upstream_module.xml @ 2609:99bd2ae8d2be
Added Buffer to njs Reference.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Thu, 08 Oct 2020 11:36:19 +0100 |
parents | 504536999408 |
children | 4add6ae1296f |
rev | line source |
---|---|
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 <!-- |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 --> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 <module name="Module ngx_stream_upstream_module" |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 link="/en/docs/stream/ngx_stream_upstream_module.html" |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 lang="en" |
2470
504536999408
Added upstream resolver info to upstream server resolve parameter.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2469
diff
changeset
|
12 rev="39"> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 <section id="summary"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 <para> |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
17 The <literal>ngx_stream_upstream_module</literal> module (1.9.0) |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 is used to define groups of servers that can be referenced |
1405
4569719f4247
Split stream module into stream_core and stream_proxy modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1367
diff
changeset
|
19 by the <link doc="ngx_stream_proxy_module.xml" id="proxy_pass"/> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 directive. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 </section> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 <section id="example" name="Example Configuration"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 <example> |
1406
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
30 upstream <emphasis>backend</emphasis> { |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
31 hash $remote_addr consistent; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
33 server backend1.example.com:12345 weight=5; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
34 server backend2.example.com:12345; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
35 server unix:/tmp/backend3; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
36 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
37 server backup1.example.com:12345 backup; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
38 server backup2.example.com:12345 backup; |
1406
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
39 } |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
40 |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
41 server { |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
42 listen 12346; |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
43 proxy_pass <emphasis>backend</emphasis>; |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
44 } |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
45 </example> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
46 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
47 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
48 <para> |
1947
6b6d0e844bf7
Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
49 Dynamically configurable group with |
6b6d0e844bf7
Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
50 periodic <link doc="ngx_stream_upstream_hc_module.xml">health checks</link> is |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
51 available as part of our |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
52 <commercial_version>commercial subscription</commercial_version>: |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
53 <example> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
54 resolver 10.0.0.1; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
55 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
56 upstream <emphasis>dynamic</emphasis> { |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
57 zone upstream_dynamic 64k; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
58 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
59 server backend1.example.com:12345 weight=5; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
60 server backend2.example.com:12345 fail_timeout=5s slow_start=30s; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
61 server 192.0.2.1:12345 max_fails=3; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
62 server backend3.example.com:12345 resolve; |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
63 server backend4.example.com service=http resolve; |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
64 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
65 server backup1.example.com:12345 backup; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
66 server backup2.example.com:12345 backup; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
67 } |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
68 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
69 server { |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
70 listen 12346; |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
71 proxy_pass <emphasis>dynamic</emphasis>; |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
72 health_check; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 } |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 </example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 </section> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 <section id="directives" name="Directives"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 <directive name="upstream"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 <syntax block="yes"><value>name</value></syntax> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 <context>stream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 Defines a group of servers. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 Servers can listen on different ports. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 In addition, servers listening on TCP and UNIX-domain sockets |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 can be mixed. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
92 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 Example: |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 <example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 upstream backend { |
1406
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
98 server backend1.example.com:12345 weight=5; |
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
99 server 127.0.0.1:12345 max_fails=3 fail_timeout=30s; |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
100 server unix:/tmp/backend2; |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
101 server backend3.example.com:12345 resolve; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 |
1406
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
103 server backup1.example.com:12345 backup; |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 } |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 </example> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
106 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
107 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
108 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
109 By default, connections are distributed between the servers using a |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
110 weighted round-robin balancing method. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
111 In the above example, each 7 connections will be distributed as follows: |
1406
ea73cd9d4cdb
Changed stream_upstream examples.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1405
diff
changeset
|
112 5 connections go to <literal>backend1.example.com:12345</literal> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 and one connection to each of the second and third servers. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
114 If an error occurs during communication with a server, the connection will |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
115 be passed to the next server, and so on until all of the functioning |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 servers will be tried. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
117 If communication with all servers fails, the connection will be closed. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
118 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
119 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
122 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 <directive name="server"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
124 <syntax><value>address</value> [<value>parameters</value>]</syntax> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
125 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
126 <context>upstream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
127 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
128 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
129 Defines the <value>address</value> and other <value>parameters</value> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
130 of a server. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 The address can be specified as a domain name or IP address |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
132 with an obligatory port, or as a UNIX-domain socket path |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
133 specified after the “<literal>unix:</literal>” prefix. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
134 A domain name that resolves to several IP addresses defines |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
135 multiple servers at once. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
136 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
137 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
138 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
139 The following parameters can be defined: |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
140 <list type="tag"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
141 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
142 <tag-name id="weight"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
143 <literal>weight</literal>=<value>number</value> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
144 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 <tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
146 sets the weight of the server, by default, 1. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
147 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 |
1800
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1774
diff
changeset
|
149 <tag-name id="max_conns"> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1774
diff
changeset
|
150 <literal>max_conns</literal>=<value>number</value> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1774
diff
changeset
|
151 </tag-name> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1774
diff
changeset
|
152 <tag-desc> |
1801
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
153 limits the maximum <value>number</value> of simultaneous |
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
154 connections to the proxied server (1.11.5). |
1800
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1774
diff
changeset
|
155 Default value is zero, meaning there is no limit. |
1801
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
156 If the server group does not reside in the <link id="zone">shared memory</link>, |
592f9fa804f6
Added info about shared memory to max_conns.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1800
diff
changeset
|
157 the limitation works per each worker process. |
1800
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1774
diff
changeset
|
158 <note> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1774
diff
changeset
|
159 Prior to version 1.11.5, this parameter was available as part of our |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1774
diff
changeset
|
160 <commercial_version>commercial subscription</commercial_version>. |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1774
diff
changeset
|
161 </note> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1774
diff
changeset
|
162 </tag-desc> |
9d722e4153ab
Documented the "max_conns" parameter as opensource.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1774
diff
changeset
|
163 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
164 <tag-name id="max_fails"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
165 <literal>max_fails</literal>=<value>number</value> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
166 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
167 <tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
168 sets the number of unsuccessful attempts to communicate with the server |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
169 that should happen in the duration set by the <literal>fail_timeout</literal> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
170 parameter to consider the server unavailable for a duration also set by the |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
171 <literal>fail_timeout</literal> parameter. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
172 By default, the number of unsuccessful attempts is set to 1. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
173 The zero value disables the accounting of attempts. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
174 Here, an unsuccessful attempt is an error or timeout |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
175 while establishing a connection with the server. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
176 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
177 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
178 <tag-name id="fail_timeout"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
179 <literal>fail_timeout</literal>=<value>time</value> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
180 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
181 <tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
182 sets |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
183 <list type="bullet"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
184 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
185 <listitem> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
186 the time during which the specified number of unsuccessful attempts to |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
187 communicate with the server should happen to consider the server unavailable; |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
188 </listitem> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
189 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
190 <listitem> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
191 and the period of time the server will be considered unavailable. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
192 </listitem> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
193 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
194 </list> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
195 By default, the parameter is set to 10 seconds. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
196 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
197 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
198 <tag-name id="backup"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
199 <literal>backup</literal> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
200 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
201 <tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
202 marks the server as a backup server. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
203 Connections to the backup server will be passed |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
204 when the primary servers are unavailable. |
2434
a1f61586779b
Listed not supported load balancing methods in upstream backup.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2418
diff
changeset
|
205 <note> |
a1f61586779b
Listed not supported load balancing methods in upstream backup.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2418
diff
changeset
|
206 The parameter cannot be used along with the |
a1f61586779b
Listed not supported load balancing methods in upstream backup.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2418
diff
changeset
|
207 <link id="hash"/> and <link id="random"/> load balancing methods. |
a1f61586779b
Listed not supported load balancing methods in upstream backup.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2418
diff
changeset
|
208 </note> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
209 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
210 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
211 <tag-name id="down"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
212 <literal>down</literal> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
213 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
214 <tag-desc> |
1410
f5dcc23b214f
Deleted info about hash and ip_hash from the down parameter.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1406
diff
changeset
|
215 marks the server as permanently unavailable. |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
216 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
217 |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
218 </list> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
219 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
220 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
221 <para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
222 Additionally, |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
223 the following parameters are available as part of our |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
224 <commercial_version>commercial subscription</commercial_version>: |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
225 <list type="tag"> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
226 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
227 <tag-name id="resolve"> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
228 <literal>resolve</literal> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
229 </tag-name> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
230 <tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
231 monitors changes of the IP addresses |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
232 that correspond to a domain name of the server, |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
233 and automatically modifies the upstream configuration |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
234 without the need of restarting nginx. |
1581
201bf8fa69e5
Added shared memory requirement to resolver in http and stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1495
diff
changeset
|
235 The server group must reside in the <link id="zone">shared memory</link>. |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
236 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
237 In order for this parameter to work, |
2470
504536999408
Added upstream resolver info to upstream server resolve parameter.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2469
diff
changeset
|
238 the <literal>resolver</literal> directive |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
239 must be specified in the |
2470
504536999408
Added upstream resolver info to upstream server resolve parameter.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2469
diff
changeset
|
240 <link doc="ngx_stream_core_module.xml" id="resolver">stream</link> block |
504536999408
Added upstream resolver info to upstream server resolve parameter.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2469
diff
changeset
|
241 or in the corresponding <link id="resolver">upstream</link> block. |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
242 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
243 </tag-desc> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
244 |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
245 <tag-name id="service"> |
1700
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
246 <literal>service</literal>=<value>name</value> |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
247 </tag-name> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
248 <tag-desc> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
249 enables resolving of DNS |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
250 <link url="https://tools.ietf.org/html/rfc2782">SRV</link> |
1700
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
251 records and sets the service <value>name</value> (1.9.13). |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
252 In order for this parameter to work, it is necessary to specify |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
253 the <link id="resolve"/> parameter for the server |
1700
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
254 and specify a hostname without a port number. |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
255 <para> |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
256 If the service name does not contain a dot (“<literal>.</literal>”), then |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
257 the <link url="https://tools.ietf.org/html/rfc2782">RFC</link>-compliant name |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
258 is constructed |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
259 and the TCP protocol is added to the service prefix. |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
260 For example, to look up the |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
261 <literal>_http._tcp.backend.example.com</literal> SRV record, |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
262 it is necessary to specify the directive: |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
263 <example> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
264 server backend.example.com service=http resolve; |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
265 </example> |
1700
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
266 If the service name contains one or more dots, then the name is constructed |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
267 by joining the service prefix and the server name. |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
268 For example, to look up the <literal>_http._tcp.backend.example.com</literal> |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
269 and <literal>server1.backend.example.com</literal> SRV records, |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
270 it is necessary to specify the directives: |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
271 <example> |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
272 server backend.example.com service=_http._tcp resolve; |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
273 server example.com service=server1.backend resolve; |
1dbef8ab47c7
Updated description of service parameter in upstream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1680
diff
changeset
|
274 </example> |
1680
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
275 </para> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
276 |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
277 <para> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
278 Highest-priority SRV records |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
279 (records with the same lowest-number priority value) |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
280 are resolved as primary servers, |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
281 the rest of SRV records are resolved as backup servers. |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
282 If the <link id="backup"/> parameter is specified for the server, |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
283 high-priority SRV records are resolved as backup servers, |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
284 the rest of SRV records are ignored. |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
285 </para> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
286 </tag-desc> |
57c3f36b3b6a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1654
diff
changeset
|
287 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
288 <tag-name id="slow_start"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
289 <literal>slow_start</literal>=<value>time</value> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
290 </tag-name> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
291 <tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
292 sets the <value>time</value> during which the server will recover its weight |
1727
1a16dce51bce
Unified description of slow_start in stream with http.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1700
diff
changeset
|
293 from zero to a nominal value, when unhealthy server becomes |
1947
6b6d0e844bf7
Moved "health_check" and "match" to ngx_stream_upstream_hc_module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1925
diff
changeset
|
294 <link doc="ngx_stream_upstream_hc_module.xml" id="health_check">healthy</link>, |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
295 or when the server becomes available after a period of time |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
296 it was considered <link id="fail_timeout">unavailable</link>. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
297 Default value is zero, i.e. slow start is disabled. |
1817
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
298 <note> |
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
299 The parameter cannot be used along with the |
2418
7e1af2148946
Updated note in slow_start with random load balancing method.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2308
diff
changeset
|
300 <link id="hash"/> and <link id="random"/> load balancing methods. |
1817
0160e8784417
Documented behavior of server slow_start with ip_hash and hash.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1809
diff
changeset
|
301 </note> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
302 </tag-desc> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
303 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
304 </list> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
305 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
306 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
307 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
308 <note> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
309 If there is only a single server in a group, <literal>max_fails</literal>, |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
310 <literal>fail_timeout</literal> and <literal>slow_start</literal> parameters |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
311 are ignored, and such a server will never be considered unavailable. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
312 </note> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
313 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
314 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
315 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
316 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
317 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
318 <directive name="zone"> |
1495
8d134b482cc3
Documented zone usage with many upstreams.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1462
diff
changeset
|
319 <syntax><value>name</value> [<value>size</value>]</syntax> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
320 <default/> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
321 <context>upstream</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
322 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
323 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
324 Defines the <value>name</value> and <value>size</value> of the shared |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
325 memory zone that keeps the group’s configuration and run-time state that are |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
326 shared between worker processes. |
1495
8d134b482cc3
Documented zone usage with many upstreams.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1462
diff
changeset
|
327 Several groups may share the same zone. |
2281
1445fc690c16
Amend the "zone" directive description in stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2275
diff
changeset
|
328 In this case, it is enough to specify the <value>size</value> only once. |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
329 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
330 |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
331 <para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
332 Additionally, |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
333 as part of our <commercial_version>commercial subscription</commercial_version>, |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
334 such groups allow changing the group membership |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
335 or modifying the settings of a particular server |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
336 without the need of restarting nginx. |
2097
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
337 The configuration is accessible via the |
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
338 <link doc="../http/ngx_http_api_module.xml">API</link> module (1.13.3). |
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
339 <note> |
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
340 Prior to version 1.13.3, |
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
341 the configuration was accessible only via a special location |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
342 handled by |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
343 <link doc="../http/ngx_http_upstream_conf_module.xml" id="upstream_conf"/>. |
2097
27c53e1cb4b6
Deprecated upstream_conf in the "zone" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2058
diff
changeset
|
344 </note> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
345 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
346 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
347 </directive> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
348 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
349 |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
350 <directive name="state"> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
351 <syntax><value>file</value></syntax> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
352 <default/> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
353 <context>upstream</context> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
354 <appeared-in>1.9.7</appeared-in> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
355 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
356 <para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
357 Specifies a <value>file</value> that keeps the state |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
358 of the dynamically configurable group. |
1809
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
359 </para> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
360 |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
361 <para> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
362 Examples: |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
363 <example> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
364 state /var/lib/nginx/state/servers.conf; # path for Linux |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
365 state /var/db/nginx/state/servers.conf; # path for FreeBSD |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
366 </example> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
367 </para> |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
368 |
2245f2827e2f
Added examples of Linux and FreeBSD paths to "state" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1801
diff
changeset
|
369 <para> |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
370 The state is currently limited to the list of servers with their parameters. |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
371 The file is read when parsing the configuration and is updated each time |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
372 the upstream configuration is |
2300
c1808cb00a60
Fixed link to API endpoint in the stream "state" directive.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2283
diff
changeset
|
373 <link doc="../http/ngx_http_api_module.xml" id="stream_upstreams_stream_upstream_name_servers_">changed</link>. |
1636
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
374 Changing the file content directly should be avoided. |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
375 The directive cannot be used |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
376 along with the <link id="server"/> directive. |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
377 </para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
378 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
379 <para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
380 <note> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
381 Changes made during |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
382 <link doc="../control.xml" id="reconfiguration">configuration reload</link> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
383 or <link doc="../control.xml" id="upgrade">binary upgrade</link> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
384 can be lost. |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
385 </note> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
386 </para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
387 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
388 <para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
389 <note> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
390 This directive is available as part of our |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
391 <commercial_version>commercial subscription</commercial_version>. |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
392 </note> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
393 </para> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
394 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
395 </directive> |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
396 |
44c4323144c5
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1581
diff
changeset
|
397 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
398 <directive name="hash"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
399 <syntax><value>key</value> [<literal>consistent</literal>]</syntax> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
400 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
401 <context>upstream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
402 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
403 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
404 Specifies a load balancing method for a server group |
2282
35fd70c12f98
Resynchronized the http and stream upstream module versions.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2281
diff
changeset
|
405 where the client-server mapping is based on the hashed <value>key</value> value. |
1744
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
406 The <value>key</value> can contain text, variables, |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
407 and their combinations (1.11.2). |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
408 Usage example: |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
409 <example> |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
410 hash $remote_addr; |
ab56dcd73af2
Added variables to stream hash, limit_conn_zone, proxy_bind.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1727
diff
changeset
|
411 </example> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
412 Note that adding or removing a server from the group |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
413 may result in remapping most of the keys to different servers. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
414 The method is compatible with the |
2275
d93c8c32df75
Updated links to CPAN search interface.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2274
diff
changeset
|
415 <link url="https://metacpan.org/pod/Cache::Memcached">Cache::Memcached</link> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
416 Perl library. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
417 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
418 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
419 <para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
420 If the <literal>consistent</literal> parameter is specified, |
2274
e28e3d0f0d20
Updated link in the "hash" directive.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2230
diff
changeset
|
421 the <link url="https://www.metabrew.com/article/libketama-consistent-hashing-algo-memcached-clients">ketama</link> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
422 consistent hashing method will be used instead. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
423 The method ensures that only a few keys |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
424 will be remapped to different servers |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
425 when a server is added to or removed from the group. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
426 This helps to achieve a higher cache hit ratio for caching servers. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
427 The method is compatible with the |
2275
d93c8c32df75
Updated links to CPAN search interface.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2274
diff
changeset
|
428 <link url="https://metacpan.org/pod/Cache::Memcached::Fast">Cache::Memcached::Fast</link> |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
429 Perl library with the <value>ketama_points</value> parameter set to 160. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
430 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
431 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
432 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
433 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
434 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
435 <directive name="least_conn"> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
436 <syntax/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
437 <default/> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
438 <context>upstream</context> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
439 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
440 <para> |
2282
35fd70c12f98
Resynchronized the http and stream upstream module versions.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2281
diff
changeset
|
441 Specifies that a group should use a load balancing method where a connection |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
442 is passed to the server with the least number of active connections, |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
443 taking into account weights of servers. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
444 If there are several such servers, they are tried in turn using a |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
445 weighted round-robin balancing method. |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
446 </para> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
447 |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
448 </directive> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
449 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
450 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
451 <directive name="least_time"> |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
452 <syntax> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
453 <literal>connect</literal> | |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
454 <literal>first_byte</literal> | |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
455 <literal>last_byte</literal> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
456 [<literal>inflight</literal>]</syntax> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
457 <default/> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
458 <context>upstream</context> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
459 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
460 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
461 Specifies that a group should use a load balancing method where a connection |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
462 is passed to the server with the least average time and |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
463 least number of active connections, taking into account weights of servers. |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
464 If there are several such servers, they are tried in turn using a |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
465 weighted round-robin balancing method. |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
466 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
467 |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
468 <para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
469 If the <literal>connect</literal> parameter is specified, |
2196
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
470 time to |
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
471 <link id="var_upstream_connect_time">connect</link> |
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
472 to the upstream server is used. |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
473 If the <literal>first_byte</literal> parameter is specified, |
2196
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
474 time to receive the |
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
475 <link id="var_upstream_first_byte_time">first byte</link> of data is used. |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
476 If the <literal>last_byte</literal> is specified, |
2196
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
477 time to receive the |
5ad35130cc7f
Added links to variables in least_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2191
diff
changeset
|
478 <link id="var_upstream_session_time">last byte</link> of data is used. |
1925
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
479 If the <literal>inflight</literal> parameter is specified (1.11.6), |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
480 incomplete connections are also taken into account. |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
481 <note> |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
482 Prior to version 1.11.6, |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
483 incomplete connections were taken into account by default. |
a58b35cc0823
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
1891
diff
changeset
|
484 </note> |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
485 </para> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
486 |
1462
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
487 <para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
488 <note> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
489 This directive is available as part of our |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
490 <commercial_version>commercial subscription</commercial_version>. |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
491 </note> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
492 </para> |
e69e4dbcc760
Documented OSS stream modules.
Vladimir Homutov <vl@nginx.com>
parents:
1450
diff
changeset
|
493 |
1450
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
494 </directive> |
f5b5eefc43cb
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
1410
diff
changeset
|
495 |
2191
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
496 |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
497 <directive name="random"> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
498 <syntax>[<literal>two</literal> [<value>method</value>]]</syntax> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
499 <default/> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
500 <context>upstream</context> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
501 <appeared-in>1.15.1</appeared-in> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
502 |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
503 <para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
504 Specifies that a group should use a load balancing method where a connection |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
505 is passed to a randomly selected server, taking into account weights |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
506 of servers. |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
507 </para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
508 |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
509 <para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
510 The optional <literal>two</literal> parameter |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
511 instructs nginx to randomly select |
2197
03f8a9c5e8ae
Updated link in the "random" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2196
diff
changeset
|
512 <link url="https://homes.cs.washington.edu/~karlin/papers/balls.pdf">two</link> |
2191
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
513 servers and then choose a server |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
514 using the specified <literal>method</literal>. |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
515 The default method is <literal>least_conn</literal> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
516 which passes a connection to a server |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
517 with the least number of active connections. |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
518 </para> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
519 |
2230
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
520 <para id="random_least_time"> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
521 The <literal>least_time</literal> method passes a connection to a server |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
522 with the least average time and least number of active connections. |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
523 If <literal>least_time=connect</literal> parameter is specified, |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
524 time to |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
525 <link id="var_upstream_connect_time">connect</link> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
526 to the upstream server is used. |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
527 If <literal>least_time=first_byte</literal> parameter is specified, |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
528 time to receive the |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
529 <link id="var_upstream_first_byte_time">first byte</link> of data is used. |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
530 If <literal>least_time=last_byte</literal> is specified, |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
531 time to receive the |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
532 <link id="var_upstream_session_time">last byte</link> of data is used. |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
533 <note> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
534 The <literal>least_time</literal> method is available as a part of our |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
535 <commercial_version>commercial subscription</commercial_version>. |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
536 </note> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
537 </para> |
283b1e67eaa6
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2222
diff
changeset
|
538 |
2191
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
539 </directive> |
2c56f91c304a
Documented the "random" directive.
Vladimir Homutov <vl@nginx.com>
parents:
2097
diff
changeset
|
540 |
2469
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
541 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
542 <directive name="resolver"> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
543 <syntax> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
544 <value>address</value> ... |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
545 [<literal>valid</literal>=<value>time</value>] |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
546 [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>] |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
547 [<literal>status_zone</literal>=<value>zone</value>]</syntax> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
548 <default/> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
549 <context>upstream</context> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
550 <appeared-in>1.17.5</appeared-in> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
551 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
552 <para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
553 Configures name servers used to resolve names of upstream servers |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
554 into addresses, for example: |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
555 <example> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
556 resolver 127.0.0.1 [::1]:5353; |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
557 </example> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
558 The address can be specified as a domain name or IP address, |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
559 with an optional port. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
560 If port is not specified, the port 53 is used. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
561 Name servers are queried in a round-robin fashion. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
562 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
563 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
564 <para id="resolver_ipv6"> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
565 By default, nginx will look up both IPv4 and IPv6 addresses while resolving. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
566 If looking up of IPv6 addresses is not desired, |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
567 the <literal>ipv6=off</literal> parameter can be specified. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
568 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
569 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
570 <para id="resolver_valid"> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
571 By default, nginx caches answers using the TTL value of a response. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
572 The optional <literal>valid</literal> parameter allows overriding it: |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
573 <example> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
574 resolver 127.0.0.1 [::1]:5353 valid=30s; |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
575 </example> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
576 <note> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
577 To prevent DNS spoofing, it is recommended |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
578 configuring DNS servers in a properly secured trusted local network. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
579 </note> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
580 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
581 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
582 <para id="resolver_status_zone"> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
583 The optional <literal>status_zone</literal> parameter |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
584 enables |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
585 <link doc="../http/ngx_http_api_module.xml" id="resolvers_">collection</link> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
586 of DNS server statistics of requests and responses |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
587 in the specified <value>zone</value>. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
588 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
589 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
590 <para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
591 <note> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
592 This directive is available as part of our |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
593 <commercial_version>commercial subscription</commercial_version>. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
594 </note> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
595 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
596 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
597 </directive> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
598 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
599 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
600 <directive name="resolver_timeout"> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
601 <syntax><value>time</value></syntax> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
602 <default>30s</default> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
603 <context>upstream</context> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
604 <appeared-in>1.17.5</appeared-in> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
605 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
606 <para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
607 Sets a timeout for name resolution, for example: |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
608 <example> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
609 resolver_timeout 5s; |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
610 </example> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
611 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
612 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
613 <para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
614 <note> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
615 This directive is available as part of our |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
616 <commercial_version>commercial subscription</commercial_version>. |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
617 </note> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
618 </para> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
619 |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
620 </directive> |
98fd810c13e0
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2434
diff
changeset
|
621 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
622 </section> |
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
623 |
1772
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
624 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
625 <section id="variables" name="Embedded Variables"> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
626 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
627 <para> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
628 The <literal>ngx_stream_upstream_module</literal> module |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
629 supports the following embedded variables: |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
630 <list type="tag"> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
631 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
632 <tag-name id="var_upstream_addr"><var>$upstream_addr</var></tag-name> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
633 <tag-desc> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
634 keeps the IP address and port, |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
635 or the path to the UNIX-domain socket of the upstream server (1.11.4). |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
636 If several servers were contacted during proxying, |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
637 their addresses are separated by commas, e.g. |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
638 “<literal>192.168.1.1:12345, 192.168.1.2:12345, unix:/tmp/sock</literal>”. |
2058
eb58ee50561d
Documented upstream name in $upstream_addr.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1947
diff
changeset
|
639 If a server cannot be selected, |
eb58ee50561d
Documented upstream name in $upstream_addr.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1947
diff
changeset
|
640 the variable keeps the name of the server group. |
1772
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
641 </tag-desc> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
642 |
2308
956685eb1d43
Reordered $upstream_bytes_ variables aphabetically in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2300
diff
changeset
|
643 <tag-name id="var_upstream_bytes_received"><var>$upstream_bytes_received</var></tag-name> |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
644 <tag-desc> |
2308
956685eb1d43
Reordered $upstream_bytes_ variables aphabetically in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2300
diff
changeset
|
645 number of bytes received from an upstream server (1.11.4). |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
646 Values from several connections |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
647 are separated by commas like addresses in the |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
648 <link id="var_upstream_addr">$upstream_addr</link> variable. |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
649 </tag-desc> |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
650 |
2308
956685eb1d43
Reordered $upstream_bytes_ variables aphabetically in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2300
diff
changeset
|
651 <tag-name id="var_upstream_bytes_sent"><var>$upstream_bytes_sent</var></tag-name> |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
652 <tag-desc> |
2308
956685eb1d43
Reordered $upstream_bytes_ variables aphabetically in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2300
diff
changeset
|
653 number of bytes sent to an upstream server (1.11.4). |
1773
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
654 Values from several connections |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
655 are separated by commas like addresses in the |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
656 <link id="var_upstream_addr">$upstream_addr</link> variable. |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
657 </tag-desc> |
9c48a717e001
Documented $upstream_bytes_sent, $upstream_bytes_received in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1772
diff
changeset
|
658 |
1774
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
659 <tag-name id="var_upstream_connect_time"><var>$upstream_connect_time</var></tag-name> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
660 <tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
661 time to connect to the upstream server (1.11.4); |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
662 the time is kept in seconds with millisecond resolution. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
663 Times of several connections |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
664 are separated by commas like addresses in the |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
665 <link id="var_upstream_addr">$upstream_addr</link> variable. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
666 </tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
667 |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
668 <tag-name id="var_upstream_first_byte_time"><var>$upstream_first_byte_time</var></tag-name> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
669 <tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
670 time to receive the first byte of data (1.11.4); |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
671 the time is kept in seconds with millisecond resolution. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
672 Times of several connections |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
673 are separated by commas like addresses in the |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
674 <link id="var_upstream_addr">$upstream_addr</link> variable. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
675 </tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
676 |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
677 <tag-name id="var_upstream_session_time"><var>$upstream_session_time</var></tag-name> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
678 <tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
679 session duration in seconds with millisecond resolution (1.11.4). |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
680 Times of several connections |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
681 are separated by commas like addresses in the |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
682 <link id="var_upstream_addr">$upstream_addr</link> variable. |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
683 </tag-desc> |
e1e0c5b27515
Documented $upstream_connect_time, $upstream_first_byte_time, $upstream_session_time.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1773
diff
changeset
|
684 |
1772
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
685 </list> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
686 </para> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
687 |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
688 </section> |
536dc1885e24
Documented the $upstream_addr variable in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1744
diff
changeset
|
689 |
1367
f1e14d87d833
Updated commercial docs for the upcoming release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
690 </module> |