Skip to content

Use exponential backoff for reserved peer reconnections #3449

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

Open
teor2345 opened this issue Mar 20, 2025 · 0 comments
Open

Use exponential backoff for reserved peer reconnections #3449

teor2345 opened this issue Mar 20, 2025 · 0 comments

Comments

@teor2345
Copy link
Member

teor2345 commented Mar 20, 2025

Problem

When the network gets larger, bootstrap nodes can exceed the default inbound connection limit, and drop new connections. Currently we resolve this issue by increasing the connection limits on the command line, so they are above the network peer count.

But if the number of peers suddenly increases, new nodes can’t make connections, and therefore can’t bootstrap.

Solution

We could increase the fixed reserved peers reconnection delays, so they are greater than the idle connection limit (3 seconds), giving new peers an opportunity to connect to the bootstrap nodes. This was done in PR #3448, but we could increase those limits more. However, increasing those limits also slows down bootstrap when the network is doing fine (or when other issues cause disconnections).

Instead, we should use a capped exponential backoff, like temporary bans, but with lower limits. Or we could re-use the same exponential backoff system for reserved peers, rather than overriding it with fixed reconnection intervals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant