<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:57:28 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-1594] mongos should work with replica-set (without sharding)</title>
                <link>https://jira.mongodb.org/browse/SERVER-1594</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Change the mongos router to work with a non-sharding replica set.&lt;/p&gt;</description>
                <environment></environment>
        <key id="12712">SERVER-1594</key>
            <summary>mongos should work with replica-set (without sharding)</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="10033" iconUrl="https://jira.mongodb.org/images/icons/statuses/information.png" description="Status for tickets that need to be escalated and unblocked on our team.">Blocked</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-catalog-and-routing">Backlog - Catalog and Routing</assignee>
                                    <reporter username="scotthernandez">Scott Hernandez</reporter>
                        <labels>
                            <label>oldshardingemea</label>
                    </labels>
                <created>Mon, 9 Aug 2010 14:11:10 +0000</created>
                <updated>Tue, 16 Jan 2024 14:44:28 +0000</updated>
                                            <version>1.6.0</version>
                                                    <component>Replication</component>
                    <component>Sharding</component>
                                        <votes>146</votes>
                                    <watches>100</watches>
                                                                                                                <comments>
                            <comment id="2437495" author="alex.komyagin@10gen.com" created="Fri, 27 Sep 2019 21:38:48 +0000"  >&lt;p&gt;I built a prototype for this functionality (not supported): &lt;a href=&quot;https://github.com/alex-thc/monguac/tree/new&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/alex-thc/monguac/tree/new&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2183943" author="jsuggala@esri.com" created="Mon, 18 Mar 2019 16:15:30 +0000"  >&lt;p&gt;+1&lt;/p&gt;</comment>
                            <comment id="1846048" author="lifubang" created="Tue, 27 Mar 2018 01:31:54 +0000"  >&lt;p&gt;+1&lt;/p&gt;</comment>
                            <comment id="1476232" author="don4of4" created="Fri, 13 Jan 2017 09:54:01 +0000"  >&lt;p&gt;Fundamentally there needs to be an option to load balance across a replica-set WITHOUT sharding.  Many people have workloads which are too small to warrant sharding, yet require replica sets for redundancy.   There people then have maintenance and reporting scripts which would permit stale data, but we have no mechanism to intelligently route the query to the most available server.&lt;/p&gt;</comment>
                            <comment id="1282165" author="dominic.baines" created="Thu, 2 Jun 2016 10:34:53 +0000"  >&lt;p&gt;Nothing in ages is this still being looked at? This would be an extremely useful feature. &lt;/p&gt;
</comment>
                            <comment id="955062" author="cdesmarais@opentable.com" created="Tue, 30 Jun 2015 21:02:35 +0000"  >&lt;p&gt;+1 we got around it creating a single shard cluster, but hadn&apos;t really wanted to do that,  This feature would have saved us an annoying trip into driver edge cases.&lt;/p&gt;</comment>
                            <comment id="747183" author="thijs" created="Wed, 22 Oct 2014 16:04:18 +0000"  >&lt;p&gt;+1, this would be extremely useful to us.&lt;/p&gt;</comment>
                            <comment id="735597" author="david.henderson@triggeredmessaging.com" created="Tue, 7 Oct 2014 15:37:04 +0000"  >&lt;p&gt;I&apos;ve cross-posted this response to a blog post here: &lt;a href=&quot;http://emptysqua.re/blog/server-discovery-and-monitoring-spec/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://emptysqua.re/blog/server-discovery-and-monitoring-spec/&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;I think this view (from the previous comment, that there is little value to more widespread use of mongos) is a little short-sighted - as far as I can see, there are other benefits of having this logic in the mongos (as well as removing the complexity from the driver developers):&lt;/p&gt;

&lt;p&gt;For ease, I&apos;m going to refer throughout to a mongo instance (i.e. a single mongod / a replicaset / a sharded cluster) as a &quot;target&quot;.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;If you have multiple processes on one app server (possibly different languages too), each connecting to a number of targets, having a local mongos that dealt with connection routing / pooling should cut down the connection count / non-mapped VM on the mongo servers. Where you have multiple targets, you could have multiple local mongos on different ports. Each app process would connect on the right port for the relevant targets it wants to reach. The mongos&apos;s could then manage the routing / pooling in a more efficient manner.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;If you have the mongos as a router / pooling manager, the the app layer does not need to have any knowledge of what it is connecting to. There should be no good reason for it to care if the server it is connecting to is, for example, a replica set vs a mongod - In python, you would be connecting with MongoReplicaSetClient vs MongoClient - requiring app code changes if the target changes.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Another benefit of using the mongos in this way is to take the fine details out of the app layer, and move it into the ops space. Currently, if you&apos;re using the mongos in a sharded environment, you can simply connect to mongos and have no knowledge of where the cluster / shards are - as this is all dealt with between the mongos/config servers.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;It would ease the transition from mongod -&amp;gt; RS -&amp;gt; Cluster (especially in a mixed environment). If you decide that you need to change one replicaset to a sharded cluster, you currently would have to:&lt;br/&gt;
1) Change the code to use the correct connection mechanism (for that target only)&lt;br/&gt;
2) Add a mongos to each app box for that target&lt;br/&gt;
3) Add 3 config servers to manage that target.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;If, on the other hand, you had the option to connect to anything via a mongos, as a standard layer, you would only have to:&lt;br/&gt;
1) Run up &amp;amp; configure your config servers&lt;br/&gt;
2) Change your mongos config  so that it pointed at the configservers rather than the at the replicaset seeds.&lt;/p&gt;


&lt;p&gt;For some background, we&apos;re running with:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;A number of clusters, each with a single shard (i.e sharding effectively off). The shard has a replicaset with a primary and a number of secondaries. Each &quot;cluster&quot; has the required 3 configsvrs for production usage (which is a pain in terms of management, especially since each new cluster means 3 more configsvrs to deploy in production. They quickly add up)&lt;/li&gt;
	&lt;li&gt;Each app server has a mongos for each &quot;cluster&quot; e.g. cluster 1 on 27017 cluster2 on 27027 etc&lt;/li&gt;
	&lt;li&gt;Each process makes connection(s) to the relevant mongos ports based on which clusters it needs to query at any point.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;In conclusion, here&apos;s my wishlist for an ideal mongos solution:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;mongos could optionally take 3 config options: single mongod address / replicaset seeds / configserver details&lt;/li&gt;
	&lt;li&gt;a single mongos process could have multiple of the above configured, listening on different ports (saves overheads of running multiple mongos&apos;s)&lt;/li&gt;
	&lt;li&gt;the drivers could talk to the mongos in a consistent manner for all types behind it (as they currently do for sharded cluster). The mongos would deal with connection pooling / readPreference routing / HA / write concerns in a stable and consistent way.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Any thoughts would be appreciated.&lt;/p&gt;</comment>
                            <comment id="713150" author="kraih" created="Sun, 7 Sep 2014 14:42:18 +0000"  >&lt;p&gt;There is so much unnecessary work going into replica set support (especially read preferences) for all the different drivers, it boggles the mind. Such an important part of the infrastructure should really be owned by the core server.&lt;/p&gt;</comment>
                            <comment id="506510" author="sheki" created="Thu, 27 Feb 2014 17:57:49 +0000"  >&lt;p&gt;This kind of critical infrastructure should ideally be owned by Mongo. Is this in the roadmap for 2.6? &lt;/p&gt;</comment>
                            <comment id="487600" author="glenn" created="Fri, 24 Jan 2014 22:00:22 +0000"  >&lt;p&gt;Big +1.  I wasted a lot of time today bringing up a server because of replica set driver weirdness.  (Pymongo requires the replica set name in the URL for some reason and my Mongo host doesn&apos;t include it.  Pymongo also has a whole separate top-level class just for replica sets.)  Users and drivers shouldn&apos;t have to care whether they&apos;re connecting to a standalone server, a replica set or a cluster, and mongos could mask all this and eliminate whole categories of driver bugs and usage errors.&lt;/p&gt;

&lt;p&gt;Another example is how easy it is to end up using a non-replica-set mongo URL when connecting to a replica set, and this will &quot;seem to work&quot; for a long time if it happens to be the primary, then suddenly fail later after a failover.  This can be hidden within mongos and handled automatically.&lt;/p&gt;</comment>
                            <comment id="482404" author="tomp" created="Wed, 15 Jan 2014 12:21:50 +0000"  >&lt;p&gt;This would be a really useful feature, as we can let the mongos deal with maintaining persistent connections to the replica sets, meaning PHP/Apache clients dont have a delay whilst they connect to all the nodes.&lt;/p&gt;</comment>
                            <comment id="475853" author="sheki" created="Mon, 30 Dec 2013 21:29:18 +0000"  >&lt;p&gt;I would like to use mongos as a connection proxy to save on the number of connections it can make to mongo. &lt;/p&gt;</comment>
                            <comment id="346704" author="sboesebeck" created="Tue, 28 May 2013 09:28:41 +0000"  >&lt;p&gt;Need this feature, too... very much so.&lt;br/&gt;
