Answer the question
In order to leave comments, you need to log in
MongoDB replication for fault tolerance
Hello!
I need to replicate Mongo databases for fault tolerance.
With MySQL I made master-master. And what about mongo? I read a lot of articles on the Internet, but did not understand how to solve my problem.
It is necessary that the data in the database be synchronized, and in the event of a failure of one server, it is necessary to write to the mongo database and read data from it.
Answer the question
In order to leave comments, you need to log in
ReplicaSet is well documented , easy and fast to do. When the master fails, one of the slaves is automatically assigned to it. There are many drivers with automatic support for ReplicaSet, for example, in the php driver, you just need to specify a list of database hosts.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question