We're planning to expand our software to the South East Asia region. Our self-hosted Mongo Cluster is fully set up at China's AWS Data Center. How can we set up the MongoDB replicate set to AWS Singapore and allow writing on both regions and rely on MongoDB for asynchronously sync up data behind the scenes?
What you are trying to do is not possible with MongoDB replica set. If you checkout the documentation here:
A replica set contains several data bearing nodes and optionally one arbiter node. Of the data bearing nodes, one and only one member is deemed the primary node, while the other nodes are deemed secondary nodes
If you really want to be able to do write operations on more than one server, you will need to shard your collections. You can go through the documentation here to get started.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With