| [11058] | 1 | BEP: 21 |
|---|
| 2 | Title: Extension for partial seeds |
|---|
| 3 | Version: $Revision$ |
|---|
| 4 | Last-Modified: $Date$ |
|---|
| [11067] | 5 | Author: Arvid Norberg <arvid@bittorrent.com>, Greg Hazel <greg@bittorrent.com>, Aaron Grunthal |
|---|
| [11058] | 6 | Status: Draft |
|---|
| 7 | Type: Standards Track |
|---|
| 8 | Created: 8-May-2008 |
|---|
| 9 | Post-History: |
|---|
| 10 | |
|---|
| 11 | The purpose of this extension is to allow further optimizations of |
|---|
| 12 | bittorrent swarms when peers are *partial seeds*. A partial seed |
|---|
| 13 | is a peer that is incomplete without downloading anything more. This |
|---|
| 14 | happens for multi file torrents where users only download some of |
|---|
| 15 | the files. |
|---|
| 16 | |
|---|
| 17 | Extension Header |
|---|
| 18 | ================ |
|---|
| 19 | |
|---|
| 20 | A peer that is a partial seed SHOULD include an extra header in the extension |
|---|
| 21 | handshake (specified in `BEP 0010`_), 'upload_only'. Setting the value of |
|---|
| 22 | this key to 1 indicates that this peer is not interested in downloading anything. |
|---|
| 23 | |
|---|
| 24 | Example extension handshake message:: |
|---|
| 25 | |
|---|
| 26 | {'m': {'ut_metadata', 3}, 'upload_only': 1} |
|---|
| 27 | |
|---|
| 28 | Tracker Scrapes |
|---|
| 29 | =============== |
|---|
| 30 | |
|---|
| 31 | The tracker scrape conventions defines three values per torrent, 'complete', |
|---|
| 32 | 'incomplete' and 'downloaded'. The purpose of this extensions is to let clients |
|---|
| 33 | distinguish between partial seeds and downloaders, both of which currently would |
|---|
| 34 | be classified as *incomplete*. |
|---|
| 35 | |
|---|
| 36 | If the tracker supports this extension, it MUST add a fourth field, 'downloaders'. |
|---|
| 37 | This field is the number of active downloaders in the swarm, it does not include |
|---|
| 38 | partial seeds. The number of partial seeds can be calculated by: |
|---|
| 39 | ``incomplete - downloaders``. |
|---|
| 40 | |
|---|
| 41 | Tracker Announce |
|---|
| 42 | ================ |
|---|
| 43 | |
|---|
| 44 | In order to tell the tracker that a peer is a partial seed, it MUST send an |
|---|
| 45 | ``event=paused`` parameter in every announce while it is a partial seed. |
|---|
| 46 | |
|---|
| 47 | Rationale |
|---|
| 48 | ========= |
|---|
| 49 | |
|---|
| 50 | Allowing peers to scrape a tracker and distinguish between active downloaders |
|---|
| 51 | and partial seeds makes it more efficient to determine what to seed based |
|---|
| 52 | on the downloader/seed ratio. |
|---|
| 53 | |
|---|
| 54 | The reason why every announce should contain ``event=paused`` is to avoid |
|---|
| 55 | relying on the state being stored in the tracker. In case there's a failure |
|---|
| 56 | and a backup tracker is used, it can recover all of the swarm state because |
|---|
| 57 | the clients are announcing that they are partial seeds. |
|---|
| 58 | |
|---|
| 59 | References |
|---|
| 60 | ========== |
|---|
| 61 | |
|---|
| 62 | .. _`BEP 0010`: http://www.bittorrent.org/beps/bep_0010.html |
|---|
| 63 | |
|---|
| 64 | |
|---|
| 65 | Copyright |
|---|
| 66 | ========= |
|---|
| 67 | |
|---|
| 68 | This document has been placed in the public domain. |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | .. |
|---|
| 72 | Local Variables: |
|---|
| 73 | mode: indented-text |
|---|
| 74 | indent-tabs-mode: nil |
|---|
| 75 | sentence-end-double-space: t |
|---|
| 76 | fill-column: 70 |
|---|
| 77 | coding: utf-8 |
|---|
| 78 | End: |
|---|