Master-slave server switching method and monitoring server

A monitoring server and server switching technology, applied in the direction of data exchange network, digital transmission system, electrical components, etc., can solve the problem of two main servers at the same time

Active Publication Date: 2017-07-21
BEIJING JINGDONG 360 DEGREE E COMMERCE CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In view of this, the embodiment of the present invention provides a master-slave server switching method and a monitoring server to solve the problem in the prior art that causes two master servers to exist at the same time

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
  • Master-slave server switching method and monitoring server
  • Master-slave server switching method and monitoring server
  • Master-slave server switching method and monitoring server

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, only parts related to the present invention are shown in the drawings but not all content.

[0020] figure 1 A first embodiment of the invention is shown.

[0021] figure 1 It is a flow chart of the master-slave server switching method provided by the first embodiment of the present invention. This method is applicable to server clusters managed by Zookeeper equipment and can be executed by a monitoring server. figure 2 It is a complete server structure diagram in the master-slave server switching method provided by the embodiment of the present invention, as shown in figure 2 As shown, the complete server struct...

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 method for switching a master server and a slave server and a monitoring server. The method comprises the steps of checking whether a registered resource node exists in a Zookeeper device or not, wherein the resource node is a label of the resource; when the registered resource node exists in the Zookeeper device, checking whether the number of server nodes in child nodes of the resource node is larger than or equal to a preset value; when the number of the server nodes in the child nodes of the resource node is larger than or equal to the preset value and a main server in the child nodes of the current resource node is not available, switching one slave server in the child nodes of the resource node into the main server. According to the method, the risks of data loss caused by the existence of two main servers at the same time cannot happen, and problems existing in the prior art are solved.

Description

technical field [0001] The embodiment of the present invention relates to server coordination technology, and in particular to a master-slave server switching method and a monitoring server. Background technique [0002] When the server provides services, the master-slave device is usually used to ensure high availability. For example, MySQL uses Heartbeat software to achieve high availability of the master-slave architecture. At least two servers are used in the high availability scheme realized by Linux Heartbeat, and the at least two servers include a central server, and the central server maintains connections with other servers through Heartbeat. The core of Heartbeat includes two parts, the heartbeat monitoring part and the resource takeover part. Heartbeat monitoring can be performed through network links and serial ports, and supports redundant links. They send messages to each other to tell each other their current status. If the message sent by the other party is ...

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 Patents(China)
IPC IPC(8): H04L12/24H04L29/06H04L1/22
Inventor 马文金
Owner BEIJING JINGDONG 360 DEGREE E COMMERCE CO LTD
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