You get a bonus - 1 coin for daily activity. Now you have 1 coin

Torrent technology and description

Lecture



The date of birth of the torrent is April 4, 2001. It was on this day that Bram Cohen announced the first torrent client. The official release of the first version took place on July 2, 2001, and since then this technology has leapt into the network computers by leaps and bounds.

A torrent is itself a network protocol for sharing files between network computers. When transferring files are divided into small parts and in this form are transferred. The torrent client (torrent-client) downloads these parts and then assembles the file together. What is the main difference from the same ftp-protocol? In the process of downloading pieces, the client immediately provides access to them for downloading to other network members, which allows transferring torrent files at a much higher speed and without waiting for the release of the main source (sider).

Torrent tracker

Torrent tracker (torrent tracker) - a dedicated server that uses the HTTP protocol. It allows clients to interact with each other, that is, to find each other and exchange information about the torrents they have. The tracker contains information about IP addresses and client ports used and the hash of the files distributed by the network. The files on the tracker are in most cases not stored and cannot be determined from the hash sum. However, as a rule, in addition to directly storing the hash of torrent amounts, the server simultaneously performs the functions of a Web server, which contains a description of files, download statistics, statistics of network nodes and users.

Torrent clients

Directly parts of the file between clients are transmitted directly, without the participation of a torrent tracker. The tracker only accumulates and provides customers with data on file distribution processes over the network. For the protocol to work with maximum efficiency, it is necessary that the maximum number of clients can receive and send files. When clients connect to each other, they first exchange data about the pieces of the torrent they have. If the first client has a missing segment to the second, then the second client sends a “download torrent” request. The first client gives the requested part of the torrent, if such an opportunity exists. Upon receipt of the requested part, the addressee checks its checksum and informs the tracker that it also has this part, so that all other connected clients can download torrent from it.

Protocols and ports of the torrent

Clients connect to the tracker via TCP. As a rule, the incoming port of the tracker is assigned 6969. Clients communicate with each other also via TCP. The most commonly used incoming client ports are 6881-6889. However, port numbers are optional according to protocol specifications and are subject to change if necessary. A large number of trackers currently use the usual HTTP port 80, and customers are encouraged to choose a random inbound port. Some providers prohibit the use of the previously mentioned range of ports in order to counteract the distribution of pirated content of torrent networks.

Also, clients have the ability to use UDP ports, but it is not officially approved. Not all customers support it. UDP ports are used for the DHT option, that is, for the operation mode without communication with the torrent tracker.

To optimize the distribution, the client may suspend the return of parts of the torrent file to another client. Priority is given to the member of the network who himself has given you more parts, that is, the more he gave you a feast (node, client), the more you give him. As a result, the torrent clients who donate with great speed get a great download speed.

Features torrent protocol

There are no download queues, i.e., it is not necessary for everyone to queue to the source / sider in order to download the file. Torrent is loaded in parts; the less common a file fragment, the more often it will be given. The protocol distributes fragments between clients so that in the future they can exchange parts without the participation of the distributor. Downloaded parts of the file immediately become available to others. For distribution it is possible to open the whole directory with the files inside.

In the modern version of the torrent protocol, support for working without a central tracker, DHT mode, has been developed. In this mode, in cases of unavailability of the central server, clients can continue to work while maintaining communication with each other. This mode of operation is based on the Kademlia protocol. With this mode of operation, the tracker information is distributed on clients in the form of hash tables. This mode is not implemented on all clients, and implemented in different ways. Therefore, different clients may not work with each other.

Every day in the torrent networks thousands of people around the world share files with each other. No wonder that to a greater extent the content of the traffic is unlicensed software, music and video files. This content is an incentive for most participants to share files. However, if you join this community, then no one can tell you which files to download and which not - everyone decides for himself. Right holders periodically try to fight with networks, with participants, with owners of trackers. But closed servers instantly revive in a new place under a new name.

What is the sequence of steps if you want to share your file with the torrent community? You create a torrent file in a special program, specifying the file you want to share, and the program automatically creates a torrent file. This file has the extension "* .torrent" and has a small amount, about 200-300 kb. This is like the contents of your file. Then you go to the Tracker, after registering on it, and upload your Torrent file, selecting a category in advance, and give a brief description of the uploaded file, its size, etc. for users. The file becomes available to network members.

Why do you need to upload files, why not just use the provided luxury? There is a simple rule on torrent trackers: if you don’t allow others to download, you can’t download anything yourself. When registering, a download limit is set for new use. For example, you can download 500 MB, and then, if you don’t share files with other users, it will be forbidden to download. But if you share, the limit automatically rises.

There are a lot of trackers and torrent clients on the network, and you can easily find them using search engines. Which one to choose is your own business.

  Torrent technology and description

Terminology

Announcement (English announce) - client's address to the tracker. At each announcement, the client sends to the tracker information about the volumes of the downloaded and sent to them, and the tracker sends the client a list of addresses of other clients. The client accesses the tracker at regular intervals, which are determined by the client and tracker settings.

Web Sid is an HTTP server that can be used as a data source, acting as a sid.

Availability (Eng. Availability , Eng. Distributed copies - common copies) - the number of full copies of the file available to the client.

Stalled (English choked - stalled, strangled) - the client, the exchange of data with which stalled. Either his channel to the output is full and he cannot transfer anything (reached max_uploads), or he is a driver and he does not need to receive anything.

Interested (eng. Interested) - a participant who wants to get pieces of the file available from another participant. For example, if client A does not have any parts that client B has, it is considered that client A is interested in an exchange with client B.

Index (eng. Index) is a list of .torrent files (usually including descriptions and other information), managed by a web site (indexer) and searchable. The indexing site can also be a tracker.

The lich, licher (eng. Leech - leech) is a feast that does not have all the segments so far, that is, it continues downloading.

Poisoned torrent - a situation where part of the peers distributes damaged segments.

A peer (eng. Peer - partner) - a client involved in the distribution.

Become baptized (eng. Scrape - scrape, scratch) - a process similar to the announcement, but the client requests only the statistics of the torrent, information about the connected clients and the possibility to contact them for exchange.

Neglect (English snubbed) - a client connected to the recipient, but not sending him the data for more than 60 seconds.

Distribution (seeding) - the process of distributing a file using BitTorrent protocol.

Rating (eng. Share ratio) - the ratio given to downloaded.

Swarm (English swarm) - a collection of all peers involved in the distribution.

Segment (English part - part) - all files for transfer are divided into small pieces - segments, which are then transmitted over the network in random order to optimize the exchange.

Sid, sider (eng. Seeder - sower) - a feast that has all the segments of the distributed file, that is, either the initial distributor of the file, or already downloaded the entire file and remained on the distribution.

Super-seeding is a special distribution mode in some BitTorrent clients, trying to minimize the amount of data that the distributor will give up before the first download is available. Supersid offers each peer to download only one file segment, which other peers do not yet have. Then the seed does not give the following segments to this feast until it receives confirmation from the other peers that they also received this segment. Thus, supersid tries to avoid re-returning of the same segments, and tries to give the segments only to those feasts that actively transfer them to others.

Hash (English hash) - a string of alphanumeric characters in a .torrent file that clients use to verify the transmitted data. After receiving, each part is first checked for a hash match. If the check fails, the data is discarded and requested again.

Passkey - user authenticator on non-anonymous trackers. Contained in the downloadable torrent file. Thus, if someone gets access to the torrent-file (for example, the user accidentally shared it), he will be able to work with the tracker on behalf of this user. The tracker can change the passkey at the user's request, but it will be necessary to download all past torrent files (or manually edit them) in order to be able to continue to distribute the downloaded files.

Announcement URL (eng. URL) is the address of the tracker to which the client makes an announcement. More often it is called “Tracker URL”. May include “passkey” - a unique code assigned by the tracker for a user account that helps to identify it on the tracker (added to the announcement URL in the * .torrent file itself when downloading).

Successful work!


Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Fundamentals of Internet and Web Technologies

Terms: Fundamentals of Internet and Web Technologies