浏览代码

Merge branch 'maint-0.2.9' into maint-0.3.0

Nick Mathewson 6 年之前
父节点
当前提交
16fd975a82
共有 3 个文件被更改,包括 16 次插入2 次删除
  1. 6 0
      changes/ticket24681
  2. 2 1
      doc/tor.1.txt
  3. 8 1
      src/or/config.c

+ 6 - 0
changes/ticket24681

@@ -0,0 +1,6 @@
+  o Minor features (fallback directory mirrors):
+    - Make the default DirAuthorityFallbackRate 0.1, so that clients on the
+      public tor network prefer to bootstrap off fallback directory mirrors.
+      This is a follow-up to 24679, which removed weights from the default
+      fallbacks.
+      Implements ticket 24681.

+ 2 - 1
doc/tor.1.txt

@@ -446,7 +446,8 @@ GENERAL OPTIONS
     When configured to use both directory authorities and fallback
     directories, the directory authorities also work as fallbacks. They are
     chosen with their regular weights, multiplied by this number, which
-    should be 1.0 or less. (Default: 1.0)
+    should be 1.0 or less. The default is less than 1, to reduce load on
+    authorities. (Default: 0.1)
 
 [[AlternateDirAuthority]] **AlternateDirAuthority** [__nickname__] [**flags**] __address__:__port__ __fingerprint__ +
 

+ 8 - 1
src/or/config.c

@@ -285,7 +285,14 @@ static config_var_t option_vars_[] = {
   VAR("DirReqStatistics",        BOOL,     DirReqStatistics_option, "1"),
   VAR("DirAuthority",            LINELIST, DirAuthorities, NULL),
   V(DirCache,                    BOOL,     "1"),
-  V(DirAuthorityFallbackRate,    DOUBLE,   "1.0"),
+  /* A DirAuthorityFallbackRate of 0.1 means that 0.5% of clients try an
+   * authority when all fallbacks are up, and 2% try an authority when 25% of
+   * fallbacks are down. (We rebuild the list when 25% of fallbacks are down).
+   *
+   * We want to reduce load on authorities, but keep these two figures within
+   * an order of magnitude, so there isn't too much load shifting to
+   * authorities when fallbacks go down. */
+  V(DirAuthorityFallbackRate,    DOUBLE,   "0.1"),
   V(DisableAllSwap,              BOOL,     "0"),
   V(DisableDebuggerAttachment,   BOOL,     "1"),
   OBSOLETE("DisableIOCP"),