CN104702693B - The processing method and node of two node system subregions - Google Patents

The processing method and node of two node system subregions Download PDF

Info

Publication number
CN104702693B
CN104702693B CN201510121396.XA CN201510121396A CN104702693B CN 104702693 B CN104702693 B CN 104702693B CN 201510121396 A CN201510121396 A CN 201510121396A CN 104702693 B CN104702693 B CN 104702693B
Authority
CN
China
Prior art keywords
node
correspondent
distributed application
message
effective
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
CN201510121396.XA
Other languages
Chinese (zh)
Other versions
CN104702693A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201510121396.XA priority Critical patent/CN104702693B/en
Publication of CN104702693A publication Critical patent/CN104702693A/en
Application granted granted Critical
Publication of CN104702693B publication Critical patent/CN104702693B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Abstract

The embodiments of the invention provide a kind of processing method and node of two node systems subregion.The node of two node systems includes Distributed Application and Correspondent, and this method includes:Determine whether node is effective when two node systems break down, send the correct response message for indicating that Distributed Application is had a quorum to Distributed Application when node is effective.The embodiment of the present invention on the node in two node systems by increasing Correspondent, with in two node system failures by Correspondent can the Distributed Application of a node have a quorum, so that the distributed system based on quorum can be used in two node systems, and can be with normal work.

Description

