Created
April 26, 2021 10:58
-
-
Save RahulJyala7/43d9e85f4ec159fd1487961e81618b93 to your computer and use it in GitHub Desktop.
Sharding vs Replication Mongo CheatSheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sharding partitions the data-set into discrete parts. | |
Replication duplicates the data-set. | |
These two things can stack since they're different. Using both means you will shard your data-set across multiple groups of replicas. Put another way, you Replicate shards; a data-set with no shards is a single 'shard'. | |
A Mongo cluster with three shards and 3 replicas would have 9 nodes. | |
3 sets of 3-node replicas. | |
Each replica-set holds a single shard. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment