<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:22:31 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>[DRIVERS-864] Round-robin loadbalancing for evenly distributing secondary reads</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-864</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;p&gt;MongoDB drivers use a&#160;&lt;a href=&quot;https://docs.mongodb.com/manual/core/read-preference-mechanics/index.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Server Selection Algorithm&lt;/a&gt;&#160;to choose which replica set member to use&#160;&lt;em&gt;(or, when connected to multiple mongos instances, which mongos instance to use)&lt;/em&gt;. For a&#160;&lt;b&gt;&lt;tt&gt;secondary&lt;/tt&gt;&lt;/b&gt;&#160;read preference, the server selection process is as follows:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;The driver assembles a list of eligible secondary members.&#160;&lt;a href=&quot;https://docs.mongodb.com/manual/core/read-preference/#replica-set-read-preference-max-staleness&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;maxStalenessSeconds&lt;/a&gt;&#160;and&#160;&lt;a href=&quot;https://docs.mongodb.com/manual/tutorial/configure-replica-set-tag-sets/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;tag sets&lt;/a&gt;&#160;can further restrict the eligibility of the members, as&#160;&lt;a href=&quot;https://docs.mongodb.com/manual/reference/read-preference/index.html#secondary&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;documented here&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;If the list of eligible members is not empty, the driver determines which eligible member is the &#8220;closest&#8221; (i.e. the member with the lowest average network round-trip-time) and calculates a latency window by adding the average round-trip-time of this &#8220;closest&#8221; server and the&#160;&lt;a href=&quot;https://docs.mongodb.com/manual/reference/connection-string/index.html#urioption.localThresholdMS&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;localThresholdMS&lt;/a&gt;. The driver uses this latency window to pare down the list of eligible members to those members that fall within this window.&lt;/li&gt;
	&lt;li&gt;&lt;b&gt;&lt;em&gt;From this list of eligible members&lt;/em&gt;&lt;/b&gt;&#160;that fall within the latency window, the driver&#160;&lt;b&gt;&lt;em&gt;&lt;ins&gt;randomly&lt;/ins&gt; chooses an eligible member&lt;/em&gt;&lt;/b&gt;.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The above process is&#160;&lt;a href=&quot;https://docs.mongodb.com/manual/core/read-preference-mechanics/index.html#read-preference-for-replica-sets&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;documented here&lt;/a&gt;. As can be seen here, this process&#160;&lt;b&gt;&lt;em&gt;does not&lt;/em&gt;&lt;/b&gt;&#160;use even-load-balancing as a criteria for selection of a secondary.&#160;&lt;b&gt;&lt;em&gt;In other words, the secondary selection process does not &lt;ins&gt;evenly&lt;/ins&gt; distribute the incoming queries equally among available secondaries.&lt;/em&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;This is an enhancement request to add a &lt;b&gt;round-robin loadbalancing&lt;/b&gt; mechanism in the Server Selection Algorithm, which will &lt;b&gt;evenly distribute secondary reads among secondaries in a round-robin fashion&lt;/b&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="756988">DRIVERS-864</key>
            <summary>Round-robin loadbalancing for evenly distributing secondary reads</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="-1">Unassigned</assignee>
                                    <reporter username="bernie@mongodb.com">Bernie Hackett</reporter>
                        <labels>
                    </labels>
                <created>Thu, 2 May 2019 21:00:43 +0000</created>
                <updated>Thu, 6 Jul 2023 20:02:23 +0000</updated>
                            <resolved>Thu, 6 Jul 2023 20:02:23 +0000</resolved>
                                                        <component>Server Selection</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="3549118" author="patrick.freed" created="Tue, 5 Jan 2021 17:20:30 +0000"  >&lt;p&gt;As part of DRIVERS-781, the server selection algorithm was updated to take the active &quot;operation count&quot; of a given server into account instead of just selecting randomly. See the changes in SPEC-1555 for details. This obviates the need for round-robin load balancing and achieves the goals set forth in this ticket, so I think we can just close this out.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;cc&#160;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=oleg.pudeyev&quot; class=&quot;user-hover&quot; rel=&quot;oleg.pudeyev&quot;&gt;oleg.pudeyev&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="756956">SERVER-40970</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|hun27z:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>