The processing method and node of two node system subregions
Technical field
The present invention relates to distributed system field, and more particularly, to two node system subregions processing method and Node.
Background technology
Distributed system is that multiple computers are interconnected and the coupled system of composition by communication line.One distributed system It is the set of several independent computers, but for the user of the system, whole system is just as a computer. Under the support of distributed system, the computer of interconnection can mutual co-ordination, accomplish a task jointly.In multinode In high-availability cluster, the working condition of cluster is determined using resolving strategy.Usually used resolving strategy is in computing cluster Whether active node number exceedes the half of whole clustered node sum.It can be determined between node by heartbeat network connection Whether fixed each node is active.
For the distributed system of a N node, the quorum of system is N/2+1.Usually, saved in distributed system Count out as odd number.Moreover, when distributed system interior joint number exceedes quorum, whole system can be with normal work.Institute With the distributed system based on quorum, it usually needs at least three nodes of configuration, it is legal could make it that interstitial content is more than Number.Such distributed system can also tolerate that part of nodes fails so that effective interstitial content is more than or equal to legal Number.
Distributed system based on quorum is generally not used for the situation of two nodes.If moreover, distributed system In only two nodes, then as long as there is a node failure in two nodes, whole system is due to being unable to reach quorum And can not normal work, cause two node system subregions or fissure.
The content of the invention
The embodiment of the present invention provides a kind of processing method and node of two node systems subregion, enables to be based on legal people Several distributed systems is used for two node systems and normal work.
First aspect, there is provided a kind of processing method of two node systems subregion, methods described are used to be based on quorum Two node systems, the node in two node system includes Correspondent and Distributed Application, it is characterised in that the side Method includes:When two node system breaks down, the Correspondent determines whether is node where the Correspondent Effectively;When the node where the Correspondent is effective, point of the Correspondent to the node where the Correspondent Cloth application sends the correct response message for indicating that the Distributed Application is had a quorum.
With reference in a first aspect, in a kind of implementation of first aspect, methods described also includes:When the Correspondent During the node failure at place, the Correspondent is sent to the Distributed Application indicates that the Distributed Application is not up to legal The error response message of number, or, no longer send message to the Distributed Application.
With reference to first aspect and its above-mentioned implementation, in another implementation of first aspect, methods described is also Including:The Correspondent of another node of the Correspondent into two node system sends co-ordination message;The communication Act on behalf of and do not receive another node in the first duration to from the time of the Correspondent transmission co-ordination message of another node Correspondent for the co-ordination message send when replying message, determine that two node system breaks down.
With reference to first aspect and its above-mentioned implementation, in another implementation of first aspect, two node System also includes the network equipment, and whether the node where the Correspondent determines the Correspondent effectively includes:It is described logical News agency sends test data bag to the network equipment;The Correspondent sends the test number to the network equipment During according to not receiving the response message that the network equipment is sent for the test data bag in the second duration from the time of bag, really The fixed node failure;The Correspondent to the network equipment send the test data bag at the time of the second duration When inside receiving the response message that the network equipment is sent for the test data bag, determine that the node is effective.
With reference to first aspect and its above-mentioned implementation, in another implementation of first aspect, two node System also includes the serial ports for connecting the node and another node in two node system, described in the Correspondent determines Whether the node where Correspondent effectively includes:The Correspondent is another into two node system by the serial ports One node sends detection message;The Correspondent at the time of detection message is sent to another node the 3rd when When not receiving the feedback message that another node is sent for the detection message in long, determine that the node is effective;It is described Correspondent at the time of the detection message is sent to another node receive another node pin in the 3rd duration During the feedback message sent to the detection message, according to the effective priority information of node, determine whether the node is effective.
With reference to first aspect and its above-mentioned implementation, in another implementation of first aspect, two node System also includes shared disk, and whether the node where the Correspondent determines the Correspondent effectively includes:It is described logical The Correspondent of another node of the news agency into two node system sends inspection data bag;The Correspondent is to institute Do not received for another section in the 4th duration from the time of stating the Correspondent transmission inspection data bag of another node The reply packet that the Correspondent of point is sent constantly, determines that the node is effective;The Correspondent is to another section The communication generation for another node is received from the time of the Correspondent of point sends the inspection data bag in 4th duration During the reply packet that haircut is sent, determine whether the node is effective according to the effective priority information of node.
With reference to first aspect and its above-mentioned implementation, in another implementation of first aspect, the node is also The shadow process of Distributed Application including another node in two node system, methods described also include:The communication Agency starts the shadow process of the Distributed Application of another node when the node is effective;The Distributed Application connects That receives that client sends is used to ask the request message that is handled data, and by the Correspondent to another section The shadow process of the Distributed Application of point sends the request message;The shadow process of the Distributed Application of another node connects The request message is received, and the data are handled according to the request message.
With reference to first aspect and its above-mentioned implementation, in another implementation of first aspect, methods described is also Including:When two node system does not break down, the Correspondent receives the first number that the Distributed Application is sent According to bag, and the Correspondent of another node forwards first packet into two node system;Or when described two sections When dot system does not break down, Correspondent that the Correspondent receives another node in two node system send the Two packets, and forward second packet to the Distributed Application.
With reference to first aspect and its above-mentioned implementation, in another implementation of first aspect, the node is Physical server or virtual server.
Second aspect, there is provided a kind of node, the node belong to two node systems based on quorum, and its feature exists In the node includes Distributed Application and Correspondent;The Correspondent, for being broken down when two node system When determine whether the node effective;The Correspondent, it is additionally operable to send out to the Distributed Application when the node is effective Send the correct response message for indicating that the Distributed Application is had a quorum.
With reference to second aspect, in a kind of implementation of second aspect, the Correspondent, it is additionally operable to work as the communication The mistake for indicating the Distributed Application quorum is not constituted is sent when acting on behalf of the node failure at place to the Distributed Application Response message by mistake, or, no longer send message to the Distributed Application.
With reference to second aspect and its above-mentioned implementation, in another implementation of second aspect, the communication generation Reason, the first duration being additionally operable at the time of the Correspondent of another node into two node system sends co-ordination message The Correspondent for not receiving another node inside when replying message, determines two node for co-ordination message transmission System jam.
With reference to second aspect and its above-mentioned implementation, in another implementation of second aspect, two node System also includes the network equipment;The Correspondent, at the time of test data bag is sent to the network equipment the When not receiving the response message that the network equipment is sent for the test data bag in two durations, determine that the node loses Effect;The Correspondent, it is described for receiving in the second duration at the time of test data bag is sent to the network equipment During the response message that the network equipment is sent for the test data bag, determine that the node is effective.
With reference to second aspect and its above-mentioned implementation, in another implementation of second aspect, two node System also includes the serial ports for connecting the node and another node in two node system;The Correspondent, for leading to Cross another node of the serial ports into two node system and send detection message;The Correspondent, for described Another node is not received in the 3rd duration from the time of another node sends the detection message is directed to the detection message During the feedback message of transmission, determine that the node is effective;The Correspondent, for sending the inspection to another node When the feedback message that another node is sent for the detection message is received from the time of surveying message in the 3rd duration, according to The effective priority information of node, determine whether the node is effective.
With reference to second aspect and its above-mentioned implementation, in another implementation of second aspect, two node System also includes shared disk;The Correspondent, the Correspondent for another node into two node system are sent out Packet is tested in censorship;The Correspondent, for sending the inspection data bag to the Correspondent of another node When not receiving the reply packet for the Correspondent transmission of another node from the moment in the 4th duration, the section is determined Point is effective;The Correspondent, at the time of the inspection data bag is sent to the Correspondent of another node When the reply packet of Correspondent transmission of another node is received in the 4th duration, believed according to the effective priority of node Breath determines whether the node is effective.
With reference to second aspect and its above-mentioned implementation, in another implementation of second aspect, the node is also The shadow process of Distributed Application including another node in two node system;The Correspondent, for described When node is effective, start the shadow process of the Distributed Application of another node;The Distributed Application, for receiving client The request message for being used to ask to handle data that end is sent, and point by the Correspondent to another node The shadow process of cloth application sends the request message;The shadow process of the Distributed Application of another node, for connecing The request message is received, and the data are handled according to the request message.
With reference to second aspect and its above-mentioned implementation, in another implementation of second aspect, the communication generation Reason, the first packet sent for when two node system does not break down, receiving the Distributed Application, and to institute The Correspondent for stating another node in two node systems forwards first packet;Or the Correspondent, for working as When stating two node systems and not breaking down, the second data that the Correspondent of another node in two node system is sent are received Bag, and forward second packet to the Distributed Application.
With reference to second aspect and its above-mentioned implementation, in another implementation of second aspect, the node is Physical server or virtual server.
The embodiment of the present invention on the node in two node systems by increasing Correspondent, with two node system failures When by Correspondent can the Distributed Application of a node have a quorum so that based on quorum Distributed system can be used in two node systems, and can be with normal work.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, it will make below to required in the embodiment of the present invention Accompanying drawing is briefly described, it should be apparent that, drawings described below is only some embodiments of the present invention, for For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing.
Fig. 1 is the schematic diagram for the communication system scene that can apply the embodiment of the present invention.
Fig. 2 is the indicative flowchart of the processing method of two node system subregions of one embodiment of the invention.
Fig. 3 is the schematic diagram of the processing method of two node system subregions of one embodiment of the invention.
Fig. 4 is the schematic diagram of the processing method of the two node system subregions of another embodiment of the present invention.
Fig. 5 is the block diagram of the node of one embodiment of the invention.
Fig. 6 is the block diagram of the node of another 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 describes, it is clear that described embodiment is the part of the embodiment of the present invention, rather than whole embodiments.Based on this hair Embodiment in bright, the every other reality that those of ordinary skill in the art are obtained on the premise of creative work is not made Example is applied, should all belong to the scope of protection of the invention.
Fig. 1 is the schematic diagram for the communication system scene that can apply the embodiment of the present invention.As shown in figure 1, the embodiment of the present invention Two node systems include node 1, node 2 102 and the network equipment 103.
Two node systems include two nodes.When node is server, operating system, example can be run in server Such as, the operating systems such as Windows, linux can be run, and server includes network card equipment, can be with other servers Networking.It should be understood that the node in the embodiment of the present invention can be physical server, or virtual server.The network equipment 103 can be interchanger, gateway or router.Two nodes are connected with interchanger respectively, coordinate work mutually by interchanger Make, accomplish a task jointly.In two node systems, cause node because the network between node power-off or node is broken Failure, two node systems break down, i.e. between two nodes can not normal communication, system is unable to reach quorum, causes two Node system subregion or fissure.
Each node in two node systems includes Distributed Application, when a node failure in two node systems, two Can not be by two mutual co-ordinations of Distributed Application of two nodes between individual node, each node can not also receive another The feedback information of individual node, effective interstitial content are unable to reach quorum, cause system can not normal work and occur therefore Barrier.
The embodiment of the present invention in each node by increasing Correspondent, in node failure, the communication generation of effective node Reason can send the correct response message that Distributed Application is had a quorum to corresponding Distributed Application, so that effectively Node think to have a quorum, continue executing with the Distributed Application on effective node.So, two node systems can be right Extraneous request is handled so that two node system normal works.
Fig. 2 is the indicative flowchart of the processing method of two node system subregions of one embodiment of the invention.
201, when two node systems break down, whether the node where Correspondent determines Correspondent is effective;
202, when the node where Correspondent is effective, Correspondent should to the distribution of the node where Correspondent The correct response message being had a quorum with instruction Distributed Application is sent.
The embodiment of the present invention on the node in two node systems by increasing Correspondent, with two node system failures When by Correspondent can the Distributed Application of a node have a quorum so that based on quorum Distributed system can be used in two node systems, and can be with normal work.
When node is effective, Correspondent corresponding to effective node can send instruction point to corresponding Distributed Application The correct response message that cloth application is had a quorum.When Distributed Application receives normal response message, it is believed that distributed Using having a quorum, normal work can be continued.
It should be understood that when node failure, Correspondent corresponding to failure node sends instruction to its Distributed Application should The error response message of Distributed Application quorum is not constituted.When node failure, failure node can also be to corresponding point The message whether Distributed Application has a quorum is not fed back in cloth application.When Distributed Application receive error response message or When not receiving the message whether Distributed Application has a quorum in a period of time, failure node stops its distribution should With.
In traditional highly available cluster system, increase is distributed formula application on each node of two node systems, but does not have There is increase Correspondent, node is connected with ballot disk.For two node systems, because ballot disk accounts for 1 ticket, for any one Node failure, can be to have a quorum as long as effective node is connected with disk of voting.But two node systems of this solution Unite subregion method need in two node systems configuration ballot disk, in systems configuration ballot disk it is relatively difficult to achieve, can also increase The complexity of system, also, every time request process will calculate quorum, check ballot disk and node between connection whether Normally and ping gateways operation, can so influence distributed system to the efficiency that is handled of request.
The embodiment of the present invention by increasing Correspondent on each node, in order to be broken down in two node systems When, Correspondent sends correct response message to corresponding Distributed Application, and to have a quorum, system can continue Communication.
When two node system normal works, two node systems can receive the request that extraneous client is sent, distributed Using 1 and Distributed Application 2 by interchanger and the mutual co-ordination of Correspondent, the processing work to request is completed jointly. For example, when the Distributed Application 1 in two node systems receives the request for the modification data that extraneous client is sent, in order to keep Data consistency in two nodes, for Distributed Application 1 while data in updating Distributed Application 1, Distributed Application 1 is also Message can be sent to Distributed Application 2 by Correspondent 1, interchanger and Correspondent 2, the message is used to ask distribution Above-mentioned data are also updated using 2.During updating the data, Distributed Application 1 and Distributed Application 2 are mutually coordinated, to carry out Data syn-chronization.Here, Distributed Application 1 and Distributed Application 2 perform identical modification operation to data.Correspondent is used to turn The related news of hair association reconciled data simultaneously operating.After Distributed Application 2 updates above-mentioned data success, Distributed Application 2 is logical Cross Correspondent 1 and response message is sent to Distributed Application 1 by Agent 2, to represent that Distributed Application 2 is successfully updated Above-mentioned data.Distributed Application 1 updates the success of above-mentioned data, and after receiving the response message of the transmission of Distributed Application 2, The result being updated successfully is returned to the outside client for initiating request by Distributed Application 1.
Correspondent is used for the related news for forwarding association's reconciled data simultaneously operating.For example, Correspondent 1 can be to distribution Formula sends co-ordination message using 2.For example Correspondent 1 forwards association's reconciled data same by Correspondent 2 to Distributed Application 2 Walk the related news of operation.When a period of time from Correspondent 1 to the Correspondent 2 of node 2 (for example, send co-ordination message First duration from moment) in, Distributed Application 1 does not receive replying message for co-ordination message, or receives network interface The message of the network error of return, then think that message is sent or reception failure, i.e. two node systems break down.Similarly, lead to News agency 2 can also send co-ordination message to Correspondent 1, interior when a period of time (for example, first duration), if Correspondent 2 do not receive the transmission of Correspondent 1 be directed to when replying message of co-ordination message, Correspondent program 2 can consider two node systems The network communication of system is broken down.
Do not limited it should be understood that the embodiment of the present invention breaks down to two node systems.As long as can not be just between two nodes Normal open is interrogated, and is all considered as two node systems and is broken down, such as network link failure, net card failure, node power-off etc..
When above-mentioned two node systems, two node systems of generation break down, positive normal open can not be carried out between two nodes News.At this moment, which node failure, which node are effective when determining, to cause effective node to continue using Correspondent The process of Distributed Application is maintained, and stops Distributed Application corresponding to invalid node.
Alternatively, the procotol of the ping network equipments can be passed through as one embodiment of the present of invention, Correspondent The method of (Internet Protocol, IP) address (for example, the IP address of interchanger or IP address of gateway) determines which is saved Point failure, which node are effective.Order ping is exactly that Correspondent sends test data bag, test to the IP address of the network equipment Whether the IP address has response, and counting response time, with response message come the connection status of test network.
The network equipment can be interchanger, router or gateway etc..Below example is carried out so that the network equipment is gateway as an example Property explanation.The address of Correspondent ping interchangers in one node can be:Correspondent calls ping orders generation one Individual ICMP (Internet Control Message Protocol, ICMP) packet, i.e. test data Bag, and the test data bag is sent to interchanger by the network interface card of node where server.Checked and accepted when in regular hour internal segment To interchanger response message when, represent that the node can lead to the interchanger with ping, the node is considered as effectively;When certain In when not receiving the response message of the interchanger, represent that the node is unable to ping and leads to the interchanger, the node is considered as failure. Node failure is probably caused by the network link between net card failure or interchanger and node breaks down.
The embodiment of the present invention can carry out the ping network equipments with Correspondent 1, can also be by Correspondent 2 come ping networks Equipment, to determine whether node is effective.For example, Correspondent 1 can send test data bag to the network equipment.In Correspondent 1 sends test data bag for a period of time in (for example, second duration) to the network equipment, when Correspondent 1 receives network equipment hair Send for above-mentioned test data bag response message when, node can be defined as effective node by Correspondent 1, by node 2 It is defined as failure node.Node 1 can also be defined as to failure node, node 2 is defined as effective node.Here, only pass through The ping network equipments are effective to determine which node, which node failure, are not that the ability of the logical interchangers of only ping is effective.Cause Distributed Application is continued to for, effective node, and failure node no longer maintains Distributed Application, the work after the system failure Work can't use the network equipment.In addition, Correspondent 2 can also determine effective node and failure by the ping network equipments Node.For example, Correspondent 2 can send test data bag to the network equipment.Send and test to the network equipment in Correspondent 2 Packet in (for example, second duration), when Correspondent 2 receives the response message of network equipment transmission, communicates for a period of time Node 2 can be defined as effective node by agency 2, and node 1 is defined as into failure node.Similarly, now can also be true by node 2 It is set to failure node, node 1 is defined as effective node.
It should be understood that the network equipment in the embodiment of the present invention can be with interchanger, router, gateway etc..The embodiment of the present invention This is not limited.
It should be understood that the embodiment of the present invention determines whether node is effective by the IP address of the ping network equipments, Ke Yishi The node for being capable of ping open network equipment is defined as effective node, another node is invalid node.Can also can not The node of ping open network equipment is defined as effective node, and another node is invalid node.The embodiment of the present invention to this not Limit.As long as can determine which node is effective, to continue to Distributed Application corresponding to the node.Also, which determines Individual node is invalid, to stop Distributed Application corresponding to invalid node.
Alternatively, it can be connected and be communicated by serial ports as one embodiment of the present of invention, between two nodes, communicated Agency can determine effective node and failure node by ping serial ports.Substantially only processing is single in highly available cluster system Point failure, it is exactly that synchronization considers that only a kind of failure occurs, does not consider network failure and hardware fault while occur.Because Serial Port Line, which interrupts, does not interfere with the continuation normal operation of distributed system, that is to say, that when distributed system works and without using Serial ports is communicated, and Serial Port Line interrupts and will not detect to obtain two node system failures.So when two node systems break down When, Serial Port Line failure is not considered.
When Correspondent forwarding co-ordination message does not receive feedback message after for a period of time, it is believed that forwarding co-ordination message is lost Lose.At this moment, Correspondent can determine that the Distributed Application of which node continues executing with by ping serial ports, which node Distributed Application is out of service.Specifically, the whether effective priority letter of a node can be selected in advance in two nodes Breath.Priority information is that Correspondent is formulated, and the priority information is determined for whether node continues executing with distribution The priority order of application.Alternatively, priority information can be preset, can also be dynamically true according to the performance of server It is fixed, dynamically it can also be determined according to the busy-idle condition of server.
Examined for example, Correspondent 1 can be sent by another node (for example, node 2) of the serial ports into two node systems Survey message.Detection message is sent for a period of time in (for example, the 3rd duration), when Correspondent 1 does not receive node in Correspondent 1 2 for above-mentioned detection message send feedback message when, determine that node 2 fails., can when Correspondent 1 determines that node 2 fails To determine that node 1 is effective.Detection message is sent for a period of time in (for example, the 3rd duration), when Correspondent 1 in Correspondent 1 When receiving the feedback message of node 2, according to priority information, it may be determined that effective node and failure node.
Similarly, Correspondent 2 can also determine the effective node and failure node in two node systems.Comprise the concrete steps that logical News agency 2 sends detection message by serial ports to node 1.Detection message is sent for a period of time (for example, the 3rd in Correspondent 2 Duration) in, when Correspondent 2 does not receive the feedback message of node 1, determine that node 1 fails., can be true when node 1 fails It is effective to determine node 2.Detection message is sent for a period of time in (for example, the 3rd duration), when Correspondent 2 receives in Correspondent 2 During the feedback message of node 1, according to priority information, it may be determined that effective node and failure node.
How lower mask body introduction determines which node is effective, and which node is invalid.Correspondent can by serial ports to Another node sends a message (such as message ping), is not received after Correspondent sends message for a period of time by serial ports During feedback message, it is believed that Correspondent Node is no longer valid (for example, Correspondent Node power-off), i.e., Correspondent Node is invalid, and sends Node is effective corresponding to message.Now, it is not necessary to effective node and invalid node are determined with reference to priority information.However, work as When Correspondent receives feedback message afterwards for a period of time by serial ports transmission message, it is believed that Correspondent Node survival is (for example, other side saves Point does not power off), while the node for sending message end is also survival.For example Correspondent corresponding to Correspondent Node can receive The message ping of transmission, while respond a feedback message (such as message pong).During due to two node system failures, so two A node is needed in individual node to be stopped.At this moment it can determine that effective node and failure save according to precedence information Point.Correspondent in precedence information corresponding to the node of high priority can send a message to the node of low priority (such as message stop), to require that the node of low priority does not continue to perform Distributed Application.The node of high priority continues Distributed Application corresponding to execution.Here, the node of high priority thinks effective, and the node of low priority is thought to fail.
Alternatively, as one embodiment of the present of invention, when two node systems also include shared disk, ping can be passed through Which node failure is the method for shared disk determine, which node is effective.
When Correspondent forwarding co-ordination message does not receive feedback message after for a period of time, it is believed that forwarding co-ordination message is lost Lose.At this moment, Correspondent can determine that the Distributed Application of which node continues executing with by ping shared disks, which section The Distributed Application of point is out of service.Specifically, the whether effective priority of one node of selection is believed in advance in two nodes Breath.Priority information is used to determine whether node continues executing with the priority order of Distributed Application.Alternatively, priority information Can preset, also dynamically according to the performance of server determine, can also dynamically according to the busy-idle condition of server come It is determined that.
For example, Correspondent 1 determines that effective node and failure node in two node systems can determine that two nodes are No effective priority information.Inspection data bag can be write shared disk by Correspondent 1.When Correspondent is from by check number Do not receive in the 4th duration from the time of writing the shared disk according to bag and when replying message, lead to for the transmission of inspection data bag News agency can determine that node 1 is effective, and node 2 fails.When Correspondent by inspection data bag from when writing shared disk Carve and received in the 4th duration for the transmission of inspection data bag when replying message, Correspondent can be effectively excellent according to node First power information determines whether node is effective.For example, can whether effective according to the busy-idle condition decision node of node.As an example Son, node 1 are in not busy state, then it is considered that node 1 is effective, node 2 fails.
Correspondent 1 can send inspection data bag to Correspondent 2, and after a period of time, Correspondent 1 does not receive logical News agency 2 reply for inspection data bag reply packet when, it is believed that node 2 fails, and node 1 is effective.Conversely, then can be with Think that node 2 is effective, node 1 fails.Specifically, Correspondent 1 can send inspection data bag to Correspondent 2.That is, communicate Agency 1 writes inspection data bag in shared disk, and wherein inspection data bag can be that Correspondent 1 is used for ping shared disks Packet.Correspondent 2 can read the inspection data bag from shared disk, i.e. Correspondent 2 receives inspection data bag. Correspondent 2 sends back complex data bag according to the inspection data bag of reading to Correspondent 1.I.e. Correspondent 2 will reply data In bag write-in shared disk, Correspondent 1 can read the reply packet, when Correspondent reads the reply packet, Think that Correspondent 1 receives reply packet.When system does not break down, Correspondent 1 can receive Correspondent 2 and send out The reply packet sent, i.e. Correspondent 1 can be read from shared disk replys packet.When system jam, such as Fruit Correspondent 1 can receive the reply packet of the transmission of Correspondent 2, at this moment think that node 2 can survive, node 1 also may be used With survival, two nodes are not all powered off, it is necessary to determine which node is effective according to the whether effective priority information of node, and which is saved Point failure.For example, when the performance of node 1 is higher than node 2, node 1 can be selected effective, node 2 fails.When event occurs for system During barrier, if Correspondent 1 can not receive the reply packet of the transmission of Correspondent 2, at this moment think that node 2 powers off, then node 2 Failure, node 1 are effective.
It should be understood that when system jam, if by ping shared disks, Correspondent 1 can receive communication generation The reply packet that reason 2 is sent, then according to Single Point of Faliure principle, the system failure is network failure here.
Similarly, Correspondent 2 can also send inspection data bag to Correspondent 2, to determine which node is effective, which Node failure.Correspondent 2 determines the specific method of effective node and failure node and the determination method class of above-mentioned Correspondent 1 Seemingly, will not be repeated here.
Duration (for example, the first duration, the second duration, the 3rd duration and the 4th duration) in the embodiment of the present invention can be Preset value, can also dynamically it set, the embodiment of the present invention is not limited this.
When two node systems do not break down, Correspondent 1 can pass through the network equipment and the Correspondent 2 of node 2 Packet is forwarded to the Distributed Application 2 of the node 2.Similarly, Correspondent 2 can also pass through the network equipment and node 1 Correspondent 1 forwards packet to the Distributed Application 1 of the node 1.When two node systems do not break down, Correspondent 1 and Correspondent 2 data can be forwarded.
With reference to the Principle of Communication and communication process before and after Fig. 3 and Fig. 4 two node system failures of detailed description.
Fig. 3 is the schematic diagram of the processing method of two node system subregions of one embodiment of the invention.Two nodes in Fig. 3 System includes node 1 (301), node 2 (302) and interchanger (303).Wherein, node 1 includes Distributed Application 1 (304) and led to 1 (305) of news agency, node 2 include Distributed Application 2 (306) and Correspondent 2 (307).
The embodiment of the present invention on the node in two node systems by increasing Correspondent, with two node system failures When by Correspondent can the Distributed Application of a node have a quorum so that based on quorum Distributed system can be used in two node systems, and can be with normal work.
It should be understood that the embodiment of the present invention is not limited the network equipment, net of the embodiment of the present invention only between two nodes Network equipment is illustrative exemplified by interchanger.
The embodiment of the present invention does not change the logic of realizing of distributed application program, but will be divided by increasing Correspondent Cloth system is applied to two node systems and causes two node systems to handle the extraneous request sent with normal work.
When two node systems do not break down, the first packet of Correspondent reception Distributed Application transmission, and to The Correspondent of another node forwards first packet in two node systems.Or when two node systems do not break down, Correspondent receives the second packet that the Correspondent of another node in two node systems is sent, and is forwarded to Distributed Application Second packet.That is, when two node systems do not break down, Correspondent is used for point of node where forwarding Correspondent Cloth applies the packet between another Correspondent.
Specifically, when two node systems do not break down, i.e., normal work when, two node systems can receive extraneous client The request sent, Distributed Application 1 and Distributed Application 2 are held by interchanger and the mutual co-ordination of Correspondent, it is common complete The processing work asked in pairs.For example, the Distributed Application 1 in two node systems receives the modification number that extraneous client is sent According to request when, in order to keep the data consistency in two nodes, the data in Distributed Application 1 is updated of Distributed Application 1 While, Distributed Application 1 can also send message by Correspondent 1, interchanger and Correspondent 2 to Distributed Application 2, The message is used to ask Distributed Application 2 also to update above-mentioned data.During updating the data, Distributed Application 1 and distribution It is mutually coordinated using 2, to carry out data syn-chronization.Correspondent is used for the related news for forwarding association's reconciled data simultaneously operating. After Distributed Application 2 updates the success of above-mentioned data, Distributed Application 2 is by Correspondent 1 and by Agent 2 to distribution Response message is sent using 1, to represent that Distributed Application 2 is successfully updated above-mentioned data.Distributed Application 1 update above-mentioned data into Work(, and receive Distributed Application 2 transmission response message after, Distributed Application 1 returns to the result being updated successfully Initiate the client of request in outside.
When two node system failures, Correspondent forwarding co-ordination message failure, i.e. forwarding association reconciled data simultaneously operating Message failure when, whether Correspondent can be effectively judged node.Correspondent can pass through the ping network equipments IP address (for example, the address of interchanger or address of router) determine whether this node effective, and another node It is whether effective.Alternatively, when two node systems break down, Correspondent can determine effective node by ping serial ports And failure node.Alternatively, when two node systems break down, Correspondent can have been determined by ping shared disks Imitate node and failure node.It is determined which node is effective, after which node is invalid, the nullified node of whole system stops work Make, and make it that effective node continues to the normal work of system, receive extraneous request, and at the request to outside Reason.
Two node systems, which break down, can include network medium interruption, net card failure, node power-off etc..The present invention is implemented Example is not construed as limiting to this.
Specifically, when Correspondent determines that node 1 is effective, when node 2 fails, Correspondent 1 can act on behalf of 2 with analog communication Responded to Distributed Application 1.When Distributed Application 1 receives the correct response message that Distributed Application has a quorum When, Distributed Application 1 thinks that node 2, so as to maintain normal quorum, can continue executing with section with normal work The Distributed Application 1 of point 1.And now, the Distributed Application 2 on node 2 is stopped due to not enough quorums.
When Correspondent determines that node 2 fails, Correspondent 2 can not respond within a period of time, represent node 2 Failure, it is impossible to continue normal work.Or when Correspondent determines that node 2 fails, Correspondent 2 is sent out to Distributed Application 2 Send the error response message of quorum is not constituted.When Distributed Application 2 receives the error response message of the transmission of Correspondent 2, It can learn that Distributed Application formula program 2 is not reaching to quorum, the cisco unity malfunction of node 2, i.e. Distributed Application 2 stop Work.
Continue normal work in Distributed Application 1, and when Distributed Application 2 is stopped, Distributed Application 1 can receive The request that data are handled that the external world is sent, and data are handled according to request.Now, as long as the energy of Correspondent 1 Enough ensure that Distributed Application 1 thinks to have a quorum, can be with normal work.At Distributed Application 1 is to request After the completion of reason, result is returned to the client for sending request.
When two node systems include multiple switch, the Correspondent on node can communicate generation by ping itself Reason and the IP address of each interchanger, so as to which whether decision node is effective.Effective node is selected to carry out normal work, and nothing The node of effect is stopped.
After two node system failures, the role of Correspondent 1 is that simulation distribution formula is sent out using 2 to Distributed Application 1 It is delivered to the correct response message of quorum.This just need Correspondent understand completely distributed system quorum it is consistent Property agreement, when system receives different requests, Correspondent 1 can with simulation distribution formula using 2 pairs request make correctly Response.
Embodiments of the invention go for the fairly simple feelings of consistency protocol of the quorum of distributed system Condition.Such as:Consistency protocol between Distributed Application is only a kind of this protocol message of synchrodata.When Distributed Application 1 After receiving the request that client is modified to data, Distributed Application 1 updates the data of oneself first, and handle enters to data The request of row modification is sent to Distributed Application 2.After Distributed Application 2 receives request, also data of synchronized update oneself, and to Distributed Application 1 sends and replied message.Replying message here represents that Distributed Application 2 has also synchronously completed data are repaiied Change.After Distributed Application 1, which receives, to be replied message, it is believed that Distributed Application 2 has synchronously completed the modification to data, at this moment, Distributed Application 1 can return to successfully modified response message to the client for request of initiating to modify to data.This Under simple scenario, if Correspondent 1 forward data when find retransmission failure, and judge Correspondent Node failure after, can reply The confirmation message of Distributed Application 1 is given, such Distributed Application 1 thinks the synchronized success of Distributed Application 2, can return and repair Change successful response message to client.
It should be understood that embodiments of the invention are effective with node 1, node 2 is illustrative exemplified by failing, but the present invention It is not limited to this.Embodiments of the invention may also testing result be that node 1 is invalid, node 2 is effective, and system is to such case Processing and node 1 it is effective, node 2 fails similar, no longer describes in detail herein.
Fig. 4 is the schematic diagram of the processing method of the two node system subregions of another embodiment of the present invention.Two nodes in Fig. 4 System includes node 1 (401), node 2 (402) and interchanger (403).Wherein, node 1 includes Distributed Application 1 (404), led to News 1 (405) of agency and the shadow process (406) of Distributed Application 2, node 2 include Distributed Application 2 (407), Correspondent 2 (408) and Distributed Application 1 shadow process (409).
The embodiment of the present invention on the node in two node systems by increasing Correspondent, with two node system failures When by Correspondent can the Distributed Application of a node have a quorum so that based on quorum Distributed system can be used in two node systems, and can be with normal work.
When two node system normal works, two node systems can receive the request that extraneous client is sent, distributed Using 1 and Distributed Application 2 by interchanger and the mutual co-ordination of Correspondent, the processing work to request is completed jointly. For example, when the Distributed Application 1 in two node systems receives the request for the modification data that extraneous client is sent, in order to keep Data consistency in two nodes, for Distributed Application 1 while data in updating Distributed Application 1, Distributed Application 1 is also Message can be sent to Distributed Application 2 by Correspondent 1, interchanger and Correspondent 2, the message is used to ask distribution Above-mentioned data are also updated using 2.During updating the data, Distributed Application 1 and Distributed Application 2 are mutually coordinated, to carry out Data syn-chronization.Correspondent is used for the related news for forwarding association's reconciled data simultaneously operating.Above-mentioned number is updated in Distributed Application 2 After success, Distributed Application 2 sends response message by Correspondent 1 and by Agent 2 to Distributed Application 1, with Represent that Distributed Application 2 is successfully updated above-mentioned data.Distributed Application 1 updates above-mentioned data success, and receives distribution After 2 response messages sent, the result being updated successfully is returned to the outside client for initiating request by Distributed Application 1 End.
When two node system failures, can by the modes such as ping interchangers, ping serial ports or ping shared disks come Determine which node is effective, which node failure.When node 1 is effective, during node failure, Distributed Application 1 can continue normally Work, and Distributed Application 2 is stopped.Distributed Application 1 continues normal work, and when Distributed Application 2 is stopped, lead to The shadow process of news agency 1 and Distributed Application 2, which is established, to be connected, and has been turned on the shadow process of Distributed Application 2.
Distributed Application 1 can receive the request handled data of extraneous transmission, and data are entered according to request Row processing.Now, Correspondent 1 is required to ensure that Distributed Application 1 thinks to have a quorum, it is also necessary to establishes distributed Using the connection between 1 and the shadow process of Distributed Application 2, data are forwarded between.In this case, divide Cloth can be with co-ordination using the shadow process of 1 and Distributed Application 2, and the request to extraneous client is handled.Distribution Formula can simulate the work for performing Distributed Application 2 using 2 shadow process, but shadow process cannot be received from extraneous visitor The request that family end is sent, can receive request or the packet of the forwarding of Correspondent 1, and request is handled.Distribution should Two node systems are formed with the shadow process of 1 and Distributed Application 2, to maintain the normal work of system.Distributed Application 1 Coordinated with the shadow process of Distributed Application 2 by Correspondent 1 after completing the request to extraneous client, Distributed Application 1 Result can be returned to the client for sending request.
Embodiments of the invention go for the more complicated feelings of consistency protocol of the quorum of distributed system Condition.The consistency protocol of some Distributed Applications is more complicated.For example, 16 kinds of different types of numbers are shared in Distributed Application According to the more new logic of these data is more complicated.When Distributed Application 1, which receives request, needs to update a certain data, Renewal operation is divided into 5 steps again, and each step Distributed Application is required for being confirmed whether to update with other nodes, so Each step is required for sending different message to other nodes.When any step during renewal operates goes wrong, renewal Operation can not just continue, and after the completion of all steps, Distributed Application 1 also needs to the data after renewal to be sent to other sections Put to carry out data syn-chronization.There are a variety of message formats between this Distributed Application, and the difference of a renewal operation disappears Also relevant between breath, i.e., the message of later step needs to be generated according to the message of previous step.Distributed Application This implementation is difficult to simulate with Correspondent, so, in this case, it is easier with the shadow of Distributed Application real It is existing.
Above Fig. 2 to Fig. 4, two node systems that are used for according to embodiments of the present invention are described in detail from node angle and divide The processing method in area, node according to embodiments of the present invention is described in detail below in conjunction with Fig. 5 and Fig. 6.
Fig. 5 is the block diagram of the node of one embodiment of the invention.Fig. 5 node 50 includes Distributed Application 51 and communication generation Reason 52.Node 50 is the node in two node systems based on quorum.
Correspondent 52 is used to determine whether node is effective when two node systems break down, and is additionally operable to when node is effective When to Distributed Application 51 send the correct response message had a quorum of instruction Distributed Application.
The embodiment of the present invention on the node in two node systems by increasing Correspondent, with two node system failures When by Correspondent can the Distributed Application of a node have a quorum so that based on quorum Distributed system can be used in two node systems, and can be with normal work.
Alternatively, as one embodiment of the present of invention, Correspondent is additionally operable to work as the node failure where Correspondent When the error response message of the Distributed Application quorum is not constituted is sent to Distributed Application instruction, or, no Again message is sent to the Distributed Application.
Alternatively, as one embodiment of the present of invention, the Correspondent is additionally operable to from another into two node systems The Correspondent of another node is not received from the time of the Correspondent of one node sends co-ordination message in first duration for association When replying message of message transmission is adjusted, determines that two node systems break down.
Alternatively, the network equipment is also included as one embodiment of the present of invention, two node systems.Correspondent, it is used for The network equipment is not received in the second duration at the time of test data bag is sent to the network equipment is directed to the test data bag During the response message of transmission, the node failure is determined.Correspondent, for the network equipment send test data bag when Carved received in the second duration the network equipment for test data bag send response message when, determine that node is effective.
Alternatively, as one embodiment of the present of invention, two node systems also include connecting the node and described two sections The serial ports of another node in dot system.Correspondent, for being sent out by another node of the serial ports into two node system Message is surveyed in censorship.Another section is not received in the 3rd duration Correspondent is used at the time of detection message is sent to another node During the feedback message that point is sent for detection message, determine that node is effective.Correspondent, for sending detection to another node It is effective according to node when receiving the feedback message that another node is sent for detection message from the time of message in the 3rd duration Priority information, determine whether node is effective.
Alternatively, shared disk is also included as one embodiment of the present of invention, institute's node system.Correspondent is used for will Inspection data bag writes shared disk.Correspondent is used to send out from the Correspondent of another node into two node system The reply data of the Correspondent transmission for another node are not received from the time of packet is tested in censorship in 4th duration Bag constantly, determines that node is effective.The Correspondent be used for another node Correspondent send inspection data bag when Carved received in the 4th duration for another node Correspondent transmission reply packet constantly, it is effective according to node Priority information determine whether node effective.
Alternatively, another node in two node system is also included as one embodiment of the present of invention, node The shadow process of Distributed Application.Correspondent is used for when node is effective, starts the shadow of the Distributed Application of another node Process.The Distributed Application is used for the request message for being used to ask to handle data that client is sent, and by logical News agency sends request message to the shadow process for the Distributed Application for stating another node.The shadow of the Distributed Application of another node Subprocess is used to receive request message, and data are handled according to request message.
Alternatively, as one embodiment of the present of invention, the Correspondent is used for when two node systems do not break down When, the first packet that Distributed Application is sent is received, and the Correspondent of another node forwards first into two node systems Packet.Or Correspondent is used for when two node systems do not break down, another node is logical in two node systems of reception The second packet that news agency sends, and forward the second packet to Distributed Application.
Turned by the Correspondent of the network equipment and another node of two node systems to the Distributed Application of another node Send out packet.
Alternatively, as one embodiment of the present of invention, node is physical server or virtual server.
Fig. 5 node 50 can perform each flow of the method shown in Fig. 2, Fig. 3 and Fig. 4, to avoid repeating, herein not It is described in detail again.
Fig. 6 is the block diagram of the node of another embodiment of the present invention.Node 60 in Fig. 6 include emitter 61, receiver 62, Processor 63 and memory 64.Each component of node 60 is coupled by bus system 65.
Memory 64 is used for store instruction, and processor 63 is used for the instruction and data for performing the memory 64 storage.Storage The a part of of device 64 can also include non-volatile row random access memory (NVRAM, Non-Volatile Random Access Memory).Each component of device is coupled by bus system 65, wherein bus system 65 except include data/address bus it Outside, in addition to power bus, controlling bus and status signal bus in addition.But for the sake of clear explanation, will be various total in figure Line is all designated as bus system 65.
The method that the embodiments of the present invention disclose can apply in processor 63, or be realized by processor 63. In implementation process, each step of the above method can pass through the integrated logic circuit or software form of the hardware in processor 51 Instruction complete.Processor 63 can be general processor, digital signal processor, application specific integrated circuit, field programmable gate Array either other PLDs, discrete gate or transistor logic, discrete hardware components, it is possible to achieve or Perform disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor can be microprocessor or Any conventional processor etc..The step of method with reference to disclosed in the embodiment of the present invention, can be embodied directly in hardware processor Completion is performed, or completion is performed with the hardware in processor and software module combination.Software module can be located at random storage Device, flash memory, read-only storage, this area such as programmable read only memory or electrically erasable programmable memory, register into In ripe storage medium.The storage medium is located at memory 64, and processor 63 reads the information in memory 64, with reference to its hardware The step of completing the above method.
Specifically, processor 63 can be used for determining whether place node is effective when two node systems break down, and For just should indeed when place node is effective to what corresponding Distributed Application transmission instruction Distributed Application was had a quorum Answer message.
The embodiment of the present invention on the node in two node systems by increasing Correspondent, with two node system failures When by Correspondent can the Distributed Application of a node have a quorum so that based on quorum Distributed system can be used in two node systems, and can be with normal work.
Alternatively, it is used for as one embodiment of the present of invention, emitter 61 when the node failure where Correspondent The error response message of instruction Distributed Application quorum is not constituted is sent to Distributed Application, or no longer to the distribution Formula application sends message.
Alternatively, it is used for as one embodiment of the present of invention, processor 63 from another node into two node systems Correspondent at the time of send co-ordination message from the Correspondent of another node do not received in the first duration be directed to co-ordination message When replying message of transmission, determines that two node systems break down.
Alternatively, as one embodiment of the present of invention, two node systems also include the network equipment, processor 63 be used for from The network equipment is not received from the time of sending test data bag to the network equipment in second duration to send out for the test data bag During the response message sent, the node failure is determined.Processor 63 be additionally operable to the network equipment send test data bag when Carved received in the second duration the network equipment for the test data bag send response message when, determine that node is effective.
Alternatively, as one embodiment of the present of invention, two node systems include connecting the node and two node The serial ports of another node in system, emitter 61 are used to send inspection by another node of the serial ports into two node systems Survey message.Another section is not received in the 3rd duration processor 63 is used at the time of detection message is sent to another node During the feedback message that point is sent for detection message, determine that node is effective.Processor 63 is additionally operable to send inspection to another node It is effective according to node when receiving the feedback message that another node is sent for detection message from the time of surveying message in the 3rd duration Priority information, determine whether node effective.
Alternatively, as one embodiment of the present of invention, two node systems include shared disk, and emitter 61 is used for institute The Correspondent for stating another node in two node systems sends inspection data bag.Processor 63 is used for another node Correspondent at the time of send the inspection data bag from communication generation for another node is not received in the 4th duration During the reply packet that haircut is sent, determine that node is effective.Processor 63 is additionally operable to from the Correspondent hair to another node The reply number of the Correspondent transmission for another node is received from sending at the time of the inspection data bag in 4th duration During according to bag, determine whether the node is effective according to the effective priority information of node.
Alternatively, the distribution of another node in two node systems is also included as one embodiment of the present of invention, node The shadow process of formula application, processor 63 are used for when the node is effective, start the Distributed Application of another node Shadow process.Receiver 62 is used for the request message for being used to ask to handle data for receiving client transmission, emitter 61 are used to send request message to the shadow process of the Distributed Application of another node by Correspondent.Receiver 62 is additionally operable to Request message is received, and processor 63 is additionally operable to the data be handled according to the request message.
Alternatively, it is used for when two node systems do not break down, connects as one embodiment of the present of invention, receiver 62 The first packet that Distributed Application is sent is received, emitter 61 is used for the Correspondent forwarding of another node into two node systems First packet.Or receiver 62 is used for when two node systems do not break down, Correspondent is received in two node systems The second packet that the Correspondent of another node is sent, emitter 61 are used to forward the second packet to Distributed Application.
Turned by the Correspondent of the network equipment and another node of two node systems to the Distributed Application of another node Send out packet.
Fig. 6 node 60 can perform each flow of the method shown in Fig. 2, Fig. 3 and Fig. 4, to avoid repeating, herein not It is described in detail again.
It should be understood that the network equipment in the embodiment of the present invention can be interchanger, gateway or router etc., the present invention is to this Do not limit.
Node in the embodiment of the present invention can be server.Server can be physical server, or virtual Server.The embodiment of the present invention is not limited this.
It should be understood that " one embodiment " or " embodiment " that specification is mentioned in the whole text mean it is relevant with embodiment During special characteristic, structure or characteristic are included at least one embodiment of the present invention.Therefore, occur everywhere in entire disclosure " in one embodiment " or " in one embodiment " identical embodiment is not necessarily referred to.In addition, these specific feature, knots Structure or characteristic can combine in one or more embodiments in any suitable manner.
It should be understood that in various embodiments of the present invention, the size of the sequence number of above-mentioned each process is not meant to perform suitable The priority of sequence, the execution sequence of each process should be determined with its function and internal logic, without the implementation of the reply embodiment of the present invention Process forms any restriction.
It should be understood that in embodiments of the present invention, " B " corresponding with A represents that B is associated with A, and B can be determined according to A.But It should also be understood that determining that B is not meant to determine B only according to A according to A, B can also be determined according to A and/or other information.
It should be understood that the terms "and/or", only a kind of incidence relation for describing affiliated partner, expression can deposit In three kinds of relations, for example, A and/or B, can be represented:Individualism A, while A and B be present, these three situations of individualism B. In addition, character "/" herein, it is a kind of relation of "or" to typically represent forward-backward correlation object.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.
Those of ordinary skill in the art with reference to each method described in the embodiments described herein it is to be appreciated that walk Rapid and unit, it can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware and soft The interchangeability of part, the step of generally describing each embodiment according to function in the above description and composition.These Function is performed with hardware or software mode actually, application-specific and design constraint depending on technical scheme.Ability Domain those of ordinary skill can realize described function using distinct methods to each specific application, but this reality Now it is not considered that beyond the scope of this invention.
The method or step described with reference to the embodiments described herein can use hardware, the software journey of computing device Sequence, or the two combination are implemented.Software program can be placed in random access memory (RAM), internal memory, read-only storage (ROM), Institute is public in electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field In any other form of storage medium known.
Although by reference to the mode of accompanying drawing and combination preferred embodiment to the present invention have been described in detail, the present invention It is not limited to this.Without departing from the spirit and substance of the premise in the present invention, those of ordinary skill in the art can be to the present invention Embodiment carry out various equivalent modifications or substitutions, and these modifications or substitutions all should be in the covering scope of the present invention.

