Method and apparatus for configuring nodes as masters or slaves
First Claim
1. A method for configuring nodes as masters or slaves, wherein the nodes are connected by one or more networks, the method comprising:
- initiating, by a first node, a state machine for supporting communications over the one or more networks between the first node and one or more other nodes, wherein the communications relate to executing an application instance in a master-slave configuration, the application instance being one of a plurality of application instances, each application instance having an additional state machine and each of the plurality of application instances managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances;
determining whether the first node is a predetermined permanent master of the application instance, wherein the predetermined permanent master is a node which will force any other node that is currently a master of the application instance to quit;
entering a master state for the application instance if the first node is the predetermined permanent master;
determining whether a problem exists with the first node acting as the master for the application instance; and
if the problem exists, resigning as the master of the application instance, the resigning comprising sending a Resignation message to a second node that is designated as a preferred slave, wherein the preferred slave is a node that is first to be given an opportunity to take over as the master, and the preferred slave is a node from which the first node most recently received a Heartbeat message.
1 Assignment
0 Petitions
Accused Products
Abstract
A node (101, FIG. 1), within a networked computer system (100), is capable of supporting communications with other nodes relating to operating multiple application instances in a master-slave configuration. A node can be designated as a permanent master for an application instance, meaning that the node will enter the master state (218, FIG. 2) for the application instance whether or not another master exists on the network. A node also can be designated as a preferred slave. A preferred slave initializes (306, FIG. 3) its election timer that is below the election timers selected by other slaves, which causes the preferred slave to call an election before any other slave, and increases the likelihood that the preferred slave will become master if a failover occurs. In addition, a master can specifically resign (510, FIG. 5) to a preferred slave.
-
Citations
28 Claims
-
1. A method for configuring nodes as masters or slaves, wherein the nodes are connected by one or more networks, the method comprising:
-
initiating, by a first node, a state machine for supporting communications over the one or more networks between the first node and one or more other nodes, wherein the communications relate to executing an application instance in a master-slave configuration, the application instance being one of a plurality of application instances, each application instance having an additional state machine and each of the plurality of application instances managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances; determining whether the first node is a predetermined permanent master of the application instance, wherein the predetermined permanent master is a node which will force any other node that is currently a master of the application instance to quit; entering a master state for the application instance if the first node is the predetermined permanent master; determining whether a problem exists with the first node acting as the master for the application instance; and if the problem exists, resigning as the master of the application instance, the resigning comprising sending a Resignation message to a second node that is designated as a preferred slave, wherein the preferred slave is a node that is first to be given an opportunity to take over as the master, and the preferred slave is a node from which the first node most recently received a Heartbeat message. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method for configuring nodes, wherein the nodes are connected by one or more networks, the method comprising:
-
initiating, by a first node, a state machine for supporting communications over the one or more networks between the first node and one or more other nodes, wherein the communications relate to executing an application instance in a master-slave configuration, the application instance being one of a plurality of application instances, each application instance having an additional state machine and each of the plurality of application instances managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances; entering a slave state as a first preferred slave for the application instance, wherein the first preferred slave is a slave from whom a master most recently received a heartbeat message; and selecting a preferred slave from a queue, the first preferred slave being unable to take over as a master and the preferred slave being a first slave to take over as the master; receiving a Heartbeat message from a second node that is the master, wherein the Heartbeat message identifies the second node and indicates that the second node is in a master state for the application instance; and resetting an election timer of the preferred slave to a value that is below values that other nodes will set their election timers to upon receipt of the Heartbeat message. - View Dependent Claims (12, 13, 14)
-
-
15. A method for configuring nodes as masters or slaves, wherein the nodes are connected by one or more networks, the method comprising:
-
initiating, by a first node, a state machine for supporting communications over the one or more networks between the first node and one or more other nodes, wherein the communications relate to executing a first application instance in a master-slave configuration, the first application instance being one of a plurality of application instances, each application instance having an additional state machine and each of the plurality of application instances managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances; entering a master state for the first application instance; determining whether a problem exists with the first node acting as a master for the application instance; and if the problem exists, sending a Resignation message to a second node that is designated as a preferred slave, wherein the preferred slave is a first slave to attempt to take over as a master, and the preferred slave is a node from which the first node most recently received a Heartbeat message. - View Dependent Claims (16, 17)
-
-
18. A method for configuring nodes as masters or slaves, wherein the nodes are connected by one or more networks, the method comprising:
-
initiating, by a first node, a state machine for supporting communications over the one or more networks between the first node and one or more other nodes, wherein the communications relate to executing an application instance in a master-slave configuration; determining whether the first node is a predetermined permanent master of the application instance, wherein the predetermined permanent master is a node which will force any other node that is currently a master of the application instance to quit; entering a master state, to reclaim a position as the master, for the application instance if the first node is the predetermined permanent master; determining whether a problem exists with the first node acting as the master for the application instance; if the problem exists, sending a Resignation message to a second node that is designated as a preferred slave, wherein the preferred slave is a node from which the first node most recently received a Heartbeat message and is the node that is first to be given an opportunity to take over as the master; entering a slave state as the preferred slave for the application instance, wherein the preferred slave is a node that is first to take over as the master for the application instance if the master fails; and setting an election timer to a value that is below values that other nodes will set their election timers to, wherein the election timer is a timer that indicates when the first node should initiate an election to attempt to become the master of the application instance.
-
-
19. A first node within a computer system, the first node comprising:
-
at least one interface to at least one external network, wherein the at least one external network interconnects the node and one or more other nodes; at least one processor, which initiates a state machine to support communications over the one or more networks between the first node and one or more other nodes, wherein the communications relate to executing an application instance in a master-slave configuration, the application instance being one of a plurality of application instances, each application instance having an additional state machine and each of the plurality of application instances being managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances, and determines whether the first node is a predetermined permanent master of the application instance, wherein the predetermined permanent master is a node which will force any other node that is currently a master of the application instance to quit, and enters a master state for the application instance if the first node is the predetermined permanent master; determining whether a problem exists with the first node acting as the master for the application instance; and if the problem exists, resigning as the master of the application instance, the resigning comprising sending a Resignation message to a second node that is designated as a preferred slave, wherein the preferred slave is a node that is first to be given an opportunity to take over as the master and the preferred slave is a node from which the first node most recently received a Heartbeat message. - View Dependent Claims (20)
-
-
21. A first node within a computer system, the first node comprising:
-
at least one interface to at least one external network, wherein the at least one external network interconnects the node and one or more other nodes that include a predetermined permanent master; and at least one processor, which initiates a state machine for supporting to support communications over the one or more networks between the first node and one or more other nodes, wherein the communications relate to executing an application instance in a master-slave configuration, and enters a slave state as a preferred slave for the application instance, the application instance having another state machine associated with the application instance, the application instance being one of a plurality of application instances, each application having an additional state machine and each of the plurality of application instances managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances, wherein the preferred slave is a node that is first to take over as a master for the application instance if the master fails, and sets an election timer to a value that is below values that other nodes will set their election timers to, wherein the election timer is a timer that indicates when the first node should initiate an election to attempt to become the master of the application instance, wherein the at least one processor also receives a Heartbeat message from a second node that is the master, wherein the Heartbeat message identifies the second node and indicates that the second node is in a master state for the application instance, and resets the election timer to the value upon receipt of the Heartbeat message.
-
-
22. A first node within a computer system, the first node comprising:
-
at least one interface to at least one external network, wherein the at least one external network interconnects the node and one or more other nodes that include a predetermined permanent master; and at least one processor, which initiates a state machine to support communications over the one or more networks between the first node and one or more other nodes, wherein the communications relate to executing a first application instance in a master-slave configuration, the first application instance being one of a plurality of application instances, each application instance having an additional state machine and each of the plurality of application instances managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances, and enters a master state for the first application instance, and determines whether a problem exists with the first node acting as a master for the application instance, and if the problem exists, sends a Resignation message to a second node that is designated as a preferred slave, wherein the preferred slave is a node that is first to be given an opportunity to take over as the master, and wherein the preferred slave is a node from which the first node most recently received a Heartbeat message.
-
-
23. A computer readable medium having computer executable instructions stored thereon for performing a method for configuring nodes as masters or slaves, wherein the nodes are connected by one or more networks, the method comprising:
-
initiating, by a first node, a state machine for supporting communications over the one or more networks between the first node and one or more other nodes, wherein the communications relate to executing an application instance in a master-slave configuration, the application instance being one of a plurality of application instances, each application instance having an additional state machine and each of the plurality of application instances managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances; determining whether the first node is a predetermined permanent master of the application instance, wherein the predetermined permanent master is a node which will force any other node that is currently a master of the application instance to quit; entering a master state for the application instance if the first node is the predetermined permanent master; receiving a first message from a second node, which indicates that the second node is the master for the application instance; and sending a second message to the second node, which tells the second node to quit as the master for the application instance.
-
-
24. A computer readable medium having computer executable instructions stored thereon for performing a method for configuring nodes, wherein the nodes are connected by one or more networks, the method comprising:
-
initiating, by a first node, a state machine for supporting communications over the one or more networks between the first node and one or more other nodes that include a predetermined permanent master, wherein the communications relate to executing an application instance in a master-slave configuration, the application instance being one of a plurality of application instances, each application instance having an additional state machine and each of the plurality of application instances managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances; entering a slave state as a preferred slave for the application instance, wherein the preferred slave is a node that is first to take over as a master for the application instance if the master fails; setting an election timer to a value that is below values that other nodes will set their election timers to, wherein the election timer is a timer that indicates when the first node should initiate an election to attempt to become the master of the application instance; receiving a Heartbeat message from a second node that is the master, wherein the Heartbeat message identifies the second node and indicates that the second node is in a master state for the application instance; and resetting the election timer to the value upon receipt of the Heartbeat message.
-
-
25. A computer readable medium having computer executable instructions stored thereon for performing a method for configuring nodes as masters or slaves, wherein the nodes are connected by one or more networks, the method comprising:
-
initiating, by a first node, a state machine for supporting communications over the one or more networks between the first node and one or more other nodes that include a predetermined permanent master, wherein the communications relate to executing a first application instance in a master-slave configuration, the first application instance being one of a plurality of application instances, each application instance having an additional state machine and each of the plurality of application instances being managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances; entering a master state for the first application instance; determining whether a problem exists with the first node acting as a master for the application instance; and if the problem exists, sending a Resignation message to a second node that is designated as a preferred slave, wherein the preferred slave is a node that is first to be given an opportunity to take over as the master, and wherein the preferred slave is a node from which the first node most recently received a Heartbeat message.
-
-
26. A node within a computer system, the node comprising:
-
means for interfacing with at least one external network, wherein the at least one external network interconnects the node and one or more other nodes; and means for processing, which initiates a state machine for supporting communications over the one or more networks between the first node and one or more other nodes, wherein the communications relate to executing an application instance in a master-slave configuration, the application instance being one of a plurality of application instances, each application instance having an additional state machine and each of the plurality of application instances managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances, and determines whether the first node is a predetermined permanent master of the application instance, wherein the predetermined permanent master is a node which will force any other node that is currently a master of the application instance to quit, and enters a master state for the application instance if the first node is the predetermined permanent master, wherein the means for processing also receives a first message from a second node, which indicates that the second node is the master for the application instance, and sends a second message to the second node, which tells the second node to quit as the master for the application instance.
-
-
27. A node within a computer system, the node comprising:
-
means for interfacing with at least one external network, wherein the at least one external network interconnects the node and one or more other nodes; and means for processing, which initiates a state machine for supporting communications over the one or more networks between the first node and one or more other nodes that include a predetermined permanent master, wherein the communications relate to executing an application instance in a master-slave configuration, the application instance being one of a plurality of application instances, each application instance having an additional state machine and each of the plurality of application instances managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances, and enters a slave state as a preferred slave for the application instance, wherein the preferred slave is a node that is first to take over as a master for the application instance if the master fails, and sets an election timer to a value that is below values that other nodes will set their election timers to, wherein the election timer is a timer that indicates when the first node should initiate an election to attempt to become the master of the application instance, wherein the means for processing also receives a Heartbeat message from a second node that is the master, wherein the Heartbeat message identifies the second node and indicates that the second node is in a master state for the application instance, and resets the election timer to the value upon receipt of the Heartbeat message.
-
-
28. A node within a computer system, the node comprising:
-
means for interfacing with at least one external network, wherein the at least one external network interconnects the node and one or more other nodes; and means for processing, which initiates a state machine for supporting communications over the one or more networks between the first node and one or more other nodes that include a predetermined permanent master, wherein the communications relate to executing a first application instance in a master-slave configuration, and enters a master state for the first application instance, the first application instance being one of a plurality of application instances, each application instance having an additional state machine and each of the plurality of application instances managed by the first node through the use of the state machine for supporting communication over one or more networks to manage a state of each additional state machine associated with each of the application instances, and determines whether a problem exists with the first node acting as a master for the application instance, and if the problem exists, sends a Resignation message to a second node that is designated as a preferred slave, wherein the preferred slave is a node that is first to be given an opportunity to take over as the master, wherein the preferred slave is a node from which the first node most recently received a Heartbeat message.
-
Specification