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

A method and device for switching between active and standby servers

A technology of server switching and main server, which is applied in the field of main-standby server switching method and device, can solve the problems of unable to switch between main and standby machines, unable to stop network bridge service, etc., and achieves the effect of simple implementation

Active Publication Date: 2020-02-21
北京明朝万达科技股份有限公司
View PDF9 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The present invention provides a method and device for switching between active and standby servers, so as to solve the problems in the prior art that the active and standby servers cannot be switched according to the state of the network bridge, and the network bridge service of the unused equipment cannot be stopped.

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
  • A method and device for switching between active and standby servers
  • A method and device for switching between active and standby servers
  • A method and device for switching between active and standby servers

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0032] refer to figure 1 , which shows a flow chart of the steps of a method for switching between active and standby servers provided by an embodiment of the present invention. The method for switching between active and standby servers can be applied to the main server, and may specifically include the following steps:

[0033] Step 101: Start the first Keepalived service.

[0034] In this embodiment of the present invention, the first Keepalived service refers to the Keepalived service on the main server side.

[0035] The self-inspection function can be added in advance in the Keepalived service configuration item of the main server. This self-inspection function can be used to check the status file of the local bridge later, so as to facilitate the master-standby switchover when the bridge status is abnormal.

[0036] After starting the first Keepalived service on the main server side, the first Keepalived service can be used to host the main server, so as to monitor the...

Embodiment 2

[0085] refer to figure 2 , which shows a flow chart of the steps of a method for switching between active and standby servers provided by an embodiment of the present invention. The method for switching between active and standby servers can be applied to a standby server, and may specifically include the following steps:

[0086] Step 201: Start the second Keepalived service.

[0087] The embodiments of the present invention can be applied to standby servers.

[0088] The second Keepalived service refers to the Keepalived service on the standby service side.

[0089] After starting the second Keepalived service and hosting the standby server, step 202 is executed.

[0090] Step 202: Start the second active / standby communication thread.

[0091] The second active-standby communication thread refers to the thread used for communication between the standby server and the main server. Through the second active-standby communication thread, the standby server and the main serv...

Embodiment 3

[0116] refer to image 3 , which shows a schematic structural diagram of an active / standby server switching device provided by an embodiment of the present invention. The active / standby server switching device can be applied to a primary server, and can specifically include:

[0117] The first Keepalived starting module 310 is used to start the first Keepalived service; the first network bridge state judgment module 320 is used to start the first network bridge service to judge the first network bridge state of the local network bridge; the first network bridge The thread starting module 330 is used to start the first network bridge inspection thread when the state of the first network bridge is in the working state; the first network bridge file generation module 340 is used to utilize the first network bridge inspection thread Check the second network bridge state of the local network bridge, generate the first network bridge state file; the first network bridge file inspect...

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 main-spare server switching methods and devices. One of the methods includes: starting a first Keepalived service; starting a first network bridge service to judge a first bridge state of a local-machine network bridge; starting a first network bridge checking thread in a case where the first network bridge state is a working state; using the first networkbridge checking thread to check a second network bridge state of the local-machine network bridge, and generating a first network bridge state file; using the first Keepalived service to check the first network bridge state file; and in a case where according to a checking result, it is determined that the local-machine network bridge is in a non-working state, stopping the first Keepalived service, and executing a main-spare switching process. According to the method, the problem that network bridge parallelism causes loops can be solved, a manner of carrying out main-spare switching by a state mechanism is provided for services without a port for keepalived hosting, a realization manner is simpler, and the purpose of reuse can be achieved.

Description

technical field [0001] The invention relates to the technical field of computer communication, in particular to a method and device for switching between active and standby servers. Background technique [0002] The function of Keepalived is to detect the status of the server. If there is a web server down or the work fails, Keepalived will detect it and remove the faulty server from the system, and use other servers to replace the work of the server. Keepalived will automatically add the server to the server group after the work is normal. All these tasks are automatically completed without manual intervention. What needs manual work is to repair the faulty server. [0003] In order to improve reliability, two or more bridges in parallel are set up between LANs (Local Area Networks). Infinite loop. Currently commonly used spanning tree (spanningtree) algorithm. The solution to the infinite loop problem is to have the bridges communicate with each other and overlay the ac...

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/26H04L12/24G06F11/20
CPCG06F11/2028H04L41/0668H04L43/0817
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