[JAVA-1567] Calculate round trip time using exponentially weighted average Created: 19/Nov/14  Updated: 31/Mar/15  Resolved: 21/Nov/14

Status: Closed
Project: Java Driver
Component/s: Cluster Management
Affects Version/s: None
Fix Version/s: 3.0.0

Type: New Feature Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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.



 Comments   
Comment by Jeffrey Yemin [ 31/Mar/15 ]

Closing all resolved 3.0.0 issues, as 3.0.0 has been tagged and released.

Comment by Githook User [ 30/Jan/15 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: Calculate round trip time as an exponentially weighted moving average, using a value of 0.2 for the weighting factor.
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.

JAVA-1567
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/81eaf6ed077e6171553430a12a64abc710cdda21

Comment by Githook User [ 21/Nov/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: Calculate round trip time as an exponentially weighted moving average, using a value of 0.2 for the weighting factor.
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.

JAVA-1567
Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/81eaf6ed077e6171553430a12a64abc710cdda21

Generated at Thu Feb 08 08:54:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.