[SERVER-11112] Can I specify shards to database? Created: 09/Oct/13  Updated: 09/Jul/16  Resolved: 10/Oct/13

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.4.6
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Dmitry Assignee: Unassigned
Resolution: Done Votes: 0
Labels: sharding
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Hello.
Is any solution to specify shards for special database.

For example: I have 4 shards:

web0001:web0001:/server1,server2,server3
web0002:web0002:/server4,server5,server6

photo0001:photo0001:/server7,server8,server9
photo0002:photo0002:/server10,server11,server12

Can I assign database 'web' works only on web0001,web0002 shards and 'photo' database works on photo0001,photo0002 on one mongos instance and in one config?

Thank you.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 10/Oct/13 ]

Yes, you can use tag aware sharding to tag different shards, and then have collections only go to some of them.

See http://docs.mongodb.org/manual/core/tag-aware-sharding/ for more information.

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