Mercurial > hg > nginx-site
changeset 2359:d5e576eb7677
Updated docs for the upcoming NGINX Plus release.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 08 Apr 2019 11:45:08 +0300 |
parents | ee4eccd811cd |
children | 32ad38998260 |
files | xml/en/docs/http/ngx_http_api_module.xml xml/en/docs/http/ngx_http_api_module_head.xml xml/en/docs/http/ngx_http_upstream_hc_module.xml xml/en/docs/stream/ngx_stream_proxy_module.xml xml/ru/docs/http/ngx_http_upstream_hc_module.xml xml/ru/docs/stream/ngx_stream_proxy_module.xml |
diffstat | 6 files changed, 183 insertions(+), 85 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_api_module.xml Thu Apr 04 20:02:01 2019 +0300 +++ b/xml/en/docs/http/ngx_http_api_module.xml Mon Apr 08 11:45:08 2019 +0300 @@ -101,21 +101,21 @@ a supported API <link id="api_version">version</link> in the URI. Examples of API requests with this configuration: <example> -http://127.0.0.1/api/3/ -http://127.0.0.1/api/3/nginx -http://127.0.0.1/api/3/connections -http://127.0.0.1/api/3/http/requests -http://127.0.0.1/api/3/http/server_zones/server_backend -http://127.0.0.1/api/3/http/caches/cache_backend -http://127.0.0.1/api/3/http/upstreams/backend -http://127.0.0.1/api/3/http/upstreams/backend/servers/ -http://127.0.0.1/api/3/http/upstreams/backend/servers/1 -http://127.0.0.1/api/3/http/keyvals/one?key=arg1 -http://127.0.0.1/api/3/stream/ -http://127.0.0.1/api/3/stream/server_zones/server_backend -http://127.0.0.1/api/3/stream/upstreams/ -http://127.0.0.1/api/3/stream/upstreams/backend -http://127.0.0.1/api/3/stream/upstreams/backend/servers/1 +http://127.0.0.1/api/4/ +http://127.0.0.1/api/4/nginx +http://127.0.0.1/api/4/connections +http://127.0.0.1/api/4/http/requests +http://127.0.0.1/api/4/http/server_zones/server_backend +http://127.0.0.1/api/4/http/caches/cache_backend +http://127.0.0.1/api/4/http/upstreams/backend +http://127.0.0.1/api/4/http/upstreams/backend/servers/ +http://127.0.0.1/api/4/http/upstreams/backend/servers/1 +http://127.0.0.1/api/4/http/keyvals/one?key=arg1 +http://127.0.0.1/api/4/stream/ +http://127.0.0.1/api/4/stream/server_zones/server_backend +http://127.0.0.1/api/4/stream/upstreams/ +http://127.0.0.1/api/4/stream/upstreams/backend +http://127.0.0.1/api/4/stream/upstreams/backend/servers/1 </example> </para> @@ -146,14 +146,14 @@ All API requests should contain a supported API version in the URI. If the request URI equals the location prefix, the list of supported API versions is returned. -The current API version is “<literal>3</literal>”. +The current API version is “<literal>4</literal>”. </para> <para> The optional “<literal>fields</literal>” argument in the request line specifies which fields of the requested objects will be output: <example> -http://127.0.0.1/api/3/nginx?fields=version,build +http://127.0.0.1/api/4/nginx?fields=version,build </example> </para> @@ -185,6 +185,14 @@ <list type="bullet"> <listitem> +The <literal>path</literal> and <literal>method</literal> fields of +<link id="def_nginx_error">nginx error object</link> +were removed in <link id="api_version">version</link> 4. +These fields continue to exist in earlier api versions, +but show an empty value. +</listitem> + +<listitem> The <link id="stream_zone_sync_">/stream/zone_sync/</link> data were added in <link id="api_version">version</link> 3. </listitem> @@ -952,7 +960,7 @@ </listitem> <listitem id="patchHttpKeyvalZoneKeyValue"> <literal>PATCH</literal> - Modify a key-value or delete a key -<para>Changes the value of the selected key in the key-value pair or deletes a key by setting the key value to <literal>null</literal>.</para> +<para>Changes the value of the selected key in the key-value pair or deletes a key by setting the key value to <literal>null</literal>. If <link url="https://nginx.org/en/docs/stream/ngx_stream_zone_sync_module.html#zone_sync">synchronization</link> of keyval zones in a cluster is enabled, deletes a key only on a target cluster node.</para> <para> Request parameters: <list type="tag"> @@ -978,7 +986,7 @@ </listitem> <listitem id="deleteHttpKeyvalZoneData"> <literal>DELETE</literal> - Empty the HTTP keyval zone -<para>Deletes all key-value pairs from the HTTP keyval shared memory <link url="https://nginx.org/en/docs/http/ngx_http_keyval_module.html#keyval_zone">zone</link>.</para> +<para>Deletes all key-value pairs from the HTTP keyval shared memory <link url="https://nginx.org/en/docs/http/ngx_http_keyval_module.html#keyval_zone">zone</link>. If <link url="https://nginx.org/en/docs/stream/ngx_stream_zone_sync_module.html#zone_sync">synchronization</link> of keyval zones in a cluster is enabled, empties the keyval zone only on a target cluster node.</para> <para> Possible responses: </para> @@ -1031,7 +1039,6 @@ </para> <list type="bullet"> <listitem>200 - Success, returns a collection of "<link id="def_nginx_stream_server_zone">Stream Server Zone</link>" objects for all stream server zones </listitem> -<listitem>404 - <link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> </list> @@ -1066,8 +1073,7 @@ </para> <list type="bullet"> <listitem>200 - Success, returns <link id="def_nginx_stream_server_zone">Stream Server Zone</link></listitem> -<listitem>404 - Server zone not found (<literal>ServerZoneNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +<listitem>404 - Server zone not found (<literal>ServerZoneNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> <listitem id="deleteStreamServerZoneStat"> @@ -1078,8 +1084,7 @@ </para> <list type="bullet"> <listitem>204 - Success</listitem> -<listitem>404 - Server zone not found (<literal>ServerZoneNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +<listitem>404 - Server zone not found (<literal>ServerZoneNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>405 - Method disabled (<literal>MethodDisabled</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> @@ -1108,7 +1113,6 @@ </para> <list type="bullet"> <listitem>200 - Success, returns a collection of "<link id="def_nginx_stream_upstream">Stream Upstream</link>" objects for all stream upstreams </listitem> -<listitem>404 - <link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> </list> @@ -1144,8 +1148,7 @@ <list type="bullet"> <listitem>200 - Success, returns <link id="def_nginx_stream_upstream">Stream Upstream</link></listitem> <listitem>400 - Upstream is static (<literal>UpstreamStatic</literal>), returns <link id="def_nginx_error">Error</link></listitem> -<listitem>404 - Upstream not found (<literal>UpstreamNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +<listitem>404 - Upstream not found (<literal>UpstreamNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> <listitem id="deleteStreamUpstreamStat"> @@ -1157,8 +1160,7 @@ <list type="bullet"> <listitem>204 - Success</listitem> <listitem>400 - Upstream is static (<literal>UpstreamStatic</literal>), returns <link id="def_nginx_error">Error</link></listitem> -<listitem>404 - Upstream not found (<literal>UpstreamNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +<listitem>404 - Upstream not found (<literal>UpstreamNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>405 - Method disabled (<literal>MethodDisabled</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> @@ -1186,8 +1188,7 @@ <list type="bullet"> <listitem>200 - Success, returns an array of <link id="def_nginx_stream_upstream_conf_server">Stream Upstream Servers</link></listitem> <listitem>400 - Upstream is static (<literal>UpstreamStatic</literal>), returns <link id="def_nginx_error">Error</link></listitem> -<listitem>404 - Upstream not found (<literal>UpstreamNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +<listitem>404 - Upstream not found (<literal>UpstreamNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> <listitem id="postStreamUpstreamServer"> @@ -1225,8 +1226,7 @@ no resolver defined to resolve (<literal>UpstreamConfNoResolver</literal>), upstream “<value>name</value>” has no backup (<literal>UpstreamNoBackup</literal>), upstream “<value>name</value>” memory exhausted (<literal>UpstreamOutOfMemory</literal>), returns <link id="def_nginx_error">Error</link></listitem> -<listitem>404 - Upstream not found (<literal>UpstreamNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +<listitem>404 - Upstream not found (<literal>UpstreamNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>405 - Method disabled (<literal>MethodDisabled</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>415 - JSON error (<literal>JsonError</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> @@ -1261,8 +1261,7 @@ <listitem>400 - Upstream is static (<literal>UpstreamStatic</literal>), invalid server ID (<literal>UpstreamBadServerId</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>404 - Upstream not found (<literal>UpstreamNotFound</literal>), -server with ID “<value>id</value>” does not exist (<literal>UpstreamServerNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +server with ID “<value>id</value>” does not exist (<literal>UpstreamServerNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> <listitem id="patchStreamUpstreamServer"> @@ -1300,8 +1299,7 @@ server “<value>ID</value>” weight is immutable (<literal>UpstreamServerWeightImmutable</literal>), upstream “<literal>name</literal>” memory exhausted (<literal>UpstreamOutOfMemory</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>404 - Upstream not found (<literal>UpstreamNotFound</literal>), -server with ID “<value>id</value>” does not exist (<literal>UpstreamServerNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +server with ID “<value>id</value>” does not exist (<literal>UpstreamServerNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>405 - Method disabled (<literal>MethodDisabled</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>415 - JSON error (<literal>JsonError</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> @@ -1318,8 +1316,7 @@ invalid server ID (<literal>UpstreamBadServerId</literal>), server “<value>id</value>” not removable (<literal>UpstreamServerImmutable</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>404 - Upstream not found (<literal>UpstreamNotFound</literal>), -server with ID “<value>id</value>” does not exist (<literal>UpstreamServerNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +server with ID “<value>id</value>” does not exist (<literal>UpstreamServerNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>405 - Method disabled (<literal>MethodDisabled</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> @@ -1348,7 +1345,6 @@ </para> <list type="bullet"> <listitem>200 - Success, returns a collection of "<link id="def_nginx_stream_keyval_zone">Stream Keyval Shared Memory Zone</link>" objects for all stream keyvals </listitem> -<listitem>404 - <link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> </list> @@ -1384,8 +1380,7 @@ <list type="bullet"> <listitem>200 - Success, returns <link id="def_nginx_stream_keyval_zone">Stream Keyval Shared Memory Zone</link></listitem> <listitem>404 - Keyval not found (<literal>KeyvalNotFound</literal>), -keyval key not found (<literal>KeyvalKeyNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +keyval key not found (<literal>KeyvalKeyNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> <listitem id="postStreamKeyvalZoneData"> @@ -1408,8 +1403,7 @@ <listitem>400 - Key required (<literal>KeyvalFormatError</literal>), only one key can be added (<literal>KeyvalFormatError</literal>), nested object or list (<literal>KeyvalFormatError</literal>), returns <link id="def_nginx_error">Error</link></listitem> -<listitem>404 - Keyval not found (<literal>KeyvalNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +<listitem>404 - Keyval not found (<literal>KeyvalNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>405 - Method disabled (<literal>MethodDisabled</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>409 - Key already exists (<literal>KeyvalKeyExists</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>415 - JSON error (<literal>JsonError</literal>), returns <link id="def_nginx_error">Error</link></listitem> @@ -1417,7 +1411,7 @@ </listitem> <listitem id="patchStreamKeyvalZoneKeyValue"> <literal>PATCH</literal> - Modify a key-value or delete a key -<para>Changes the value of the selected key in the key-value pair or deletes a key by setting the key value to <literal>null</literal>.</para> +<para>Changes the value of the selected key in the key-value pair or deletes a key by setting the key value to <literal>null</literal>. If <link url="https://nginx.org/en/docs/stream/ngx_stream_zone_sync_module.html#zone_sync">synchronization</link> of keyval zones in a cluster is enabled, deletes a key only on a target cluster node.</para> <para> Request parameters: <list type="tag"> @@ -1436,22 +1430,20 @@ only one key can be updated (<literal>KeyvalFormatError</literal>), nested object or list (<literal>KeyvalFormatError</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>404 - Keyval not found (<literal>KeyvalNotFound</literal>), -keyval key not found (<literal>KeyvalKeyNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +keyval key not found (<literal>KeyvalKeyNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>405 - Method disabled (<literal>MethodDisabled</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>415 - JSON error (<literal>JsonError</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> <listitem id="deleteStreamKeyvalZoneData"> <literal>DELETE</literal> - Empty the stream keyval zone -<para>Deletes all key-value pairs from the stream keyval shared memory <link url="https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html#keyval_zone">zone</link>.</para> +<para>Deletes all key-value pairs from the stream keyval shared memory <link url="https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html#keyval_zone">zone</link>. If <link url="https://nginx.org/en/docs/stream/ngx_stream_zone_sync_module.html#zone_sync">synchronization</link> of keyval zones in a cluster is enabled, empties the keyval zone only on a target cluster node.</para> <para> Possible responses: </para> <list type="bullet"> <listitem>204 - Success</listitem> -<listitem>404 - Keyval not found (<literal>KeyvalNotFound</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> +<listitem>404 - Keyval not found (<literal>KeyvalNotFound</literal>), returns <link id="def_nginx_error">Error</link></listitem> <listitem>405 - Method disabled (<literal>MethodDisabled</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> @@ -1471,8 +1463,6 @@ </para> <list type="bullet"> <listitem>200 - Success, returns <link id="def_nginx_stream_zone_sync">Stream Zone Sync Node</link></listitem> -<listitem>404 - Zone sync not configured (<literal>ZoneSyncNotConfigured</literal>), -<link url="https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream">stream</link> not configured (<literal>StreamNotConfigured</literal>), returns <link id="def_nginx_error">Error</link></listitem> </list> </listitem> </list> @@ -3009,18 +2999,6 @@ <para>Error:</para> nginx error object.<list type="tag"> <tag-name> -<literal>path</literal> (<literal>string</literal>) -</tag-name> -<tag-desc> -API path. -</tag-desc> -<tag-name> -<literal>method</literal> (<literal>string</literal>) -</tag-name> -<tag-desc> -HTTP method. -</tag-desc> -<tag-name> <literal>error</literal></tag-name> <tag-desc> <list type="tag">
--- a/xml/en/docs/http/ngx_http_api_module_head.xml Thu Apr 04 20:02:01 2019 +0300 +++ b/xml/en/docs/http/ngx_http_api_module_head.xml Mon Apr 08 11:45:08 2019 +0300 @@ -101,21 +101,21 @@ a supported API <link id="api_version">version</link> in the URI. Examples of API requests with this configuration: <example> -http://127.0.0.1/api/3/ -http://127.0.0.1/api/3/nginx -http://127.0.0.1/api/3/connections -http://127.0.0.1/api/3/http/requests -http://127.0.0.1/api/3/http/server_zones/server_backend -http://127.0.0.1/api/3/http/caches/cache_backend -http://127.0.0.1/api/3/http/upstreams/backend -http://127.0.0.1/api/3/http/upstreams/backend/servers/ -http://127.0.0.1/api/3/http/upstreams/backend/servers/1 -http://127.0.0.1/api/3/http/keyvals/one?key=arg1 -http://127.0.0.1/api/3/stream/ -http://127.0.0.1/api/3/stream/server_zones/server_backend -http://127.0.0.1/api/3/stream/upstreams/ -http://127.0.0.1/api/3/stream/upstreams/backend -http://127.0.0.1/api/3/stream/upstreams/backend/servers/1 +http://127.0.0.1/api/4/ +http://127.0.0.1/api/4/nginx +http://127.0.0.1/api/4/connections +http://127.0.0.1/api/4/http/requests +http://127.0.0.1/api/4/http/server_zones/server_backend +http://127.0.0.1/api/4/http/caches/cache_backend +http://127.0.0.1/api/4/http/upstreams/backend +http://127.0.0.1/api/4/http/upstreams/backend/servers/ +http://127.0.0.1/api/4/http/upstreams/backend/servers/1 +http://127.0.0.1/api/4/http/keyvals/one?key=arg1 +http://127.0.0.1/api/4/stream/ +http://127.0.0.1/api/4/stream/server_zones/server_backend +http://127.0.0.1/api/4/stream/upstreams/ +http://127.0.0.1/api/4/stream/upstreams/backend +http://127.0.0.1/api/4/stream/upstreams/backend/servers/1 </example> </para> @@ -146,14 +146,14 @@ All API requests should contain a supported API version in the URI. If the request URI equals the location prefix, the list of supported API versions is returned. -The current API version is “<literal>3</literal>”. +The current API version is “<literal>4</literal>”. </para> <para> The optional “<literal>fields</literal>” argument in the request line specifies which fields of the requested objects will be output: <example> -http://127.0.0.1/api/3/nginx?fields=version,build +http://127.0.0.1/api/4/nginx?fields=version,build </example> </para> @@ -185,6 +185,14 @@ <list type="bullet"> <listitem> +The <literal>path</literal> and <literal>method</literal> fields of +<link id="def_nginx_error">nginx error object</link> +were removed in <link id="api_version">version</link> 4. +These fields continue to exist in earlier api versions, +but show an empty value. +</listitem> + +<listitem> The <link id="stream_zone_sync_">/stream/zone_sync/</link> data were added in <link id="api_version">version</link> 3. </listitem>
--- a/xml/en/docs/http/ngx_http_upstream_hc_module.xml Thu Apr 04 20:02:01 2019 +0300 +++ b/xml/en/docs/http/ngx_http_upstream_hc_module.xml Mon Apr 08 11:45:08 2019 +0300 @@ -9,7 +9,7 @@ <module name="Module ngx_http_upstream_hc_module" link="/en/docs/http/ngx_http_upstream_hc_module.html" lang="en" - rev="4"> + rev="5"> <section id="summary"> @@ -290,6 +290,17 @@ </tag-desc> </list> + +<list type="tag"> + +<tag-name id="match_require"><literal>require</literal> + <value>$variable</value> + <literal>...;</literal></tag-name> +<tag-desc> +all specified variables are not empty and not equal to “0” (1.15.9). +</tag-desc> + +</list> </para> <para> @@ -328,6 +339,18 @@ } </example> +<example> +# status is 200 or 204 +map $upstream_status $good_status { + 200 1; + 204 1; +} + +match server_ok { + require $good_status; +} +</example> + </para> </directive>
--- a/xml/en/docs/stream/ngx_stream_proxy_module.xml Thu Apr 04 20:02:01 2019 +0300 +++ b/xml/en/docs/stream/ngx_stream_proxy_module.xml Mon Apr 08 11:45:08 2019 +0300 @@ -9,7 +9,7 @@ <module name="Module ngx_stream_proxy_module" link="/en/docs/stream/ngx_stream_proxy_module.html" lang="en" - rev="22"> + rev="23"> <section id="summary"> @@ -296,6 +296,40 @@ </directive> +<directive name="proxy_session_drop"> +<syntax><literal>on</literal> | <literal>off</literal></syntax> +<default>off</default> +<context>stream</context> +<context>server</context> +<appeared-in>1.15.8</appeared-in> + +<para> +Enables terminating all sessions to a proxied server +after it was removed from the group or marked as permanently unavailable. +This can occur because of +<link doc="ngx_stream_core_module.xml" id="resolver">re-resolve</link> +or with the API +<link doc="../http/ngx_http_api_module.xml" id="deleteStreamUpstreamServer"><literal>DELETE</literal></link> +command. +A server can be marked as permanently unavailable if it is considered +<link doc="ngx_stream_upstream_hc_module.xml" id="health_check">unhealthy</link> +or with the API +<link doc="../http/ngx_http_api_module.xml" id="patchStreamUpstreamServer"><literal>PATCH</literal></link> +command. +Each session is terminated when the next +read or write event is processed for the client or proxied server. +</para> + +<para> +<note> +This directive is available as part of our +<commercial_version>commercial subscription</commercial_version>. +</note> +</para> + +</directive> + + <directive name="proxy_socket_keepalive"> <syntax><literal>on</literal> | <literal>off</literal></syntax> <default>off</default>
--- a/xml/ru/docs/http/ngx_http_upstream_hc_module.xml Thu Apr 04 20:02:01 2019 +0300 +++ b/xml/ru/docs/http/ngx_http_upstream_hc_module.xml Mon Apr 08 11:45:08 2019 +0300 @@ -9,7 +9,7 @@ <module name="Модуль ngx_http_upstream_hc_module" link="/ru/docs/http/ngx_http_upstream_hc_module.html" lang="ru" - rev="4"> + rev="5"> <section id="summary"> @@ -293,6 +293,17 @@ </tag-desc> </list> + +<list type="tag"> + +<tag-name id="match_require"><literal>require</literal> + <value>$переменная</value> + <literal>...;</literal></tag-name> +<tag-desc> +все указанные переменные непустые и не равны “0” (1.15.9). +</tag-desc> + +</list> </para> <para> @@ -331,6 +342,18 @@ } </example> +<example> +# код ответа равен 200 или 204 +map $upstream_status $good_status { + 200 1; + 204 1; +} + +match server_ok { + require $good_status; +} +</example> + </para> </directive>
--- a/xml/ru/docs/stream/ngx_stream_proxy_module.xml Thu Apr 04 20:02:01 2019 +0300 +++ b/xml/ru/docs/stream/ngx_stream_proxy_module.xml Mon Apr 08 11:45:08 2019 +0300 @@ -9,7 +9,7 @@ <module name="Модуль ngx_stream_proxy_module" link="/ru/docs/stream/ngx_stream_proxy_module.html" lang="ru" - rev="22"> + rev="23"> <section id="summary"> @@ -297,6 +297,38 @@ </directive> +<directive name="proxy_session_drop"> +<syntax><literal>on</literal> | <literal>off</literal></syntax> +<default>off</default> +<context>stream</context> +<context>server</context> +<appeared-in>1.15.8</appeared-in> + +<para> +Позволяет завершить все сессии к проксируемому серверу, +если он был удалён из группы или помечен как постоянно недоступный. +Это может произойти вследствие повторного +<link doc="ngx_stream_core_module.xml" id="resolver">преобразования имён</link> +в адреса, а также при помощи команды API +<link doc="../http/ngx_http_api_module.xml" id="deleteStreamUpstreamServer"><literal>DELETE</literal></link>. +Сервер может быть помечен как постоянно недоступный в случае неуспешной +<link doc="ngx_stream_upstream_hc_module.xml" id="health_check">проверки работоспособности</link>, +а также при помощи команды API +<link doc="../http/ngx_http_api_module.xml" id="patchStreamUpstreamServer"><literal>PATCH</literal></link>. +Сессия завершается при обработке очередного +события чтения или записи на стороне клиента или проксируемого сервера. +</para> + +<para> +<note> +Эта директива доступна как часть +<commercial_version>коммерческой подписки</commercial_version>. +</note> +</para> + +</directive> + + <directive name="proxy_socket_keepalive"> <syntax><literal>on</literal> | <literal>off</literal></syntax> <default>off</default>