Configuring the default shard for non-sharded collections
In the recipe Starting a simple sharded environment of two shards in Chapter 1, Installing and Starting the Server we set up a simple two-shard server. In the recipe Connecting to a shard in the shell and performing operations in Chapter 1, Installing and Starting the Server we added data to a person collection that was sharded. However, for any collection that is not sharded, all the documents end up on one shard called the primary shard. This situation is acceptable for small databases with relatively small number of collections. However, if the database size increases and at the same time the number of un-sharded collections increase, we end up overloading a particular shard (which is the primary shard for a database) with a lot of data from these un-sharded collections. All query operations for such un-sharded collections as well as those on the collections whose particular range in the shard reside on this server instance will...