Sharded Cluster Components

Sharded Cluster Components

Sharded clusters implement sharding. A sharded cluster consists of the following components:

  • Shards – A shard is a MongoDB instance that holds a subset of a collection’s data. Each shard is either a single mongod instance or a replica set. In production, all shards are replica sets.
  • Config Servers – Each config server is a mongod instance that holds metadata about the cluster. The metadata maps chunks to shards.
  • Routing Instances – Each router is a mongos instance that routes the reads and writes from applications to the shards. Applications do not access the shards directly.
Image 39
Diagram of a sharded cluster.

Enable sharding in MongoDB on a per-collection basis. For each collection you shard, you will specify a shard key for that collection.

Apply for MongoDB Certification Now!!

https://www.vskills.in/certification/databases/mongodb-server-administrator

Back to Tutorial

Share this post
[social_warfare]
Sharding Introduction
Sharded Cluster Deployment

Get industry recognized certification – Contact us

keyboard_arrow_up