ENVIRONMENT:
- MariaDB Ver 15.1 Distrib 10.5.9-MariaDB
- ProxySQL Maxscale
- Debian 10
I have master(A)>slave(B) replication. Replication is controlled by Maxsale with autofailover. If there is no Internet on my master(A), then the master switches to the slave. When the Internet appears, the wizard returns to its original position(A). How to make sure that the master switches to the slave and does not return?
I tried to install enforce_simple_topology=true, it got worse. My master>slave replication transformed to master-master. It does not suit me.
How to change the switching logic of the master?
You should not mix MaxScale with ProxySQL as they can end up using different servers for writes.
Whenever MaxScale is configured to use automatic failover, all SQL traffic should be routed through it to guarantee that the correct servers are used. Additionally, if you use multiple MaxScale instances you should configure
cooperative_monitoring_locks=majority_of_all
to make sure all MaxScale instances use the same node in the cluster.