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

Use dynamically adjusted request size to fetch blobs data from peers through p2p instread of using the static p2p.max.request.size value #232

Closed
ping-ke opened this issue Mar 9, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request high priority

Comments

@ping-ke
Copy link
Collaborator

ping-ke commented Mar 9, 2024

Why should this feature exist?

Currently, we use p2p.max.request.size to control the size of blobs fetched from peers. However, different peers are distributed in different regions, so the request sizes between the local node and peers should be different. So we should use different request sizes to fetch blobs from different peers.

How does it work?

When the local node is connected to a new peer, it still uses the p2p.max.request.size to control the size fetch blobs, if the request fails 5 times with the following error (means request timeout between the local node and the new peer), reduce the request size to half of the previous value.
t=2024-03-09T02:03:32+0000 lvl=warn msg="Failed to request blobs" peer=16Uiu2HAmCsJgtzAZLtJPPmaSz46sasCDy7Y3xByb8NUZ1anDraCU err="i/o deadline reached"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

No branches or pull requests

2 participants