Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up`maxConns` option is ignored for incoming connections #703
Comments
This comment has been minimized.
This comment has been minimized.
If all of the peers in a swarm are at capacity, and a new peer joins, what should happen? Won't new peers be unable to join the swarm? See: http://blog.libtorrent.org/2012/12/swarm-connectivity/ I propose that we use Kademlia's xor distance algorithm to decide to accept or reject a peer based on id, and drop the current peer with the greatest distance. A problem is that the swarm is easy to attack, as mentioned in the article, unless you use ip addresses. Edit: I've tested this out with bittorrent-tracker and it works. |
This comment has been minimized.
This comment has been minimized.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
The maxConns option is currently ignored for incoming connections, so there's effectively no limit the number of incoming connections that we accept.
For TCP, we could just immediately destroy the incoming connection, or perhaps pause the server somehow to avoid accepting in the first place?
For WebRTC, we should consider not ever returning an offer when we're at capacity, since doing the whole signaling process is expensive (webrtc conns are a limited resource; and trackers have limited resources)