aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-10-01 21:59:09 +0000
committerNick Mathewson <nickm@torproject.org>2006-10-01 21:59:09 +0000
commit57ffca883d586c0b7e20eea2460587b409f9b302 (patch)
treec308225bb41ec570809042c114a89b9982fef11c /doc
parent219ad6395cea5403857c3adf1b938741dba79c4f (diff)
downloadtor-57ffca883d586c0b7e20eea2460587b409f9b302.tar
tor-57ffca883d586c0b7e20eea2460587b409f9b302.tar.gz
r8826@totoro: nickm | 2006-10-01 17:58:45 -0400
Disprefer exit nodes for entry, middle positions (fixes bug 200). Also, switch to using a uint64_t to hold "total bandwidth for all nodes" under consideration; crypt_rand_int would have died at 2GB/s network capacity. svn:r8571
Diffstat (limited to 'doc')
-rw-r--r--doc/TODO10
-rw-r--r--doc/path-spec.txt27
2 files changed, 22 insertions, 15 deletions
diff --git a/doc/TODO b/doc/TODO
index f255b969c..7da1ba923 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -35,12 +35,10 @@ x - If the client's clock is too far in the past, it will drop (or
D The right thing here is to revamp our node selection implementation.
(Deferred until oprofile says this matters.)
o make it configurable, so people can turn it on or off.
-N - Add script to grep for identical log msgs.
-N - Bug 200: disprefer exit nodes for entry, middle.
- - If less than 1/3 support port X, only use as exit.
- - If 2/3 support port X, weight exits 1/2; weight non-exits 1.
- - (Exit fraction - 1/3):Non-exit fraction
- - (e - 1/3)/(1-e)
+ o Add script to grep for identical log msgs.
+ o Bug 200: disprefer exit nodes for entry, middle.
+ o Specify
+ o Implement
o Bug 303: block exit from circuits created with create-fast
o Specify and document
o Implement
diff --git a/doc/path-spec.txt b/doc/path-spec.txt
index 77c0da259..cfffd5289 100644
--- a/doc/path-spec.txt
+++ b/doc/path-spec.txt
@@ -157,15 +157,24 @@ of their choices.
below)
- XXXX Choosing the length
- For circuits that are not "fast", when choosing among multiple
- candidates for a path element, we choose randomly. For "fast" circuits,
- we choose
- a given router with probability proportional to its advertised bandwidth
- [the smaller of the 'rate' and 'observed' arguments to the "bandwidth"
- element in its descriptor]. If a router's advertised bandwidth is greater
- than MAX_BELIEVEABLE_BANDWIDTH (1.5 MB/sec), we clip to that value.
-
- (XXXX We should do something to shift traffic away from exit nodes.)
+ For circuits that do not need to be not "fast", when choosing among
+ multiple candidates for a path element, we choose randomly.
+
+ For "fast" circuits, we a given router as an exit with probability
+ proportional to its advertised bandwidth [the smaller of the 'rate' and
+ 'observed' arguments to the "bandwidth" element in its descriptor]. If a
+ router's advertised bandwidth is greater than MAX_BELIEVEABLE_BANDWIDTH
+ (1.5 MB/sec), we clip to that value.
+
+ For non-exit positions on "fast" circuits, we pick routers as above, but
+ we weight the clipped advertised bandwidth of Exit-flagged nodes depending
+ on the fraction of bandwidth available from non-Exit nodes. Call the
+ total clipped advertised bandwidth for Exit nodes under consideration E,
+ and the total clipped advertised bandwidth for non-Exit nodes under
+ consideration N. If E<N/2, we do not consider Exit-flagged nodes.
+ Otherwise, we weight their bandwidth with the factor (E-N/2)/(N+E-N/2) ==
+ (2E - N)/(2E + N). This ensures that bandwidth is evenly distributed over
+ nodes in 3-hop paths.
Additionally, we may be building circuits with one or more requests in
mind. Each kind of request puts certain constraints on paths: