# HG changeset patch # User Yaroslav Zhuravlev # Date 1506087845 -10800 # Node ID 29b68a7b42fc7489d08ba8c46c29df3a7a683874 # Parent 093855e77388c82c65a4ed8c88ef6cf933570c8a Documented cookie name for sticky cookie and server route. diff --git a/xml/en/docs/http/ngx_http_upstream_module.xml b/xml/en/docs/http/ngx_http_upstream_module.xml --- a/xml/en/docs/http/ngx_http_upstream_module.xml +++ b/xml/en/docs/http/ngx_http_upstream_module.xml @@ -10,7 +10,7 @@ + rev="62">
@@ -835,6 +835,25 @@ selected as if the client has not been b The first parameter sets the name of the cookie to be set or inspected. +The cookie value is +a hexadecimal representation of the MD5 hash of the IP address and port, +or of the UNIX-domain socket path. +However, if the “route” parameter of the + directive is specified, the cookie value will be +the value of the “route” parameter: + +upstream backend { + server backend1.example.com route=a; + server backend2.example.com route=b; + + sticky cookie srv_id expires=1h domain=.example.com path=/; +} + +In this case, the value of the “srv_id” cookie will be +either a or b. + + + Additional parameters may be as follows: diff --git a/xml/ru/docs/http/ngx_http_upstream_module.xml b/xml/ru/docs/http/ngx_http_upstream_module.xml --- a/xml/ru/docs/http/ngx_http_upstream_module.xml +++ b/xml/ru/docs/http/ngx_http_upstream_module.xml @@ -10,7 +10,7 @@ + rev="62">
@@ -842,6 +842,24 @@ upstream backend { Первый параметр задаёт имя куки, которую необходимо установить или проверить. +Значением куки является MD5-хэш IP-адреса и порта +(или пути UNIX-сокета) в шестнадцатеричном виде. +Однако если указан параметр “route” +директивы , то значением куки будет +значение параметра “route”: + +upstream backend { + server backend1.example.com route=a; + server backend2.example.com route=b; + + sticky cookie srv_id expires=1h domain=.example.com path=/; +} + +В этом случае значение куки “srv_id” будет +или a, или b. + + + Дополнительные параметры могут быть следующими: