Search code examples
mongodbmongodb-replica-set

how to write data to multi master instance in mongodb 3.4


How can I write data to multi mongodb instances and keep data synchronous among these instances? Just like in mariaDB.

Currently we use the replica-set in mongodb, but this seems can only support writing data to one node, and this may cause pressure issue if writing requests going up.

Sharded Cluster is not appropriate for me.

Thanks.


Solution

  • Please read the docs (Replication in MongoDB)

    Of the data bearing nodes, one and only one member is deemed the primary node, while the other nodes are deemed secondary nodes