Claims (18)

1. a kind of processing method of two node systems subregion, methods described is used for two node systems based on quorum, described Node in two node systems includes Correspondent and Distributed Application, it is characterised in that methods described includes:
When two node system breaks down, whether the node where the Correspondent determines the Correspondent has Effect;
When the node where the Correspondent is effective, distribution of the Correspondent to the node where the Correspondent Formula application sends the correct response message for indicating that the Distributed Application is had a quorum.
2. the method as described in claim 1, it is characterised in that methods described also includes:
When the node failure where the Correspondent, the Correspondent sends described point of instruction to the Distributed Application The error response message of cloth application quorum is not constituted no longer sends message to the Distributed Application.
3. method as claimed in claim 1 or 2, it is characterised in that methods described also includes:
The Correspondent of another node of the Correspondent into two node system sends co-ordination message;
The Correspondent to the Correspondent of another node send co-ordination message at the time of from do not receive in the first duration The Correspondent of another node when replying message, determines that two node system occurs for co-ordination message transmission Failure.
4. method as claimed in claim 1 or 2, it is characterised in that two node system also includes the network equipment, described logical Whether the node where news agency determines the Correspondent effectively includes:
The Correspondent sends test data bag to the network equipment;
The Correspondent at the time of test data bag is sent to the network equipment do not receive institute in the second duration When stating the response message that the network equipment is sent for the test data bag, the node failure is determined;
The Correspondent at the time of test data bag is sent to the network equipment receive in the second duration it is described During the response message that the network equipment is sent for the test data bag, determine that the node is effective.
5. method as claimed in claim 1 or 2, it is characterised in that two node system also include connecting the node with Whether the serial ports of another node in two node system, the node where the Correspondent determines the Correspondent have Effect includes:
The Correspondent sends detection message by the serial ports to another node;
The Correspondent at the time of detection message is sent to another node do not receive in the 3rd duration it is described During the feedback message that another node is sent for the detection message, determine that the node is effective;
The Correspondent at the time of detection message is sent to another node receive in the 3rd duration it is described another During the feedback message that one node is sent for the detection message, according to the effective priority information of node, the node is determined It is whether effective.
6. method as claimed in claim 1 or 2, it is characterised in that two node system also includes shared disk, described logical Whether the node where news agency determines the Correspondent effectively includes:
The Correspondent of another node of the Correspondent into two node system sends inspection data bag;
The Correspondent to another node Correspondent send the inspection data bag at the time of the 4th duration When not receiving the reply packet for the Correspondent transmission of another node inside, determine that the node is effective;
The Correspondent to another node Correspondent send the inspection data bag at the time of the 4th duration It is true according to the effective priority information of node when inside receiving the reply packet for the Correspondent transmission of another node Whether the fixed node is effective.
7. method as claimed in claim 1 or 2, it is characterised in that the node also includes another in two node system The shadow process of the Distributed Application of one node, the shadow process are used for the work for simulating the Distributed Application of another node Make, methods described also includes:
The Correspondent starts the shadow process of the Distributed Application of another node when the node is effective;
The Distributed Application receives the request message for being used to ask to handle data that client is sent, and by described Correspondent sends the request message to the shadow process of the Distributed Application of another node;
The shadow process of the Distributed Application of another node receives the request message, and according to the request message to institute Data are stated to be handled.
8. method as claimed in claim 1 or 2, it is characterised in that methods described also includes:
When two node system does not break down, the Correspondent receives the first data that the Distributed Application is sent Bag, and the Correspondent of another node forwards first packet into two node system;Or
When two node system does not break down, another node is logical in the Correspondent reception two node system The second packet that news agency sends, and forward second packet to the Distributed Application.
9. processing method as claimed in claim 1 or 2, it is characterised in that the node is physical server or Virtual Service Device.
10. a kind of node, the node belongs to two node systems based on quorum, it is characterised in that
The node includes Distributed Application and Correspondent;
The Correspondent, for determining whether the node is effective when two node system breaks down;
The Correspondent, it is additionally operable to send the instruction Distributed Application to the Distributed Application when the node is effective The correct response message having a quorum.
11. node as claimed in claim 10, it is characterised in that
The Correspondent, it is additionally operable to send instruction to the Distributed Application when the node failure where the Correspondent The error response message of the Distributed Application quorum is not constituted, or no longer send message to the Distributed Application.
12. the node as described in claim 10 or 11, it is characterised in that
The Correspondent, it is additionally operable to send co-ordination message from the Correspondent of another node into two node system The Correspondent for not receiving another node from moment in first duration is directed to when replying message of co-ordination message transmission, Determine that two node system breaks down.
13. the node as described in claim 10 or 11, it is characterised in that
Two node system also includes the network equipment;
The Correspondent, for not receiving institute in the second duration at the time of test data bag is sent to the network equipment When stating the response message that the network equipment is sent for the test data bag, the node failure is determined;
The Correspondent, it is described for receiving in the second duration at the time of test data bag is sent to the network equipment During the response message that the network equipment is sent for the test data bag, determine that the node is effective.
14. the node as described in claim 10 or 11, it is characterised in that
Two node system also includes the serial ports for connecting the node and another node in two node system;
The Correspondent, for sending detection message to another node by the serial ports;
The Correspondent, for not received in the 3rd duration at the time of the detection message is sent to another node During the feedback message that another node is sent for the detection message, determine that the node is effective;
The Correspondent, for receiving institute in the 3rd duration at the time of the detection message is sent to another node When stating the feedback message that another node is sent for the detection message, according to the effective priority information of node, it is determined that described Whether node is effective.
15. the node as described in claim 10 or 11, it is characterised in that
Two node system also includes shared disk;
The Correspondent, the agency for another node into two node system send inspection data bag;
The Correspondent, for another node Correspondent send the inspection data bag at the time of the 4th When not receiving the reply packet for the Correspondent transmission of another node in duration, determine that the node is effective;
The Correspondent, for another node Correspondent send the inspection data bag at the time of the 4th It is true according to the effective priority information of node when the reply packet of Correspondent transmission of another node is received in duration Whether the fixed node is effective.
16. the node as described in claim 10 or 11, it is characterised in that
The node also includes the shadow process of the Distributed Application of another node in two node system, and the shadow enters Journey is used for the work for simulating the Distributed Application of another node;
The Correspondent, for when the node is effective, starting the shadow process of the Distributed Application of another node;
The Distributed Application, for receiving the request message for being used to ask to handle data of client transmission, and lead to Cross the Correspondent and send the request message to the shadow process of the Distributed Application of another node;
The shadow process of the Distributed Application of another node, disappear for receiving the request message, and according to the request Breath is handled the data.
17. the node as described in claim 10 or 11, it is characterised in that
The Correspondent, for when two node system does not break down, receive that the Distributed Application sends the One packet, and the Correspondent of another node forwards first packet into two node system;Or
The Correspondent, for when two node system does not break down, receiving another section in two node system The second packet that the Correspondent of point is sent, and forward second packet to the Distributed Application.
18. the node stated such as claim 10 or 11, it is characterised in that the node is physical server or virtual server.
CN201510121396.XA 2015-03-19 2015-03-19 The processing method and node of two node system subregions Active CN104702693B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510121396.XA CN104702693B (en) 2015-03-19 2015-03-19 The processing method and node of two node system subregions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510121396.XA CN104702693B (en) 2015-03-19 2015-03-19 The processing method and node of two node system subregions

