Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

System and method for ensuring high availability and consistency of MHA cluster

A consistent and clustered technology, applied in the field of database management, can solve the problem that MySQL cluster cannot be switched normally, and achieve the effect of ensuring configuration consistency, simple implementation, and reducing real-time requirements.

Pending Publication Date: 2020-10-09
SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF2 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The technical task of the present invention is to provide a system and method for ensuring the high availability and consistency of the MHA cluster, to solve the problem of how to avoid the failure of the MySQL cluster to switch normally due to the simultaneous failure of the MHA and the MySQL cluster, and to ensure the availability of user applications

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
  • System and method for ensuring high availability and consistency of MHA cluster
  • System and method for ensuring high availability and consistency of MHA cluster
  • System and method for ensuring high availability and consistency of MHA cluster

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0077] as attached figure 1 As shown, the system for ensuring the high availability and consistency of the MHA cluster of the present invention includes,

[0078] Redis cluster, used to provide published locks and configure global notification delivery capabilities;

[0079] The MHA module is used to register an exclusive lock in the Redis cluster when performing disaster recovery switching to prevent other MHA instances from performing disaster recovery switching operations at the same time, and push the configuration to the Redis cluster after the switch is completed and release the lock; the MHA module is based on It is a native tool of MHA, and implements locking and releasing of exclusive locks and configuration push functions at the two custom scripts of secondary_check_script and ip_failover_script. as attached figure 2 As shown, the processing logic of the MHA module is as follows:

[0080] S1. Periodically monitor the status of the master node of the MySQL cluster...

Embodiment 2

[0105] The method for ensuring the high availability and consistency of the MHA cluster of the present invention is specifically as follows:

[0106] (1) The Redis cluster provides distributed locks and the ability to configure global notifications;

[0107] (2) The MHA module registers an exclusive lock in Redis when performing disaster recovery switching to prevent other MHA instances from performing disaster recovery switching operations at the same time, and after the switching is completed, push the configuration to Redis and release the lock;

[0108] (3) When the configuration manager starts, it pulls the cluster configuration from Redis, updates the local MHA configuration and restarts it to take effect, and monitors whether the cluster configuration on Redis changes:

[0109] If there is a change, update the local MHA configuration and restart to take effect.

[0110] Among them, as attached figure 2 As shown, the processing logic of the MHA module is as follows: ...

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 system and method for ensuring high availability and consistency of an MHA cluster and belongs to the technical field of database management. The technical problem to be solved by the invention is how to avoid the problem that the MySQL cluster cannot be normally switched due to simultaneous failure of the MHA and the MySQL cluster. According to the technical scheme, thesystem comprises a Redis cluster used for providing a published lock and configuring global notification issuing capacity; an MHA module used for registering an exclusive lock in the Redis cluster when disaster recovery switching is executed, preventing other MHA instances from executing disaster recovery switching operation at the same time, pushing the switched MHA instances to the Redis clusterand releasing the lock; an MHA module based on an MHA native tool, and locking, releasing and configuration pushing functions of an exclusive lock are achieved at two user-defined scripts of a segment _ check _ script and an ip _ failover _ script; and a configuration manager used for ensuring that the local configuration of the MHA node is consistent with other MHA moments.

Description

technical field [0001] The invention relates to the technical field of database management, in particular to a system and method for ensuring high availability and consistency of MHA clusters. Background technique [0002] MHA is currently one of the most commonly used MySQL disaster recovery switching components. It can monitor one or more MySQL master-slave clusters. When the MySQL master node fails, the slave node will be promoted to the master node and mounted on the original master node. The IP is switched to the new master node to ensure the availability of the MySQL cluster. Because of its fast switching speed and high integrity of MySQL data, it is widely used in various development, testing, and production environments. [0003] However, MHA is originally deployed on a single node. If the MHA node fails and the master node of the MySQL cluster fails, the MySQL cluster will not be able to switch normally, resulting in interruption of user services. At present, most...

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
IPC IPC(8): G06F16/23G06F16/27G06F11/20
CPCG06F16/2343G06F16/27G06F11/2023
Inventor 赵山王阳赵建昌
Owner SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products