[SERVER-1834] Automatic client fail-over for mongos (w/auto-discovery) Created: 23/Sep/10 Updated: 12/Dec/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Backlog - Cluster Scalability |
| Resolution: | Unresolved | Votes: | 11 |
| Labels: | RM | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Cluster Scalability
|
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||
| Description |
|
Much like a replicaset, mongos should return the list of other nodes on isMaster. Each mongos instance should return true for isMaster and the list of the other mongos instances for the cluster. If it works this way then all the drivers should be able to run against it and find all the other mongos instances for automatic fail over. |
| Comments |
| Comment by Andy Schwerin [ 20/Jul/15 ] |
|
There is no limit on the number of mongos nodes, which makes returning the exhaustive list as part of ismaster problematic. Further, automatically switching the mongos used by a client can compromise read-your-writes behavior. As such, I don't believe this is a good way to get high availability. eliot or scotthernandez, I propose closing this ticket as "Works as designed". Do you object? |
| Comment by Siddharth Sharma [ 06/Mar/12 ] |
|
In our project, we have to write mongos failover using round-robin strategy. When can this request be incorporated in mongoDb release? -Sid |
| Comment by Mathias Stearn [ 11/May/11 ] |
|
After meeting the concensus was that this should be implemented client-side, directly querying the config.mongos collection. |
| Comment by Scott Hernandez (Inactive) [ 28/Apr/11 ] |
|
This is the same issue with replicasets and why there is a passive (prio=0) and hidden option, among other reasons. We should probably allow the drivers to restrict selection (with a user setting/constructor-param); I would argue that method should work for replicasets too. |
| Comment by Robert Stam [ 28/Apr/11 ] |
|
I would think the developer wants some control over which mongos(es) the application is connecting to. An application server for example may want to limit connections to mongos(es) running on the same machine or the same datacenter. Finding and using all mongos(es) everywhere is probably going to be surprising behavior. |
| Comment by Eliot Horowitz (Inactive) [ 04/Apr/11 ] |
|
Need to have a reasonable limit and to make sure we pull things that have pinged in the last 3 minutes or so. |
| Comment by Eliot Horowitz (Inactive) [ 17/Dec/10 ] |
|
Should pull all other active mongos from config.mongos add put in ismaster result |