diff options
| author | Roman Arutyunyan <arut@nginx.com> | 2025-01-15 12:42:39 +0400 |
|---|---|---|
| committer | Roman Arutyunyan <arutyunyan.roman@gmail.com> | 2025-02-05 13:08:01 +0300 |
| commit | 22a2a225ba87029f0e7bbc09a80ff7cdad23399d (patch) | |
| tree | e4baa7d8cee212b51a470677ee52e57f7404377f /src/http/ngx_http_core_module.h | |
| parent | 04914cfbcbab347e13927b5da4b87e3846038563 (diff) | |
| download | nginx-22a2a225ba87029f0e7bbc09a80ff7cdad23399d.tar.gz nginx-22a2a225ba87029f0e7bbc09a80ff7cdad23399d.tar.bz2 | |
Added "keepalive_min_timeout" directive.
The directive sets a timeout during which a keepalive connection will
not be closed by nginx for connection reuse or graceful shutdown.
The change allows clients that send multiple requests over the same
connection without delay or with a small delay between them, to avoid
receiving a TCP RST in response to one of them. This excludes network
issues and non-graceful shutdown. As a side-effect, it also addresses
the TCP reset problem described in RFC 9112, Section 9.6, when the last
sent HTTP response could be damaged by a followup TCP RST. It is important
for non-idempotent requests, which cannot be retried by client.
It is not recommended to set keepalive_min_timeout to large values as
this can introduce an additional delay during graceful shutdown and may
restrict nginx from effective connection reuse.
Diffstat (limited to 'src/http/ngx_http_core_module.h')
| -rw-r--r-- | src/http/ngx_http_core_module.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h index 765e7ff60..e7e266bf8 100644 --- a/src/http/ngx_http_core_module.h +++ b/src/http/ngx_http_core_module.h @@ -370,6 +370,7 @@ struct ngx_http_core_loc_conf_s { ngx_msec_t send_timeout; /* send_timeout */ ngx_msec_t keepalive_time; /* keepalive_time */ ngx_msec_t keepalive_timeout; /* keepalive_timeout */ + ngx_msec_t keepalive_min_timeout; /* keepalive_min_timeout */ ngx_msec_t lingering_time; /* lingering_time */ ngx_msec_t lingering_timeout; /* lingering_timeout */ ngx_msec_t resolver_timeout; /* resolver_timeout */ |
