MongoDB multiple Cluster data sync
1)MongoDB - Multiple cluster data synchronizing master to master


As MongoDB jira documentation Why was MongoDB not designed to have master-master replication actually, don't think master-master perform better than master-slave.
but it indeed easy to scale out.

my point about this is that mongo have provided too much functions to support all DB requirement.and lose its core design brief.this cause messes when using mongo db.it want to provide RDBMS function,also provide high availbility,scale out.

today mongo provide replica set deployment to meet normal data storage.and sharding cluster for large data storage.it is easy to convert replica set architect to sharding cluster deployment.but from application side,it is not easy to keep same query operation efficiency.

and other things like Data engine.mongo provide MMap,WireTiger,also other third party data engine.which also cause application developer to optimize the performance.

MongoDB doesn't do master-master replication.


  2) MongoDB - Multiple cluster DR


As per Ron Galbraith BMC documentation MongoDB configuration across 2 sites - and manual DR option  the issue arises around forming a Majority to elect a new Primary server (based on information on the MongoDB Strategy around fault tolerance.


  3)MongoDB - Multiple cluster Blue-green deployment


blue-green deployment strategy is Zero downtime during application deployment is one of the key requirements for continuos delivery. And no business would like their site to be down and showing maintenance page every few days/weeks during deployment.

To achieve this we decide to go for blue-green deployment. However, we were challenged with how to do this in legacy style data center infrastructure where we are,

Not able to spin new and throw away machines automatically using scripts
Don’t have ability to add/remove instances using scripts from load-balancer
Network level configurations are done manually like firewall setting

As per Sunit Parekh blog documentation of Decision 1 MongoDB database didn’t require any schema migration etc. However, we required to follow design principle, always write code which is backward compatible with the data models. And if there is any database migration required it should be run after deployment.