Skip to content
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

perf: add eth response backpressure #13971

Merged
merged 5 commits into from
Jan 24, 2025
Merged

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Jan 24, 2025

this introduces a new parameter that effectively restricts how many concurrent requests we support.

if we have more that 4 concurrent outgoing responses, we deprioritize reading more messages from the peer.

this additional check is relatively cheap and would only apply to peers that are spamming us with requests. This targets 10MB of buffered response data.
well behaved peers shouldn't encounter this because usually those send requests sequentially

@mattsse mattsse requested a review from Rjected as a code owner January 24, 2025 11:49
@mattsse mattsse added the A-networking Related to networking in general label Jan 24, 2025
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

crates/net/network/src/session/active.rs Outdated Show resolved Hide resolved
@mattsse mattsse enabled auto-merge January 24, 2025 21:08
@mattsse mattsse added this pull request to the merge queue Jan 24, 2025
Merged via the queue into main with commit a087731 Jan 24, 2025
43 checks passed
@mattsse mattsse deleted the matt/add-response-backpressure branch January 24, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-networking Related to networking in general
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants