Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1567

Calculate round trip time using exponentially weighted average

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.0.0
    • None
    • Cluster Management
    • None

    Description

      If there have been no RTT measurements for a server (e.g. the first ismaster command after the server becomes available), the average RTT MUST be set equal to the first RTT measurement.

      After the first measurement, average RTT MUST be computed using an exponentially-weighted moving average formula, with a weighting factor (alpha) of 0.2. If the prior average is denoted old_rtt, then the new average (new_rtt) is computed from a new RTT measurement using the following formula:

      alpha = 0.2
      new_rtt = alpha * x + (1 - alpha) * old_rtt

      A weighting factor of 0.2 was chosen to put about 85% of the weight of the average RTT on the 9 most recent observations.

      Attachments

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: