MongoDB on AWS. Sync data between regions

Hi all.
We are faced with replicating data between several AWS regions task. We need to replicate any user profile changes across all regions. At the same time, profile data can change in any of the regions in which the user is currently located.

For example we have 3 regions

  1. user one registered on region1
  2. his registration data was replicated to region2 and region3
  3. user changed his data on region1
  4. user data has also been replicated to region2 and region3
  5. user changed region to region2
  6. user data has changed on region2
  7. his data was replicated to region1 and region3

I would like to know who had a similar problem and how it can be solved in the best way)

Hey @Alexey_D,

Welcome to the MongoDB Community Forums! :leaves:

From what you mentioned, it seems you are looking for a multi-master setup, where any data can be changed anywhere and be propagated to all clusters. In an Atlas replica set deployment, members can be hosted in different regions. You can use Atlas Global Clusters for your use case. I’m attaching a few documentation links for you to go over.
Manage Global Clusters
Segmenting Data by Location

Please let us know if there’s any more information needed around this. Feel free to reach out for anything else as well.

Regards,
Satyam

Hey Satyam,
Unfortunately, we don’t use MongoDB Atlas. We chose the MongoDB Multi-Master deployment on AWS. Each our region will has own MongoDB cluster. And use the MongoDB Kafka Connector as the replication mechanism.
But also we need to integrate with AWS DocumentDB database and stream changes to MongoDB. We will use Kafka as a message broker.
Can we use MongoDB Kafka Connector as a Sink/Source for AWS DocumentDB ?

Hey @Alexey_D,

But also we need to integrate with AWS DocumentDB database and stream changes to MongoDB. We will use Kafka as a message broker.
Can we use MongoDB Kafka Connector as a Sink/Source for AWS DocumentDB ?

Our Kafka connector was not designed to work with products other than genuine MongoDB servers. There is no guarantee that it can work correctly, or at all, with other databases.

Also, since you mentioned Multi-Master deployment, I came across a blog on our developer centre that should be of use to you. It talks about deploying an application across multiple data centers where application servers in all data centers are simultaneously processing requests, something that you are trying to do as well.
Active Active Architectures in MongoDB

Regards,
Satyam

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.