root / dotorg / trunk / html / beps / bep_0012.html

Revision 11040, 5.0 kB (checked in by dave, 8 weeks ago)

All HTML docs now reference the new SVN server running at bittorrent.org

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
7<title></title>
8<link rel="stylesheet" href="../css/bep.css" type="text/css" />
9</head>
10<body>
11<div class="document">
12
13<div id="upper" class="clear">
14<div id="wrap">
15<div id="header">
16<h1><a href="../index.html">BitTorrent<span>.org</span></a></h1>
17</div>
18<div id="nav">
19<ul>
20<li><a href="../index.html">Home</a></li>
21<li><a href="../introduction.html">For Users</a></li>
22<li><a href="bep_0000.html"><span>For Developers</span></a></li>
23<!-- <li><a href="./blog">Blog</a></li> -->
24<li><a href="http://forum.bittorrent.org"> Forums </li>
25<li><a href="../donate.html">Donate!</a></li>
26</ul>
27</div> <!-- nav -->
28<!-- ### Begin Content ### -->
29<div id="second">
30
31
32
33<table class="rfc2822 docutils field-list" frame="void" rules="none">
34<col class="field-name" />
35<col class="field-body" />
36<tbody valign="top">
37<tr class="field"><th class="field-name">BEP:</th><td class="field-body">12</td>
38</tr>
39<tr class="field"><th class="field-name">Title:</th><td class="field-body">Multitracker Metadata Extension</td>
40</tr>
41<tr class="field"><th class="field-name">Version:</th><td class="field-body">10759</td>
42</tr>
43<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="http://svn.bittorrent.org/trac/browser/dotorg/trunk/html/beps/bep_0012.rst">2008-02-14 12:51:44 -0800 (Thu, 14 Feb 2008)</a></td>
44</tr>
45<tr class="field"><th class="field-name">Author:</th><td class="field-body">John Hoffman &lt;theshadow&#32;&#97;t&#32;degreez.net&gt;</td>
46</tr>
47<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td>
48</tr>
49<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td>
50</tr>
51<tr class="field"><th class="field-name">Created:</th><td class="field-body">07-Feb-2008</td>
52</tr>
53<tr class="field"><th class="field-name">Post-History:</th><td class="field-body"></td>
54</tr>
55</tbody>
56</table>
57<hr />
58<div class="contents topic" id="contents">
59<p class="topic-title first">Contents</p>
60<ul class="simple">
61<li><a class="reference internal" href="#metadata-extension" id="id2">Metadata Extension</a></li>
62<li><a class="reference internal" href="#order-of-processing" id="id3">Order of Processing</a></li>
63</ul>
64</div>
65<div class="section" id="metadata-extension">
66<h1>Metadata Extension</h1>
67<p>In addition to the standard &quot;announce&quot; key, in the main area of the
68metadata file and not part of the &quot;info&quot; section, will be a new key,
69&quot;announce-list&quot;.  This key will refer to a list of lists of URLs, and
70will contain a list of tiers of announces.  If the client is compatible
71with the multitracker specification, and if the &quot;announce-list&quot; key is
72present, the client will ignore the &quot;announce&quot; key and only use the
73URLs in &quot;announce-list&quot;.</p>
74</div>
75<div class="section" id="order-of-processing">
76<h1>Order of Processing</h1>
77<p>The tiers of announces will be processed sequentially; all URLs in each
78tier must be checked before the client goes on to the next tier.  URLs
79within each tier will be processed in a randomly chosen order; in other
80words, the list will be shuffled when first read, and then parsed in
81order.  In addition, if a connection with a tracker is successful, it
82will be moved to the front of the tier.</p>
83<p>Examples:</p>
84<pre class="literal-block">
85d['announce-list'] = [ [tracker1], [backup1], [backup2] ]
86</pre>
87<p>On each announce, first try tracker1, then if that cannot be reached,
88try backup1 and backup2 respectively.  On the next announce, repeat
89in the same order.  This is meant for when the trackers are standard
90and can not share information.</p>
91<blockquote>
92d['announce-list'] = [[ tracker1, tracker2, tracker3 ]]</blockquote>
93<p>First, shuffle the list.  (For argument's sake, we'll say the list
94has already been shuffled.)  Then, if tracker1 cannot be reached, try
95tracker2.  If tracker2 can be reached, the list is now:
96tracker2,tracker1,tracker3.  From then on, this will be the order the
97client tries.  If later neither tracker2 nor tracker1 can be reached,
98but tracker3 responds, then the list will be changed to:
99tracker3,tracker2,tracker1, and will be tried in that order in the
100future.  This form is meant for trackers which can trade peer
101information and will cause the clients to help balance the load
102between the trackers.</p>
103<blockquote>
104d['announce-list'] = [ [ tracker1, tracker2 ], [backup1] ]</blockquote>
105<p>The first tier, consisting of tracker1 and tracker2, is shuffled.
106Both trackers 1 and 2 will be tried on each announce (though perhaps
107in varying order) before the client tries to reach backup1.</p>
108</div>
109
110
111</div>
112        <div id="footer">
113<hr/>
114</div>
115
116</div>
117</body>
118</html>
Note: See TracBrowser for help on using the browser.