Publications (2)

Publication Number Publication Date
CN104702693A CN104702693A (en) 2015-06-10
CN104702693B true CN104702693B (en) 2018-01-23

Family

ID=53349451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510121396.XA Active CN104702693B (en) 2015-03-19 2015-03-19 The processing method and node of two node system subregions

Country Status (1)

Country Link
CN (1) CN104702693B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107171849B (en) * 2017-05-31 2020-03-31 郑州云海信息技术有限公司 Fault monitoring method and device for virtual machine cluster
CN107403003A (en) * 2017-07-21 2017-11-28 南京智网云联信息科技有限公司 A kind of distributed copies file referee method
CN109218141A (en) * 2018-11-20 2019-01-15 郑州云海信息技术有限公司 A kind of malfunctioning node detection method and relevant apparatus

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1882935A (en) * 2003-12-23 2006-12-20 思科技术公司 Providing location-specific services to a mobile node
CN103718533A (en) * 2013-06-29 2014-04-09 华为技术有限公司 Zoning balance subtask issuing method, apparatus and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010013092A1 (en) * 2008-07-30 2010-02-04 Telefonaktiebolaget Lm Ericsson (Publ) Systems and method for providing trusted system functionalities in a cluster based system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1882935A (en) * 2003-12-23 2006-12-20 思科技术公司 Providing location-specific services to a mobile node
CN103718533A (en) * 2013-06-29 2014-04-09 华为技术有限公司 Zoning balance subtask issuing method, apparatus and system

