]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: server: add a max-reuse parameter
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Jan 2019 09:21:49 +0000 (10:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 24 Jan 2019 18:06:43 +0000 (19:06 +0100)
commit9c538e01c2e9d4b7120e96df35447ef08533eb71
tree6d8ab93cfc47f9534620f6b6464ba14bbb21665f
parent2c7deddc06374700c967a7a1f72b913d0f0d9bb0
MINOR: server: add a max-reuse parameter

Some servers may wish to limit the total number of requests they execute
over a connection because some of their components might leak resources.
In HTTP/1 it was easy, they just had to emit a "connection: close" header
field with the last response. In HTTP/2, it's less easy because the info
is not always shared with the component dealing with the H2 protocol and
it could be harder to advertise a GOAWAY with a stream limit.

This patch provides a solution to this by adding a new "max-reuse" parameter
to the server keyword. This parameter indicates how many times an idle
connection may be reused for new requests. The information is made available
and the underlying muxes will be able to use it at will.

This patch should be backported to 1.9.
doc/configuration.txt
include/types/server.h
src/cfgparse.c
src/server.c