]> git.kaiwu.me - haproxy.git/commit
MINOR: haload: add rate limiting support using -R option
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 23 Jul 2026 08:41:33 +0000 (10:41 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 23 Jul 2026 13:47:07 +0000 (15:47 +0200)
commit439e6a99d5daf03fb849128ed300b65f810fecef
tree0fa1178a857a222576abff9b97d062b7b59e3074
parent0667ef102f8cd641ee1def83fddfbecc42edf80c
MINOR: haload: add rate limiting support using -R option

Implement request/connection rate limiting per second using the new
-R command line option <arg_rate>.

Instead of reinventing the wheel, this implementation aligns with the
h1load approach by relying on existing frequency counters. Dedicated
tasks <hld_rate_task> are spawned on each thread solely to manage and
throttle connection initializations based on <arg_rate>.

The counter <running_usrs> is renamed to <running_tasks> to track both
users and connection rate-limiting tasks.

Modify the doc/haload.txt file.
doc/haload.txt
include/haproxy/haload.h
src/haload.c
src/haload_init.c