Opened 2 years ago

Closed 2 years ago

#22421 closed defect (fixed)

Update fallback config comment for exponential backoff

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.3.1.x-final
Component: Core Tor/Tor Version: Tor: 0.2.9.1-alpha
Severity: Normal Keywords: fallback, comment
Cc: Actual Points: 0.1
Parent ID: Points: 0.1
Reviewer: Sponsor:

Description (last modified by teor)

We modified the fallback behaviour when we merged the exponential backoff code in 0.2.9.1-alpha, and again in #17750:

/* With the ClientBootstrapConsensus*Download* below:
   * Clients with only authorities will try:
   *  - 3 authorities over 10 seconds, then wait 60 minutes.
   * Clients with authorities and fallbacks will try:
   *  - 2 authorities and 4 fallbacks over 21 seconds, then wait 60 minutes.
   * Clients will also retry when an application request arrives.
   * After a number of failed reqests, clients retry every 3 days + 1 hour.
   *
   * Clients used to try 2 authorities over 10 seconds, then wait for
   * 60 minutes or an application request.
   *
   * When clients have authorities and fallbacks available, they use these
   * schedules: (we stagger the times to avoid thundering herds) */
  V(ClientBootstrapConsensusAuthorityDownloadSchedule, CSV_INTERVAL,
    "6, 11, 3600, 10800, 25200, 54000, 111600, 262800" /* 3 days + 1 hour */),
  V(ClientBootstrapConsensusFallbackDownloadSchedule, CSV_INTERVAL,
    "0, 1, 4, 11, 3600, 10800, 25200, 54000, 111600, 262800"),
  /* When clients only have authorities available, they use this schedule: */
  V(ClientBootstrapConsensusAuthorityOnlyDownloadSchedule, CSV_INTERVAL,
    "0, 3, 7, 3600, 10800, 25200, 54000, 111600, 262800"),

The behaviour is now:

/* With the ClientBootstrapConsensus*Download* below:
   * Clients with only authorities will try:
   *  - at least 3 authorities over 10 seconds, then exponentially backoff,
   *    with the next attempt 3-21 seconds later,
   * Clients with authorities and fallbacks will try:
   *  - at least 2 authorities and 4 fallbacks over 21 seconds, then
   *    exponentially backoff, with the next attempts 4-33 seconds later,
   * Clients will also retry when an application request arrives.
   * After a number of failed requests, clients retry every 3 days + 1 hour.
   *
   * Clients used to try 2 authorities over 10 seconds, then wait for
   * 60 minutes or an application request.

Child Tickets

Change History (4)

comment:1 Changed 2 years ago by teor

Description: modified (diff)
Status: newneeds_review

Edit: let's fix a typo in that comment as well.

comment:2 Changed 2 years ago by teor

Description: modified (diff)

Wrap comments

comment:3 Changed 2 years ago by teor

My github branch bug22421 has these changes

comment:4 Changed 2 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

merged; thanks!

Note: See TracTickets for help on using tickets.