mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-14 15:34:35 +00:00
[MINOR] sessions: only wake waiting listeners up if rate limit is OK
Instead of waking a listener up then making it sleep, we only wake them up if we know their rate limit is fine. In the future we could improve on top of that by deciding to wake a proxy-specific task in XX milliseconds to take care of enabling the listeners again.
This commit is contained in:
parent
d408bd40f3
commit
b32907b6c7
@ -2096,7 +2096,8 @@ struct task *process_session(struct task *t)
|
||||
if (!LIST_ISEMPTY(&global_listener_queue))
|
||||
dequeue_all_listeners(&global_listener_queue);
|
||||
|
||||
if (!LIST_ISEMPTY(&s->fe->listener_queue))
|
||||
if (!LIST_ISEMPTY(&s->fe->listener_queue) &&
|
||||
(!s->fe->fe_sps_lim || freq_ctr_remain(&s->fe->fe_sess_per_sec, s->fe->fe_sps_lim, 0) > 0))
|
||||
dequeue_all_listeners(&s->fe->listener_queue);
|
||||
|
||||
if (unlikely((global.mode & MODE_DEBUG) &&
|
||||
|
Loading…
Reference in New Issue
Block a user