In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Let's learn about MySQL high-availability MHA architecture knowledge. I believe you will benefit a lot after reading it. The text is not much in essence. I hope this short article about MySQL high-availability MHA architecture knowledge is what you want.
Introduction of MHA Software
1.MHA software is composed of MHA Manager (management node) and MHA Node (data node).
2.MHA Manager can be deployed on a separate machine or on a slave node
3.MHA Node runs on every MySQL CVM.
4.MHA Manager regularly detects the master nodes in the cluster, automatically promotes the latest slave of the data to the new master when the master fails, and then redirects other slave to the new master to resume master-slave replication.
5. The entire failover process is completely transparent to the application
Introduction to MHA Architecture
1. At present, MHA mainly supports the architecture of one master and multiple slaves. To build MHA, there must be at least three database cloud servers in a replication cluster.
two。 In the MHA cluster architecture of one master and two slaves, one serves as master, one acts as standby master, and one acts as slave.
3. Because at least three CVMs are needed, Taobao has made improvements on this basis because of the machine cost. At present, Taobao TMHA supports one master and one slave.
4. When we use it ourselves, we can also use one master and one slave, but the master host cannot be switched after downtime, and the binlog cannot be completed. However, after master's mysqld process crash, you can still switch successfully and complete the binlog.
MHA switching principle automatic failover process
1. Profile check phase, which checks the entire cluster profile configuration
two。 Master handling of outages, which includes vip removal and host shutdown.
3. Copy the relay log of the difference between dead master and the latest slave and save it to the directory defined by MHA Manager
4. Identify the slave with the latest updates
5. Apply binary log events saved from master (binlog events)
6. Upgrade a slave to a new master
7. Make other slave connect to the new master for replication
Manual failover proc
Note: MHA Manager must not be running
1. Manually call MHA for failover, masterha_master_switch
two。 After going through profile check, surviving CVM check, cluster replication check, and backup master setting check, ask master if he is dead and whether to switch.
3. Master handling of outages, which includes vip removal and host shutdown.
4. Copy the relay log of the difference between dead master and the latest slave and save it to the directory defined by MHA Manager
5. Identify the slave with the latest updates
6. Apply binary log events saved from master (binlog events)
7. Upgrade a slave to a new master
8. Make other slave connect to the new master for replication
Manual online switching process
1. Detect cluster replication settings and determine current master
two。 Identify the new master
3. Block writing to the current master
4. Wait for all slave to catch up with replication
5. Grant to write to a new master
6. Reset slave to copy from the new master
After reading this article on MySQL High availability MHA Architecture knowledge, many readers will want to know more about it. For more industry information, you can follow our industry information section.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.