Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_upstream_module.xml @ 2041:29b68a7b42fc
Documented cookie name for sticky cookie and server route.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Fri, 22 Sep 2017 16:44:05 +0300 |
parents | 5c55b7054b58 |
children | eb58ee50561d |
comparison
equal
deleted
inserted
replaced
2040:093855e77388 | 2041:29b68a7b42fc |
---|---|
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="61"> | 13 rev="62"> |
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 |
833 selected as if the client has not been bound yet. | 833 selected as if the client has not been bound yet. |
834 </para> | 834 </para> |
835 | 835 |
836 <para> | 836 <para> |
837 The first parameter sets the name of the cookie to be set or inspected. | 837 The first parameter sets the name of the cookie to be set or inspected. |
838 The cookie value is | |
839 a hexadecimal representation of the MD5 hash of the IP address and port, | |
840 or of the UNIX-domain socket path. | |
841 However, if the “<literal>route</literal>” parameter of the | |
842 <link id="server"/> directive is specified, the cookie value will be | |
843 the value of the “<literal>route</literal>” parameter: | |
844 <example> | |
845 upstream backend { | |
846 server backend1.example.com route=<emphasis>a</emphasis>; | |
847 server backend2.example.com route=<emphasis>b</emphasis>; | |
848 | |
849 sticky cookie srv_id expires=1h domain=.example.com path=/; | |
850 } | |
851 </example> | |
852 In this case, the value of the “<literal>srv_id</literal>” cookie will be | |
853 either <value>a</value> or <value>b</value>. | |
854 </para> | |
855 | |
856 <para> | |
838 Additional parameters may be as follows: | 857 Additional parameters may be as follows: |
839 <list type="tag"> | 858 <list type="tag"> |
840 | 859 |
841 <tag-name><literal>expires=</literal><value>time</value></tag-name> | 860 <tag-name><literal>expires=</literal><value>time</value></tag-name> |
842 <tag-desc> | 861 <tag-desc> |