DBAtlas · Database operations atlas

Add a shard to the cluster

MongoDBSharding

Command

sh.addShard("shardRS/mongoShard1:27018")

What it does

Adds a new shard (replica set) to the sharded cluster.

When to use it

When scaling storage or throughput capacity horizontally.

Caution

After adding a shard, the balancer starts migrating chunks; this creates additional IO load.

Open in DBAtlas →

Related