2

I am looking for a proper way to do Multi Master Master replication.

I am currently using MySQL but open to switching to Postgres or Oracle if needed.

So far the only solution I find is tungsten-replicator from Continuent. Looking for similar or alternatives.

This will be used to synch 30-50 nodes in an asynchronous setting (nodes may be disconnected several hours at a time).

Thank you.

nedm
  • 5,610
  • 5
  • 30
  • 52
smorhaim
  • 229
  • 1
  • 7
  • What's your conflict resolution strategy? If, say, four nodes insert a row with the same PK, and two of them then delete it but the other two still have it? For PostgreSQL, you might be able to use bidirectional replication (http://wiki.postgresql.org/wiki/BDR_User_Guide), but at time of writing it's still very much in development - and it doesn't love being disconnected for super-long periods. – Craig Ringer Jul 19 '13 at 09:56
  • For conflict resolution we are ok with "latest entry wins". All of our tables have an unique id and most of them have timestamping. Also we only do soft deletes for 99% of the data. – smorhaim Jul 19 '13 at 18:01
  • For postgres, how long is too long? 1 min? 1 hour? The longest disconnections we get are 24-36 hours maximum. – smorhaim Jul 19 '13 at 18:02
  • with BDR (which isn't part of PostgreSQL yet, it's a patch in active development) that depends on how much disk space you have to store up changes and how fast changes come in. Nodes can be disconnected for as long as you have local disk space to store changes (WAL files) so it depends on the rate you generate WAL at. It's probably too alpha-development stage for you at this point anyway; I'm raising it here as much as anything so that others who find this later know about it. – Craig Ringer Jul 20 '13 at 04:49
  • You might be able to get some good use out of Postgres-XC, though. – Craig Ringer Jul 20 '13 at 04:50

1 Answers1

3

We've been doing multi-master replication on MySQL for a while, and it works great as long as you understand and can plan around/be prepared for the potential pitfalls. Be diligent about the auto-increment-offset, and auto-increment-increment replication settings (not as important if your app uses only GUIDs or some other manual keyfield assignment), and understand how row-based vs. statement-based vs. mixed replication will work with your app.

Alternatively, if you're interested in synchronous replication look into MariaDB Galera Cluster, which is maturing rapidly.

nedm
  • 5,610
  • 5
  • 30
  • 52
  • I'll appreciate your opinion if you have to set up replica today. I'm not sure at which point should I chose a replica or a cluster. thanks – Horaciux Aug 31 '18 at 02:26