BitTorrent BEP 19: GetRight Web Seeding Explained
BitTorrent Enhancement Proposal 19 (BEP 19), commonly known as GetRight-style web seeding, is a specification that allows BitTorrent clients to download file pieces directly from traditional HTTP or FTP web servers alongside regular peer-to-peer (P2P) transfers. This article explains how BEP 19 works, its technical implementation, why it was developed, and how it ensures torrent availability even when no traditional peer seeders are online.
The Purpose of Web Seeding
In standard BitTorrent swarms, file distribution relies entirely on peers and dedicated seeds running BitTorrent client software. If the original uploader goes offline and no full copies remain in the swarm, the torrent becomes incomplete and unusable.
BEP 19 solves this issue by allowing publishers to use existing standard web hosting infrastructure as a fallback source. When a swarm lacks active seeders, clients can fetch missing pieces from a standard web server and subsequently share those pieces with other connected peers.
How BEP 19 Works
The BEP 19 mechanism integrates standard web servers into the BitTorrent ecosystem using the following process:
- Metadata Integration: When generating a
.torrentfile, the creator includes aurl-listkey in the torrent’s metadata dictionary. This key contains one or more HTTP or FTP URLs pointing directly to the file (for single-file torrents) or the root directory containing the files (for multi-file torrents). - Byte-Range Requests: BitTorrent divides files into
uniform chunks called “pieces.” When a client needs a piece from the web
seed, it issues a standard HTTP
GETrequest using theRangeheader (e.g.,Range: bytes=1048576-2097151) to retrieve the exact byte offset corresponding to that piece. - Data Verification: Once the piece is downloaded via
HTTP/FTP, the BitTorrent client verifies its cryptographic SHA-1 hash
against the hash list stored in the
.torrentfile. If the hash matches, the data is marked as valid. - P2P Redistribution: As soon as a client validates a piece retrieved from the web seed, it advertises availability of that piece to other peers in the swarm, offloading bandwidth from the web server to the P2P network.
Single-File vs. Multi-File Torrents
- Single-File Torrents: The
url-listpoints directly to the hosted file (e.g.,http://example.com/file.iso). The client requests byte ranges directly from that single resource. - Multi-File Torrents: The
url-listpoints to a root directory path ending in a slash (e.g.,http://example.com/data/). The client maps the internal paths of the torrent’s file layout to sub-paths on the server and queries individual files using byte offsets.
Key Advantages
- High Availability: A torrent can never truly “die” as long as the HTTP/FTP fallback URL remains accessible.
- Low Server Overhead: Unlike running a continuous BitTorrent seed node, hosting files on a standard web server or Content Delivery Network (CDN) requires no specialized daemon or persistent P2P connections.
- Efficient CDN Integration: Because BEP 19 relies on standard HTTP byte ranges, it is fully compatible with standard caching proxies, CDNs, and cloud object storage services like Amazon S3.
- Bandwidth Offloading: Popular downloads transition automatically from the central web host to the P2P swarm as more users join, reducing central server hosting costs.
BEP 19 vs. BEP 17
BEP 19 is distinct from BEP 17 (the Hoffman-style web seeding specification). While BEP 17 requires the web server to run custom scripts or redirects capable of understanding BitTorrent piece indexing and multi-file structures, BEP 19 works directly with unmodified, standard web servers that support basic HTTP/1.1 range requests. Due to its simplicity and zero-configuration server requirements, BEP 19 became the widely adopted industry standard for BitTorrent web seeding.