Hi Syed, every member of a replica set will send a ping/heartbeat to one
another every 2 seconds. The two machines in data center B will not be
able to receive heartbeats from the machines in data center A, this will
cause them to believe only 2 of the 5 machines in the replica set are
healthy (since they can only communicate with one another).
A new primary election between the two machines in data center B will then
occur (since both are currently secondary and a primary is needed). When a
new primary election begins, the first member to receive a majority of
votes from the machines in the replica set will become the new primary.
Since there are only 2/5 machines in data center B, no majority can be
reached and both machines will step down.
There is a great overview of replica set internals
I hope this answers your question, please let me know if you need more help.
On Wednesday, October 3, 2012 1:47:45 AM UTC-7, Syed Mehdi wrote:
> we have two data centers (Say "A" and "B") and one replica set with 5
> 3 of its machines are in "A" and 2 are in "B". Till now everything was
> working fine,
> but then network operator stopped imitation of communication from "B" to
> "A" (though "A" to "B" is still allowed).
> now our 2 machines (in "B") are shown as down in replica set status
> (checked on DB machine of "A").
> since primary is in "A", and "A" to "B" initiated communication is
> allowed, shouldn't the 2 machine show up as fine?
> also how can we deal with such a problem, if network operator will keep
> this rule and we still have to have machines in "A" and "B".
> thanks for any help