[MXS-3357] Priority of Master Promotion Created: 2020-12-30  Updated: 2021-04-07  Resolved: 2021-04-07

Status: Closed
Project: MariaDB MaxScale
Component/s: failover
Affects Version/s: None
Fix Version/s: 2.5.10

Type: New Feature Priority: Minor
Reporter: Kathryn Sizemore Assignee: Esa Korhonen
Resolution: Done Votes: 0
Labels: None

Sprint: MXS-SPRINT-128

 Description   

In several topologies , there are servers that are more suited to be master if possible and others that might be a DR or we would only like to be a master as a last resort.

I would like the ability to prioritize the servers that are reviewed for master eligibility in a failover.
For example, If I am currently running master on MariaDB-1 and I also have MariaDB-2, MariaDB-3, and MariaDB-DR, In the event of failover, I want MariaDB-2 and then MariaDB-3 to be checked for Master viability before ever checking MariaDB-DR. I don't want to exclude DR entirely with servers_no_promotion, but I want it to be the very last resort in the event 1, 2, & 3 are all down.

Similarly, I might have more resources allocated to MariaDB1 & MariaDB2 but have a smaller server running as a backup slave on MariaDB3 (not an ideal scenario, but not uncommon with limited budgets). In a failover scenario, I might want to always prioritize failing over to 1 & 2 before resorting to 3.



 Comments   
Comment by Esa Korhonen [ 2021-03-31 ]

When deciding on what server to promote, the monitor checks the servers in the order they are listed in the "servers"-parameter. A later server has to be "better" (i.e has higher gtid) than the ones before it to be selected instead. So, simply list the preferred servers first.

Comment by Esa Korhonen [ 2021-04-07 ]

Closing for now. If more information is required, please reopen issue.

Generated at Thu Feb 08 04:20:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.