Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does the MHA High availability Architecture work? Main library downtime process

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Main library downtime process

1. Monitor nodes (get all node information through configuration files)

System, network, SSH connectivity

Master-slave status, focusing on the master library

two。 Choose the master

(1) if the slave database (position or GTID) is judged to be different, the slave that is closest to the Master becomes the candidate.

(2) if it is judged that the slave database (position or GTID) is consistent with the data, choose the master according to the order of the configuration file.

(3) if the weight is set (candidate_master=1), the alternate master is forcibly designated according to the weight.

1. By default, if a slave lags behind a master 100 M relay logs, it will fail even if it has a weight.

two。 If check_repl_delay=0 is changed, even if it lags far behind, it will be forced to be selected as the candidate.

3. Data compensation

(1) when SSH can connect, compare the slave database with the master database GTID or position number, immediately save the binary log to each slave node and apply (save_binary_logs)

(2) when SSH cannot be connected, compare the difference of relaylog between slave libraries (apply_diff_relay_logs)

4. Failover

Switch the identity of the candidate to provide services to the outside world

The rest of the slave library and the new master library confirm the new master-slave relationship

5. Application transparency (VIP)

6. Failover notification (send_reprt)

7. Quadratic data compensation (binlog_server)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report