Mongo DB Replication

I am new to MongoDB and have watched a few videos and really liked the replication setup that Mongo offers.

Scenario

I want to know if the following scenario is possible in MongoDB.

says I have 3 MongoDB servers

  • server in the cloud (CloudMongo)
  • 2 servers running on two terminal computers (T1 and T2)

CloudMongo has a database called Enterprise with AllSales and Promotions tables
Terminal machines have POS databases with Sales and Promotions tables

Questions

  • Can CloudMongo replicate a subset of the Promotions data on T1 and another subset on T2?
  • Can T1 and T2 terminals replicate their sales data for consolidation to the AllSales table / collection on CloudMongo?
+3


source to share


1 answer


Replication in Mongo is for data durability (and in some cases read scaling). It is not intended for application-level data management. Selective replication is not supported.

The collections in the data path of the servers in the replica set will be fully replicated.



It sounds like you want to copy certain chunks of data to different members of your set. This can of course be automated at the application level by creating specific queries.

+1


source







All Articles