03 / 15

What are the components of a sharded cluster?

A MongoDB sharded cluster consists of the following components:

  1. 1

    shard: Each shard contains a subset of the sharded data. Each shard must be deployed as a replica set.

  2. 2

    mongos: The mongos acts as a query router, providing an interface between client applications and the sharded cluster.

  3. 3

    config servers: Config servers store metadata and configuration settings for the cluster. Config servers must be deployed as a replica set (CSRS).