CN101917263A - Multi-machine hot standby method and system - Google Patents

Multi-machine hot standby method and system Download PDF

Info

Publication number
CN101917263A
CN101917263A CN2010102541507A CN201010254150A CN101917263A CN 101917263 A CN101917263 A CN 101917263A CN 2010102541507 A CN2010102541507 A CN 2010102541507A CN 201010254150 A CN201010254150 A CN 201010254150A CN 101917263 A CN101917263 A CN 101917263A
Authority
CN
China
Prior art keywords
main frame
host
standby
standby host
sign
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2010102541507A
Other languages
Chinese (zh)
Inventor
周中东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN HEADWARE INFORMATION TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN HEADWARE INFORMATION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN HEADWARE INFORMATION TECHNOLOGY Co Ltd filed Critical SHENZHEN HEADWARE INFORMATION TECHNOLOGY Co Ltd
Priority to CN2010102541507A priority Critical patent/CN101917263A/en
Publication of CN101917263A publication Critical patent/CN101917263A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Hardware Redundancy (AREA)

Abstract

The invention discloses a multi-machine hot standby method and a multi-machine hot standby system. The method comprises the following steps of: setting start identifiers of a host machine and standby machines for marking identities, wherein the start identifiers of the host machine and the standby machines correspond to a preset sequence; starting at least two standby machines when the host machine for providing services for a user is started; detecting the state of the host machine; and when the host machine is in a stop state, sending a recommendation message to all the standby machines with latter standby identifiers by each standby machine with the former start identifier, and determining the standby machine which receives preset number of the recommendation messages as a deputy host machine to supply services to the user. When the host machine stops, the standby machines are recommended to serve as the host machine in sequence, so that one standby machine is prevented from competing to serve as the host machine for a many times, and the stability and reliability of the multi-machine hot standby system are also improved.

Description

