]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: backend: set release on takeover for strict maxconn
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 8 Aug 2025 15:50:57 +0000 (17:50 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 28 Aug 2025 14:11:32 +0000 (16:11 +0200)
commit21f7974e05827d3229258694926fa5a34d581e47
tree4673196ae653fbf69b79da220040a35a7543179c
parentd971d3fed806fb1f1c1ec093d748e893756ee532
OPTIM: backend: set release on takeover for strict maxconn

When strict maxconn is enforced on a server, it may be necessary to kill
an idle connection to never exceed the limit. To be able to delete a
connection from any thread, takeover is first used to migrate it on the
current thread prior to its deletion.

As takeover is performed to delete a connection instead of reusing it,
<release> argument can be set to true. This removes unnecessary
allocations of resources prior to connection deletion. As such, this
patch is a small optimization for strict maxconn implementation.

Note that this patch depends on the previous one which removes any
assumption in takeover implementation that thread isolation is active if
<release> is true.
src/backend.c