]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: checks: start the checks in sleeping state
authorWilly Tarreau <w@1wt.eu>
Thu, 17 Aug 2023 14:09:05 +0000 (16:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Sep 2023 06:26:06 +0000 (08:26 +0200)
commit7163f95b43476ccddbd07d37148e0d040e353dcf
treef98f5af12d45acf17969973d3da3d5458a556ccf
parent48442b8b156b3d7b7e99cdeb6decc1314b3e286d
MINOR: checks: start the checks in sleeping state

The CHK_ST_SLEEPING state was introduced by commit d114f4a68 ("MEDIUM:
checks: spread the checks load over random threads") to indicate that
a check was not currently bound to a thread and that it could easily
be migrated to any other thread. However it did not start the checks
in this state, meaning that they were not redispatchable on startup.

Sometimes under heavy load (e.g. when using SSL checks with OpenSSL 3.0)
the cost of setting up new connections is so high that some threads may
experience connection timeouts on startup. In this case it's better if
they can transfer their excess load to other idle threads. By just
marking the check as sleeping upon startup, we can do this and
significantly reduce the number of failed initial checks.
include/haproxy/check-t.h
src/check.c