Master - master replication concerns

idlenexusgaming wrote on Sunday, October 18, 2015:

Greetings!

I am currently using rsync and master-slave to provide a manual fail-over solution. I am considering going to a redudant solution using haproxy and master-master mysql replication. I have looked at all the standard concerns regarding using master-master configuration: toplogy, data drift, key coliisions, semantic conflicts, syncing issues and recovery processes.

From what I have read and what I see in the openemr database, it looks like this is a really bad idea. I am seeing a very real possibility for key collisions. Incrementing the keys by 4 could solve this, but I see that auto increment keys aren’t uniformly implemented across the tables. Has there been consideration for uniform auto-increment key implementation?

Has anyone else considered using master-master replication? Have others implmented this strategy? If so, has there been sync conflicts and how difficult was it to recover?

Cheers

tmccormi wrote on Monday, October 19, 2015:

We (ensoftek and mi-squared) had to rewrite much of OpenEMR core to be able to do this for the Peace Corps. Changed all the relevant keys to GUID instead of incremented keys.

We hope to be able to share the code soon, but some, currently, unavailable and unfunded resources are needed to do Peace Corps mandated “clean up” of some private content before we can release it.

Yehster was the primary guru behind it…

–Tony