<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:20 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-459] smooth the latency measurements</title>
                <link>https://jira.mongodb.org/browse/JAVA-459</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;This is to avoid ignoring local servers because some measurements were bad.&lt;br/&gt;
Since we dont do just a ping but call isMaster, extra delay may appear.&lt;br/&gt;
The default smoothing factor is 4.0 and can be modified with com.mongodb.latencySmoothFactor&lt;/p&gt;</description>
                <environment></environment>
        <key id="24078">JAVA-459</key>
            <summary>smooth the latency measurements</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="antoine">Antoine Girbal</assignee>
                                    <reporter username="antoine">Antoine Girbal</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Oct 2011 06:31:57 +0000</created>
                <updated>Wed, 19 Oct 2016 22:31:22 +0000</updated>
                            <resolved>Fri, 28 Oct 2011 03:39:59 +0000</resolved>
                                                    <fixVersion>2.7</fixVersion>
                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="63111" author="antoine" created="Thu, 27 Oct 2011 16:54:35 +0000"  >&lt;p&gt;smoothing latency like this is what is implemented in many systems.&lt;br/&gt;
The common case is following:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;by default driver will disregard slaves that are more than 15ms away from closest.&lt;/li&gt;
	&lt;li&gt;with no smoothing, any time a ping time is higher than 15ms slave will be disregarded for that period (5s). When it is due to load, it can lead to load imbalance and can start moving traffic back and forth between servers. This can lead to lower throughput and system instability.&lt;/li&gt;
	&lt;li&gt;with smoothing the latency would have to jump to at least 60s to disable that slave, so basically the selection is more stable. But at you mentioned the trade off is when a very bad latency happens, it takes more time to come back.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="63082" author="remonvv" created="Thu, 27 Oct 2011 15:43:21 +0000"  >&lt;p&gt;Can you comment on why local server measurements would be bad? It would seem that this solution could cause rather odd behaviour when big spikers occur, e.g. :&lt;/p&gt;

&lt;p&gt;PING 1 : 0ms (smoothed 0)&lt;br/&gt;
PING 2 : 1ms (smoothed 1)&lt;br/&gt;
PING 3 : 0ms (smoothed 0)&lt;br/&gt;
PING 4 : 6113ms (smoothed 1527)&lt;br/&gt;
PING 5 : 1ms (smoothed 1144)&lt;br/&gt;
PING 6 : 1ms (smoothed 857)&lt;/p&gt;

&lt;p&gt;In other words, a spike might disqualify the member as a suitable secondary for quite a long time and spikes will happen on distributed environments. Perhaps I misunderstood the solution.&lt;/p&gt;

&lt;p&gt;Also, I sugest using System.nanoTime() for measurements like these since apart from being way more accurate for &amp;lt;1ms measurements it also avoid OS specific timer granularity. On a lot of OS granularity of System.currentTimeMillis() is significantly larger than 1ms.&lt;/p&gt;</comment>
                            <comment id="62691" author="auto" created="Wed, 26 Oct 2011 06:33:58 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-459&quot; title=&quot;smooth the latency measurements&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-459&quot;&gt;&lt;del&gt;JAVA-459&lt;/del&gt;&lt;/a&gt;: smooth the latency measurements&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/d8aaf49ffa82c93cab1ce9c3e9985a80aa77db31&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/d8aaf49ffa82c93cab1ce9c3e9985a80aa77db31&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrhblb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14678</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>