after a massive data problem from my provider in GER, I'm now forced to deal with failover scenarios. But there are a few questions that I can't find any real answers to. So I hope someone can help me here.
I currently have server1 running two MySQL databases in separated docker containers. These should now be replicated on a second server. In case that server1 fails, I can switch to server2 relatively quickly via a ClusterIP.
In case it is important to know: the software that uses the database is a sports competition management system which does a lot of write operations to the database (not tested but in total mot write that read operations).
The questions for me are now:
- Which replication method is the most suitable?
- As I understand it, MASTER <-> MASTER would be most appropriate. But I've also read here again and again that problems can arise.
- With MASTER <-> SLAVE, the question arises that the slave can only read. What happens if the master fails? Does the slave then automatically become the master and can also write?
- Or is a cluster the best solution? At the moment I only have one active node. Another DB node in the USA could be added in the future. But at the moment it doesn't exist.
I really appreciate any help, because I need a fast working solution and this general topic seems to be very huge and not that easy.