The method and system of multi-host hot swap
Technical field
The present invention relates to server Hot Spare technology, relate in particular to a kind of method and system of multi-host hot swap.
Background technology
The server heat of extensive use at present is equipped with to realize it being that server is installed as mutually redundant two or multiple servers, and has only a station server simultaneously in operation, when this server went wrong, another standby host started and operation, thereby guaranteed the normal operation of whole cluster.
The inventor finds that there is following technical problem at least in prior art in implementing process of the present invention: 1. may cause erroneous judgement to the main frame halted state to switch to standby host owing to the reason of system with making main frame uncomfortable opportunity.2. the problem that has many standby hosts competition main frames when many standby hosts same standby host may occur and use problem as main frame repeatedly.
Summary of the invention
Embodiment of the invention technical problem to be solved is, a kind of method and system of multi-host hot swap are provided, and switches main frame and standby host to avoid uncomfortable opportunity, and avoids same standby host to be used as main frame repeatedly.
For solving the problems of the technologies described above, the embodiment of the invention adopts following technical scheme: the method that a kind of multi-host hot swap is provided, method comprises: the startup sign that is used to indicate identity of main frame and standby host is set, satisfies pre-order between the startup sign of described main frame and described standby host; Start one provide the main frame of service for the user in, start at least two standby hosts; Detect the state of described main frame; When described main frame was in halted state, each described standby host sent than the described standby host that self starts the sign back to all and elects message, and the standby host of receiving the election message that presets number is confirmed as proxy and begun to provide service for the user.
The present invention also provides a kind of multi-host hot swap system, and described system comprises: main frame is used to the user that service is provided; At least two standby hosts; Start sign the unit is set, be used for before described host-initiated, described main frame and each described standby host being provided for indicating the startup sign of identity, satisfy pre-order between the startup sign of described main frame and described standby host; Monitoring unit is used for the running status that timing detects described main frame and described standby host; The proxy start unit, be used for when described monitoring unit detects described main frame and is halted state, each described standby host sends than the described standby host that self starts the sign back to all and elects message, and the standby host that acknowledges receipt of the election message that presets number is a proxy.
The beneficial effect of the embodiment of the invention is: only when a standby host is received the election message of every other standby host, determine that just main frame is a halted state, this standby host starts as proxy then, has improved the stability and the reliability of multi-host hot swap system.
Main frame and standby host are provided with in certain sequence and start sign, and still be provided with in proper order after main frame is restarted and start sign according to this, guaranteed when main frame stops, starting by sequence between each standby host as main frame, preventing that the standby host from repeatedly competing becomes main frame and uses, and has also improved the stability and the reliability of multi-host hot swap system.
Below in conjunction with accompanying drawing the embodiment of the invention is described in further detail.
Description of drawings
Fig. 1 is the structural representation of multi-host hot swap of the present invention system.
Fig. 2 is a multi-host hot swap method flow diagram of the present invention.
Fig. 3 is the module map of multi-host hot swap of the present invention system.
Embodiment
Please refer to Fig. 1, is the structural representation of multi-host hot swap of the present invention system.This multi-host hot swap system forms a server cluster (Server Cluster) by the main frame that many operation service programs are set in the rear end, and this server cluster can be extending transversely.This server cluster is made up of main frame 1 and standby host 2-5, and this main frame 1 is connected by a switch communication with standby host 2-5, follows Transmission Control Protocol.This multiple servers starts work simultaneously, this main frame 1 provides service for the user, this multi-host hot swap system safeguards increasing, delete, changing of a thread and three formations simultaneously, when the data of main frame 1 take place to increase accordingly, delete, when changing simultaneously to the data that increase, delete, change in the formation, these three formations of thread periodic scanning, and this data broadcasting gone out, standby host 2-5 receives the data in message and updating memory or the database, thereby reaches the data sync of a plurality of standby hosts.When this main frame stopped to serve, the multi-host hot swap system elected a standby host and begins to provide service for the user as proxy.
Please refer to Fig. 2, is multi-host hot swap method flow diagram of the present invention.
Step S21 is provided for indicating the startup sign of identity to main frame and standby host by a configuration file.
This startup is designated the unique identify label of every station server, and satisfies pre-order between the startup of described main frame and the described standby host sign; This pre-order is numerical order or lexicographic order, and 0-9 for example starts that to be designated 0 server be main frame, and all the other are standby host; Or a-j, starting the server that is designated a is main frame, all the other are standby host.This pre-order can be arranged for positive sequence and also be can be inverted order and arrange, and as 9-0, starts that to be designated 9 server be main frame, and all the other are standby host; Or j-a, starting the server that is designated j is main frame, all the other are standby host.Start the order setting of sign according to 1-5 in the present embodiment, promptly host-initiated is designated 1, and standby host starts sign and arranges to 5 from 2 respectively.
Step S22, start one provide the main frame of service for the user in, start at least two standby hosts.
Usually the quantity of standby host is the 2-9 platform, and the quantity of standby host is 4 in the present embodiment, and when main frame 1 started, this standby host 2-5 all started simultaneously.The standby host 2-5 of main frame 1 in subnet initiates to connect during startup, and every station server all sends the request of " read and start sign " after the successful connection to other servers, and the startup sign of this machine has been carried in this request.After the other side's server is received request, return the startup sign in the configuration file.
Step S23 detects the state of described main frame; And judge whether described main frame is halted state, if execution in step S24 then continues if not to detect and judges Host Status.
When fault has taken place in the running environment that active process or this active process relied on of main frame, the state of main frame is halted state, certainly the state that causes main frame is that the reason of halted state can also be an other reasons of the prior art, does not exemplify one by one at this.
The method that detects Host Status in the present embodiment is specially, when main frame 1 provides service for the user, send heartbeat signal to standby host 2-5, and each standby host sends heartbeat signal to the big standby host that starts the sign back than this standby host, this heartbeat signal is specially the heartbeat packet that this machine of expression is in active state, be that the high standby host of priority oneself also is in active state to the low standby host transmission heartbeat packet sign of priority, the standby host that this priority is high when main frame 1 stops then preferentially to be campaigned for and is proxy so.For example standby host 2 sends heartbeat packet to standby host 3-5.Among another embodiment, start sign and arrange according to inverted order, host-initiated is designated 5, and the standby host startup is designated 4-1, and each standby host sends heartbeat signal to start the little standby host of sign than this standby host so, repeats no more.
Step S24 if judge when described main frame is in halted state, elects a standby host according to the mechanism of electing and begins to provide service for the user as proxy.
When main frame stopped, each standby host sent than the big standby host that self starts the sign back to all and elects message, receives that the standby host of the election message that presets number is confirmed as main frame, and the described number that presets is that the sum of described main frame and described standby host subtracts 2.In the present embodiment, do not send heartbeat packet if this main frame surpasses the certain hour threshold values, each standby host is to sending and elect message than initiating self the big standby host of sign, the sum of receiving described main frame and described standby host subtract 2 promptly the standby hosts of 3 election message confirm as main frame.Also promptly except that itself and main frame all servers assert that all main frame stops, and this standby host received the election message of every other standby host, this standby host is just confirmed oneself to become proxy so.Among another embodiment, start sign and arrange according to inverted order, each standby host is to sending and elect message than initiating self the little standby host of sign, and the sum of receiving described main frame and described standby host subtracts the standby hosts of 2 election message and confirms as main frame.
Step S25 is restarted after main frame stops, and resets the startup sign of described main frame according to described pre-order.
In the present embodiment, restart after main frame 1 stops, according to ascending order, this sign of the startup of this main frame 1 changes to 6 in turn.
Please refer to Fig. 3, is the module map of multi-host hot swap of the present invention system.This multi-host hot swap system 100 comprises main frame 10, at least two standby hosts 20, monitoring unit 30 and proxy start units 40.
This main frame 10 is used to the user that service is provided.This standby host 20 is used for starting together when this main frame 10 starts again, as standby server.
This monitoring unit 30 be used for monitoring in real time this main frame 10 and this standby host 20 as running status movable, that stop etc.
This proxy start unit 40 is used for when described monitoring unit 30 detects described main frame 10 for halted state, and starting a standby host 20 according to the mechanism of electing provides service as proxy for the user.
Described monitoring unit 30 comprises detection module 31, is used for regularly detecting the running status of described main frame 10 and described standby host 20; Judge module 32 is used to judge whether described startup sign repeats.
This multi-host hot swap system 100 comprises that also starting sign is provided with unit 50 and alarm unit 60.
This startup sign is provided with the startup sign that unit 50 is used for described main frame 10 and each described standby host 20 being provided for indicating before described main frame 10 starts identity, satisfy pre-order between the startup sign of described main frame 10 and described standby host 20, and after described main frame 10 stops, reseting the startup sign of described main frame 10 according to each described pre-order.
This alarm unit 60 is used for sending alarm when described monitoring unit 30 judges that described startup sign has repetition.This alarm can be auditory tone cues, and an interface prompt is pointed out or ejected in flash of light.Then, administrative staff revise the startup sign of this mistake according to this alarm.
Wherein, this pre-order is numerical order or lexicographic order, can be inverted order or tactic numeral or letter and combination thereof, described election mechanism is that each described standby host 10 sends election message to all than the standby host 20 that self starts the sign back, receive that the standby host 20 of the election message that presets number confirms as main frame, described to preset number be described main frame 10 and the sum of described standby host 20 subtracts 2.
This main frame 10 comprises the first heartbeat unit 101, described standby host 20 comprises the second heartbeat unit 201, be respectively applied for when described main frame 10 provides service for the user, described main frame 10 sends heartbeat signal to all standby hosts 20, and each described standby host 20 sends heartbeat signal to the standby host 20 that starts the sign back than this standby host 20.
In addition, one of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method, be to instruct relevant hardware to finish by program, the program of being somebody's turn to do can be stored in the computer-readable recording medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, the storage medium that is somebody's turn to do can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random AccessMemory, RAM) etc.
More than this is the specific embodiment of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also are considered as protection scope of the present invention.

