<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:25:54 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-2568] Zero connection overhead SDAM</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-2568</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;div class=&quot;panel&quot; style=&quot;background-color: #fafbfc;border-color: #21313c;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #fafbfc;&quot;&gt;
&lt;h3&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;/h3&gt;
&lt;p&gt;Streaming SDAM mode requires 2 extra connections per server: one for streaming hello, one for RTT measurements.&lt;br/&gt;
Polling SDAM mode requires 1 extra connection per server.&lt;/p&gt;

&lt;p&gt;We could get Polling SDAM to be zero connection overhead (in the best case assuming no pool contention) if SDAM and application operations would share a single pooled connection. The initial connection sequence would be:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Monitor creates unauthenticated connection, runs hello handshake, discovers server, checks connection back into the pool.&lt;/li&gt;
	&lt;li&gt;Application thread checks connection out of the pool, runs auth handshake, executes operation, checks connection back into the pool.&lt;/li&gt;
	&lt;li&gt;Monitor wakes for next check and reuses the pooled connection.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In scenarios where the application uses a single thread with many processes (eg AWS Lambda) this change would allow 200% more MongoClients vs Streaming SDAM and 100% more MongoClients vs Polling SDAM.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Motivation&quot;&gt;&lt;/a&gt;&lt;b&gt;Motivation&lt;/b&gt;&lt;/h3&gt;
&lt;h4&gt;&lt;a name=&quot;Whoistheaffectedenduser%3F&quot;&gt;&lt;/a&gt;Who is the affected end user?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Who are the stakeholders?&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Howdoesthisaffecttheenduser%3F&quot;&gt;&lt;/a&gt;How does this affect the end user?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Are they blocked? Are they annoyed? Are they confused?&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Howlikelyisitthatthisproblemorusecasewilloccur%3F&quot;&gt;&lt;/a&gt;How likely is it that this problem or use case will occur?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Main path? Edge case?&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Iftheproblemdoesoccur%2Cwhataretheconsequencesandhowseverearethey%3F&quot;&gt;&lt;/a&gt;If the problem does occur, what are the consequences and how severe are they?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Minor annoyance at a log message? Performance concern? Outage/unavailability? Failover can&apos;t complete?&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Isthisissueurgent%3F&quot;&gt;&lt;/a&gt;Is this issue urgent?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Does this ticket have a required timeline? What is it?&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Isthisticketrequiredbyadownstreamteam%3F&quot;&gt;&lt;/a&gt;Is this ticket required by a downstream team?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Needed by e.g. Atlas, Shell, Compass?&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Isthisticketonlyfortests%3F&quot;&gt;&lt;/a&gt;Is this ticket only for tests?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Does this ticket have any functional impact, or is it just test improvements?&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="2281058">DRIVERS-2568</key>
            <summary>Zero connection overhead SDAM</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="shane.harvey@mongodb.com">Shane Harvey</reporter>
                        <labels>
                            <label>FY24Q4</label>
                            <label>maintainers-triage</label>
                    </labels>
                <created>Fri, 3 Mar 2023 19:52:46 +0000</created>
                <updated>Mon, 25 Sep 2023 17:37:43 +0000</updated>
                                                                <component>CMAP</component>
                    <component>FaaS</component>
                    <component>Performance</component>
                    <component>SDAM</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="5304705" author="shane.harvey" created="Tue, 28 Mar 2023 00:53:01 +0000"  >&lt;p&gt;Some interesting things to consider:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;With streaming SDAM, the RTT monitor could share a connection from the pool, thus reducing the overhead of streaming for all users (not just FaaS).&lt;/li&gt;
	&lt;li&gt;With streaming SDAM, the task reading hello responses from the server will essentially pin a connection out of the pool, do we use a dedicated connection here instead?&lt;/li&gt;
	&lt;li&gt;Application pools are paused by default until SDAM discovers the state and marks the pool &quot;ready&quot;. This will need to change since SDAM needs to checkout a connection before knowing the state. Perhaps we can add a CMAP api which adds an externally created connection to the pool?&lt;/li&gt;
	&lt;li&gt;When using an application socket, are CMAP or command events emitted?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Overall this could be a big improvement for FaaS envs and I think is in the realm of possibility (&lt;a href=&quot;https://github.com/ShaneHarvey/mongo-python-driver/tree/DRIVERS-2568&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;I have a quick POC here&lt;/a&gt;). My main concern is introducing complexity that might overlap with gRPC.&lt;/p&gt;</comment>
                            <comment id="5248086" author="behackett" created="Fri, 3 Mar 2023 20:29:07 +0000"  >&lt;p&gt;We would have to keep in mind the design for gRPC, in particular any support for automatically upgrading how we connect, from using mongoRPC for the initial connection to using gRPC once we know the deployment supports it.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </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_10951" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Driver Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10748"><![CDATA[Needed]]></customfieldvalue>

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