-
Notifications
You must be signed in to change notification settings - Fork 92
Sharding how to
agirbal edited this page Oct 4, 2011
·
4 revisions
- Open the Connect dialog
- Input a single server which should be a MongoS instance
- Wait a few seconds and you should get a complete view of your cluster
First click on the db node in the tree...
- To enable sharding, click "Sharding" / "Enable Sharding"
- For sharding info, click "Sharding" / "Sharding Info"
- First you need to enable sharding on the database if not done yet
- Then you need to decide which index you want to shard the collection on. If not "_id", make sure you create the secondary index you want to shard on.
- Click "Sharding" / "Shard Collection", and select the index you want to shard on, or pick a custom key (e.g. a subset of an index key)
- You will get confirmation that the command succeeded. Refresh the database tree, and the sharding icon should appear on the collection icon.
First click on the collection node in the tree...
- To find all chunks for a collection, click "Sharding" / "Find Chunks"
- To move a chunk for a collection, click "Sharding" / "Move Chunk"
- To split a chunk for a collection, click "Sharding" / "Split Chunk"
First click on the collection node in the tree...
- To list shards, click "Sharding" / "List Shards"
- To add a shard, click "Sharding" / "Add Shard"
- To turn on/off the auto balancer, click "Sharding" / "Auto Balance"