-
Notifications
You must be signed in to change notification settings - Fork 973
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
p2p: Deprecate TTFB, RESP_TIMEOUT, introduce rate limiting recommenda… #3767
Merged
Commits on May 14, 2024
-
p2p: Deprecate TTFB, RESP_TIMEOUT, introduce rate limiting recommenda…
…tions As part of the discussions surrounding EIP-7594 (peerdas), it was highlighted that during sampling and/or data requests, the sampler does not have timing information for when a samplee will have data available. It is desireable to not introduce a deadline, since this artificially introduces latency for the typical scenario where data becomes available earlier than an agreed-upon deadline. Similarly, when a client issues a request for blocks, it does often not know what rate limiting policy of the serving end and must either pessimistically rate limit itself or run the risk of getting disconnected for spamming the server - outcomes which lead to unnecessarily slow syncing as well as testnet mess with peer scoring and disconnection issues. This PR solves both problems by: * removing the time-to-first-byte and response timeouts allowing requesters to optimistically queue requests - the timeouts have historically not been implemented fully in clients to this date * introducing a hard limit in the number of concurrent requests that a client may issue, per protocol * introducing a recommendation for rate limiting that allows optimal bandwidth usage without protocol changes or additional messaging roundtrips On the server side, an "open" request does not consume significant resources while it's resting, meaning that allowing the server to manage resource allocation by slowing down data serving is safe, as long as concurrency is adequately limited. On the client side, clients must be prepared to handle slow servers already and they can simply apply their existing strategy both to uncertainty and rate-limiting scenarios (how long before timeout, what to do in "slow peer" scenarios). Token / leaky buckets are a classic option for rate limiting with desireable properties both for the case when we're sending requests to many clients concurrently (getting good burst performance) and when the requestees are busy (by keeping long-term resource usage in check and fairly serving clients)
Configuration menu - View commit details
-
Copy full SHA for f975387 - Browse repository at this point
Copy the full SHA f975387View commit details
Commits on May 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f349bfc - Browse repository at this point
Copy the full SHA f349bfcView commit details
Commits on May 22, 2024
-
Update specs/phase0/p2p-interface.md
Co-authored-by: Pop Chunhapanya <haxx.pop@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e4919d7 - Browse repository at this point
Copy the full SHA e4919d7View commit details
Commits on Aug 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 08e020e - Browse repository at this point
Copy the full SHA 08e020eView commit details
Commits on Oct 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 911019c - Browse repository at this point
Copy the full SHA 911019cView commit details
Commits on Oct 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 456372e - Browse repository at this point
Copy the full SHA 456372eView commit details
Commits on Oct 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a232b25 - Browse repository at this point
Copy the full SHA a232b25View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.