<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:25:43 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>[SERVER-31010] Server Selection localThresholdMS enhancement</title>
                <link>https://jira.mongodb.org/browse/SERVER-31010</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;From the documentation&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_When localThresholdMS is used :&lt;br/&gt;
During monitoring, drivers regularly record the RTT of ismaster commands. The Server Selection specification calls for these to be calculated using an exponentially-weighted moving average function.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;If the prior average is denoted RTTt-1, then the new average (RTTt) is computed from a new RTT measurement (Xt) and a weighting factor (&#945;) using the following formula:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;  t = &#945;&#183;Xt + (1-&#945;)&#183;RTTt-1&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The weighting factor is set to 0.2, which was chosen to put about 85% of the weight of the average RTT on the 9 most recent observations. Weighting recent observations more means that the average responds quickly to sudden changes in latency._&lt;/p&gt;

&lt;p&gt;Would it be possible to have another similar configuration option to tell the client to observe query/operation response times over a window of time or over n executions, be able to specify a threshold for response times so that servers with best response times can be picked over slow responding servers?&lt;/p&gt;</description>
                <environment></environment>
        <key id="425608">SERVER-31010</key>
            <summary>Server Selection localThresholdMS enhancement</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="12300">Won&apos;t Do</resolution>
                                        <assignee username="backlog-server-servicearch">Backlog - Service Architecture</assignee>
                                    <reporter username="shakir.sadikali@mongodb.com">Shakir Sadikali</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Sep 2017 18:53:36 +0000</created>
                <updated>Tue, 6 Dec 2022 03:52:28 +0000</updated>
                            <resolved>Tue, 9 Nov 2021 18:55:51 +0000</resolved>
                                                                    <component>Replication</component>
                                        <votes>1</votes>
                                    <watches>15</watches>
                                                                                                                <comments>
                            <comment id="4178494" author="JIRAUSER1262719" created="Tue, 9 Nov 2021 18:55:51 +0000"  >&lt;p&gt;We haven&#8217;t heard back from you for some time, so I&#8217;m going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.&lt;/p&gt;</comment>
                            <comment id="2276018" author="jason.carey" created="Fri, 7 Jun 2019 16:59:23 +0000"  >&lt;p&gt;I wanted to provide an update on a feature that provides some help in situations like the one above, albeit through a very different kind of mechanism.&lt;/p&gt;

&lt;p&gt;After &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41132&quot; title=&quot;Support parallel targeting of hosts in the ARS&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41132&quot;&gt;&lt;del&gt;SERVER-41132&lt;/del&gt;&lt;/a&gt; (which is in master, and planned to land in 4.2.0), we&apos;ve made an update to how read preference targeting is utilized for command dispatch.&lt;/p&gt;

&lt;p&gt;Specifically, in pre-4.2 land, read preference targeting finds all eligible hosts, then selects one at random to execute a command against.  After 4.2, read preference targeting will:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Generate a list of all known hosts that satisfy that read preference&lt;/li&gt;
	&lt;li&gt;Request connections to each host in an order dictated by random selection&lt;/li&gt;
	&lt;li&gt;Use the first connection acquired (either because we have one available, or when we&apos;re able to initialize one)&lt;/li&gt;
	&lt;li&gt;Cease requesting new connections after one is acquired&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This should cause us to preferentially route requests to hosts with more ready connections (either because of a transient drop in performance/availability or because of heterogeneous capacity).&lt;/p&gt;

&lt;p&gt;This functionality is only in mongos for the moment (so you can&apos;t get it in a driver), and it isn&apos;t precisely what&apos;s described here, but it solves a similar set of use cases.  It has some other benefits in allowing us to respond much quicker than a time windowing system would allow, as well as allowing for uneven distribution of work to heterogeneous servers (rather than being an all or nothing threshold)&lt;/p&gt;</comment>
                            <comment id="1674180" author="nmayakuntla" created="Fri, 15 Sep 2017 17:19:38 +0000"  >&lt;p&gt;It would also help if an event can be generated to let application know that a node(s) were not considered because of high latency so that we can know certain node(s) had issue and maybe log/alert based on that.&lt;/p&gt;</comment>
                            <comment id="1668562" author="nmayakuntla" created="Fri, 8 Sep 2017 22:00:48 +0000"  >&lt;p&gt;Example Scenario:&lt;/p&gt;

&lt;p&gt;    5 Node Cluster (2 in DC1, 2 in DC2, 1 DC3). Primary in DC1.&lt;br/&gt;
    Client is using secondaryPreferred&lt;br/&gt;
    localThresholdMs is set to 3ms&lt;br/&gt;
    Latency from DC1 &amp;lt;=&amp;gt; DC2 is 8ms, DC2 &amp;lt;=&amp;gt; DC3 is 8ms, DC1 &amp;lt;=&amp;gt; DC2 is 15ms. Inter-DC is ~1ms.&lt;/p&gt;

&lt;p&gt;If a Client in DC2 sends a request, the 2 nodes in DC2 are eligible.&lt;/p&gt;

&lt;p&gt;If one of the nodes in DC2 has a storage/disk i/o latency problem, the RTT calculation via Heartbeat will not be aware (because isMaster does not interact w/ disk). Therefore, the client will continue to consider a node that is consistently returning queries past the desired SLA). It&apos;s likely that localThresholdMs was meant to only consider network latency, but if it could be amended (or a new parameter added) to consider end-to-end execution ...&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25132"><![CDATA[Service Arch]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000Y087tIAB, 500A000000YRGA2IAP, 500A000000YQAWhIAP]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 8 Sep 2017 20:27:33 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 13 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 13 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-servicearch</customfieldvalue>
            <customfieldvalue>lauren.lewis@mongodb.com</customfieldvalue>
            <customfieldvalue>mira.carey@mongodb.com</customfieldvalue>
            <customfieldvalue>nmayakuntla</customfieldvalue>
            <customfieldvalue>shakir.sadikali@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htehu7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8e9z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hte3xb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>