my mongodb rs configure resemble:
node1:shard1 primary,shard2 primary
node2:shard1 secondary,shard2 secondary
node3:shard1 arbiter,shard2 artbite
every time there are many writes and read,but yesterday I found the mode1 become secondary,contrast,node2 become primary,I’m very weird,so post this issue,hoping more opnions.
Thanks in advance
A primary stepping down to become a secondary is not unusual in a Replica Set, and will happen for one of three reasons.
replSetStepDowncommandA secondary can also call for an election if it cannot contact a primary, or if the primary is too slow to respond. The election will force the primary to step down.
You can read more about this process in the documentation