mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-24 12:20:59 +01:00
[MINOR] proxy: make session rate-limit more accurate
Patch d9bbe17b used to limit the rate-limit to off-by-one to avoid a busy loop when the limit is reached. Now that the listeners are automatically disabled and queued when a limit is reached, we don't need this workaround anymore and can bring back the most accurate computation.
This commit is contained in:
parent
a17c2d9361
commit
d408bd40f3
@ -501,7 +501,7 @@ void maintain_proxies(int *next)
|
|||||||
p->state = PR_STREADY;
|
p->state = PR_STREADY;
|
||||||
|
|
||||||
if (p->fe_sps_lim &&
|
if (p->fe_sps_lim &&
|
||||||
(wait = next_event_delay(&p->fe_sess_per_sec, p->fe_sps_lim, 1))) {
|
(wait = next_event_delay(&p->fe_sess_per_sec, p->fe_sps_lim, 0))) {
|
||||||
/* we're blocking because a limit was reached on the number of
|
/* we're blocking because a limit was reached on the number of
|
||||||
* requests/s on the frontend. We want to re-check ASAP, which
|
* requests/s on the frontend. We want to re-check ASAP, which
|
||||||
* means in 1 ms before estimated expiration date, because the
|
* means in 1 ms before estimated expiration date, because the
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user