Peer exchange
Peer exchange or PEX is a communications protocol that augments the BitTorrent file sharing protocol. It allows a group of users (or peers) that are collaborating to share a given file to do so more swiftly and efficiently.
In the original design of the BitTorrent file sharing protocol, peers (users) in a file sharing group (known as a "swarm") relied upon a central computer server called a tracker to find each other and to maintain the swarm. PEX greatly reduces the reliance of peers on a tracker by allowing each peer to directly update others in the swarm as to which peers are currently in the swarm. By reducing dependency on a centralized tracker, PEX increases the speed, efficiency, and robustness of the BitTorrent protocol.
Description
[edit]Users wishing to obtain a copy of a file typically first download a torrent file that describes the file(s) to be shared, as well as the URLs of one or more central computers called trackers that maintain a list of peers currently sharing the file(s) described in the .torrent file. In the original BitTorrent design, peers then depended on this central tracker to find each other and maintain the swarm. Later development of distributed hash tables (DHTs) meant that partial lists of peers could be held by other computers in the swarm and the load on the central tracker computer could be reduced. PEX allows peers in a swarm to exchange information about the swarm directly without asking (polling) a tracker computer or a DHT. By doing so, PEX leverages the knowledge of peers that a user is connected to by asking them for the addresses of peers that they are connected to. This is faster and more efficient than relying solely on one tracker and reduces the processing load on the tracker. It also keeps swarms together when the tracker is down.[1]
Peer exchange cannot be used on its own to introduce a new peer to a swarm. To make initial contact with a swarm, each peer must either connect to a tracker using a ".torrent" file, or else use a router computer called a bootstrap node to find a distributed hash table (DHT) which describes a swarm's list of peers. For most BitTorrent users, DHT and PEX will start to work automatically after the user launches a BitTorrent client and opens a .torrent file. A notable exception is "private torrents" which are not freely available; these will commonly disable DHT.
Peer Exchange Conventions
[edit]Extensions to BitTorrent such as PEX are typically implemented using one of two common extension protocols, AZMP[2] or LTEP.[3] Both types of peer exchange send messages containing a group of peers to be added to the swarm and a group of peers to be removed.
It was agreed between the Azureus and μTorrent developers that any clients which implement either of the mechanisms above try to obey the following limits when sending PEX messages:[4]
- There should be no more than 50 added peers and 50 removed peers sent in any given PEX message.
- A peer exchange message should not be sent more frequently than once a minute.
Some clients may choose to enforce these limits and drop connections from clients that ignore them.[4]
DHT
[edit]To create a PEX protocol providing a uniformly-distributed peer selection, one could form a small distributed hash table (DHT) local to a torrent. For each desired new peer one would look up a (uniformly) random key, and use the node responsible for the key as a new peer. This is conceptually simple but would require quite some overhead.[citation needed]
For "trackerless" torrents, it is not clear if PEX provides any value[citation needed] since the mainline DHT can distribute load as necessary. Each DHT node acting as a tracker may store only a subset of the peers, but these are maximal subsets constrained only by DHT node load rather than by a single peer's view. Private torrents commonly disable the DHT, and for this case, PEX might be useful provided the peer obtains enough peers from the tracker.
Versions
[edit]There are three incompatible PEX implementations (making distinct "networks" in swarm)[citation needed]
- Vuze – introduced in Azureus
- BitComet – proprietary – introduced in BitComet, from version 1.19 supports BEP11,[5] compatible with MainLine[6]
- MainLine – introduced in μTorrent
Clients supporting peer exchange
[edit]This section needs additional citations for verification. (July 2010) |
Most BitTorrent clients use PEX to gather peers in addition to trackers and DHT. With the 3.0.5.0 release of Vuze, all major BitTorrent clients now have compatible peer exchange.
Each of these clients implement some version of peer exchange:
- aria2, μTorrent PEX support[7]
- Vuze, formerly Azureus, and clients based on it (The Vuze PEX is only compatible with the Transmission client. PEX with other clients has been implemented into Vuze and into Azureus from 3.0.4.3 onwards) [8]
- BitComet supports PEX using a proprietary protocol in its older versions.[9] Starting with v.1.19 it also added support for the μTorrent/Mainline implementation of PEX, based on the Extension Protocol.[10]
- Bitflu[11]
- BitTorrent[12]
- KTorrent has implemented full μTorrent PEX support as of 2.1 RC1[13]
- libtorrent and clients based on it (Deluge,[14] qBittorrent,[15] MooPolice[16]) compatible with μTorrent
- Tixati
- μTorrent[17]
- Opera 9.5, μTorrent PEX support[18]
- qBittorrent, μTorrent PEX support[19]
- rTorrent[20]
- Transmission (compatible with both the μTorrent and Vuze implementations)[21]
- XTorrent being based on Transmission source code, equally fully supports the Vuze and μTorrent implementations as of version 1.0 (v40)[22]
References
[edit]- ^ "Peer Exchange - VuzeWiki".
- ^ "Azureus messaging protocol - VuzeWiki". wiki.vuze.com. Retrieved 2019-11-20.
- ^ "extension_protocol.rst". www.rasterbar.com. Retrieved 2019-11-20.
- ^ a b "BitTorrentPeerExchangeConventions - Theory.org Wiki". wiki.theory.org. Retrieved 2019-11-20.
- ^ <[email protected]>, The 8472. "bep_0011.rst_post". www.bittorrent.org. Retrieved 2021-05-23.
{{cite web}}
: CS1 maint: numeric names: authors list (link) - ^ "Bitcomet - Changelog".
- ^ "Ubuntu Manpage: Aria2c - the ultra fast download utility". Archived from the original on 2015-04-02. Retrieved 2015-03-29.
- ^ "utorrent PEX in Vuze". Vuze Wiki website. Retrieved 2010-08-15.
- ^ "PEX in BitComet". BitComet Wiki website. Retrieved 2010-02-23.
- ^ "Release notes for BitComet". BitComet official website. Retrieved 2010-02-23.
- ^ "Bitflu configuration example". Retrieved 2007-03-30.
- ^ BitTorrent User Manual - Appendix A: The BitTorrent Interface - Miscellaneous - Torrent Properties - General - Other Settings - Peer Exchange Archived 2014-07-06 at the Wayback Machine
- ^ "What's new in 2.1?". KTorrent official website. Archived from the original on 2006-04-02. Retrieved 2007-03-30.
- ^ "Deluge 0.5.1 Beta 1 changes". Archived from the original on 2008-12-25. Retrieved 2007-09-11.
- ^ "qBittorrent official website". Retrieved 2007-05-14.
- ^ "MooPolice official website". Retrieved 2007-03-30.
- ^ "μTorrent 1.4.1 beta and 1.4.2 beta changes". Archived from the original on 2006-11-25. Retrieved 2007-09-11.
- ^ "Opera 9.5 BitTorrent support". Retrieved 2007-09-04.
- ^ "Details of qBittorrent package". Debian Packages. Retrieved 2011-04-15.
μTorrent-compatible Peer eXchange (PeX)
- ^ "libTorrent 0.11.8 and rTorrent 0.7.8 Changelog". Archived from the original on 2007-11-03. Retrieved 2007-09-11.
- ^ "NEWS (rev 1579)". Transmission SVN. Archived from the original on 2007-08-24. Retrieved 2007-03-30.
- ^ Xtorrent P2P (for Mac OS X)