Comments - MySQL Monitor

7 years, 4 months ago Markus Mäkelä

How does the slave get promoted as a master? Is this done by some external program?

I'd recommend looking at the Multi-Master Monitor if the slave always has read_only set to ON and some external actor removes it from the master.

 
7 years, 4 months ago Yiannis Sot

Thanks for the immediate answer.

The databases are MySQL databases and I used mysqlrpladmin for the failover (it's in mysql-utilities package). But what is the internal/native way to do this with Maxscale? The replication-manager?

 
7 years, 4 months ago Markus Mäkelä

Two node setups are slightly problematic for MaxScale. The MySQL monitor expects that a master will always have at least one slave before it assigns master status to the server. With a two node master-slave pair, when the master dies and the slave is promoted, MaxScale cannot be absolutely certain that the slave is actually the new master.

Most of the time this problem is solved by using the multi-master monitor instead of the MySQL monitor and placing the slave server into read-only mode. With this, a failover can be performed by putting the master into read-only mode and removing the read-only mode from the slave. MaxScale will see this change and start sending writes to the new master.

The replication-manager is the recommended way to do failovers with MariaDB 10. It will automatically set the slave servers into read-only mode and also adjust it when a failover is performed.

In the upcoming 2.1 version of MaxScale, there's a simple failover mode for the MySQL monitor which should make these kinds of situations easier to handle without external programs. You can read about the upcoming failover mode here

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.