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)05/31 Report--
This article introduces the relevant knowledge of "what are the advantages and disadvantages of MySQL cluster architecture". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Master-slave replication architecture MHA
MHA, namely Master High Availability Manager and Tools for MySQL, is a MySQL high-availability management tool written by a MySQL expert in Japan in Perl language, which aims to maintain the high availability and data consistency of the Master main library.
MHA is currently a relatively mature solution for the high availability of MySQL and is widely used in a large number of enterprises. Its most important feature is that it can fix the difference log between multiple Slave, finally make all Slave keep data consistent, and then select a Slave database as the new Master, and point other Slave to it.
When the Master fails, the MHA randomly selects one of the multiple Slave to act as the new Master, or it can specify a certain Slave in the configuration file to become the Master first.
Its structure is as follows, please refer to:
For a simple explanation of the above figure, please refer to:
1. In MHA architecture, the best practice is to plan read-write separation in advance during application development and design, and to set up two connection pools, namely read connection pool and write connection pool, or to introduce SQL Proxy as a compromise.
two。 F5, LVS, HAPROXY or SQL Proxy can be used for read load balancing, as long as load balancing, fault checking and read-write stripping after backup upgrade can be realized. LVS is recommended.
3.MHA Manager Node is mainly responsible for completely synchronizing the bin log of the master database to the slave library during crash, monitoring the status and switching of the master and slave libraries.
Second, the official cluster MySQLCluster architecture
MySQL Cluster is an enterprise-level solution officially provided by Oracle. It adopts the data storage mode without shared storage, which really realizes the real-time synchronization of data in the cluster and the transparency of database node failure to the application. Officials promise that MySQL Cluster can guarantee 99.999% availability of the database system.
For a simple explanation of the above figure, please refer to:
1. For read and write load balancing, you can use F5, LVS, HAPROXY or other SQL Proxy tools, as long as you can achieve load balancing and fault checking.
2. MySQL Cluster supports both Cluster and Sharding functions, and tables are generally designed according to actual needs.
3. Making Sharding tables generally requires the use of NDB Cluster storage engine
4.MGM node: the function is to manage other nodes in the MySQL Cluster, such as providing configuration data, starting and stopping nodes, running backups, etc. The failure itself will not affect the MySQL Cluster.
5.SQL node: the node used to access Cluster data
6.NDB node: used to save data for Cluster
7.MySQL Cluster supports real-time synchronization from cluster to cluster, and the granularity can be as fine as row level, which can be used to praise data center deployment.
Third, open source distributed solution Cobar
Cobar is a distributed relational data processing system developed by Alibaba's B2B department. It can provide you with massive data services like a traditional database in a distributed environment. The main functions of Cobar are as follows:
1. Cobar supports splitting a table horizontally into multiple parts and putting them into different libraries to achieve horizontal splitting of tables.
2. Cobar also supports putting different tables into different libraries.
3. In most cases, the above two methods will be mixed and matched.
4. Cobar can automatically send heartbeats to the MySQL connected to the backend to determine the health status of the MySQL. If the operation is abnormal, the Cobar can automatically switch to the slave to work.
For a simple explanation of the above figure, please refer to:
1.Cobar supports both Cluster clustering function and Sharding data slicing function, and mashup is generally adopted according to actual needs.
2.Cobar implements the functions of load balancing of application requests, health check of back-end nodes, SQL segmentation and aggregation of query result sets.
The 3.MySQL master and backup library should be set to the master-master bi-directional synchronization mode, that is, MySQL M01 and MySQL S01 should be set to the master-master synchronization mode.
This is the end of the content of "what are the advantages and disadvantages of MySQL cluster architecture". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.