Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5825

Add minRoundTripTime field and calculation to Monitor

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.6.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 3
    • 2
    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Use Case

      As a Node.js driver engineer
      I want Monitor to advertise the "minRoundTripTime" across a rolling set of RTTs
      So that I can confidently calculate an accurate maxTimeMS setting or short circuit an operation when CSOT is enabled.

      See DRIVERS-2035

      User Impact

      • No API changes as affected classes are internal
      • May see more stable server selection

      Dependencies

      • None

      Unknowns

      • None

      Acceptance Criteria

      Implementation Requirements

      • Add a "minRoundTripTime" to the Monitor and RTTPinger classes
      • Clients MUST report the minimum RTT as 0 until at least 2 samples have been
      • Clients MUST track the minimum RTT out of the (at most) last 10 samples.
      • Update "roundTripTime" to be the average across the current sample set
      • Make minRoundTripTime accessible to Connection class

      Testing Requirements

      • Note that the maxTimeMS calculation for CSOT that uses minRTT are the only spec tests and will be enabled in a future ticket
      • Bespoke node unit testing, using sinon or manually created socket server
        • Simulate RTT values, ensure average is calculated correctly and minimum is reported accurately

      Documentation Requirements

      • Add TSDoc to server description fields

      Follow Up Requirements

      • None

            Assignee:
            warren.james@mongodb.com Warren James
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: