[SERVER-12686] Can Mongos route to different hosts by collections? Created: 12/Feb/14  Updated: 12/Feb/14  Resolved: 12/Feb/14

Status: Closed
Project: Core Server
Component/s: Admin, Networking
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: larry.loi Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Given that we have 2 mongoDB hosts, for example host A and B, then their own DB and collections. our application server. has only 1 mongos, is there any way to route to different host if we want to access different collection. we are using ruby implementation, each collection is under ORM controll.



 Comments   
Comment by Scott Hernandez (Inactive) [ 12/Feb/14 ]

These types of questions are best asked on the community forum (https://groups.google.com/group/mongodb-user) and not in jira (which is used to file bugs, feature requests, and other code-related changes for the core server). There are already many answers and discussions there which you might find very useful and informative.

Comment by Reno Reckling [ 12/Feb/14 ]

I am not quite sure what the problem is here.
Mongodb shards are already defined on a per-collection basis, meaning that it is easily possible to assign collection 1 to shard A and collection 2 to shard B and the mongos router will route them accordingly.

Take a look at the mongodb sharding tutorials, they explain it quite well.
MongoDB Shards

Generated at Thu Feb 08 03:29:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.