]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: server: make server state changes synchronous again
authorWilly Tarreau <w@1wt.eu>
Thu, 2 Aug 2018 09:48:52 +0000 (11:48 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 8 Aug 2018 07:57:45 +0000 (09:57 +0200)
commit3ff577e165486de87d1c0923e84f72cc7ad790c0
tree34fbe297c3c0c891b0af1731deb30fa514579612
parent647c70b681e23bbff8fcff24621645f68ca1513f
MAJOR: server: make server state changes synchronous again

Now we try to synchronously push updates as they come using the new rdv
point, so that the call to the server update function from the main poll
loop is not needed anymore.

It further reduces the apparent latency in the health checks as the response
time almost always appears as 0 ms, resulting in a slightly higher check rate
of ~1960 conn/s. Despite this, the CPU consumption has slightly dropped again
to ~32% for the same test.

The only trick is that the checks code is built with a bit of recursivity
because srv_update_status() calls server_recalc_eweight(), and the latter
needs to signal srv_update_status() in case of updates. Thus we added an
extra argument to this function to indicate whether or not it must
propagate updates (no if it comes from srv_update_status).
include/proto/server.h
src/checks.c
src/haproxy.c
src/server.c