Track tasks and feature requests
Join 40 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.
Sign up for free See pricing for teams and enterprisesGeolocation awareness, ISP network awareness etc. #675
Comments
This comment has been minimized.
This comment has been minimized.
|
Here is the code that discover and add peers inside webtorrent https://github.com/feross/webtorrent/blob/master/lib/torrent.js#L297 It is based on this lib https://github.com/feross/torrent-discovery/blob/master/index.js#L151 which just re-emit the 'peer' event. In the browser the websocket tracker client is used https://github.com/feross/bittorrent-tracker/blob/master/lib/client/websocket-tracker.js#L198 which just emit the 'peer' event whenever a new peer is available. So the conclusion to your question is : no webtorrent just add any peers it can find. I believe the algorithm to maximize the transfer speed is based on dropping connection to peers that don't send pieces fast enough. I think this is a good thing. Having to try to guess the causes for the connection speed with each speed could be very hard. |
This comment has been minimized.
This comment has been minimized.
|
Also see https://github.com/feross/webtorrent/blob/master/lib/torrent.js#L990 and generally the term "choke", that's what happens when a peer doesn't send data fast enough. |
This comment has been minimized.
This comment has been minimized.
|
@rom1504's explanation is correct. There's no fancy logic that uses geolocation or ISP information to determine who to connect to. It's really hard to predict what will be fast. It's best to just connect to everyone and see if it's actually fast. This is what all BitTorrent clients do as well.
For WebRTC peers, the local LAN IP address will be preferred over the public IP address, so that peers on the same LAN will take the optimal path. That's what WebRTC does by default. For normal BitTorrent peers, there's no difference for LAN peers (again, see the first explanation above). |
This comment has been minimized.
This comment has been minimized.
|
“If Netflix uses WebTorrent, customers would see higher video quality during peak hours. WebTorrent would allow customers with the same ISP to share video pieces with each other without leaving the ISP’s network,” Feross says. |
This comment has been minimized.
This comment has been minimized.
|
I think the fact is that light goes so fast, that geographical areas or isp boundaries are not always the most important thing. |
This comment has been minimized.
This comment has been minimized.
This quote was in the context of the Netflix-Comcast spat where Comcast was throttling the speed of traffic at the Netflix-Comcast interchange. So, by using a torrent with a HTTP web seed hosted by Netflix, they can work around this issue because connections between Comcast users would be faster than between a Comcast user and the Netflix HTTP endpoint.
Right. There's just too many possible factors that could affect speed that it's better to just connect and see what speed you get. |
This comment has been minimized.
This comment has been minimized.
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
Does WebTorrent uses geolocation awareness?
Does WebTorrent uses ISP network awareness?
Also peers which are in the same LAN get preferably matched together, right?
And more general:
What are the criteria which peer streams to which peer?