In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you the "MySQL high availability solution MHA how to use", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "MySQL high availability program MHA how to use" this article.
The MHA Jedi is a quite mature implementation in the MySQL high availability scheme. For data switching, MGR can also be done very well, that is to say, the role switching at the data level has been deliberately done smoothly, but there is still a lot of room for accessing IP, and MHA provides a lot of optional space to support.
Common combinations are:
MHA+VIP
MHA+keepalive
MHA+Zookeeper
Of course, MHA+VIP is a very mature and classic solution.
Generally speaking, there is a similar architectural approach, assuming that the architectural pattern is one master and two slaves. For application access, the IP information provided is based on the bound VIP address. VIP can drift between different nodes according to the data state of nodes, achieving the high availability of seamless switching.
MHA Manager is a core scheduler, which can schedule multiple environments. Of course, MHA Manager itself has a single point, so it will consider two sets of MHA Manager nodes for redundancy, which is actually cross-backup. For example, if there are 100 sets of environments and two MHA Manager nodes, each has 50 nodes. If the Manager node fails, it can be smoothly handed over to Manager2 to take over.
For applications, it is accessed uniformly through VIP. If the solution of middleware is considered on this basis, the strategy of data access will be more complicated.
For such a basic solution, if you drill down from multiple dimensions, you will find that there are a lot of things to pay attention to, so the problems are everywhere, and the good news is that almost all of them have been taken into account in MHA. To put it simply, there are a few main scenarios to consider:
The main database is down.
Database downtime from the library
Restart the main database
Restart the database slave library
Apply delay from library
Master-slave network delay
The main library server is down
Downtime from the library server
One-master-multi-slave switching priority
Switching of network jitter
Manual master-slave switching
Master node IP adjustment
IP adjustment from node
Add slave node
Culling from nod
Prevention of Network Jitter
The influence of semi-synchronous plug-in on MHA
Custom MHA script
So the above scheme needs to be considered more or less. If it is shown in the figure below, there will be some red warnings as follows. Therefore, there may be problems and anomalies at all levels, how not to affect the business as much as possible, and how to maintain the continuous visit of the Business Section is a top priority.
To cite a more complicated problem, if the network from the MHA Manager node to the database master database jitters, making it inaccessible for a short time, we hope that this process will not make a disaster switch, but if the time is too long, it will be inaccessible for 2 or 3 minutes. At this time, the information is still relatively small, if we join the role of the application server, if the application server is accessible, then not cut, if the application access is affected, then cut. And according to our tests, there are still some differences between MHA 0.56 and 0.57. Tested a number of environments, tested a number of features, combined to find that the consideration of MHA will be more comprehensive, and in other words, understand the reason, can better grasp MHA, but also can see more problems, to try to customize it, make it more satisfied with the current business needs.
The above is all the contents of the article "how to use MHA in MySQL High availability Program". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.