A sharded cluster is comprised of the following elements:
- Two or more shards. Each shard must be a replica set.
- One or more query routers (mongos). mongos provides an interface between our application and the database.
- A replica set of config servers. Config servers store metadata and configuration settings for the entire cluster.
![](https://static.packt-cdn.com/products/9781783982608/graphics/assets/6bea952b-a10e-4110-82a0-77e97d8d4e67.png)
Reference: https://www.infoq.com/news/2010/08/MongoDB-1.6
We can't have a shard composed of a single server.