1

I have three member set [primary,secondary & arbiter] in my data center 1 [DC1]. Now i want a delayed member in data center 2 [DR]. In case DC 1 is completely down then my sub net application pointed will be redirected to DR. In that case :

a. How i will use DR mongodb as its a delayed member.

b. When the DC come back online then how i will sync the database from DR to DC.

  • 1
    This question should be moved to DBA. Note: promoting a delayed secondary to primary is not recommended. Any changes outside of the delay will be missing (i.e. 1 hour delay means 1 hour of data inserts/updates/deletes not applied on the delayed node). If you force a stale/delayed node to become primary, any other data nodes will rollback to a consistent state with the current primary when they rejoin the replica set. You really want non-delayed nodes for failover. – Stennie May 16 '15 at 1:10
  • If you add another member to the replica set, you will be having even number of members in replica set. It is not recommended to have even number of members in the replica set. – vishad May 28 '15 at 9:48
1

Firstly, it is not recommended to have a replica set with even number of members. Hence, it will be better to add an arbiter or another data bearing node in the DC2

Coming to your question, the DR servers are not supposed to be used for ensuring availability they are meant to provide limited functionality during recovery from a disaster. Assuming the configuration that you have provided:

a.) How i will use DR mongodb as its a delayed member.

For your configuration assuming 1 vote per server, the majority will be 3. If DC1 goes down then no server will be able to get majority votes. Hence there will be no primary. Thus for the duration of the downtime your application will be able to service only read requests for the time up-to which the data has been synched on the delayed node.

b. When the DC come back online then how i will sync the database from DR to DC.

Since the application is in read only mode, hence once the DC1 comes up, there will be a primary election and server in DC1 with the latest data will be elected primary and the server in DC2 will be relegated to the secondary and the replication would take care of the synch

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.