0

I am very new to both MongoDB and AWS cloud technologies.

I am currently trying to configure MongoDB to allow data replication and sync between instances of two different AWS account. Also, I have been reading some doc from official MongoDB website on how it can be done, and the closest info I got so far is from here https://docs.mongodb.com/manual/tutorial/deploy-geographically-distributed-replica-set/ and https://docs.mongodb.com/manual/reference/replica-configuration/. However, I am unsure if those lead me to the correct direction.

My biggest question is, how can we perform data replication and sync (say periodically, two hours) between two MongoDB instances from two distinct locations/regions and accounts (eg AWS Tokyo and AWS Singapore regional accounts)? Also, what is the best strategy to perform such?

halfer
  • 19,824
  • 17
  • 99
  • 186
Newbie
  • 11
  • 1
  • Yes, connecting your nodes in different locations in a single replica set is the right way to sync your data. However, it will happen instantaneously rather than periodically. – Vince Bowdren Mar 27 '17 at 11:24

1 Answers1

0

Depending on your reasoning behind the periodic sync, you could set up a delayed replica set member, whereby data replications will be applied post the specified delay period. i.e. 2 hours delay. It is also important to plan the number of replica set members to have in a deployment.

If the reason of this sync is to provide data redundancy or backup, see MongoDB backup strategies.

  • I'd recommend to review [Whitepaper: MongoDB on AWS guidelines and best practices](https://docs.mongodb.com/manual/data-center-awareness/) – Rupa Narayanan Apr 13 '17 at 03:35