In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to analyze the high availability architecture of the database. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.
Database high-availability architecture is a relatively unfamiliar field for us application-side developers, which is an environment built on specific database products, which requires sufficient understanding of database products like DBA to be involved. Although we can't go deep into it, we can learn the ideas through some classic high-availability architectures. As far as I know, there are the following:
MySQL Replication
MySQL Cluster
Oracle RAC
IBM HACMP
Oracle ASM
MySQL Replication
MySQL Replication aims to improve availability by replicating multiple copy asynchronously. Regular replication architectures include the following:
Master-Slaves
Master-Master
Master-Master-Salves
1) Master-Slaves
Master-Slaves is the most commonly used method to improve availability, especially in Internet applications, where reading is far greater than writing, so improving the availability of reading is the first thing to do. Master-Slaves allows write operations to be concentrated on a database Master, and then the Master replicates the updated operations to other database Slaves. All read operations take place on Slaves, as shown in the architecture figure:
For example, when the SlaveC is not available, the reading and writing will not be interrupted. After the SlaveC is restored, the lost data will be automatically synchronized and can be put back into operation. The maintainability is very good. But it's troublesome if Master has a problem, so it only solves the high availability of reads, but does not guarantee the high availability of writes.
2) Master-Master
To address the high availability described above, MySQL provides a replication architecture for Master-Master, as follows:
Generally speaking, it is written to MasterA. MasterA synchronizes data to MasterB. When there is a problem with MasterA, it automatically switches to MasterB. When MasterA is restored, MasterB synchronizes data to MasterA.
3) Master-Master-Salves
Master-Master-Salves, which combines the above two scenarios, is a replication architecture that provides high availability for both read and write, as shown in the following figure:
MySQL Cluster
MySQL Cluster consists of three main parts:
SQL server node
NDB data storage node
Monitor and manage nodes
The composition of the three departments is shown in the following figure:
Such layering is also related to the architecture in which SQL processing and storage are separated by MySQL itself.
This allows MySQL Cluster to make highly available replication strategies at the two levels of SQL processing and storage, respectively. At the SQL processing level, it is easier to cluster because these SQL processes are stateless and availability can be enhanced by adding machines. At the storage level, increase storage availability by backing up each node, similar to MySQL Replication, as shown in the following diagram:
Oracle RAC
Oracle RAC and MySQL Cluster are somewhat similar, but mainly focus on the high availability of the SQL processing layer, but not much on storage, as shown in the following structure diagram:
Its main advantages are transparent to applications and high availability detected by Heartbeat. The main disadvantage is that storage is shared and lack of scalability on storage.
IBM HACMP
IBM HACMP is also similar to Oracle RAC, which is mainly used for mutual backup between two computers. The running process is as follows:
1) as two servers (hosts An and B) of a dual-computer system, they run simultaneously in the Hacmp environment.
2) the server not only runs its own application normally, but also acts as the backup host of the other party.
3) during the whole operation, the two host systems (An and B) monitor each other's operation through the "heartbeat line" (including the software and hardware operation of the system, network communication and application operation, etc.)
4) once the operation of the other host is found to be abnormal (failure), the application on the fault machine will stop running immediately, and the local machine (the backup machine of the fault machine) will immediately start the application on the fault machine on its own machine and take over the application and its resources (including the IP address and disk space used), so that the application on the fault machine will continue to run on the machine.
5) the takeover process of applications and resources is completed automatically by Ha software without human intervention.
6) when the two hosts are working normally, the applications on one machine can also be artificially switched to the other machine (backup machine) to run as needed.
Oracle ASM
Oracle ASM mainly provides storage scalability and achieves high availability through automated storage management and back-end scalable storage arrays, as shown in the following diagram:
Therefore, you can try to combine Oracle RAC and ASM while providing high availability for SQL processing and storage, which is what MySQL Cluster wants to achieve.
This is the end of the analysis of the ideas on how to carry out the highly available architecture of the database. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
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.