stripe-archive / mosql

MongoDB → PostgreSQL streaming replication
MIT License
1.63k stars 225 forks source link

[Question] Replication back to MongoDB #41

Closed gjolund closed 10 years ago

gjolund commented 10 years ago

Hey Guys,

Kudos

Just started exploring mosql, and I just want to thank you for deciding to open source this tool. Was a breeze to setup, and has scaled very nicely. I budgeted 3 days to get this working and it took 10 minutes...

Background

My current setup looks something like this ->

I've load tested this setup by running 10 simultaneous meteor clients all creating new documents every milisecond. MoSQL was able to handle this no problem, and the PostgreSQL db was only a couple hundred milliseconds behind.

You can check out the app here

Question

The goal of this whole exercise was to try to create what ammounts to Master-Master replication between MongoDB and PostgreSQL. MongoDB -> PostgreSQL is working fine thanks to mosql, but I was wondering if you had any insight on PostgreSQL -> MongoDB.

I've seen a couple of independent tutorials using Bucardo, but I am afraid to introduce another replication engine as I'm sure it will just create a replication loop.

Have you guys invested any brain time in trying to solve this problem? If so what was your approach, and if not do you see any potential gotchas that I may be missing.

Thanks, Austin Rivas