We know there are two ways to create a mongoDB cluster :-

1.) Sharding

2.) Replication

My question is can we combine both sharding & replication like we have in elastic cluster?


In MongoDB 3.6 and newer, shards must be deployed as a replica set. Replication provides data redundancy and high availability for each shard; sharding enables a collection to be distributed across multiple shards.

For more information see Sharded Cluster Components and the Deploy a Sharded Cluster tutorial in the MongoDB documentation.

  • Thanks a lot @Stennie for your comment. I will look into this. SO, basically if i will deploy a shard with mongoDB version 3.6 or newer then it will be the same.
    – abhi
    Jan 13 '20 at 17:37
  • @abhi In versions of MongoDB earlier than 3.6 it was optional (but recommended) for shards to be replica sets. In MongoDB 3.6+ replication this changed to a requirement.
    – Stennie
    Jan 13 '20 at 18:17
  • Thanks for the explanation. Do you mind connecting on linkedin incase if i will be having more question.
    – abhi
    Jan 13 '20 at 18:30
  • @abhi If you have more questions it would be good to ask them on public forums like DBA StackExchange so others can also learn and participate in the conversation.
    – Stennie
    Jan 13 '20 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.