Question

I am developing a server to a customer who has only one machine for his production deployment. It's a CentOS 64bit with 8Gb of memory.

I am using Mongo and the question is, do I still need to deploy a replica set even though it's a single machine?

Will I get the advantages of a replica set or since it's a single machine it really does not matter and journaling is enough?

Was it helpful?

Solution

You definitely have to enable journaling (It will ensure consistent state even in cases of HW failure scenarios, you will not have to run costy repair command after a crash). You should enable RAID under the data directrory (Anyway this is in general recommended), while here will be crucial not to lose data due to a disk failure (You do not have copy on an other box or so). There is no option for HA within one box it is quite straightforward, however it is not harmful, and in some cases useful to configure 1 node (1 mongod) replicaset (Than you will have oplog). This will help for example when you likely to have MMS backup, or just for enable point in time backup feature of mongodump. Later if you will likely to scale out for HA this way you will only have to add the new nodes to your initially established replicaset. Make no sense to run several replicas inside one box, while they will race on HW resources and will bring nothing as an advantage.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top