-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: manual
-
Labels:
-
1
This question comes up once in a while. When a new database is created in a sharded cluster, which shard is chosen as the "primary shard". I have seen answers from support saying "round robin" and "arbitrary". The answer according to SERVER team is that the shard with the least amount of data on it is picked as the "primary shard" for the new database. At least since 2.0, unsure of earlier versions.
Our education clases m102 says its the first shard always. m202 says random.
Documentation doesn't mention this at all at docs.mongodb.com.