146-long-term-stability.txt 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. Filename: 146-long-term-stability.txt
  2. Title: Add new flag to reflect long-term stability
  3. Author: Nick Mathewson
  4. Created: 19-Jun-2008
  5. Status: Superseded
  6. Superseded-by: 206
  7. Status:
  8. The applications of this design are achieved by proposal 206 instead.
  9. Instead of having the authorities track long-term stability for nodes
  10. that might be useful as directories in a fallback consensus, we
  11. eliminated the idea of a fallback consensus, and just have a DirSource
  12. configuration option. (Nov 2013)
  13. Overview
  14. This document proposes a new flag to indicate that a router has
  15. existed at the same address for a long time, describes how to
  16. implement it, and explains what it's good for.
  17. Motivation
  18. Tor has had three notions of "stability" for servers. Older
  19. directory protocols based a server's stability on its
  20. (self-reported) uptime: a server that had been running for a day was
  21. more stable than a server that had been running for five minutes,
  22. regardless of their past history. Current directory protocols track
  23. weighted mean time between failure (WMTBF) and weighted fractional
  24. uptime (WFU). WFU is computed as the fraction of time for which the
  25. server is running, with measurements weighted to exponentially
  26. decay such that old days count less. WMTBF is computed as the
  27. average length of intervals for which the server runs between
  28. downtime, with old intervals weighted to count less.
  29. WMTBF is useful in answering the question: "If a server is running
  30. now, how long is it likely to stay running?" This makes it a good
  31. choice for picking servers for streams that need to be long-lived.
  32. WFU is useful in answering the question: "If I try connecting to
  33. this server at an arbitrary time, is it likely to be running?" This
  34. makes it an important factor for picking guard nodes, since we want
  35. guard nodes to be usually-up.
  36. There are other questions that clients want to answer, however, for
  37. which the current flags aren't very useful. The one that this
  38. proposal addresses is,
  39. "If I found this server in an old consensus, is it likely to
  40. still be running at the same address?"
  41. This one is useful when we're trying to find directory mirrors in a
  42. fallback-consensus file. This property is equivalent to,
  43. "If I find this server in a current consensus, how long is it
  44. likely to exist on the network?"
  45. This one is useful if we're trying to pick introduction points or
  46. something and care more about churn rate than about whether every IP
  47. will be up all the time.
  48. Implementation:
  49. I propose we add a new flag, called "Longterm." Authorities should
  50. set this flag for routers if their Longevity is in the upper
  51. quartile of all routers. A router's Longevity is computed as the
  52. total amount of days in the last year or so[*] for which the router has
  53. been Running at least once at its current IP:orport pair.
  54. Clients should use directory servers from a fallback-consensus only
  55. if they have the Longterm flag set.
  56. Authority ops should be able to mark particular routers as not
  57. Longterm, regardless of history. (For instance, it makes sense to
  58. remove the Longterm flag from a router whose op says that it will
  59. need to shutdown in a month.)
  60. [*] This is deliberately vague, to permit efficient implementations.
  61. Compatibility and migration issues:
  62. The voting protocol already acts gracefully when new flags are
  63. added, so no change to the voting protocol is needed.
  64. Tor won't have collected this data, however. It might be desirable
  65. to bootstrap it from historical consensuses. Alternatively, we can
  66. just let the algorithm run for a month or two.
  67. Issues and future possibilities:
  68. Longterm is a really awkward name.