comparison xml/en/docs/http/ngx_http_upstream_module.xml @ 1391:0702cc081c63

Revised descriptions of upstream module variables.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 19 Jan 2015 15:23:46 +0300
parents d796c95f0922
children 82e62822abe8
comparison
equal deleted inserted replaced
1390:d7cb4dcc1c3e 1391:0702cc081c63
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
9 9
10 <module name="Module ngx_http_upstream_module" 10 <module name="Module ngx_http_upstream_module"
11 link="/en/docs/http/ngx_http_upstream_module.html" 11 link="/en/docs/http/ngx_http_upstream_module.html"
12 lang="en" 12 lang="en"
13 rev="30"> 13 rev="31">
14 14
15 <section id="summary"> 15 <section id="summary">
16 16
17 <para> 17 <para>
18 The <literal>ngx_http_upstream_module</literal> module 18 The <literal>ngx_http_upstream_module</literal> module
1284 supports the following embedded variables: 1284 supports the following embedded variables:
1285 <list type="tag"> 1285 <list type="tag">
1286 1286
1287 <tag-name id="var_upstream_addr"><var>$upstream_addr</var></tag-name> 1287 <tag-name id="var_upstream_addr"><var>$upstream_addr</var></tag-name>
1288 <tag-desc> 1288 <tag-desc>
1289 keeps the IP address and port of the server, 1289 keeps the IP address and port,
1290 or the path to the UNIX-domain socket. 1290 or the path to the UNIX-domain socket of the upstream server.
1291 If several servers were contacted during request processing, 1291 If several servers were contacted during request processing,
1292 their addresses are separated by commas, e.g. 1292 their addresses are separated by commas, e.g.
1293 “<literal>192.168.1.1:80, 192.168.1.2:80, unix:/tmp/sock</literal>”. 1293 “<literal>192.168.1.1:80, 192.168.1.2:80, unix:/tmp/sock</literal>”.
1294 If an internal redirect from one server group to another happens, 1294 If an internal redirect from one server group to another happens,
1295 initiated by 1295 initiated by
1304 <tag-desc> 1304 <tag-desc>
1305 keeps the status of accessing a response cache (0.8.3). 1305 keeps the status of accessing a response cache (0.8.3).
1306 The status can be either “<literal>MISS</literal>”, 1306 The status can be either “<literal>MISS</literal>”,
1307 “<literal>BYPASS</literal>”, “<literal>EXPIRED</literal>”, 1307 “<literal>BYPASS</literal>”, “<literal>EXPIRED</literal>”,
1308 “<literal>STALE</literal>”, “<literal>UPDATING</literal>”, 1308 “<literal>STALE</literal>”, “<literal>UPDATING</literal>”,
1309 “<literal>REVALIDATED</literal>” or “<literal>HIT</literal>”. 1309 “<literal>REVALIDATED</literal>”, or “<literal>HIT</literal>”.
1310 </tag-desc> 1310 </tag-desc>
1311 1311
1312 <tag-name id="var_upstream_cookie_"><var>$upstream_cookie_</var><value>name</value> 1312 <tag-name id="var_upstream_cookie_"><var>$upstream_cookie_</var><value>name</value>
1313 </tag-name> 1313 </tag-name>
1314 <tag-desc> 1314 <tag-desc>
1315 cookie with the specified <value>name</value> sent by the upstream server 1315 cookie with the specified <value>name</value> sent by the upstream server
1316 in the <header>Set-Cookie</header> response header field (1.7.1). 1316 in the <header>Set-Cookie</header> response header field (1.7.1).
1317 Only the last server’s response header fields are saved. 1317 Only the cookies from the response of the last server are saved.
1318 </tag-desc> 1318 </tag-desc>
1319 1319
1320 <tag-name id="var_upstream_response_length"><var>$upstream_response_length</var> 1320 <tag-name id="var_upstream_response_length"><var>$upstream_response_length</var>
1321 </tag-name> 1321 </tag-name>
1322 <tag-desc> 1322 <tag-desc>
1323 keeps the lengths of responses obtained from the upstream servers (0.7.27); 1323 keeps the length of the response obtained from the upstream server (0.7.27);
1324 lengths are kept in bytes. 1324 the length is kept in bytes.
1325 Several response lengths are separated by commas and colons 1325 Lengths of several responses
1326 like addresses in the <var>$upstream_addr</var> variable. 1326 are separated by commas and colons like addresses in the
1327 <link id="var_upstream_addr">$upstream_addr</link> variable.
1327 </tag-desc> 1328 </tag-desc>
1328 1329
1329 <tag-name id="var_upstream_response_time"><var>$upstream_response_time</var> 1330 <tag-name id="var_upstream_response_time"><var>$upstream_response_time</var>
1330 </tag-name> 1331 </tag-name>
1331 <tag-desc> 1332 <tag-desc>
1332 keeps times of responses obtained from upstream servers; 1333 keeps time spent on receiving the response from the upstream server;
1333 times are kept in seconds with a milliseconds resolution. 1334 the time is kept in seconds with millisecond resolution.
1334 Several response times are separated by commas and colons 1335 Times of several responses
1335 like addresses in the <var>$upstream_addr</var> variable. 1336 are separated by commas and colons like addresses in the
1337 <link id="var_upstream_addr">$upstream_addr</link> variable.
1336 </tag-desc> 1338 </tag-desc>
1337 1339
1338 <tag-name id="var_upstream_status"><var>$upstream_status</var></tag-name> 1340 <tag-name id="var_upstream_status"><var>$upstream_status</var></tag-name>
1339 <tag-desc> 1341 <tag-desc>
1340 keeps codes of responses obtained from upstream servers. 1342 keeps status code of the response obtained from the upstream server.
1341 Several response codes are separated by commas and colons 1343 Status codes of several responses
1342 like addresses in the <var>$upstream_addr</var> variable. 1344 are separated by commas and colons like addresses in the
1345 <link id="var_upstream_addr">$upstream_addr</link> variable.
1343 </tag-desc> 1346 </tag-desc>
1344 1347
1345 <tag-name id="var_upstream_http_"><var>$upstream_http_</var><value>name</value></tag-name> 1348 <tag-name id="var_upstream_http_"><var>$upstream_http_</var><value>name</value></tag-name>
1346 <tag-desc> 1349 <tag-desc>
1347 keep server response header fields. 1350 keep server response header fields.
1348 For example, the <header>Server</header> response header field 1351 For example, the <header>Server</header> response header field
1349 is available through the <var>$upstream_http_server</var> variable. 1352 is available through the <var>$upstream_http_server</var> variable.
1350 The rules of converting header field names to variable names are the same 1353 The rules of converting header field names to variable names are the same
1351 as for the variables that start with the 1354 as for the variables that start with the
1352 “<link doc="ngx_http_core_module.xml" id="variables">$http_</link>” prefix. 1355 “<link doc="ngx_http_core_module.xml" id="var_http_">$http_</link>” prefix.
1353 Only the last server’s response header fields are saved. 1356 Only the header fields from the response of the last server are saved.
1354 </tag-desc> 1357 </tag-desc>
1355 1358
1356 </list> 1359 </list>
1357 </para> 1360 </para>
1358 1361