We also have a lot of shell-scripts in our environment - shell does not do fail overs.&lt;/p&gt;</comment>
                            <comment id="287066" author="philippe.david@allgoob.com" created="Tue, 12 Mar 2013 11:04:00 +0000"  >&lt;p&gt;A lot of efforts have been done to code the replica set connection/reconnection logic in several drivers.&lt;br/&gt;
I have been using the PHP driver in production for nearly 2 years now, and we experienced significant trouble in degraded situations. There have been a lot of work on this driver but yet, we are in 2013 and things like the connection timeout have only been fixed very recently.&lt;/p&gt;

&lt;p&gt;The client-side replica set code is indeed complex, but even for a language like PHP which is quite popular I am not yet satisfied by the driver. To me it sounds very reasonnable to have this complexity only once in a generic proxy and not in every driver. If it means running a mongos daemon on localhost for every PHP client, fine. As long as it&apos;s more stable.&lt;/p&gt;

&lt;p&gt;+1&lt;/p&gt;</comment>
                            <comment id="250622" author="0xbaadf00d" created="Sat, 26 Jan 2013 18:39:31 +0000"  >&lt;p&gt;So i&apos;m looking for this kind of feature today. You have my vote too.&lt;/p&gt;</comment>
                            <comment id="195311" author="lovato" created="Wed, 21 Nov 2012 01:22:11 +0000"  >&lt;p&gt;We are just about to install MongoDB for our production site (replacing Oracle) and we did a lot of testing using Mongos, but our production site will definetivelly use replica-set. Then we found this.&lt;br/&gt;
Again, is it still planned? It has been more then 2 years since first post, and its considered small (&amp;lt;1day).&lt;/p&gt;

&lt;p&gt;Best&lt;br/&gt;
Marco&lt;/p&gt;</comment>
                            <comment id="104803" author="sporcina" created="Thu, 29 Mar 2012 15:58:10 +0000"  >&lt;p&gt;The feature gets my vote too.&lt;/p&gt;</comment>
                            <comment id="81528" author="shamil@boxee.tv" created="Sun, 22 Jan 2012 18:27:44 +0000"  >&lt;p&gt;Is this still planned? When to expect for this future, I&apos;m desperately waiting for this future... &lt;/p&gt;</comment>
                            <comment id="20549" author="suno" created="Sun, 21 Nov 2010 13:14:17 +0000"  >&lt;p&gt;Resolving this one would also enable the case where nginx-gridfs could read from secondaries as opposed to primaries only:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mdirolf/nginx-gridfs/issues/unreads#issue/11&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mdirolf/nginx-gridfs/issues/unreads#issue/11&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://groups.google.com/group/mongodb-user/browse_thread/thread/2d79f7e79af2d779/8b3e7321c23782a0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://groups.google.com/group/mongodb-user/browse_thread/thread/2d79f7e79af2d779/8b3e7321c23782a0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="173669">TOOLS-487</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>20.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26387"><![CDATA[Catalog and Routing]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 21 Nov 2010 13:14:17 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 19 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<a href='https://jira.mongodb.org/browse/PM-635'>PM-635</a>]]></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>connie.chen@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 19 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>sheki</customfieldvalue>
            <customfieldvalue>alex.komyagin@mongodb.com</customfieldvalue>
            <customfieldvalue>shamil@boxee.tv</customfieldvalue>
            <customfieldvalue>backlog-server-catalog-and-routing</customfieldvalue>
            <customfieldvalue>cdesmarais@opentable.com</customfieldvalue>
            <customfieldvalue>david.henderson@triggeredmessaging.com</customfieldvalue>
            <customfieldvalue>dominic.baines</customfieldvalue>
            <customfieldvalue>don4of4</customfieldvalue>
            <customfieldvalue>glenn</customfieldvalue>
            <customfieldvalue>jsuggala@esri.com</customfieldvalue>
            <customfieldvalue>lovato</customfieldvalue>
            <customfieldvalue>suno</customfieldvalue>
            <customfieldvalue>philippe.david@allgoob.com</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
            <customfieldvalue>kraih</customfieldvalue>
            <customfieldvalue>sporcina</customfieldvalue>
            <customfieldvalue>sboesebeck</customfieldvalue>
            <customfieldvalue>0xbaadf00d</customfieldvalue>
            <customfieldvalue>thijs</customfieldvalue>
            <customfieldvalue>tomp</customfieldvalue>
            <customfieldvalue>lifubang</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrphkv:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4560</customfieldvalue>
                        </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|hriwuf:</customfieldvalue>

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