MEDIUM: checks: search more aggressively for another thread on overload
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Aug 2023 09:39:00 +0000 (11:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Sep 2023 06:26:06 +0000 (08:26 +0200)
commitcfc0bceeb5f8769fa7912500a5fb8e7f53693412
tree2565199b6b086865db130ffa95ddbc4ab3435aec
parent016e189ea3ce3c1cfb02b6a4b9587bd6ed1c128d
MEDIUM: checks: search more aggressively for another thread on overload

When the current check is overloaded (more running checks than the
configured limit), we'll try more aggressively to find another thread.
Instead of just opportunistically looking for one half as loaded, now if
the current thread has more than 1% more active checks than another one,
or has more than a configured limit of concurrent running checks, it will
search for a more suitable thread among 3 other random ones in order to
migrate the check there. The number of migrations remains very low (~1%)
and the checks load very fair across all threads (~1% as well). The new
parameter is called tune.max-checks-per-thread.
doc/configuration.txt
include/haproxy/global-t.h
src/check.c