Reputation: 492
I understand the idea of Replica Set and am able to pull Replica Set Setup by using 3 server, the logic is as below, the reference are from this link https://severalnines.com/database-blog/turning-mongodb-replica-set-sharded-cluster :
So I came to have confusion when I am trying to understand how does Sharded Cluster works in Replica Logic, the reference I was able to find is as below:
There are a few concerns:
Upvotes: 0
Views: 278
Reputation: 59523
Yes, it does - provided your database and collection have "sharding enabled".
No, they don't. Shard 1's Secondaries hold a copy of Shard 1's Primary data.
The config replica set stores all kind of meta data, e.g. user accounts and privileges and - very important - it stores which ranges of data are stored in which shard. Otherwise, when you insert or read any data, you would not know to which shard they belong to.
Upvotes: 1