Claims (9)

1. the method for a multi-host hot swap is characterized in that, method comprises:
The startup sign that is used to indicate identity of main frame and standby host is set, satisfies pre-order between the startup sign of described main frame and described standby host;
Start one provide the main frame of service for the user in, start at least two standby hosts;
Detect the state of described main frame;
When described main frame was in halted state, each described standby host sent than the described standby host that self starts the sign back to all and elects message, and the standby host of receiving the election message that presets number is confirmed as proxy and begun to provide service for the user.
2. the method for multi-host hot swap as claimed in claim 1 is characterized in that, described pre-order is numerical order or lexicographic order, and the described number that presets is that the sum of described main frame and described standby host subtracts 2.
3. the method for multi-host hot swap as claimed in claim 1 is characterized in that, also comprises:
Restart after described main frame stops, reseting the startup sign of described main frame according to described pre-order.
4. the method for multi-host hot swap as claimed in claim 1 is characterized in that, when described main frame provides service for the user, sends heartbeat signal to all standby hosts, and each described standby host sends heartbeat signal to the standby host that starts the sign back than this standby host.
5. a multi-host hot swap system is characterized in that, described system comprises:
Main frame is used to the user that service is provided;
At least two standby hosts;
Start sign the unit is set, be used for before described host-initiated, described main frame and each described standby host being provided for indicating the startup sign of identity, satisfy pre-order between the startup sign of described main frame and described standby host;
Monitoring unit is used for the running status that timing detects described main frame and described standby host;
The proxy start unit, be used for when described monitoring unit detects described main frame and is halted state, each described standby host sends than the described standby host that self starts the sign back to all and elects message, and the standby host that acknowledges receipt of the election message that presets number is a proxy.
6. the system of multi-host hot swap as claimed in claim 5 is characterized in that, described pre-order is numerical order or lexicographic order, and the described number that presets is that the sum of described main frame and described standby host subtracts 2.
7. multi-host hot swap as claimed in claim 5 system is characterized in that, restarts after described main frame stops, and resets the startup sign of described main frame according to described pre-order.
8. the system of multi-host hot swap as claimed in claim 5, it is characterized in that, described main frame comprises the first heartbeat unit, described standby host comprises the second heartbeat unit, be respectively applied for when described main frame provides service for the user, described main frame sends heartbeat signal to all standby hosts, and each described standby host sends heartbeat signal to the standby host that starts the sign back than this standby host.
9. the system of multi-host hot swap as claimed in claim 5 is characterized in that, described monitoring unit comprises:
Detection module is used for the running status that timing detects described main frame and described standby host;
Judge module is used to judge whether described startup sign repeats;
The system of described multi-host hot swap also comprises:
Alarm unit is used for sending alarm when described monitoring unit judges that described startup sign has repetition.
CN2010102541507A 2010-08-16 2010-08-16 Multi-machine hot standby method and system Pending CN101917263A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102541507A CN101917263A (en) 2010-08-16 2010-08-16 Multi-machine hot standby method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102541507A CN101917263A (en) 2010-08-16 2010-08-16 Multi-machine hot standby method and system

