Details
-
Question
-
Resolution: Done
-
Major - P3
-
None
-
3.2.6
-
None
Description
am trying tag based sharding in mongo db with tag ranges .Since i do have a range for my shard key .I came up with an idea of adding range for each value of shard key.
ex:
sh.addTagRange( ".",{ shardKey: 1 },{ shardKey: 2 },"tag_name")
|
Since value 2 of shardKey in the above command is excluded in in the range .The range will cover only 1 value. I do this for all the documents(doc size : 1,76000 docs) . I have 2 tags and 2 shards .Each has only 1 node ie primary node.
When i do this and do sh.startBalancer() .The data is not getting distributed across the shards as per the tag .
Is this approach correct or having such large number of ranges in tags collection of config db is not supported or recommended ?