]> git.kaiwu.me - haproxy.git/commit
MINOR: haload: keep old-scheduled users under -ee's floor rate
authorFrederic Lecaille <flecaille@haproxy.com>
Mon, 24 Aug 2026 17:14:06 +0000 (19:14 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Mon, 24 Aug 2026 17:16:05 +0000 (19:16 +0200)
commitdd8b6934bf3fa972c9aa4997a7f48632258df6cf
tree8e4e1c9d7407745f050f76f8ad5af5b42d7bbb8d
parent6292861aa2dd6698d4506952ef0780a1f8f8a5f9
MINOR: haload: keep old-scheduled users under -ee's floor rate

A user with its next send already scheduled before -ee starts still
fires at the old, unlimited pace. Nothing re-paces it once the ramp
begins. A mass failure could still cause a burst of new connections
right when the floor kicks in.

Each user now remembers the last -ee generation it checked in with.
On its first wakeup during a new ramp, it checks for room under the
current rate before sending. If there is none, it retries after a
short, fixed delay, and checks again. A user created during the ramp
already has the right generation, so replacements are not affected:
-ee's doubling still only depends on their own successes.

This check does not reuse hld_usr_schedule()'s wait: that one grows
with the number of idle users on the thread, and right after a mass
failure that number can be huge. It also never gets recomputed later,
so a user could end up waiting several minutes with no way back. A
short, fixed retry avoids this, since the user is checked again each
time instead of trusting one old estimate.
src/haload.c