-
Notifications
You must be signed in to change notification settings - Fork 123
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
Reconsider peer connection strategy #33
Comments
Yeah, TT should do something better than it currently does. Fine with me if On Wed Jan 15 2014 at 1:00:45 PM, Matthieu Rakotojaona <
|
It's worth mentioning that policies like this can lead to vulnerability to sybil (and other) attacks. (e.g. people can fabricate peerids to attack particular hosts. (For ex, Kademlia's trusting "oldest" peers more mitigates this). This is probably not worth worrying much about though :) |
Just a point of information, it looks like TT currently does have a limit of MAX_NUM_PEERS per torrent session and MAX_NUM_PEERS is currently 60. |
I've tested transmission and TT on same magnet link and TT is always slower. I wonder if it is because wrong peers(with low speed) are chosen. |
There can be multiple possible explanations for that. For example,
transmission is probably better about punching UDP/TCP holes for NAT
connections.
|
Currently, we accept all incoming connections and try to connect to all new peers we learn of. According to this blog post from libtorrent main dev, the standard behavior is to cap connectivity to 50 peers.
The outcome of this strategy is that global connectivity is low, and it is long until a new entrant can find anyone willing to share in the swarm.
The proposed alternative is to have a commutative function that depends on both peers' address and outputs a priority, and select peers with highest priority first (even going as far as disconnecting peers we are currently connected to if another one turns out to be better).
Here's the function (from the simulator code):
Fairly simple, could be interesting to consider.
The text was updated successfully, but these errors were encountered: