This version of the documentation is archived and no longer supported.

Sharded Cluster Tutorials

The following tutorials provide instructions for administering sharded clusters. For a higher-level overview, see Sharding.

Sharded Cluster Deployment Tutorials

Instructions for deploying sharded clusters, adding shards, selecting shard keys, and the initial configuration of sharded clusters.

Deploy a Sharded Cluster
Set up a sharded cluster by creating the needed data directories, starting the required MongoDB instances, and configuring the cluster settings.
Considerations for Selecting Shard Keys
Choose the field that MongoDB uses to parse a collection’s documents for distribution over the cluster’s shards. Each shard holds documents with values within a certain range.
Shard a Collection Using a Hashed Shard Key
Shard a collection based on hashes of a field’s values in order to ensure even distribution over the collection’s shards.
Add Shards to a Cluster
Add a shard to add capacity to a sharded cluster.

Continue reading from Sharded Cluster Deployment Tutorials for additional tutorials.

Sharded Cluster Maintenance Tutorials

Procedures and tasks for common operations on active sharded clusters.

View Cluster Configuration
View status information about the cluster’s databases, shards, and chunks.
Remove Shards from an Existing Sharded Cluster
Migrate a single shard’s data and remove the shard.
Migrate Config Servers with Different Hostnames
Migrate a config server to a new system that uses a new hostname. If possible, avoid changing the hostname and instead use the Migrate Config Servers with the Same Hostname procedure.
Manage Shard Tags
Use tags to associate specific ranges of shard key values with specific shards.

Continue reading from Sharded Cluster Maintenance Tutorials for additional tutorials.

Sharded Cluster Data Management
Practices that address common issues in managing large sharded data sets.
Troubleshoot Sharded Clusters
Presents solutions to common issues and concerns relevant to the administration and use of sharded clusters. Refer to FAQ: MongoDB Diagnostics for general diagnostic information.