[PATCH 6 of 7] Documented send_min_rate and client_body_min_rate
Maxim Dounin
mdounin at mdounin.ru
Mon Jul 7 04:30:43 UTC 2025
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1751861409 -10800
# Mon Jul 07 07:10:09 2025 +0300
# Node ID eb9401e437d9415a25fc2b48caecd6bf9b863594
# Parent d14a134efcea212983096ada295d5c54bf99a2d6
Documented send_min_rate and client_body_min_rate.
diff --git a/xml/en/docs/http/ngx_http_core_module.xml b/xml/en/docs/http/ngx_http_core_module.xml
--- a/xml/en/docs/http/ngx_http_core_module.xml
+++ b/xml/en/docs/http/ngx_http_core_module.xml
@@ -10,7 +10,7 @@
<module name="Module ngx_http_core_module"
link="/en/docs/http/ngx_http_core_module.html"
lang="en"
- rev="110">
+ rev="111">
<section id="directives" name="Directives">
@@ -356,6 +356,34 @@ variable, to save the number of copy ope
</directive>
+<directive name="client_body_min_rate">
+<syntax><value>rate</value></syntax>
+<default>0</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<appeared-in>1.29.0</appeared-in>
+
+<para>
+Specifies the minimum required rate for reading client request body,
+in bytes per second.
+For example:
+<example>
+client_body_min_rate 10k;
+</example>
+</para>
+
+<para>
+If the client request body reading rate
+since the <link id="client_body_timeout">timeout</link> was last set
+is below this value,
+the timeout will not be updated on read operations,
+and the request will be terminated when the timeout expires.
+</para>
+
+</directive>
+
+
<directive name="client_body_temp_path">
<syntax>
<value>path</value>
@@ -395,8 +423,10 @@ a path to a temporary file might look li
Defines a timeout for reading client request body.
The timeout is set only for a period between two successive read operations,
not for the transmission of the whole request body.
-If a client does not transmit anything within this time, the
-request is terminated with the
+If no data is received within this time,
+or the amount of data is insufficient to maintain
+the <link id="client_body_min_rate">minimum rate</link>,
+the request is terminated with the
<http-status code="408" text="Request Time-out"/>
error.
</para>
@@ -2387,6 +2417,34 @@ This directive is ignored on Linux, Sola
</directive>
+<directive name="send_min_rate">
+<syntax><value>rate</value></syntax>
+<default>0</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<appeared-in>1.29.0</appeared-in>
+
+<para>
+Specifies the minimum required data transmission rate to the client,
+in bytes per second.
+For example:
+<example>
+send_min_rate 10k;
+</example>
+</para>
+
+<para>
+If the average transmission rate
+since the <link id="send_timeout">send timeout</link> was last set
+is below this value,
+the timeout will not be updated on write operations,
+and the connection will be closed when the timeout expires.
+</para>
+
+</directive>
+
+
<directive name="send_timeout">
<syntax><value>time</value></syntax>
<default>60s</default>
@@ -2398,7 +2456,9 @@ This directive is ignored on Linux, Sola
Sets a timeout for transmitting a response to the client.
The timeout is set only between two successive write operations,
not for the transmission of the whole response.
-If the client does not receive anything within this time,
+If no data is sent within this time,
+or the amount of data is insufficient to maintain
+the <link id="send_min_rate">minimum rate</link>,
the connection is closed.
</para>
diff --git a/xml/ru/docs/http/ngx_http_core_module.xml b/xml/ru/docs/http/ngx_http_core_module.xml
--- a/xml/ru/docs/http/ngx_http_core_module.xml
+++ b/xml/ru/docs/http/ngx_http_core_module.xml
@@ -10,7 +10,7 @@
<module name="Модуль ngx_http_core_module"
link="/ru/docs/http/ngx_http_core_module.html"
lang="ru"
- rev="110">
+ rev="111">
<section id="directives" name="Директивы">
@@ -354,6 +354,34 @@ chunked encoding, несмотря на требования стандарта.
</directive>
+<directive name="client_body_min_rate">
+<syntax><value>скорость</value></syntax>
+<default>0</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<appeared-in>1.29.0</appeared-in>
+
+<para>
+Задаёт минимальную требуемую скорость чтения тела запроса клиента,
+в байтах в секунду.
+Например:
+<example>
+client_body_min_rate 10k;
+</example>
+</para>
+
+<para>
+Если средняя скорость чтения тела запроса клиента
+с момента последней установки <link id="client_body_timeout">таймаута</link>
+ниже заданного значения,
+таймаут не будет обновляться при операциях чтения,
+и по истечении таймаута обработка запроса будет прекращена.
+</para>
+
+</directive>
+
+
<directive name="client_body_temp_path">
<syntax>
<value>путь</value>
@@ -393,6 +421,8 @@ client_body_temp_path /spool/nginx/clien
Таймаут устанавливается не на всю передачу тела запроса,
а только между двумя последовательными операциями чтения.
Если по истечении этого времени клиент ничего не передаст,
+или количество полученных от клиента данных будет недостаточно для поддержания
+<link id="client_body_min_rate">минимальной скорости</link>,
обработка запроса прекращается с ошибкой
<http-status code="408" text="Request Time-out"/>.
</para>
@@ -2384,6 +2414,34 @@ location / {
</directive>
+<directive name="send_min_rate">
+<syntax><value>скорость</value></syntax>
+<default>0</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<appeared-in>1.29.0</appeared-in>
+
+<para>
+Задаёт минимальную требуемую скорость передачи ответа клиенту,
+в байтах в секунду.
+Например:
+<example>
+send_min_rate 10k;
+</example>
+</para>
+
+<para>
+Если средняя скорость передачи ответа
+с момента последней установки <link id="send_timeout">таймаута</link>
+ниже установленного значения,
+таймаут не будет обновляться при операциях записи,
+и по истечении таймаута соединение будет закрыто.
+</para>
+
+</directive>
+
+
<directive name="send_timeout">
<syntax><value>время</value></syntax>
<default>60s</default>
@@ -2396,6 +2454,8 @@ location / {
Таймаут устанавливается не на всю передачу ответа,
а только между двумя операциями записи.
Если по истечении этого времени клиент ничего не примет,
+или количество переданных клиенту данных будет недостаточно для поддержания
+<link id="send_min_rate">минимальной скорости</link>,
соединение будет закрыто.
</para>
More information about the nginx-devel
mailing list