Also Published As

Publication number Publication date
CN104702693A (en) 2015-06-10

Similar Documents

Publication Publication Date Title
US10567340B2 (en) Data center system
JP3932994B2 (en) Server handover system and method
JP6362120B2 (en) Arbitration processing method, quorum storage device, and system after cluster brain division
EP3324576B1 (en) System for fast detection of communication path failures
US20200244569A1 (en) Traffic Forwarding Method and Traffic Forwarding Apparatus
CN102209000B (en) Avionics full duplex switched Ethernet (AFDX) network terminal system simulator with layered fault injection and fault analysis functions
CN103051470B (en) The control method of a kind of cluster and magnetic disk heartbeat thereof
CN104503965A (en) High-elasticity high availability and load balancing realization method of PostgreSQL (Structured Query Language)
CN104702693B (en) The processing method and node of two node system subregions
CN106330786A (en) MAC address synchronization method, apparatus and system
CN114448828A (en) Storage double-active function testing method, system, terminal and storage medium
CN107277043A (en) Network admittance control system based on cluster service
CN103414591A (en) Method and system for fast converging when port failure is recovered
US7636315B2 (en) Broadcast traceroute
CN106708881A (en) Interaction method and device based on network file system
CN106776107B (en) A kind of parity error correction method and the network equipment
CN108092834B (en) System and method for testing multi-activation detection performance
CN111130813B (en) Information processing method based on network and electronic equipment
CN109039680B (en) Method and system for switching main Broadband Network Gateway (BNG) and standby BNG and BNG
CN104243197A (en) Data transmitting method and system and virtual storage gateways
Walden et al. Seeking high IMP reliability in maintenance of the 1970s ARPAnet
CN116094940B (en) VRRP brain crack inhibition method, system, equipment and storage medium
US11947431B1 (en) Replication data facility failure detection and failover automation
CN112003764B (en) Method and device for detecting network packet error of distributed storage nodes
CN116032797A (en) Host connectivity detection method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant