Changeset 11110
- Timestamp:
- 06/16/2008 05:34:48 PM (2 months ago)
- Files:
-
- 1 modified
-
dotorg/trunk/html/beps/bep_0022.html (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dotorg/trunk/html/beps/bep_0022.html
r11107 r11110 37 37 <tr class="field"><th class="field-name">BEP:</th><td class="field-body">22</td> 38 38 </tr> 39 <tr class="field"><th class="field-name">Title:</th><td class="field-body">BitTorrent CacheDiscovery Protocol</td>40 </tr> 41 <tr class="field"><th class="field-name">Version:</th><td class="field-body">1110 1</td>42 </tr> 43 <tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="http://bittorrent.org/trac/browser/dotorg/trunk/html/beps/bep_0022.rst">2008-0 5-27 19:02:55 -0700 (Tue, 27 May2008)</a></td>39 <tr class="field"><th class="field-name">Title:</th><td class="field-body">BitTorrent Tracker Discovery Protocol</td> 40 </tr> 41 <tr class="field"><th class="field-name">Version:</th><td class="field-body">11109</td> 42 </tr> 43 <tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="http://bittorrent.org/trac/browser/dotorg/trunk/html/beps/bep_0022.rst">2008-06-16 17:33:22 -0700 (Mon, 16 Jun 2008)</a></td> 44 44 </tr> 45 45 <tr class="field"><th class="field-name">Author:</th><td class="field-body">David Harrison <dave at bittorrent.com>, Stanislav Shalunov <shalunov at bittorrent.com>, Greg Hazel <greg at bittorrent.com></td> … … 72 72 <div class="section" id="motivation"> 73 73 <h1>Motivation</h1> 74 <p>Some Internet Service Providers (ISPs) may be interested in deploying 75 BitTorrent caches to lower transit costs, reduce internal traffic, and 76 improve user experience by speeding up downloads.</p> 77 <p>A cache is simply a fast peer in the middle of the network. It might 78 also have substantial disk space. The client communicates with a cache 79 using the normal BitTorrent protocol.</p> 80 <p>With this extension, BitTorrent clients are able to discover caches 81 nearby on the network. When a cache is present, the user benefits 82 from having a high capacity peer from which the user's client 83 downloads and to which it can delegate seeding. When a cache inside 84 the user's ISP network seeds on behalf of the client, it frees 85 upstream capacity in the user's access network benefiting the user and 86 those that share the access network. When subsequent peers transfer 87 from their ISP's cache, the ISP experiences less transit traffic.</p> 74 <p>Some Internet Service Providers (ISPs) may wish to localize traffic 75 to reduce transit costs, reduce internal traffic, and improve user 76 experience by speeding up downloads.</p> 77 <p>With this extension, BitTorrent clients are able to discover a tracker 78 nearby on the network, and via this tracker discover nearby caches or 79 peers. A cache is simply a fast peer in the middle of the network. It 80 might also have substantial disk space. The client communicates with a 81 cache using the normal BitTorrent protocol.</p> 82 <p>When a cache is present, the user benefits from having a high capacity 83 peer from which the user's client downloads and to which it can 84 delegate seeding. When a cache inside the user's ISP network seeds on 85 behalf of the client, it frees upstream capacity in the user's access 86 network benefiting the user and those that share the access network. 87 When subsequent peers transfer from their ISP's cache, the ISP 88 experiences less transit traffic.</p> 88 89 <p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL 89 90 NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and … … 93 94 <div class="section" id="the-discovery-mechanism"> 94 95 <h1>The Discovery Mechanism</h1> 95 <p>To find the cachesfor its ISP, a BitTorrent client performs a reverse96 <p>To find the tracker for its ISP, a BitTorrent client performs a reverse 96 97 DNS lookup on its external IP address and then obtains the BitTorrent 97 98 SRV resource record associated with the host's domain name. For … … 115 116 <p>The target field in each returned SRV resource record contains the 116 117 domain name of a tracker and the port on which the tracker runs. This 117 tracker is called a <em> cachetracker</em>, but the protocol to talk to this118 tracker is called a <em>local tracker</em>, but the protocol to talk to this 118 119 tracker is no different from the standard BitTorrent tracker protocol 119 120 described in <a class="footnote-reference" href="#bep-3" id="id2">[1]</a>.</p> 120 121 <p>When the BitTorrent client joins a swarm it announces to one or more 121 122 of the trackers referenced in the .torrent file and announces to the 122 cache tracker. The cachetracker returns peers which may be caches or123 other peers that announced the same file to the cachetracker.</p>124 <p>A c ache is a BitTorrent peer. A client MAY treat itpreferentially.</p>123 local tracker. The local tracker returns peers which may be caches or 124 other peers that announced the same file to the local tracker.</p> 125 <p>A client MAY treat nearby peers or caches preferentially.</p> 125 126 <p>Reverse DNS lookups are described in <a class="reference external" href="http://www.faqs.org/rfcs/rfc1034.html">RFC 1034</a> <a class="footnote-reference" href="#rfc-1034" id="id3">[4]</a>. 126 127 The SRV resource record type is described in <a class="reference external" href="http://www.faqs.org/rfcs/rfc2782.html">RFC 2782</a> <a class="footnote-reference" href="#rfc-2782" id="id4">[6]</a>.</p> … … 210 211 <h1>Example</h1> 211 212 <p>In our example, we use AT&T's PacBell network. AT&T could implement 212 cachediscovery by adding the following lines to the zone file for213 tracker discovery by adding the following lines to the zone file for 213 214 pacbell.net,</p> 214 215 <pre class="literal-block"> … … 216 217 _bittorrent-tracker._tcp.pacbell.net. 600 IN SRV 5 0 6969 tracker 217 218 </pre> 218 <p>Now when a client performs cachediscovery, it performs three DNS219 <p>Now when a client performs tracker discovery, it performs three DNS 219 220 queries removing labels before reaching the domain name pacbell.net, 220 221 at which point the SRV record is returned and the client queries 221 222 tracker.pacbell.net to obtain the domain names of caches.</p> 222 <p>In Python, the cachetracker's port and domain can be obtained using223 <p>In Python, the local tracker's port and domain can be obtained using 223 224 PyDNS using the following code:</p> 224 225 <pre class="literal-block">