You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pick_io_context_idx in http_server.h has a comment: "TODO improve load balancing".
It turns out the existing load balancing doesn't even work! 🥴
The "task queue length" stored for each io context is incremented each time the context is used, but it is never decremented (unless there is an error; see do_accept in http_server.h).
As a result there is no "load balancing", but it just continuously sequentially picks the next io context.
And as a result of that, you will see a stall if you have a long running request, because it doesn't correctly choose an io context with a lower task queue length.
The intent seems to be there, as the task queue length is passed to the Connection, stored as queue_length_.
From what I can tell, what should happen is queue_length_ is decremented in the destructor of Connection. Currently, Connection does nothing at all with queue_length_.
The text was updated successfully, but these errors were encountered:
pick_io_context_idx
inhttp_server.h
has a comment: "TODO improve load balancing".It turns out the existing load balancing doesn't even work! 🥴
The "task queue length" stored for each io context is incremented each time the context is used, but it is never decremented (unless there is an error; see
do_accept
inhttp_server.h
).As a result there is no "load balancing", but it just continuously sequentially picks the next io context.
And as a result of that, you will see a stall if you have a long running request, because it doesn't correctly choose an io context with a lower task queue length.
The intent seems to be there, as the task queue length is passed to the
Connection
, stored asqueue_length_
.From what I can tell, what should happen is
queue_length_
is decremented in the destructor ofConnection
. Currently,Connection
does nothing at all withqueue_length_
.The text was updated successfully, but these errors were encountered: