diff --git a/xml/en/docs/http/ngx_http_js_module.xml b/xml/en/docs/http/ngx_http_js_module.xml index 77848227..a056f40b 100644 --- a/xml/en/docs/http/ngx_http_js_module.xml +++ b/xml/en/docs/http/ngx_http_js_module.xml @@ -9,7 +9,7 @@ + rev="55">
@@ -473,6 +473,96 @@ with Fetch API. + +connections +0 +http +server +location + + +Activates the cache for connections to destination servers. +When the value is greater than 0, +enables keepalive connections for +Fetch API. + + + +The connections parameter sets the maximum number of idle +keepalive connections to destination servers that are preserved in the cache +of each worker process. +When this number is exceeded, the least recently used connections are closed. + + + +Example: + +location /fetch { + js_fetch_keepalive 32; + js_fetch_trusted_certificate /path/to/ISRG_Root_X1.pem; + js_content main.fetch_handler; +} + + + + + + + +number +1000 +http +server +location + + +Sets the maximum number of requests that can be served through one keepalive +connection with Fetch API. +After the maximum number of requests is made, the connection is closed. + + + +Closing connections periodically is necessary to free per-connection memory +allocations. +Therefore, using too high maximum number of requests could result in +excessive memory usage and not recommended. + + + + + + +time +1h +http +server +location + + +Limits the maximum time during which requests can be processed through one +keepalive connection with Fetch API. +After this time is reached, the connection is closed following the subsequent +request processing. + + + + + + +time +60s +http +server +location + + +Sets a timeout during which an idle keepalive connection to a destination server +will stay open with Fetch API. + + + + + module.function diff --git a/xml/en/docs/njs/engine.xml b/xml/en/docs/njs/engine.xml index 9aea932a..175f23c1 100644 --- a/xml/en/docs/njs/engine.xml +++ b/xml/en/docs/njs/engine.xml @@ -9,7 +9,7 @@
@@ -60,7 +60,6 @@ to ensure compatibility with the njs engine, with the following exceptions: njs-specific API: njs.dump(), -njs.on(), console.dump(). diff --git a/xml/en/docs/stream/ngx_stream_js_module.xml b/xml/en/docs/stream/ngx_stream_js_module.xml index 484450e8..a6c389e1 100644 --- a/xml/en/docs/stream/ngx_stream_js_module.xml +++ b/xml/en/docs/stream/ngx_stream_js_module.xml @@ -9,7 +9,7 @@ + rev="51">
@@ -347,6 +347,93 @@ with Fetch API. + +connections +0 +stream +server + + +Activates the cache for connections to destination servers. +When the value is greater than 0, +enables keepalive connections for +Fetch API. + + + +The connections parameter sets the maximum number of idle +keepalive connections to destination servers that are preserved in the cache +of each worker process. +When this number is exceeded, the least recently used connections are closed. + + + +Example: + +server { + listen 12345; + js_fetch_keepalive 32; + js_fetch_trusted_certificate /path/to/ISRG_Root_X1.pem; + js_preread main.fetch_handler; +} + + + + + + + +number +1000 +stream +server + + +Sets the maximum number of requests that can be served through one keepalive +connection with Fetch API. +After the maximum number of requests is made, the connection is closed. + + + +Closing connections periodically is necessary to free per-connection memory +allocations. +Therefore, using too high maximum number of requests could result in +excessive memory usage and not recommended. + + + + + + +time +1h +stream +server + + +Limits the maximum time during which requests can be processed through one +keepalive connection with Fetch API. +After this time is reached, the connection is closed following the subsequent +request processing. + + + + + + +time +60s +stream +server + + +Sets a timeout during which an idle keepalive connection to a destination server +will stay open with Fetch API. + + + + + module.function diff --git a/xml/ru/docs/http/ngx_http_js_module.xml b/xml/ru/docs/http/ngx_http_js_module.xml index a258365e..fe36e199 100644 --- a/xml/ru/docs/http/ngx_http_js_module.xml +++ b/xml/ru/docs/http/ngx_http_js_module.xml @@ -9,7 +9,7 @@ + rev="52">
@@ -450,6 +450,98 @@ HTTPS-сертификата + +соединения +0 +http +server +location + + +Активирует кэш для соединений с серверами назначения. +Если значение больше 0, +включает keepalive-соединения для +Fetch API. + + + +Параметр соединения задаёт максимальное количество +неактивных keepalive-соединений с серверами назначения, +которые сохраняются в кэше каждого рабочего процесса. +Если это количество превышено, наименее недавно использованные соединения закрываются. + + + +Пример: + +location /fetch { + js_fetch_keepalive 32; + js_fetch_trusted_certificate /path/to/ISRG_Root_X1.pem; + js_content main.fetch_handler; +} + + + + + + + +число +1000 +http +server +location + + +Задаёт максимальное количество запросов, которые могут быть обслужены +через одно keepalive-соединение при помощи +Fetch API. +После выполнения максимального количества запросов соединение закрывается. + + + +Периодическое закрытие соединений необходимо для освобождения +выделенной под соединение памяти. +Поэтому использование слишком большого максимального количества запросов +может привести к чрезмерному потреблению памяти и не рекомендуется. + + + + + + +время +1h +http +server +location + + +Ограничивает максимальное время, в течение которого запросы могут обрабатываться +через одно keepalive-соединение при помощи +Fetch API. +По истечении этого времени соединение закрывается после обработки очередного запроса. + + + + + + +время +60s +http +server +location + + +Задаёт таймаут, в течение которого неактивное keepalive-соединение +с сервером назначения остается открытым при помощи +Fetch API. + + + + + функция | модуль.функция diff --git a/xml/ru/docs/njs/engine.xml b/xml/ru/docs/njs/engine.xml index f9022082..81a2f8d4 100644 --- a/xml/ru/docs/njs/engine.xml +++ b/xml/ru/docs/njs/engine.xml @@ -9,7 +9,7 @@
@@ -60,7 +60,6 @@ njs — встроенный движок JavaScript, API njs: njs.dump(), -njs.on(), console.dump(). diff --git a/xml/ru/docs/stream/ngx_stream_js_module.xml b/xml/ru/docs/stream/ngx_stream_js_module.xml index fe71f4ad..80e145fe 100644 --- a/xml/ru/docs/stream/ngx_stream_js_module.xml +++ b/xml/ru/docs/stream/ngx_stream_js_module.xml @@ -9,7 +9,7 @@ + rev="49">
@@ -348,6 +348,95 @@ HTTPS-сертификата + +соединения +0 +stream +server + + +Активирует кэш для соединений с серверами назначения. +Если значение больше 0, +включает keepalive-соединения для +Fetch API. + + + +Параметр соединения задаёт максимальное количество +неактивных keepalive-соединений с серверами назначения, +которые сохраняются в кэше каждого рабочего процесса. +Если это количество превышено, наименее недавно использованные соединения закрываются. + + + +Пример: + +server { + listen 12345; + js_fetch_keepalive 32; + js_fetch_trusted_certificate /path/to/ISRG_Root_X1.pem; + js_preread main.fetch_handler; +} + + + + + + + +число +1000 +stream +server + + +Задаёт максимальное количество запросов, которые могут быть обслужены +через одно keepalive-соединение при помощи +Fetch API. +После выполнения максимального количества запросов соединение закрывается. + + + +Периодическое закрытие соединений необходимо для освобождения +выделенной под соединение памяти. +Поэтому использование слишком большого максимального количества запросов +может привести к чрезмерному потреблению памяти и не рекомендуется. + + + + + + +время +1h +stream +server + + +Ограничивает максимальное время, в течение которого запросы могут обрабатываться +через одно keepalive-соединение при помощи +Fetch API. +По истечении этого времени соединение закрывается после обработки очередного запроса. + + + + + + +время +60s +stream +server + + +Задаёт таймаут, в течение которого неактивное keepalive-соединение +с сервером назначения остается открытым при помощи +Fetch API. + + + + + функция | модуль.функция