]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: spoe: Fix policy to close applets when SPOE connections are queued
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 2 Aug 2021 16:13:27 +0000 (18:13 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 Aug 2021 08:07:43 +0000 (10:07 +0200)
commitd7da3dd928b4bc71c1c207908c455b81d2514676
treec1ed69954b898fe491c9e2c91fc969791f66898f
parent6f1296b5c70d2f513836b61cfb9a06aed2db10eb
BUG/MEDIUM: spoe: Fix policy to close applets when SPOE connections are queued

It is the second part of the fix that should solve fairness issues with the
connections management inside the SPOE filter. Indeed, in multithreaded
mode, when the SPOE detects there are some connections in queue on a server,
it closes existing connections by releasing SPOE applets. It is mandatory
when a maxconn is set because few connections on a thread may prenvent new
connections establishment.

The first attempt to fix this bug (9e647e5af "BUG/MEDIUM: spoe: Kill applets
if there are pending connections and nbthread > 1") introduced a bug. In
pipelining mode, SPOE applets might be closed while some frames are pending
for the ACK reply. To fix the bug, in the processing stage, if there are
some connections in queue, only truly idle applets may process pending
requests. In this case, only one request at a time is processed. And at the
end of the processing stage, only truly idle applets may be released. It is
an empirical workaround, but it should be good enough to solve contention
issues when a low maxconn is set.

This patch should partely fix the issue #1340. It must be backported as far
as 2.0.
src/flt_spoe.c