-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rumqttc: Throttling of pending requests can cause starvation on the request side #814
Comments
Hey, please check if i understood this correctly:
my thoughts / questions:
due to this, and my limited context, i think this might be a trade-off rather than an issue. If you think otherwise, can you please elaborate the context more? thank you so much! |
Exactly.
Both - the A scenario where this can happen is when there are pending requests and a configured throttle. The client connects with
Think it's just a bug in the implementation. The |
Loved the Codec implementation, let's start by implementing that in the first PR? I'll take this up if you are ok with it. We can go about this by dividing up the work. |
I'm absolutely fine with that but think this is a general and architectural decision which must be approved within the rumqtt team. Some notes: The branch is probably a good starting point but needs something more:
|
Noted, we will discuss this and get back to you.
That sounds like a great option, we could just as well re-establish a connection and use the buffers as it was from the previous connection, dropping corrupted/incomplete packet bytes.
Forgive me if my understanding is naive, but I believe it is better to not spawn a separate task and use something like a timer that doesn't get cancelled to handle this, we could ignore it and set it to never when nothing is pending? |
Hm. The
Also possible and less invasive. This would be another |
Store the pending throttle interval within the EventLoop. Fixes: bytebeamio#814
Store the pending throttle interval within the EventLoop. Fixes: bytebeamio#814
Store the pending throttle interval within the EventLoop. Fixes: bytebeamio#814
Current Behavior
The delay between pending request is awaited in parallel to incoming frames. A incoming frame cancels a potential pending delay. The delay is started from scratch in the next call to
poll
. Cyclic incoming frames with a period lower than the throttle duration leads to starvation on the request side.Failure Information (for bugs)
This is a bug. I have no traces - found by review.
The text was updated successfully, but these errors were encountered: