The config database is the backbone of a sharded setup in Mongo. It stores all the metadata of the shard setup and has a dedicated mongod
process running for it. When a mongos
process is started, we provide it with the config server's URL. In this recipe, we will take a look at some collections in the config
database and dive deep into their content and significance.
We will have a sharded setup for this recipe. Refer to the Starting a simple sharded environment of two shards in Chapter 1, Installing and Starting the MongoDB Server, for how to start a simple shard. Additionally, connect to the mongos
process from a shell.