Replicate Mongodb data across 2 servers with write access
Asked Answered
C

0

6

I want to be able to replicate data from MongoDB, with minimal latency, across 2 (later more) servers. One server is located in China (behind the Great Firewall) and the other is located in the USA (not behind the Great Firewall).

The reason we want these two servers is for one to serve requests from outside of China, and the other to server from inside. Requests which have to pass through the Wall are incredibly slow.

The data set has to remain consistent between the two servers. Is there a way, using MongoDB, to replicate the data from one server to another (bi-directional) where both servers retain read and write capabilities.

MongoDB replica sets do not seem appropriate, as it seems only the nominated primary node retains write capabilities. If it were possible to have 2 or more primary nodes, this would work, but to the best of my knowledge there is not.

What would be an appropriate approach here? Any ideas?

Thanks again.

Calathus answered 1/8, 2016 at 8:30 Comment(1)
did you find a solution? I think you will somehow have to split the information you are accessing from within china and the information you are accessing from the US, so you can shard properly, if you sync between the databases via the GFW it will become incredibly slow I assumeEsther

© 2022 - 2024 — McMap. All rights reserved.