Publications (1)

Publication Number Publication Date
CN101917263A true CN101917263A (en) 2010-12-15

Family

ID=43324664

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102541507A Pending CN101917263A (en) 2010-08-16 2010-08-16 Multi-machine hot standby method and system

Country Status (1)

Country Link
CN (1) CN101917263A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624567A (en) * 2012-03-25 2012-08-01 沈阳通用软件有限公司 Hardware type network safety control server thermal backup device
CN102724065A (en) * 2012-05-22 2012-10-10 长沙中联消防机械有限公司 Network communication system and engineering mechanical equipment comprising same
CN103530200A (en) * 2012-07-04 2014-01-22 腾讯科技(深圳)有限公司 Server hot backup system and method
CN103634411A (en) * 2013-12-16 2014-03-12 上海证券交易所 Real-time market data broadcasting system and real-time market data broadcasting method with state consistency
CN105933135A (en) * 2015-11-16 2016-09-07 中国银联股份有限公司 Method for determining execution of scheduling task and first host for executing scheduling task
CN106713056A (en) * 2017-03-17 2017-05-24 郑州云海信息技术有限公司 Method for selecting and switching standbys under distributed cluster
CN107632517A (en) * 2017-07-31 2018-01-26 上海蔚来汽车有限公司 Electric charging station and charging and conversion electric monitoring system, method
CN107819808A (en) * 2016-09-14 2018-03-20 北京百度网讯科技有限公司 Communicate to connect method for building up and device
CN109032849A (en) * 2018-08-30 2018-12-18 百度在线网络技术(北京)有限公司 Hot backup system, heat backup method and computer equipment
CN109799797A (en) * 2019-01-10 2019-05-24 国网陕西省电力公司 The method of plant stand electric energy acquisition terminal two-node cluster hot backup
CN110333973A (en) * 2018-12-28 2019-10-15 锐捷网络股份有限公司 A kind of method and system of multi-host hot swap

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002290489A (en) * 2001-03-28 2002-10-04 Nec Corp Communication system and communication control device using plural circuits
CN1665198A (en) * 2004-03-06 2005-09-07 鸿富锦精密工业(深圳)有限公司 Management method of stacked switch
CN101207512A (en) * 2006-12-22 2008-06-25 中兴通讯股份有限公司 Method for switching and redundancy backup of database system
CN101212458A (en) * 2006-12-25 2008-07-02 中兴通讯股份有限公司 Database system backup method
CN101378334A (en) * 2008-09-25 2009-03-04 卡斯柯信号有限公司 Communication method base on dual-network redundant universal network model
CN101447858A (en) * 2008-01-17 2009-06-03 中兴通讯股份有限公司 Method for realizing synchronous switching of virtual router redundancy protocol in dual-machine hot backup system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002290489A (en) * 2001-03-28 2002-10-04 Nec Corp Communication system and communication control device using plural circuits
CN1665198A (en) * 2004-03-06 2005-09-07 鸿富锦精密工业(深圳)有限公司 Management method of stacked switch
CN101207512A (en) * 2006-12-22 2008-06-25 中兴通讯股份有限公司 Method for switching and redundancy backup of database system
CN101212458A (en) * 2006-12-25 2008-07-02 中兴通讯股份有限公司 Database system backup method
CN101447858A (en) * 2008-01-17 2009-06-03 中兴通讯股份有限公司 Method for realizing synchronous switching of virtual router redundancy protocol in dual-machine hot backup system
CN101378334A (en) * 2008-09-25 2009-03-04 卡斯柯信号有限公司 Communication method base on dual-network redundant universal network model

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624567A (en) * 2012-03-25 2012-08-01 沈阳通用软件有限公司 Hardware type network safety control server thermal backup device
CN102724065A (en) * 2012-05-22 2012-10-10 长沙中联消防机械有限公司 Network communication system and engineering mechanical equipment comprising same
CN103530200A (en) * 2012-07-04 2014-01-22 腾讯科技(深圳)有限公司 Server hot backup system and method
CN103530200B (en) * 2012-07-04 2018-01-26 腾讯科技(深圳)有限公司 A kind of server hot backup system and method
CN103634411B (en) * 2013-12-16 2017-06-06 上海证券交易所 A kind of marketing data real time broadcasting system and method with state consistency
CN103634411A (en) * 2013-12-16 2014-03-12 上海证券交易所 Real-time market data broadcasting system and real-time market data broadcasting method with state consistency
CN105933135A (en) * 2015-11-16 2016-09-07 中国银联股份有限公司 Method for determining execution of scheduling task and first host for executing scheduling task
CN105933135B (en) * 2015-11-16 2019-07-16 中国银联股份有限公司 It is a kind of it is determining execute scheduler task method and execute scheduler task the first host
CN107819808A (en) * 2016-09-14 2018-03-20 北京百度网讯科技有限公司 Communicate to connect method for building up and device
CN106713056A (en) * 2017-03-17 2017-05-24 郑州云海信息技术有限公司 Method for selecting and switching standbys under distributed cluster
CN106713056B (en) * 2017-03-17 2019-06-28 郑州云海信息技术有限公司 A kind of method of standby host election switching under distributed type assemblies
CN107632517A (en) * 2017-07-31 2018-01-26 上海蔚来汽车有限公司 Electric charging station and charging and conversion electric monitoring system, method
CN109032849A (en) * 2018-08-30 2018-12-18 百度在线网络技术(北京)有限公司 Hot backup system, heat backup method and computer equipment
CN109032849B (en) * 2018-08-30 2021-03-23 百度在线网络技术(北京)有限公司 Hot backup system, hot backup method and computer equipment
US11397647B2 (en) 2018-08-30 2022-07-26 Apollo Intelligent Driving Technology (Beijing) Co., Ltd. Hot backup system, hot backup method, and computer device
CN110333973A (en) * 2018-12-28 2019-10-15 锐捷网络股份有限公司 A kind of method and system of multi-host hot swap
CN110333973B (en) * 2018-12-28 2023-04-25 锐捷网络股份有限公司 Multi-machine hot standby method and system
CN109799797A (en) * 2019-01-10 2019-05-24 国网陕西省电力公司 The method of plant stand electric energy acquisition terminal two-node cluster hot backup

Similar Documents

Publication Publication Date Title
CN101917263A (en) Multi-machine hot standby method and system
US10560315B2 (en) Method and device for processing failure in at least one distributed cluster, and system
US11809291B2 (en) Method and apparatus for redundancy in active-active cluster system
CN108847982B (en) Distributed storage cluster and node fault switching method and device thereof
US5875290A (en) Method and program product for synchronizing operator initiated commands with a failover process in a distributed processing system
US8700760B2 (en) Method and systems for redundant server automatic failover
CN106330475B (en) Method and device for managing main and standby nodes in communication system and high-availability cluster
US6012150A (en) Apparatus for synchronizing operator initiated commands with a failover process in a distributed processing system
CN109344014B (en) Main/standby switching method and device and communication equipment
WO2018233645A1 (en) Method and system for transmitting train network data based on canopen protocol, and apparatus therefor
CN103354503A (en) Cloud storage system capable of automatically detecting and replacing failure nodes and method thereof
CN109471759B (en) A kind of database failure switching method and equipment based on SAS dual control equipment
CN110677282B (en) Hot backup method of distributed system and distributed system
US10037253B2 (en) Fault handling methods in a home service system, and associated household appliances and servers
CN106888100B (en) Ethernet power supply switch and power supply method thereof
CN114866365B (en) Arbitration machine election method, device, intelligent equipment and computer readable storage medium
CN114461428A (en) Arbitration method for split brain of double-computer cluster
CN111314098A (en) Method and device for realizing VIP address drift in HA system
CN112346925A (en) Process-level dual-computer hot standby redundancy system and method
CN111585835A (en) Control method and device for out-of-band management system and storage medium
CN101557307B (en) Dispatch automation system application state management method
CN112069032A (en) Availability detection method, system and related device for virtual machine
JP5285044B2 (en) Cluster system recovery method, server, and program
WO2023041073A1 (en) Method for data synchronisation between multiple nodes, and system, device, and storage medium
CN115987999A (en) Master-slave competition method and device for multi-machine system, ARM and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20101215