-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
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
- is related to
-
NODE-5844 Add iscryptd to ServerDescription
- Closed
- related to
-
NODE-5840 Heartbeat durations are measured incorrectly
- Closed
- split from
-
DRIVERS-2035 Use minimum RTT for CSOT maxTimeMS calculation instead of 90th percentile
- Closed