-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Catalog and Routing
-
1
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
Currently the engine will select as primary shard for a new db the most empty shard (code).
For an empty cluster usually the dbs are created all together and therefore all dbs will be located on the same shard.
The selection algorithm could be improved in order to distribute the primary shards even when the cluster is empty, something like:
- take the smallest shard
- take all the shards in the smallest + threashold (e.g. 50GB)
- from them chose the one with lowest number of collections
- if all the same chose one random