summaryrefslogtreecommitdiffhomepage
path: root/src/core/ngx_connection.h
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2023-02-02 23:38:48 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2023-02-02 23:38:48 +0300
commit2485681308bd8d3108da31546cb91bb97813a3fb (patch)
treeaf077d3c55d14d356973707942b7bbb859c37f9c /src/core/ngx_connection.h
parent384a8d8dfbf817b98715e8ed5ec7bf3cb545d501 (diff)
downloadnginx-2485681308bd8d3108da31546cb91bb97813a3fb.tar.gz
nginx-2485681308bd8d3108da31546cb91bb97813a3fb.tar.bz2
Lingering close for connections with pipelined requests.
This is expected to help with clients using pipelining with some constant depth, such as apt[1][2]. When downloading many resources, apt uses pipelining with some constant depth, a number of requests in flight. This essentially means that after receiving a response it sends an additional request to the server, and this can result in requests arriving to the server at any time. Further, additional requests are sent one-by-one, and can be easily seen as such (neither as pipelined, nor followed by pipelined requests). The only safe approach to close such connections (for example, when keepalive_requests is reached) is with lingering. To do so, now nginx monitors if pipelining was used on the connection, and if it was, closes the connection with lingering. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973861#10 [2] https://mailman.nginx.org/pipermail/nginx-devel/2023-January/ZA2SP5SJU55LHEBCJMFDB2AZVELRLTHI.html
Diffstat (limited to 'src/core/ngx_connection.h')
-rw-r--r--src/core/ngx_connection.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h
index 6d3348d9c..36e1be27c 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -172,6 +172,7 @@ struct ngx_connection_s {
unsigned timedout:1;
unsigned error:1;
unsigned destroyed:1;
+ unsigned pipeline:1;
unsigned idle:1;
unsigned reusable:1;