A detailed approach to the database high availability architecture

Source: Internet
Author: User
Tags backup

The highly available architecture of the database is a relatively unfamiliar area for those of us who are developers of the application side, is built on the basis of a specific database product environment, need to be like DBA so the database products have enough knowledge to be involved, although not in depth, but can through some classic highly available architecture to learn the idea. As far as I know, there are the following:

MySQL Replication

MySQL Cluster

Oracle RAC

IBM HACMP

Oracle ASM

MySQL Replication

MySQL replication is the goal of increasing availability by asynchronously copying multiple copies, with the following common replication architectures:

Master-slaves

Master-master

Master-master-salves

1) master-slaves

Master-slaves is the most commonly used method of increasing availability, especially in Internet applications, where reading is much larger than writing, so improving the usability of reading is the first, and master-slaves is to let write operations focus on a single database Master, The master then replicates the updated operations to the other database slaves, and the read operations occur on the slaves, and the frame composition is as follows:

If the above figure in Slavec is not available, read and write will not be interrupted, such as Slavec recovery will automatically synchronize the lost data, and can be back into operation, maintainability is very good. But if Master has a problem, it solves only the high availability of read, but does not guarantee the high availability of the write.

2) Master-master

To address the high availability of written talk above, MySQL provides a master-master replication architecture, as follows:

Generally write to Mastera, Mastera sync data to Masterb, when Mastera have a problem, will automatically switch to Masterb, and so Mastera restore, Masterb sync data to Mastera

3) master-master-salves

Master-master-salves, which combines the above two scenarios, is a copy architecture that provides both read and write high availability, as shown in the following illustration:

MySQL Cluster

The MySQL cluster consists of three main parts:

SQL Server node

NDB Data Storage Node

Monitoring and Managing nodes

The composition structure of the three departments is shown in the following illustration:

Such hierarchies are also related to the architecture in which MySQL itself separates SQL processing from storage.

This allows MySQL cluster to make highly available replication policies at the two levels of SQL processing and storage, respectively. On the SQL processing level, it is easier to do clustering because these SQL processing is stateless and can be enhanced by increasing the availability of the machine. At the storage level, increase the availability of storage by backing up each node in a similar way to the MySQL Replication, as shown in the following chart:

Oracle RAC

Oracle RAC and MySQL cluster are somewhat similar, but are mainly concentrated on the high availability of the SQL processing layer, while not much on storage, as shown in the structure diagram:

Its main advantage is transparent to the application, and through heartbeat detection of very high availability, the main disadvantage is that storage is shared, storage scalability is insufficient.

IBM HACMP

IBM hacmp is similar to Oracle RAC, mainly for dual-machine interoperability, and the running process looks like this:

1 The two servers (host A and B) are running in the HACMP environment as a dual-machine system;

2 the server in addition to the normal operation of the application of the machine, at the same time as the other side of the backup host;

3 The two host systems (A and B) monitor the operation of each other through the "Heartbeat line" during the whole operation (including the system's software and hardware operation, network communication and application operation etc.);

4 If the other host is found to be operating abnormally (failure), the application on the fault machine will stop running immediately, the machine (the backup machine of the fault machine) will immediately start the application on its own machine, and take over the application of the fault machine and its resources (including the IP address and disk space used). So that the application of the fault machine continue to operate in this machine;

5 The application and resources of the process from the HA software automatically completed, without human intervention;

6 when two hosts are working properly, the application can be switched to another computer (backup machine) on the basis of the need.

Oracle ASM

Oracle ASM delivers storage scalability primarily, with automated storage management plus a back-end scalability storage array for high availability, as shown in the chart below:

As a result, you can try to combine Oracle RAC and ASM, while providing high availability for SQL processing and storage, which is what the MySQL cluster wants to achieve.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.