What Is a Torrent
A torrent is a file being shared through the BitTorrent protocol, or the small metadata file that describes it. The word gets used for both, which causes confusion. This article explains what each meaning covers, how the protocol actually works, and why BitTorrent has stayed the fastest method for distributing large files for over two decades.
Pulsed Media has been running seedbox infrastructure in Finland since 2009. Every day our servers in Helsinki and Kerava move large volumes of torrent traffic. What follows is an operational explanation, not a textbook one.
The .torrent file
A .torrent file is a small metadata file, typically a few kilobytes to a few hundred kilobytes. It does not contain the content you want. It describes the content and tells your BitTorrent client how to find it.
Open a .torrent file in a hex editor and you see bencoded data, a simple serialization format invented for BitTorrent. The fields that matter:
- Tracker URLs: one or more announce addresses where the client reports its presence and gets a list of peers
- File names and directory structure: the exact paths and names of every file in the torrent
- File sizes: total and per-file
- Piece length: how large each chunk is, typically 256KB to 16MB depending on total content size
- Piece hashes: a SHA-1 hash for every piece, used to verify each chunk after download
- Private flag: optional; when set, disables DHT and PEX (used by private trackers)
The piece hashes are what make BitTorrent reliable. After your client downloads a piece, it hashes the data and compares it to the hash in the .torrent file. If they match, the piece is good. If not, the client discards it and downloads it again from a different peer. Corruption cannot propagate, because every piece is checked independently.
The collection of all piece hashes, file names, and sizes forms the info dictionary. The SHA-1 hash of this dictionary is the info hash, a 20-byte identifier that uniquely identifies the torrent. Every .torrent file for the same content has the same info hash, regardless of which tracker it uses.
Magnet links
A magnet link replaces the .torrent file entirely. Instead of downloading a metadata file and then starting the transfer, you click a magnet link and your client starts immediately.
A magnet link is a URI that begins with magnet:. The essential component is the xt parameter, which carries the info hash in urn:btih: format. Optional parameters include dn (a display name for the UI) and one or more tr entries for tracker URLs.
With only the info hash, the client uses DHT (explained below) to find peers who have the torrent. Once connected, it requests the full torrent metadata directly from those peers. After the metadata arrives, the download proceeds exactly as it would with a .torrent file.
Magnet links are slightly slower to start because the metadata fetch adds a step. On a fast swarm with many DHT nodes, the delay is a few seconds. On a sparse swarm, it can take longer. Torrent index sites moved heavily toward magnet links after legal pressure made hosting .torrent files a liability.
Swarms: seeders and leechers
Every torrent has a swarm: the group of all peers currently participating in sharing it.
- Seeder
- A peer that has every piece of the content and is uploading to others. No download in progress.
- Leecher
- A peer still downloading. Leechers also upload the pieces they have already received, so they contribute to the swarm while downloading.
- Peer
- The general term for any participant, seeder or leecher.
When a leecher finishes downloading all pieces and has verified every hash, it becomes a seeder. Whether it stays in the swarm as a seeder depends on the client settings and the user's choice.
Seeder count is the most important factor in download speed. A torrent with 50 seeders and 1,000 leechers is faster than the same torrent with 2 seeders and 10 leechers, even though the ratio looks worse. More seeders means more upload bandwidth available to the swarm.
A torrent with zero seeders, sometimes called a dead torrent, cannot be completed by anyone who does not already have some pieces. Even one seeder can restart a stalled swarm.
How peer discovery works
Your client knows the info hash of the torrent. It needs to find other peers who have it. Three mechanisms handle this.
Trackers
A tracker is a server that maintains a list of peers for each torrent. When your client starts a download, it sends an announce request to the tracker URL from the .torrent file:
- The info hash (which torrent)
- Your IP and port (how peers reach you)
- Upload and download totals (accounting)
- An event flag: started, stopped, or completed
The tracker responds with a list of peer addresses. Your client connects to those peers and starts downloading. The tracker never touches the file content; it only manages peer lists.
Trackers re-announce on a schedule the tracker sets, typically every 30 minutes to a few hours. If a peer stops announcing, the tracker eventually drops it from the active list.
DHT (Distributed Hash Table)
DHT removes the dependency on any centralized tracker. The protocol is based on Kademlia, a distributed routing scheme where peers collectively maintain a routing table across the whole swarm. If all trackers for a torrent go offline, DHT keeps peer discovery working.
DHT is disabled on private trackers by the private flag in the .torrent file. On public torrents, it runs alongside tracker announces and provides a fallback. Clients keep a DHT routing table that persists between sessions; an established DHT node finds peers quickly even without a tracker.
PEX (Peer Exchange)
Once your client is connected to a few peers, PEX lets those peers share their own peer lists with you. Your client learns about peers from the peers themselves, not just from the tracker or DHT. This supplements the other methods and typically speeds up swarm entry after the initial connection.
Like DHT, PEX is disabled by the private flag.
How BitTorrent manages pieces
Two algorithms shape how pieces move through a swarm.
Rarest first
When choosing which piece to download next, clients prioritize pieces that fewer peers have. If a particular piece exists on only two seeders in a 200-peer swarm, every leecher tries to get that piece early. Rare pieces spread quickly, which prevents a single rare piece from becoming the bottleneck for hundreds of downloads. Common pieces take care of themselves.
Tit-for-tat choking
Upload slots are limited. Your client uploads to the peers who upload back to you. Peers who contribute get faster downloads; peers who only take get throttled. Your client periodically re-evaluates which peers to unchoke based on their upload rate to you.
One slot is reserved for optimistic unchoking: periodically giving a random new peer a chance to demonstrate its upload speed, regardless of history. This lets new peers enter the cooperative cycle.
Clients that seed actively get faster downloads. The protocol rewards contribution.
Legal uses
BitTorrent is used for legitimate distribution of large files. Ubuntu, Debian, Fedora, and Arch Linux all offer official torrents for ISO downloads. LibreOffice and Blender have distributed via BitTorrent. Blizzard used peer-to-peer distribution for World of Warcraft patches. Large scientific datasets move efficiently via BitTorrent where HTTP servers would struggle under the load. The Internet Archive makes its public domain collection available via torrents, and many musicians and filmmakers distribute Creative Commons work the same way.
The protocol is neutral. What users choose to download is their responsibility.
Torrents and seedboxes
A seedbox is a remote server dedicated to running BitTorrent clients continuously. A server in a datacenter has better connectivity than a home connection, stays online around the clock, and can maintain seeder status on many torrents at once without affecting your local network.
When you download a torrent on a home connection, your upload speed is usually limited by your ISP's upstream bandwidth, often a fraction of your download capacity. The torrent is unavailable when your machine is off. Incoming peer connections may be blocked by NAT.
A Pulsed Media seedbox removes those constraints. The server is in our datacenters in Helsinki and Kerava. Bandwidth is up to 20Gbps depending on the plan. The BitTorrent client announces a datacenter IP with a consistently open port. Peers connect without interruption. Torrents on private trackers stay seeded, protecting ratio.
Pulsed Media supports rTorrent, Deluge, and qBittorrent on all plans. FTP, SFTP, HTTPS, WebDAV, and Rclone are all available for pulling finished downloads. The PMSS management panel is open source. Public trackers are allowed without restrictions on all plans.
The difference between the file and the content
"The torrent" can mean three different things:
- The .torrent file itself: a few KB of metadata
- The content described by that file: potentially hundreds of gigabytes
- The active transfer: your client's current download session
In common use, "downloading a torrent" means downloading the content. "Seeding a torrent" means having the content and uploading it. The .torrent file is what you open to start either process.
Magnet links make this even more indirect. There is no .torrent file at all, just a hash that resolves to metadata that resolves to content.
See also
- Tracker (BitTorrent) — how trackers work, UDP announces, and scrape
- Private tracker — ratio enforcement, passkeys, and invite-only communities
- Seedbox — remote servers for always-on torrent activity
- Deluge — BitTorrent client available on Pulsed Media seedboxes
- QBittorrent — BitTorrent client available on Pulsed Media seedboxes
- RTorrent — BitTorrent client available on Pulsed Media seedboxes
- Public Torrent Trackers — open tracker lists, UDP protocol, tracker reliability