-
Notifications
You must be signed in to change notification settings - Fork 38
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
Feature Proposal: Simultaneous outgoing request limit #215
Comments
Lgtm! |
@jennijuju this is a fixed "number of requests in progress" limit. However, it doesn't inhibit doing something more complex like size/seconds to transfer. I am not sure that kind of limiting belongs in graphsync though -- it may need to go at a higher level like go-fil-markets. @raulk may have more perspective. |
|
An absolute limit on the number of simultaneous requests is the simplest way to solve this problem, and I think it's worth implementing 👍 In practice the connection to each peer will have varying bandwidth and latency. A future, more sophisticated rate limiter could
For example:
Once the block for Peer A has been processed we can open a request to Peer C
etc... |
going to move forward on this soon. |
Sounds like a way forward. Out of curiosity, @jennijuju, did we survey providers and find that they'd want a global limit instead of separate inbound and outbound limits? |
@raulk I am almost done implementing this, and the transition to unified combined limit should it be needed is possible. |
It looked like initial miner sentiment was for seperate configuration |
we did and they want separate settings. |
What
Add an option to limit the number of in progress outgoing requests.
Why
Currently, we have a limit on the number of incoming requests processed at the same time in the Responder implementation in Graphsync.
However, there are several cases where we'd like to limit the number of outgoing requests as well. It certainly makes sense as a protocol implementation to have these controls.
How
MaxInProgressRequests is really MaxInProgressIncomingRequests and will be renamed as such.
We will add MaxInProgressOutgoingRequests which will have the same effect for the requestor side.
We will also implement the requestor side with a PeerTaskQueue, meaning that requests will be balanced between peers, so that one slow peer does not cause congestion in the queue.
For discussion
This implementation will support solutions for filecoin-project/lotus#7276. It will allow us to implement option 4 (
N in progress simultaneous Storage Deals and M in progress simultaneous Retrieval Deals separately.
) for Miners. It is NOT a complete solution to the problem -- it sounds like there needs to some significantly more robust solutions that control the overall flow between transfer and sealing. However, it will be a good start for now.Note that we are NOT implementing a single global transfer limit for now that encompasses both incoming and outgoing requests.
The text was updated successfully, but these errors were encountered: