CN106992890A - A kind of multiserver switching method and system - Google Patents
A kind of multiserver switching method and system Download PDFInfo
- Publication number
- CN106992890A CN106992890A CN201710255938.1A CN201710255938A CN106992890A CN 106992890 A CN106992890 A CN 106992890A CN 201710255938 A CN201710255938 A CN 201710255938A CN 106992890 A CN106992890 A CN 106992890A
- Authority
- CN
- China
- Prior art keywords
- server
- master server
- timestamp
- multiserver
- inactivation
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 230000002779 inactivation Effects 0.000 claims abstract description 35
- 230000005540 biological transmission Effects 0.000 claims description 11
- 230000003068 static effect Effects 0.000 claims description 9
- 238000001514 detection method Methods 0.000 claims description 4
- 230000006870 function Effects 0.000 description 5
- 230000003111 delayed effect Effects 0.000 description 2
- 230000001934 delay Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0668—Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/202—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephonic Communication Services (AREA)
- Hardware Redundancy (AREA)
Abstract
This application discloses a kind of multiserver switching method, including:When detecting former master server inactivation from server group, then timestamp is mutually sent from each in server group from server;Each timestamp received from server by utilizing judge the time described in the timestamp itself sent judge itself whether relative importance value highest, if it is, being used as standby master server.It can be seen that, the application is in the case where former master server is inactivated, respectively timestamp is mutually sent from server, each timestamp received from server by utilizing judge the time described in the timestamp itself sent judge itself whether relative importance value highest, if, then as standby master server, so that after ensure that former master server inactivation reliable data, services can be provided the user smoothly by being continued to run with from server generation for its function.In addition, the application further correspondingly discloses a kind of multiserver switching system.
Description
Technical field
The present invention relates to the hot standby field of multiserver, more particularly to a kind of multiserver switching method and system.
Background technology
With internet (mobile Internet) high speed development, user becomes increasingly dependent on the data, services of server offer, right
The usability requirements enhancing of data, it is necessary to access the service (data) that server is provided more anywhere or anytime;To avoid service
Device failure, causes user can not normally obtain service, therefore uses multi-host hot swap scheme, when master server inactivation, then from service
Device should switch to master server, continue to provide the user service.
The content of the invention
In view of this, it is an object of the invention to provide a kind of multiserver switching method and system, former master server is made
Can be smoothly by being continued to run with from server generation for its function after inactivation.Its concrete scheme is as follows:
A kind of multiserver switching method, including:
It is when detecting former master server inactivation from server group, then described mutually to be sent out from server from each in server group
Send timestamp;
Each timestamp received from server by utilizing judge itself whether relative importance value highest, if it is, as standby
Use master server.
It is preferred that, the process that former master server inactivation is detected from server group, including:
It is described to fail in first threshold to receive that the former master server sends in fortune signal from server group, then sentence
The fixed former master server inactivation.
It is preferred that, each from server in the inscribed receipts timestamp of Second Threshold.
It is preferred that, in addition to:
When multiple timestamps from server transmission are the same, then static allocation set in advance order, selection can be utilized
Go out as standby master server from server.
It is preferred that, in addition to:
Recover normal when the standby master server detects the former master server, then inactivate the former master server
The data of period are sent to the former master server, and the standby master server be changed into it is described from one in server group from
Server.
The invention also discloses a kind of multiserver switching system, including:
Sending module, it is for when detecting former master server inactivation from server group, then described from each in server group
Timestamp is mutually sent from server;
Judge module, the timestamp for each being received from server by utilizing judge itself whether relative importance value highest, such as
Fruit is, then as standby master server.
It is preferred that, the sending module, including:
Detection unit, fails in first threshold to receive what the former master server was sent for described from server group
In fortune signal, then the former master server inactivation is judged.
It is preferred that, the judge module, including:
Timing unit, for each from server in the inscribed receipts timestamp of Second Threshold.
It is preferred that, in addition to:
Selecting module, for when it is multiple from server send timestamps it is the same, then can utilize static state set in advance
Allocation order, is selected as standby master server from server.
It is preferred that, in addition to:
Data transmission blocks, for recovering normal when the standby master server detects the former master server, then will
Data during the former master server inactivation are sent to the former master server;
Handover module, for the standby master server be changed into it is described from one in server group from server.
In the present invention, multiserver switching method, including:When detecting former master server inactivation from server group, then from
Each in server group mutually sends timestamp from server;Each timestamp received from server by utilizing judges that itself sends out
The time described in timestamp sent judge itself whether relative importance value highest, if it is, being used as standby master server.It can be seen that,
The present invention respectively mutually sends timestamp in the case where former master server is inactivated from server, is each received from server by utilizing
To timestamp judge itself send timestamp described in time judge itself whether relative importance value highest, if it is, make
For standby master server, so that ensure that can be smoothly by continuing to transport after former master server inactivation from server generation for its function
OK, reliable data, services are provided the user.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is a kind of multiserver switching method schematic flow sheet disclosed in the embodiment of the present invention;
Fig. 2 is a kind of multiserver switching system structural representation disclosed in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
The embodiment of the invention discloses a kind of multiserver switching method, shown in Figure 1, this method includes:
Step S11:When detecting former master server inactivation from server group, then from each from server phase in server group
Mutually send timestamp.
Specifically, in normal operation, from server group can receive that former master server sends in fortune signal, work as original
Master server is inactivated, and fails in first threshold to receive that former master server sends in fortune signal from server group, just can be obtained
Know former master server inactivation, former master server sends in fortune signal for example, failing to receive in 10 seconds from server group, just
Former master server inactivation is learnt, or receives the information of former master server inactivation, former master server inactivation is learnt.
Wherein, when detecting former master server inactivation from server group, then from each from server in server group
Timestamp can be sent to each from server, the time described in timestamp can learn that master server loses to be each from server
Time living, or each time that timestamp is sent from server, delay setting can also be carried out, do not limited herein.
It is understood that there is different degrees of delay due to being communicated between each server, so respectively being obtained from server
Difference can be had by knowing the time of former master server inactivation, meanwhile, each from server after former master server inactivation is learnt, response
Time influences the transmission time as different from the current running status of server, it is possible to during using receiving
Between and send the time as the time in timestamp, in actual applications, in order to avoid standby master server determination excessively with
Machine, therefore can be set carrying out different delays to the time in timestamp from server, made with playing certain sequence
With.
For example, have 3 from server, respectively first from server, second from server and the 3rd from server,
One learns that the time of former master server is 8 from server:30, it is 8 to send the timestamp time:33, second learns original from server
The time of master server is 8:31, it is 8 to send the timestamp time:32, the 3rd learns that the time of former master server is from server
8:33, it is 8 to send the timestamp time:35;When being punctual using the time of learning, first from server, second from server and the 3rd
It is respectively 8 from the time in the timestamp of server:30、8:31 and 8:33;When being punctual to send the time, first from service
Device, second are respectively 8 from the time in the timestamp of server from server and the 3rd:33、8:32 and 8:35;When there is delay to be
Regularly, user carries out delay setting to second from server in advance, and 2 points are delayed from the time in the timestamp of server to second
Clock, second is punctual from server using the time of learning, the time of timestamp is 8:33, using send the time be it is punctual, timestamp
Time is 8:34.
Step S12:Each timestamp received from server by utilizing judge described in the timestamp that itself sends when
Between judge itself whether relative importance value highest, if it is, being used as standby master server.
Specifically, each will receive other timestamps sent from server from server, and utilize each time
Time in the timestamp that is sent with itself of time recorded in stamp is contrasted, for example, in judging the timestamp of itself transmission
Whether the time of record is earliest, if it is, can be as standby master server, and switch over, perform standby main clothes
The function of business device.For example, have 3 from server, respectively first from server, second from server and the 3rd from service
Device, first is respectively 8 from the time in the timestamp of server from server and the 3rd from server, second:30、8:31 and 8:
33, then first from the time earliest relative importance value highest of server, therefore first is used as standby master server from server.
It can be seen that, in the embodiment of the present invention in the case where former master server is inactivated, timestamp is mutually respectively sent from server,
Each timestamp received from server by utilizing judges that the time described in the timestamp itself sent judges whether itself is excellent
Highest is first spent, if it is, as standby master server, so that ensure that after former master server inactivation can be smoothly by from clothes
Business device is continued to run with instead of its function, provides the user reliable data, services.
It should be noted that the temporal meaning of each timestamp sent from server can be different, for example, first from clothes
The time being engaged in the timestamp of device can be the first learning the time from server, and second from the time in the timestamp of server
It can be the second time that timestamp is sent from server, have no effect on and filtered out from from server group as standby main service
Device from server.
In actual applications, time in multiple timestamps from server occurring unavoidably the same situation, therefore, working as
Multiple timestamps from server transmission are the same, then can be selected using static allocation set in advance order as standby
Master server from server.
Specifically, when multiple timestamps from server transmission are the same, from respective from server judgement in server group
Static allocation order, relative importance value highest is changed into standby master server from server;Static allocation order can be pre- by user
First set, specify and the order of former master server is each switched to from server, for example, there are 10 from server group from clothes
Business device, it is 1 to 10 to the tenth from the numbering of server from server to specify first, sets and is cut according to the order of numbering from small to large
Change, e.g., when former master server inactivation, then numbering is 1 first to be changed into standby master server from server priority degree highest;From clothes
In business device group from server after former master server inactivation is learnt, the static allocation order of itself is just inquired about, when from server
Confirm then to switch to standby master server from server as relative importance value highest certainly.
Further, when former master server recovers normal, to make former master server resume work, it is necessary to make standby main clothes
Business, which is thought highly of, newly to be switched to from server, continues original work by former master server, therefore, when standby master server detects original
Master server recovers normal, then the data during former master server is inactivated are sent to former master server, and standby master server
It is changed into from one in server group from server.
Specifically, the data during standby master server is run all are sent to former master server, i.e. by the main clothes of original
Data before business device recovers normally are all sent to former master server, so that former master server can continue to processing data, no
The loss and interruption of data occurs, it is ensured that the stability of operation, after data are transferred, standby master server recovers before it
Operation identity, be changed into, from server, working on.
It should be noted that have from server send timestamp delay may it is larger, or inactivated can not in time by
Timestamp is sent to other from server, so as to cause the time for being delayed switching server, therefore, each presetting from server
Time inscribed receipts timestamp, sends timestamp, not to rear continued access more than that will not continue after waiting after preset time from server
The timestamp received is judged, for example, each since server timing, preset time confirming after former master server inactivation
For 5 minutes, the time described in the timestamp and own timestamp that receive in 5 minutes is contrasted from server, and
Timestamp more than 5 minutes will be contrasted no longer, and do not wait more than the time sends timestamp from server, can be effective
Improve switching efficiency.
The embodiment of the present invention further correspondingly discloses a kind of multiserver switching system, and shown in Figure 2, the system includes:
Sending module 11, for when detect former master server inactivation from server group, then from server group it is each from
Server mutually sends timestamp;
Judge module 12, the timestamp for each being received from server by utilizing judge itself whether relative importance value highest,
If it is, being used as standby master server.
It can be seen that, in the embodiment of the present invention in the case where former master server is inactivated, timestamp is mutually respectively sent from server,
Each timestamp received from server by utilizing judges that the time described in the timestamp itself sent judges whether itself is excellent
Highest is first spent, if it is, as standby master server, so that ensure that after former master server inactivation can be smoothly by from clothes
Business device is continued to run with instead of its function, provides the user reliable data, services.
Specifically, above-mentioned sending module 11, can include detection unit;Wherein,
Detection unit, for failing to receive in fortune believing for former master server transmission in first threshold from server group
Number, then judge former master server inactivation.
Above-mentioned judge module 12, can include timing unit;Wherein,
Timing unit, for each from server in the inscribed receipts timestamp of Second Threshold.
In the embodiment of the present invention, selecting module, data transmission blocks 11 and handover module can also be included;Wherein,
Selecting module, for when it is multiple from server send timestamps it is the same, then can utilize static state set in advance
Allocation order, is selected as standby master server from server.
Data transmission blocks 11, for recovering normal when standby master server detects former master server, then by the main clothes of original
Data during business device inactivation are sent to former master server;
Handover module, is changed into from one in server group from server for standby master server.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to by
One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation
Between there is any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant meaning
Covering including for nonexcludability, so that process, method, article or equipment including a series of key elements not only include that
A little key elements, but also other key elements including being not expressly set out, or also include be this process, method, article or
The intrinsic key element of equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", is not arranged
Except also there is other identical element in the process including the key element, method, article or equipment.
A kind of multiserver switching method provided by the present invention and system are described in detail above, herein should
The principle and embodiment of the present invention are set forth with specific case, the explanation of above example is only intended to help and managed
Solve the method and its core concept of the present invention;Simultaneously for those of ordinary skill in the art, according to the thought of the present invention,
It will change in embodiment and application, in summary, this specification content should not be construed as to this hair
Bright limitation.
Claims (10)
1. a kind of multiserver switching method, it is characterised in that including:
When detecting former master server inactivation from server group, then it is described from server group it is each from server mutually send when
Between stab;
Each timestamp received from server by utilizing judge itself whether relative importance value highest, if it is, being used as standby master
Server.
2. multiserver switching method according to claim 1, it is characterised in that described to detect former master from server group
The process of server inactivation, including:
It is described to fail in first threshold to receive that the former master server sends in fortune signal from server group, then judge institute
State former master server inactivation.
3. multiserver switching method according to claim 1, it is characterised in that each from server in Second Threshold
Receive timestamp.
4. the multiserver switching method according to any one of claims 1 to 3, it is characterised in that also include:
When multiple timestamps from server transmission are the same, then work can be selected using static allocation set in advance order
It is standby master server from server.
5. the multiserver switching method according to any one of claims 1 to 3, it is characterised in that also include:
Recover normal when the standby master server detects the former master server, then by during the former master server inactivation
Data be sent to the former master server, and the standby master server be changed into it is described from one in server group from service
Device.
6. a kind of multiserver switching system, it is characterised in that including:
Sending module, it is for when detecting former master server inactivation from server group, then described from each from clothes in server group
Business device mutually sends timestamp;
Judge module, the timestamp for each being received from server by utilizing judge itself whether relative importance value highest, if it is,
Then as standby master server.
7. multiserver switching system according to claim 6, it is characterised in that the sending module, including:
Detection unit, fails in first threshold to receive that the former master server sends in fortune for described from server group
Signal, then judge the former master server inactivation.
8. multiserver switching system according to claim 6, it is characterised in that the judge module, including:
Timing unit, for each from server in the inscribed receipts timestamp of Second Threshold.
9. the multiserver switching system according to any one of claim 6 to 8, it is characterised in that also include:
Selecting module, for when it is multiple from server send timestamps it is the same, then can utilize static allocation set in advance
Sequentially, select as standby master server from server.
10. the multiserver switching system according to any one of claim 6 to 9, it is characterised in that also include:
Data transmission blocks, then will be described for recovering normal when the standby master server detects the former master server
Data during former master server inactivation are sent to the former master server;
Handover module, for the standby master server be changed into it is described from one in server group from server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710255938.1A CN106992890B (en) | 2017-04-18 | 2017-04-18 | Multi-server switching method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710255938.1A CN106992890B (en) | 2017-04-18 | 2017-04-18 | Multi-server switching method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106992890A true CN106992890A (en) | 2017-07-28 |
CN106992890B CN106992890B (en) | 2020-09-04 |
Family
ID=59415253
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710255938.1A Active CN106992890B (en) | 2017-04-18 | 2017-04-18 | Multi-server switching method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106992890B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109344014A (en) * | 2018-09-26 | 2019-02-15 | 新华三大数据技术有限公司 | A kind of main/standby switching method, device and communication equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1607515A (en) * | 2003-08-29 | 2005-04-20 | 国际商业机器公司 | Apparatus and method to select a captain from a plurality of control nodes |
CN101212341A (en) * | 2006-12-25 | 2008-07-02 | 中兴通讯股份有限公司 | Database system switching method |
US20120158662A1 (en) * | 2010-12-17 | 2012-06-21 | Microsoft Corporation | Backup and restore of data from any cluster node |
CN103067206A (en) * | 2012-12-28 | 2013-04-24 | 无锡博欧节能科技有限公司 | Internet of things across-machine room distributed type full automatic hot standby server switching system |
CN104901882A (en) * | 2014-03-06 | 2015-09-09 | 中国移动通信集团广东有限公司 | Method and device for switching equipment, and server |
CN105406980A (en) * | 2015-10-19 | 2016-03-16 | 浪潮(北京)电子信息产业有限公司 | Multi-node backup method and multi-node backup device |
-
2017
- 2017-04-18 CN CN201710255938.1A patent/CN106992890B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1607515A (en) * | 2003-08-29 | 2005-04-20 | 国际商业机器公司 | Apparatus and method to select a captain from a plurality of control nodes |
CN101212341A (en) * | 2006-12-25 | 2008-07-02 | 中兴通讯股份有限公司 | Database system switching method |
US20120158662A1 (en) * | 2010-12-17 | 2012-06-21 | Microsoft Corporation | Backup and restore of data from any cluster node |
CN103067206A (en) * | 2012-12-28 | 2013-04-24 | 无锡博欧节能科技有限公司 | Internet of things across-machine room distributed type full automatic hot standby server switching system |
CN104901882A (en) * | 2014-03-06 | 2015-09-09 | 中国移动通信集团广东有限公司 | Method and device for switching equipment, and server |
CN105406980A (en) * | 2015-10-19 | 2016-03-16 | 浪潮(北京)电子信息产业有限公司 | Multi-node backup method and multi-node backup device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109344014A (en) * | 2018-09-26 | 2019-02-15 | 新华三大数据技术有限公司 | A kind of main/standby switching method, device and communication equipment |
CN109344014B (en) * | 2018-09-26 | 2022-02-11 | 新华三大数据技术有限公司 | Main/standby switching method and device and communication equipment |
Also Published As
Publication number | Publication date |
---|---|
CN106992890B (en) | 2020-09-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10095576B2 (en) | Anomaly recovery method for virtual machine in distributed environment | |
US10764119B2 (en) | Link handover method for service in storage system, and storage device | |
CN103152419A (en) | High availability cluster management method for cloud computing platform | |
CN108199962B (en) | Address migration method and device, network equipment and readable storage medium | |
CN109347705B (en) | Loop detection method and device | |
CN102014012B (en) | Synchronous alarming method and device | |
CN102025562A (en) | Path detection method and device | |
CN101873223A (en) | N+M service backup mechanism based on IP switching | |
CN105677673A (en) | Business processing method, device and system | |
CN104158707A (en) | Method and device of detecting and processing brain split in cluster | |
CN103491134A (en) | Container monitoring method and device and agency service system | |
CN107517110A (en) | Veneer configuration self-recovery method and device in a kind of distributed system | |
CN104424275A (en) | Database system and data synchronization method | |
CN102647304A (en) | Synchronizing method of address resolution protocols and device | |
CN107888434B (en) | Network equipment configuration synchronization method and device | |
CN111654384A (en) | Main/standby switching method, BRAS (broadband remote Access Server) equipment and storage medium | |
CN111083049A (en) | User table item recovery method and device, electronic equipment and storage medium | |
CN102571311B (en) | Master-slave switching communication system and master-slave switching communication method | |
CN102281105A (en) | Method and device for detecting optical fiber state | |
CN106992890A (en) | A kind of multiserver switching method and system | |
CN111030871A (en) | Configuration information synchronization method and device based on dual-computer hot standby system | |
CN103414591A (en) | Method and system for fast converging when port failure is recovered | |
CN106992889A (en) | A kind of multiserver switching method and system | |
CN104038387B (en) | Line detecting method on frame-type switch business board | |
CN109219105B (en) | Route switching method and route switching system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |