Hi, everyone. I am trying to set up MySQL master-master replication. I managed to set it up by following the guide at the first link. However, the databases do not resync their state when one of the databases recovers from a shutdown state.
For example, server B was down and server A had inserted 3 rows of data. The server B did not replicate the 3 rows of data after up again.
So, my question is: How can I force the data to sync after recovering from server downtime or a server failure issue?
@DoubleClickDesignLtd
My client has a globally launched application, and they want the database to be synchronized. DigitalOcean's database cluster provides Master-Slave replication, but it has only one write node. This can result in high latency when connecting from different regions. To solve this issue, I am working on implementing Master-Master replication.
@frankielee that a fascinating/exciting problem to work on. My skillset is not in this area as your need a mysql specialist as your gonna need to custom the mysql configuration (etc/mysql/my.cnf or /etc/my.cnf.) to get this working correctly.
I've done a bit of research on this because it such an interesting problem. I think in the future I may need the answer too on one of my projects.
If your on Digital Ocean hosting I would recommend putting a support ticket in via your control panel to the manage database team. I've had to ask for support before in the past and they where very help the last two times I've needed to understand something.
Question does it need to be on Digital Ocean or would you be ok if it was on AWS? If your not lock into your hosting provider have a look at this article it may help you
Question does it need to be on Digital Ocean or would you be ok if it was on AWS? If your not lock into your hosting provider have a look at this article it may help you
Mostly its budget thing haha, trying to apply this at the lower budget
@frankielee I would definitely go for managed database for this type of setup. As soon as you start doing it all on your side the up keep and time out of your life to do it correctly is a big factor.
Cost wise I would go for Digital Ocean over the AWS as I find them cheaper in many situations and I find the whole process with them much easier and nice to do that AWS. I mean for starters the Digital Ocean Panels are a much nice place to spend time working in than AWS maze.
However on the flip side AWS does give you much more control over every aspect of your app infrastructure so if you really need to have micro control over all aspect of your infrastructure AWS is a better fix.
Let me know what Digital Ocean recommend on the Master Master replication it would be interesting to hear what they recommend on this.