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

MySQL fault switching method and device based on sentry mechanism

A technology of failover and mechanism, applied in the field of data processing, can solve the problem that MySQL nodes cannot be switched, other partitions cannot access MySQL services, etc., to achieve the effect of ensuring smooth switching and ensuring service quality

Pending Publication Date: 2020-10-27
新浪技术(中国)有限公司
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This will cause other partitions to be unable to access the MySQL service
[0007] 3. When it is known in advance that the MySQL main database node will not be able to provide services, such as computer room adjustment, switch replacement, etc., it is necessary to manually switch the MySQL node to another unaffected machine in advance, and if there is no metadata information, these MySQL nodes then it is not possible to switch

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 fault switching method and device based on sentry mechanism
  • MySQL fault switching method and device based on sentry mechanism

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0025] Such as figure 1 As shown, it is a flowchart of a MySQL failover method based on the sentinel mechanism in the embodiment of the present invention, and the method includes:

[0026] S101: Regularly monitor the MySQL master database node through the sentinel node, and when a sentinel node finds that the MySQL master database node fails, it instructs other sentinel nodes to determine whether the MySQL master database node fails.

[0027] Prior to this, f...

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 embodiment of the invention provides a MySQL fault switching method and device based on a sentry mechanism. The method comprises the steps that MySQL main library nodes are periodically monitoredthrough sentinel nodes, and when one sentinel node finds that the MySQL main library node breaks down, other sentinel nodes are required to judge whether the MySQL main library node breaks down or not; if the number of the sentinel nodes exceeds the set number, the MySQL main library node is determined to fail, and a resource information score value given by each sentinel node according to the resource information of the corresponding MySQL cluster library node is obtained; a MySQL cluster library node with the highest copying speed is determined, and a difference log of a copying point position of the MySQL cluster library node with the highest copying speed is copied to each MySQL cluster library node and executed; and the MySQL cluster library node with the maximum resource informationscore value is determined as a new MySQL main library node, and metadata are modified. According to the technical scheme, the information acquired by the machine information is comprehensively judgedthrough a sentry mechanism, and the MySQL node most suitable for becoming a new master node is selected.

Description

technical field [0001] The invention relates to the field of data processing, in particular to a MySQL failover method and device based on a sentinel mechanism. Background technique [0002] MHA (Master High Availability) is a set of MySQL failover scheme written by MySQL experts in Perl to ensure high availability of the database. Its function is to achieve master MySQL failover within 10-30s. [0003] MHA failover can help us solve the consistency problem of slave database data after the master node goes down, and at the same time maximize the recovery of data after the failure occurs. There are two roles in MHA, one is the node node and the other is the manager node. To implement this MHA, you must have at least three database servers, one master and multiple backups, that is, one as the master node and one as the backup machine for the master node. One is a slave machine. It needs to be explained that once the main server goes down, the backup machine will start to serv...

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): G06F11/20
CPCG06F11/203
Inventor 吕志杰
Owner 新浪技术(中国)有限公司
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