replication - Anyone know why a mongodb replica set would have a primary and secondary swap in rather quick succession? -
We have 3 mono servers set as replicas, one of which can not be primary, (backup ). Suppose that Mongo 1 is primary and Mongo [2..3] The second category is randomly unreachable by mongo1 mongo2 and mongo3, resulting in mongo2 being selected as primary. Mongo1 looks at it and becomes primary, then meet Mango 2 and 3 again after a few seconds and it is re-elected.
Is there any reason why he should choose Mongo 1 again so soon? Both 1 and 2 have the same priority.
The issue is that it disconnects the Mongo Router from each of our webservers, which again shows that it is primary and connected to it.
In addition, should mongodb routers should be on the application server or on separate server? In the Mongodb manual it suggests putting each application on the server, but what are the benefits of doing this in this way? What are the benefits and problems with having a router server between the application and the Mongo server?
I should mention that it is in AWS (EC2), if it does make any difference.
Edit:
Running Mongo 2.4.6 as a taboo-replica set. Sorry about that, I forgot to mention that part they are rather high load. Mongo examples are in the same area and EC2 has the same availability area.
-
Why can you put Mongo on the same charge as your application server? Are you
Network Hops / Latency Asking a local Mongo for an official shock is faster than doing a remote query ??? After both methods, the data will need to be brought right from the stake.
Note on one side: Other databases such as Coachebase avoid the mangos / router component to avoid this overhead completely. -
I think that you divided your primary and second class into multiple availability areas? Maybe the network is a little unstable, though it should not be? Unfortunately, if you do not divide the network then you can not do against failover? If you fail quickly, a large rollback window will open, which you want to save until you want to completely disable the failover automatically.
And the node should only be re-chosen, if the new primary loses its majority then in your case it seems that 2 and 3 2 can not be connected. Therefore 2 new ones become primary. But soon after 1 and 3 2 can not join, and because they have a majority, they choose to become 1 master.
Comments
Post a Comment