MongoDB multi-master replication across AWS Regions for replicated, sharded cluster.

142 views
Skip to first unread message

Archanaa Panda

unread,
Jan 25, 2015, 5:00:08 AM1/25/15
to mongod...@googlegroups.com

We are building a multi-geographical region product - which will be eventually deployed in US, APAC and Europe regions. 
In order to give consumers a good user experience, we are planning that the eventual deployment will be across AWS regions. 


However the application has to be accessible to the consumer accounts even if they travel across the globe. So the consumer profile such as credentials, favourites etc has to be replicated across AWS regions while other collections such as local geographical transactions will be not be replicated across regions. Moreover, the credentials and other data that has to be replicated can be updated (master/primary-write) in any of the AWS regions eg an APAC-registered consumer opening the application in Europe and changing his credentials. 


Is it possible to have multiple primaries of MongoDB for say UserCredentials collection in 3 different AWS regions and have multi-master replication out-of-the-box (MongoDB product's feature) of user records across AWS regions ? 
Or do we need to build a custom application for the same on our own.

Will Berkeley

unread,
Jan 28, 2015, 12:44:47 PM1/28/15
to mongod...@googlegroups.com
No. MongoDB does not support multimaster replication. A healthy replica set has exactly one primary, which is the only node that accepts writes. You can use the nearest read preference to direct reads to the closest secondaries. I think this should suffice for this case, as users should be willing to accept some latency for a rare request like changing credentials.

-Will
Reply all
Reply to author
Forward
0 new messages