addShardTag( shard, tag )
Changed in version 3.4: This method aliases to
sh.addShardToZone()in MongoDB 3.4. The functionality specified below still applies to MongoDB 3.2. MongoDB 3.4 provides Zone sharding as the successor to tag-aware sharding.
Associates a shard with a tag or identifier. MongoDB uses these identifiers to direct chunks that fall within a tagged range to specific shards.
sh.addTagRange()associates chunk ranges with tag ranges.
Parameter Type Description
string The name of the shard to which to give a specific tag.
string The name of the tag to add to the shard.