Analysis of MySQL high availability architecture at the business layer _ MySQL

Source: Internet
Author: User
In the mysql system, it is best to implement a disaster recovery system through the database architecture phase in the initial stage. Therefore, we will explain all aspects of the mysql architecture from the business perspective. Preface:

Compared with the relative service time of the traditional industry, 9x9x6 or 9x12x5, because of the real-time performance of Internet e-commerce and Internet games, the service requirement is. The Business architecture is both application and database, both require disaster tolerance and mutual backup. in the mysql system, it is best to implement the disaster tolerance system through the database architecture phase in the initial stage. Therefore, we will explain all aspects of the mysql architecture from the business perspective.

I. MySQL architecture design-Business Analysis

(1) Read more and write less

The dotted line indicates the deployment across data centers. for example, in an e-commerce system, a Master node has both read and write data, which is important for read data consistency. read data should be placed on the Master node.

M (R) is only a slave database. only when M (WR) fails will it be switched to M (R). at this time, M (R) will become a read/write database. For example, in a game system, many Salve instances mount the next M (R.

(2) read-write-less MMS-e-commerce

If it is e-commerce type, this type of read-write is less, generally one master is dragged to four to six slave, all slave attached to a master is enough.

When switching, switch the read/write business of M1 to M2, and then mount all the slave on M1 to M2, as shown below:

(3) read, write, and reduce MMSS-game

If it is in the gaming industry, reading a lot is quite obvious, there will be a general case where one Master will be mounted with more than 10 Slave, so at this time, you can mount some Slave instances to the new M (R. At least some pressure will be reduced, so that at least when the server fails, it will not affect all slave, and some slave on M (R) will continue, it will not affect all slave operations. See,

(4) read less and write more

This means that reading does not affect writing efficiency. Therefore, reading and writing can be stored in one M1 (WR), while the other does not provide reading or writing, and only provides standby redundancy for remote disaster tolerance.

This remote disaster tolerance is very important. Otherwise, if it is a single-host, unilateral business, in case of a fault in the idc room, it will generally affect online business, this will make the business unavailable for 2 hours. for online e-commerce transactions, the impact is quite large. Therefore, in order to maximize the hour guarantee, remote disaster tolerance must be implemented, MM must be used across IDCs. Although there are some requirements for resources, this mechanism is indispensable for HA.

During the switchover, you can directly switch all the reads and writes from M1 to M2.

(5) read and write data in the same autumn

Reading is similar to writing, but reading cannot affect writing ability. put reading and writing on M1 (WR), and then put some reading on M2 (R, of course, M1 and M2 are also deployed across data centers.

When switching, you can switch part of the read and write operations from M1 to M2.

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.