Home > Specs > BitTorrent
Trackers

There are currently two tracker protocols.

UDP trackers are the most widely used.  There is a single round-trip to setup a connection key that can be used for multiple announces from the same IP over a period of minutes.  With a valid connection key, an announce can be made in one round trip, with a simple query/response protocol.

HTTP trackers use an HTTP GET query in the conventional way, and the response body is in the form of a BEncoded map.

The basic mechanics of either protocol are the same.  The peer sends a request which includes the torrent's info-hash ID and other peer-specific info such as incoming connection port and some statistical information about how many bytes have been uploaded/downloaded so far.  The tracker then responds with a (possibly partial) list of other peers that are in the same torrent and some overall counts of total peers in the swarm.

When a tracker is announced to for a particular torrent for the first time, it must be announced with the STARTED event.

The announcement must be refreshed after a certain amount of time has passed, without any event code.  The refresh interval is set by the tracker in the announce response.

When a torrent that has already been started has completely downloaded, an announcement must be made with the COMPLETED event.

When a torrent is stopped, the tracker must be updated with an announcement of the STOPPED event.


This web site is powered by Super Simple Server