A mongodb cluster is the word usually used for sharded cluster in mongodb. The main purposes of a sharded mongodb are:
- Scale reads and writes along several nodes
- Each node does not handle the whole data so you can separate data along all the nodes of the shard. Each node is a member of a shard (which is a replicaset, see below for the explanation) and the data are separated on all shards.
This is the representation of a mongodb sharded cluster from the official doc.
If you are starting with mongodb, I do not recommend you to shard your data. Shards are way more complicated to maintain and handle than replicasets are. You should have a look at a basic replicaset. It is fault tolerant and sufficient for simple needs.
The ideas of a replicaset are :
- Every data are repartited on each node
- Only one node accept writes
A replicaset representation from the official doc
For simple apps there is no problem to have your mongodb cluster on the same host than your application. You can even have them on a single member replicaset but you won't be fault tolerant anymore.


Comments
Post a Comment