BitTorrentPeerExchangeConventions

From Theory.org Wiki
Jump to: navigation, search

There are two common extension protocols, AZMP and LTEP. The common peer exchange mechanism on AZMP is AZ_PEX and on LTEP, it is ut_pex.

Both types of peer exchange sends messages containing a group of "added" peers and "removed" peers - though not necessarily in the same list (ut_pex sends IPv4 and IPv6 peers in different lists).

It has been agreed between the Azureus and µTorrent developers that any clients which implement either of the following peer mechanisms try and obey the limits described below when sending PEX messages:

  • There should be no more than 50 added peers and 50 removed peers sent in a PEX message (so 100 in total).
    • In the case of ut_pex where there are different lists for IPv4 and IPv6 added peers, there cannot be more than 50 added peers in total. Same with removed peers.
  • 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 which don't obey these limits. However, there should be some tolerance to clients that send a PEX message just under a minute since the last PEX message.