CN103593266B - A kind of double hot standby method based on arbitration disk mechanism - Google Patents

A kind of double hot standby method based on arbitration disk mechanism Download PDF

Info

Publication number
CN103593266B
CN103593266B CN201310560287.9A CN201310560287A CN103593266B CN 103593266 B CN103593266 B CN 103593266B CN 201310560287 A CN201310560287 A CN 201310560287A CN 103593266 B CN103593266 B CN 103593266B
Authority
CN
China
Prior art keywords
server
arbitration
district
value
heart beating
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.)
Active
Application number
CN201310560287.9A
Other languages
Chinese (zh)
Other versions
CN103593266A (en
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.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry 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 Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201310560287.9A priority Critical patent/CN103593266B/en
Publication of CN103593266A publication Critical patent/CN103593266A/en
Application granted granted Critical
Publication of CN103593266B publication Critical patent/CN103593266B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

A kind of double hot standby method based on arbitration disk mechanism is provided, for realizing the backup between multiple server, the plurality of server is by competing the control obtained the arbitration district on memory node, the server being successfully obtained arbitration district control becomes active server, and other node becomes backup server;The timing of described active server updates heart beating value, heart beating value is read in the timing of described backup server, if described heart beating value does not change within a period of time, determining that described active server is delayed machine, described backup server competes the control to arbitration district again, it is determined that new active server。Described method can accurately judge the duty of active server, it is to avoid the generation of erroneous judgement and Schizencephaly situation, it is ensured that the seriality of service。

Description

A kind of double hot standby method based on arbitration disk mechanism
Technical field
The present invention relates to server Hot Spare technical field, be specifically related to a kind of double hot standby method based on arbitration disk mechanism。
Background technology
Server is as the node of network, the data of 80%, information on storage, process network, therefore the soul of network it is also referred to as, being a kind of high performance computer providing various services for client computer on network, also centralized calculation, information can be provided to deliver for the network user and data management etc. services。Its high-performance is mainly reflected in the aspects such as operational capability at high speed, long reliability service, powerful external data handling capacity。
In order to externally provide reliable continuous print persistent service, it is desirable to server must have reliable stability, to ensure being smoothed out of various real-time online business。The online transaction that can avoid server software or hardware fault by the mode of two-node cluster hot backup based on this and cause is interrupted, namely when a station server fault, another station server can monitor fault timely, and take over another station server service is externally provided, to reach to service unbroken requirement。
But there is more drawback in the mode of current two-node cluster hot backup, for instance can accurately not monitor another station server whether normal operation, thus the situation of erroneous judgement occurs;Another kind is Schizencephaly situation easily occur, so that server database is impaired, destroys data。
Summary of the invention
For disadvantages described above, the present invention provides a kind of double hot standby method based on arbitration disk mechanism, can be judged the duty of server accurately by the method, well avoids the generation of erroneous judgement and Schizencephaly situation;Additionally this arbitration disk mechanism will not account for too big hard drive space, only needs small part to meet。
Described method is applied in dual-machine hot backup system, and described dual-machine hot backup system includes multiple server and a memory node, and described memory node is provided with arbitration district, and described method includes:
S1: after described system electrification starts, the competition of described server obtains the control in described arbitration district, and the server being successfully obtained described arbitration district control is set to active server, and other server is set to backup server;
S2: active server timing updates the heart beating value being stored in described arbitration district, described heart beating value is read in backup server timing;
S3: if within a period of time, described backup server determines that described heart beating value is not changed in, it is determined that described active server is delayed machine, and the competition of described backup server obtains the control in described arbitration district, becomes new active server, returns step S2。
It is an advantage of the current invention that: can monitoring server node whether normal operation accurately by the present invention, and avoid some drawbacks of contention disk access power, the judgement of machine of making node is delayed is more accurate, and do not have the situation of erroneous judgement so that node can externally provide more stable service。
Accompanying drawing explanation
Fig. 1 is the Dual-Computer Hot-Standby System Organization Chart that the present invention proposes。
Fig. 2 is the flow chart of the control obtaining arbitration district that the present invention proposes。
Fig. 3 is the flow chart that heart beating value is intercepted by the backup node that the present invention proposes。
Fig. 4 is the flow chart that the backup node that the present invention proposes obtains arbitration district control。
Detailed description of the invention
In conjunction with accompanying drawing 1-4, technical scheme is described in detail。
Referring to accompanying drawing 1, whole Dual-Computer Hot-Standby System is by two-server, and a memory node composition, two-server respectively becomes NodeA and NodeB, is connected by optical fiber between two-server with memory node。Dividing one piece of disk space on memory node as arbitration district, and only allow specific process to its read-write, and data produced by real time business store other subregion, namely this subregion is only used as to arbitrate and uses, not as storage application。Arbitration region is written and read operation by active node (in NodeA and NodeB) and backup node (for another in NodeA and NodeB) timing in system, and backup node is by judging that the duty that perception active node is current is carried out in particular state position。When arbitrating district and being controlled by active node, backup node can failure to the read-write data in this district。
Wherein said arbitration district refers on memory node the one piece of subregion individually divided, and for the communication between two-server, carries out the order ground of monitor in real time reaching the duty to server。Arbitration district determines which node in two-node cluster hot backup externally provides service and the power that disk is written and read;Arbitration district safeguards data below: status, node, count。Node only obtains the control to arbitration district, just has the power to access the data field of disk, real-time transaction data is stored。
Whether wherein said status mark arbitration district has owner, just can attempt without node competing the owner becoming arbitration district, if there being owner, other nodes can only continue that this mode bit carries out opinion and ask。
Wherein said node is the mark of arbitration district owner, and namely which node currently often manages arbitration district, and then has the read-write power to whole disk。
Wherein said count is used for judging whether disk owner delays machine, and backup node can judge whether active node currently delays machine by reading the value of count。The machine if it find that active node is delayed, then backup node can obtain the arbitration district rules of competence according to competition and obtain the control authority to arbitration district。
The wherein said arbitration district control that obtains need to possess two conditions: condition one is that status does not have owner, condition two to be that backup node judges that active node is delayed machine on the basis of condition one。After possessing the two condition, backup node just can perform to obtain the flow process of arbitration district control, and then obtain the power of the read-write to data in magnetic disk district and externally provide service。
Accompanying drawing 2 illustrates that competition obtains arbitration district control flow, node read-write arbitration district data, namely the value of status is read, if this value display arbitration district does not have owner, what then write node of controlling oneself is identified to node, then the value of node is read again, check whether the value read mates with oneself mark, if coupling, continue to write to the data count to arbitration district, the value of count is again read off after writing successfully, if value when its value is with write is equal, the administrative power in this node adapter arbitration district, become active node, this active node timing afterwards updates the value of count and by the value of count as heart beating value。If any step failure of this flow process, described node all can not obtain the control in arbitration district, it is necessary to again initiates competition and obtains the flow process of arbitration district control。
Wherein said is intercept the major way of active node whether normal operation using the value of count as heart beating value, and flow process is referring to shown in accompanying drawing 3。Such as NodeA obtains the control to arbitration district, become active node, so NodeA can regularly update the value of count, inquire about the value of the value of node and count as the NodeB of backup node by timing to carry out detected event node NodeA and whether delay machine, NodeB waits to wait for a period of time after certain moment reads the value of count, go to read the value of count again, if this value changes, illustrate that NodeA is working properly。
Referring to accompanying drawing 4, if NodeB goes after waiting for a period of time read the value of count and determine that this value does not change again, then illustrating that NodeA delays machine, after repeating certain number of times, NodeB just can affirm that NodeA delays machine really。Afterwards, NodeB can initiate competition and obtain the flow process of arbitration disk control and to change the value of node be own node name。
In order to make it easy to understand, the flow process of accompanying drawing 2-4 can be summarized as follows:
First turn on competition and obtain arbitration district control flow process, after two-server NodeA and NodeB opens for the first time, will initiating competition and obtain the flow process of arbitration district control, the control of arbitration disk will be administered by wherein certain node afterwards, and this certain node just becomes active node。
Secondly, after active node adapter arbitration disk authority, service just can be externally provided, and the value updating count of timing is as heart beating value。
Again, the value of count in backup point joint moment detecting arbitration disk, if finding that within a period of time the value of count does not change, just judging that active node is delayed machine, will initiate to compete the flow process of acquisition arbitration disk control。
Finally, being just changed into active node after backup node is successfully obtained arbitration disk control externally provides service, and another node then carries out paraphasia and recovers flow process, continues the value of monitor activities node count after having recovered as backup node。So far, two node roles exchange, and namely complete once to switch, and what so can continue externally provides service without interrupting。
Certainly; the present invention also can have other various embodiments; when without departing substantially from present invention spirit and essence thereof; those of ordinary skill in the art are when can make various corresponding change and deformation according to the present invention, but these change accordingly and deform the scope of the claims that all should belong to the present invention。

Claims (5)

1. the double hot standby method based on arbitration disk mechanism, it is applied in dual-machine hot backup system, it is characterized in that: described dual-machine hot backup system includes multiple server and a memory node, described memory node is provided with arbitration district, and described method comprises the steps:
S1: after described system electrification starts, the competition of described server obtains the control in described arbitration district, and the server being successfully obtained described arbitration district control is set to active server, and other server is set to backup server;
S2: active server timing updates the heart beating value being stored in described arbitration district, described heart beating value is read in backup server timing;
S3: if within a period of time, described backup server determines that described heart beating value is not changed in, it is determined that described active server is delayed machine, and the competition of described backup server obtains the control in described arbitration district, becomes new active server, returns step S2;
Described arbitration district preserves three data fields, respectively status field, node field and count field, arbitrate whether district has owner described in described status field record, described node field record arbitration district owner mark, heart beating value described in described count field record, three data fields described in when system electrification starts are null value
Described competition obtains the control in arbitration district particularly as follows: the plurality of server reads the value of status field, if it is determined that described arbitration district is currently without owner, then the mark of this server is write node field, and then read the value of described node field, check whether the value read mates with the mark of oneself, if coupling, heart beating value is write count field, again reading off the value of count field after write, if this value is equal with the value that this server writes, the competition of this server obtains the control in arbitration district。
2. the method for claim 1, it is characterised in that:
Described step S2 is particularly as follows: the timing of described active server is by the count field in new heart beating value write arbitration district, and the heart beating value of described count field record is read in the timing of described backup server。
3. the method for claim 1, it is characterised in that:
If described in described step S3 within a period of time, described backup server determines that described heart beating value is not changed in, it is determined that described active server delay machine particularly as follows:
In certain moment, described backup server accesses described arbitration district and reads described heart beating value record, after separated in time, again access described arbitration district and read described heart beating value, compare with the heart beating value of record and determine and do not change, if all determining after repeating the certain number of times of said process, described heart beating value does not change, then described backup server determines that described active server is delayed machine。
4. method as claimed any one in claims 1 to 3, it is characterised in that:
Described memory node is additionally provided with data field, and described active server has the access limit to described data field, and described backup server lack of competence accesses described data field。
5. the method as described in any one of claims 1 to 3, it is characterised in that:
The plurality of server is connected with described memory node by optical fiber。
CN201310560287.9A 2013-11-12 2013-11-12 A kind of double hot standby method based on arbitration disk mechanism Active CN103593266B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310560287.9A CN103593266B (en) 2013-11-12 2013-11-12 A kind of double hot standby method based on arbitration disk mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310560287.9A CN103593266B (en) 2013-11-12 2013-11-12 A kind of double hot standby method based on arbitration disk mechanism

Publications (2)

Publication Number Publication Date
CN103593266A CN103593266A (en) 2014-02-19
CN103593266B true CN103593266B (en) 2016-06-22

Family

ID=50083420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310560287.9A Active CN103593266B (en) 2013-11-12 2013-11-12 A kind of double hot standby method based on arbitration disk mechanism

Country Status (1)

Country Link
CN (1) CN103593266B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104503709B (en) * 2015-01-14 2018-05-22 浪潮(北京)电子信息产业有限公司 The shared disk contention referee method and system of a kind of dual control storage array
CN105045533B (en) * 2015-07-09 2019-03-22 上海爱数信息技术股份有限公司 Magnetic disk heartbeat receiving/transmission method suitable for dual control high availability storage system
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
CN105607969A (en) * 2015-12-18 2016-05-25 深圳市金蝶友商电子商务服务有限公司 Failure period data access recovery system and method
CN106909307B (en) * 2015-12-22 2020-01-03 华为技术有限公司 Method and device for managing double-active storage array
CN105472022A (en) * 2015-12-24 2016-04-06 北京同有飞骥科技股份有限公司 Method and device for solving dual-computer cluster split brain
CN105681074B (en) * 2015-12-29 2018-11-09 北京同有飞骥科技股份有限公司 A kind of enhancing dual computer group is reliable, availability method and device
CN107066480B (en) 2016-12-20 2020-08-11 创新先进技术有限公司 Method, system and equipment for managing main and standby databases
CN108243031B (en) * 2016-12-23 2021-05-25 大唐移动通信设备有限公司 Method and device for realizing dual-computer hot standby
CN106686099A (en) * 2017-01-03 2017-05-17 杭州沃趣科技股份有限公司 Method of realizing active-active mode across machine rooms of OracleRAC database based on infiniband network
CN107147528A (en) * 2017-05-23 2017-09-08 郑州云海信息技术有限公司 One kind stores gateway intelligently anti-fissure system and method
CN107181834B (en) * 2017-06-13 2021-02-12 聚好看科技股份有限公司 Method and device for managing virtual IP address by redis and redis system
CN107255918A (en) * 2017-06-19 2017-10-17 北京航天发射技术研究所 A kind of remote control computer hot backup redundancy control method for automatically switching
CN108173684A (en) * 2017-12-26 2018-06-15 郑州云海信息技术有限公司 A kind of dual-active system and its building method
CN110442094B (en) * 2019-07-26 2021-05-07 新华三大数据技术有限公司 Distributed system arbitration method and device
CN110647427A (en) * 2019-08-30 2020-01-03 许昌许继软件技术有限公司 Main and standby system based on storage sharing and implementation method thereof
CN114844809A (en) * 2022-04-18 2022-08-02 北京凝思软件股份有限公司 Multi-factor arbitration method and device based on network heartbeat and kernel disk heartbeat
CN117493082B (en) * 2023-12-28 2024-03-15 苏州元脑智能科技有限公司 Dual-machine hot standby method, system, equipment and medium for preventing data brain cracking

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202004776U (en) * 2011-01-07 2011-10-05 北京捷世伟业电子科技有限公司 Redundant hot swapping system
CN103309774A (en) * 2013-06-24 2013-09-18 浪潮电子信息产业股份有限公司 Construction method of virtual cluster double-layer redundancy framework

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7577868B2 (en) * 2005-09-30 2009-08-18 Lockheed Martin Corporation No data loss IT disaster recovery over extended distances

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202004776U (en) * 2011-01-07 2011-10-05 北京捷世伟业电子科技有限公司 Redundant hot swapping system
CN103309774A (en) * 2013-06-24 2013-09-18 浪潮电子信息产业股份有限公司 Construction method of virtual cluster double-layer redundancy framework

Also Published As

Publication number Publication date
CN103593266A (en) 2014-02-19

Similar Documents

Publication Publication Date Title
CN103593266B (en) A kind of double hot standby method based on arbitration disk mechanism
US10621200B2 (en) Method and apparatus for maintaining replica sets
CN106598762B (en) Message synchronization method
US9201742B2 (en) Method and system of self-managing nodes of a distributed database cluster with a consensus algorithm
EP3694148A1 (en) Configuration modification method for storage cluster, storage cluster and computer system
US8055735B2 (en) Method and system for forming a cluster of networked nodes
US7440977B2 (en) Recovery method using extendible hashing-based cluster logs in shared-nothing spatial database cluster
CN101755257B (en) Managing the copying of writes from primary storages to secondary storages across different networks
US8484510B2 (en) Enhanced cluster failover management
CN104965850B (en) A kind of database high availability implementation method based on open source technology
US7693882B2 (en) Replicating data across the nodes in a cluster environment
US10366106B2 (en) Quorum-based replication of data records
CN103763155A (en) Multi-service heartbeat monitoring method for distributed type cloud storage system
US8984332B2 (en) Active/passive database management across clusters
TWI677797B (en) Management method, system and equipment of master and backup database
CN103257908A (en) Software and hardware cooperative multi-controller disk array designing method
US20180276251A1 (en) Methods and systems of database cluster formation and management
US11003550B2 (en) Methods and systems of operating a database management system DBMS in a strong consistency mode
WO2020210036A2 (en) Iot partition management and load balancing
CN106331166A (en) Access method and device of storage resource
US8074109B1 (en) Third-party voting to select a master processor within a multi-processor computer
Pankowski Consistency and availability of Data in replicated NoSQL databases
US20190251006A1 (en) Methods and systems of managing consistency and availability tradeoffs in a real-time operational dbms
US11669516B2 (en) Fault tolerance for transaction mirroring
US9582384B2 (en) Method and system for data replication

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant