When downloading a large file, you can do so from a single source, with a multiple mirror sources technique for data distribution. This presents a problem when used on networks with lower bandwidths and in the presence of sever recipients. As an alternative, a Torrent (also known as BitTorrent) protocol increases the efficiency of the distribution by reducing the network and server impact. The torrent protocol allows users to join a swarm of hosts that download and upload from each other simultaneously. That increases the efficiency of distributing files to many recipients, working over low bandwidth computers and mobile phones.
A user wanting to upload a file has to create a small torrent descriptor file first. They can distribute this file by conventional means such as web, email, etc. The file itself is made available through a seed or BitTorrent node. Those wanting to download the file present the torrent descriptor file to their own BitTorrent nodes on their computers. These nodes further act as peers or leeches and the node downloads the file by interconnecting to the seed and to other peers.
The file under distribution is divided into several segments called pieces. When a peer downloads a piece of the file, it turns into a source for that piece for all other peers. That exempts the primary seed from having to transmit that piece to all computers or users connected to copy. BitTorrent allows the task of file distribution to those who want the file. While the seed may only be sending a single copy of the file itself, the distribution ultimately reaches an unlimited number of peers.
A cryptographic hash within the torrent descriptor protects each piece of the file. Therefore, any modification of the piece is reliably detectable. That prevents any modification – accidental and malicious – of any piece received at other nodes. If any node starts downloading with a genuine copy of the torrent descriptor, it can verify the genuineness of the entire file it downloads.
This way of downloading pieces makes the collection non-sequential. However, the BitTorrent Client rearranges them in the correct order. The client continually monitors the pieces it has, and uploads to other peers, as they need. Throughout a single download, all pieces are of the same size. That makes the BitTorrent process very useful for transfer of large files as you can stop a file download any time and resume it later, without the loss of any information previously downloaded.
The non-sequential download typically reduces the overall length of a download. The client can seek out readily available pieces and download them immediately. It does not have to halt the download process to wait for the next and possibly unavailable piece in the line.
As a peer completes its file download, it turns into an additional seed. This eventual shift from peer to seed actually determines the overall health of the file. This is also shown as the number of times the file is available in its complete form. In reality, BitTorrent type of distribution creates a spreading akin to a torrential flood throughout many peer computer nodes. As the number of peers goes up, the likelihood increases for any particular node to complete a successful download.