]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: peers: limit the number of updates sent at once
authorWilly Tarreau <w@1wt.eu>
Tue, 19 Jul 2022 18:17:38 +0000 (20:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 23 Aug 2022 18:19:11 +0000 (20:19 +0200)
commit8bd146d8af78371f97b66e50cac718666eb93388
treec34eeda94cbc78981a9285356ed6088218bfd60f
parentdf3cab1ca176a372908764de28b5273cbe6c4e61
MEDIUM: peers: limit the number of updates sent at once

As seen in GH issue #1770, peers synchronization do not cope well with
very large buffers because by default the only two reasons for stopping
the processing of updates is either that the end was reached or that
the buffer is full. This can cause high latencies, and even rightfully
trigger the watchdog when the operations are numerous and slowed down
by competition on the stick-table lock.

This patch introduces a limit to the number of messages one may send
at once, which now defaults to 200, regardless of the buffer size. This
means taking and releasing the lock up to 400 times in a row, which is
costly enough to let some other parts work.

After some observation this could be backported to 2.6. If so, however,
previous commits "BUG/MEDIUM: applet: fix incorrect check for abnormal
return condition from handler" and "BUG/MINOR: applet: make the call_rate
only count the no-progress calls" must be backported otherwise the call
rate might trigger the looping protection.
doc/configuration.txt
src/peers.c