MySQL application layer high-availability system and method suitable for various cloud environments

An application layer and cloud environment technology, applied in the computer field, can solve problems such as expensive, complex logic, and not supporting keepalived, and achieve high availability, fast switching, and simple architecture

Active Publication Date: 2019-12-13
杭州衣科信息技术股份有限公司
View PDF9 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The first method (dual-node master-slave + keepalived / haproxy) has a simple architecture and direct switching between two nodes. The disadvantage is that additional consideration needs to be given to the high-availability mechanism of haproxy and keepalived, especially in the cloud environment, because it has been virtualized, it is often not used. support keepalived
[0004] The second method (MHA+ multi-node cluster) can automatically detect and transfer faults, and has better scalability. The probability of three-node / multi-node MySQL being unavailable is lower. The disadvantage is that it requires more resources than two-node ;The logic is more complicated, and it is more difficult to troubleshoot and locate the problem after a fault occurs; it may be caused by a split-brain phenomenon due to network partition
[0005] The third method (zookeeper+proxy) better guarantees the high availability of the entire system and has better scalability. The disadvantage is that the logic of the entire system becomes more complicated when ZK is introduced.
[0006] The fourth method (SAN shared storage) only needs two nodes, simple deployment, simple switching logic; very good guarantee of strong data consistency; the disadvantage is that high availability of shared storage needs to be considered, and the price is expensive

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • MySQL application layer high-availability system and method suitable for various cloud environments
  • MySQL application layer high-availability system and method suitable for various cloud environments

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0042] This embodiment is a MySQL application layer high-availability system applicable to various cloud environments, and can be applied to various cloud environments, for example, it can be applied to various cloud environments such as Alibaba Cloud, Tencent Cloud, Huawei Cloud, and Baidu Cloud. Such as figure 1 and figure 2 As shown, the system includes:

[0043] Two MySQL instance unit 1, two MySQL instance unit 1 master-master replication. The master-master replication of MySQL instance unit 1 can automatically synchronize the data after switching, without manual data processing after switching;

[0044] Guard unit 2 is used to check whether the MySQL instance unit 1 is healthy;

[0045] The state storage unit 3 stores the MySQL instance unit 1 state information according to the inspection result of the guard unit 2, and if the MySQL instance unit 1 is unhealthy, then a switch flag is set;

[0046] Switching unit 5 is used to close the connection of unhealthy MySQL i...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a MySQL application layer high-availability system and method suitable for various cloud environments. The system comprises a plurality of MySQL instance units; a guard unit used for checking whether the MySQL instance units are healthy or not; a state storage unit used for storing the state information of the MySQL instance unit according to the inspection result of the guard unit, and setting a switching mark if the MySQL instance unit is unhealthy; a switching unit used for closing the connection of the unhealthy MySQL instance units and creating the connection of the healthy MySQL instance units; and a switching detection unit used for detecting the switching sign at regular time, and calling the switching unit to trigger switching if the switching sign is found. MySQL high availability, simple architecture, dual-node-based dual-master replication, adaptation to various cloud environments, online use in a plurality of cloud machine rooms, rapid switching, noinfluence on services and no perception of users are realized in the application layer.

Description

technical field [0001] The invention belongs to the technical field of computers, and in particular relates to a MySQL application layer high-availability system and method applicable to various cloud environments. Background technique [0002] There are currently four common methods for MySQL high availability: the first method, dual-node master-slave + keepalived / haproxy; the second method, MHA+ multi-node cluster; the third method, zookeeper+proxy; the fourth method, SAN shared storage. [0003] The first method (dual-node master-slave + keepalived / haproxy) has a simple architecture and direct switching between two nodes. The disadvantage is that additional consideration needs to be given to the high-availability mechanism of haproxy and keepalived, especially in the cloud environment, because it has been virtualized, it is often not used. Support keepalived. [0004] The second method (MHA+ multi-node cluster) can automatically detect and transfer faults, and has bette...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/27G06F16/25
CPCG06F16/25G06F16/27
Inventor 金新华赖少飞徐克强
Owner 杭州衣科信息技术股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products