0

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?

  • How do you determine which server is the master? Did you use `maxctrl list servers`? If you used an SQL connection through ProxySQL to check it, it's possible that ProxySQL ends up choosing a different server. The topology is not clear and it should be clarified. – markusjm Apr 22 '21 at 06:22
  • Yes, I used `maxctrl list servers` – Alexander Kolesnik Apr 22 '21 at 10:23

1 Answers1

0

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.

markusjm
  • 2,358
  • 1
  • 11
  • 23