]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: queues: Check minconn first in srv_dynamic_maxconn()
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 11 Feb 2026 06:53:21 +0000 (07:53 +0100)
committerOlivier Houchard <ohouchard@haproxy.com>
Thu, 12 Feb 2026 01:18:59 +0000 (02:18 +0100)
commita8f50cff7e2f0678abd0eb0d5f402dc6e3f1a870
treedce5b91cb1df73fd251cced7513b72fa967c4ff0
parentc622ed23c8e7f93e37bd993e86837aa758b8cabc
MINOR: queues: Check minconn first in srv_dynamic_maxconn()

In srv_dynamic_maxconn(), we'll decide that the max number of connection
is the server's maxconn if 1) the proxy's number of connection is over
fullconn, or if minconn was not set.
Check if minconn is not set first, as it will be true most of the time,
and as the proxy's "beconn" variable is in a busy cache line, it can be
costly to access it, while minconn/maxconn is in a cache line that
should very rarely change.
src/queue.c