This article is all about the Torrent File Transfer Mechanism and its features. How to optimize Torrent client and how to create our own Torrent file for transferring bulk data instead downloading Movies and Software from other Torrent sites.

What is Torrent?
Torrent is the protocol for distributing files. It uses Peer-to-Peer data transmission. Its advantage over plain HTTP is that when multiple downloads of the same file happen concurrently, the downloaders upload to each other, making it possible for the file source to support very large numbers of downloaders, with only a modest increase in its load.Torrent's peer protocol can operate over TCP or uTP.

Torrent is created by Bram cohen in 2001 and now handled by BitTorrent.inc company

Torrent file distribution consists of these entities:
  • An ordinary web server
  • A static 'metainfo' file
  • A Torrent tracker
  • An 'original' downloader
  • The end user web browsers
  • The end user downloaders

Torrent Files
Torrent files are also known as metainfo files which are bencoded dictionaries which contains metadata like name, piece length, pieces, length, path and announce URL for trackers

Trackers
Tracker GET requests have the following keys:
  • info_hash- Bencoded form of info values
  • peer_id-Random generated id at the start of new download
  • ip-Trackers machines IP address
  • port-Port number for listening on peer
  • uploaded-Total amount uploaded so far
  • downloaded- Total amount downloaded so for
  • left-Remaining amount has to download
  • event-Announcement events such as started, completed, stopped(empty)
How Torrent Network works?
Seed is the user or computer that has a file can be downloaded. There are also so-called leechers/peers. Leechers are the users or computers who want to download the file. When one leecher has managed to download the files 100% of the seed, then the leecher's role will change to seed. Therefore torrent source files are not fixated on single sources. 

Advantage of Torrent
  • It will be very faster when the files are being download by many users. But normal download will fail s to serve if number of downloaders increases.
  • By downloading via torrent, the same file can be downloaded from many sources.
  • The leecher can become seeder once the download complete to serve other leecher.
  • It consume less CPU utilization compared to normal download.
  • It allows to transfer files with anyone, anywhere. 
Tips to optimize Torrent Client[Some Popular Torrent Client Softwares are BitTorrent, uTorrent, Vuze, qBittorrent.]
  • Go to Options-> setup guide -> uncheck the bandwith 
  • Go to Options-> Preferences -> Advanced -> Change "net.max_halfopen" value to 50 by selecting the line, modifying the value at the bottom to 50 and clicking Set.
  • At the same Advanced screen, Change "bt.transp_disposition" value to 255 by selecting the line, modifying the value at the bottom to 255 and clicking Set.
  • More Peers means more speed, To get more peers, right-click the entry on the list of peers , and click Update Tracker.
  • Increase the number of connections by Options -> Preferences -> Bandwidth -> Number of Connections. Experiment by increasing the number of global/max connections in steps of 25
  • Increase the speed of particular torrent by setting the download limit to unlimited and upload limit to very less.
How to transfer files via Torrent file.
Step 1: Create Built-in Tracker
        a) Open the utorrent Software->Options->Preferences
        b) Go to Connections and set the port number which is opened/unused

        c) Then go to BitTorrent and set the IP/Hostname to report to tracker: [as your sender IP address]

        d) And go the Advanced and set true for bt.enable_tracker and save the setting


Step 2:Create Torrent file
        a) Click File->Create New Torrent
        b) Select Source which you want to transfer
        c) Give the Torrent Properties Tracker values as "http://[Sender IP Address][Port]/announce"   
        where  Port and Sender IP Address are we already configured in tracker

        d) Delete if any other trackers found other than our tracker.
        e) Give tick Start Seeding and Private torrent. and press Create
Now this will create a .torrent extension file

Step 3:Download the file from any other system like as normal as we download movies using .torrent file.