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

swarm: rate limit establishing new connections #1550

Open
magik6k opened this issue Sep 14, 2018 · 3 comments
Open

swarm: rate limit establishing new connections #1550

magik6k opened this issue Sep 14, 2018 · 3 comments
Labels
kind/bug A bug in existing code (including security flaws) kind/support A question or request for support need/community-input Needs input from the wider community

Comments

@magik6k
Copy link
Contributor

magik6k commented Sep 14, 2018

I'm on a new internet connection since a few weeks and I'm noticing interesting pattern with the ISP provided router - it can handle 1000s of connections just fine, but whenever I try to establish 100+ connections is a really short time (around 1 connection/ms), it just freezes for a few seconds or just dies (same with closing connections, but that's an issue for connmgr).

@magik6k
Copy link
Contributor Author

magik6k commented Sep 14, 2018

Note that this should be optional as it may impact DHT performance quite a bit

@Stebalien
Copy link
Member

Interesting... We should also be able to use relays without killing the DHT too much but the problem there is:

  1. Picking the relay.
  2. Not killing the relay.
  3. Switching away from the relay for, e.g., bitswap.

Note: This could also be due to the number of connection attempts we make. We should probably limit the number of dials we attempt per peer to, e.g., 10-20 at most.

@raulk
Copy link
Member

raulk commented Jan 31, 2019

We now have a dial pacer in the DHT: libp2p/go-libp2p-kad-dht#237.

@marten-seemann marten-seemann changed the title Rate limit establishing new connections swarm: rate limit establishing new connections May 25, 2022
@marten-seemann marten-seemann transferred this issue from libp2p/go-libp2p-swarm May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) kind/support A question or request for support need/community-input Needs input from the wider community
Projects
None yet
Development

No branches or pull requests

3 participants