System and method for controlling system
The system addresses split brain and communication failures in cluster configurations by using a quorum-based algorithm with redundant message transmission, ensuring continuous and responsive service delivery.
Patent Information
- Application Number
- JP2023073408
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2024-11-08
AI Technical Summary
Existing cluster configurations face issues with split brain and communication failures that disrupt service continuity and responsiveness, particularly in client-server interactions where packet loss or delay occurs.
A system employing a quorum-based cluster management algorithm with a leader and follower nodes, where messages are transmitted to both the leader and follower nodes, and the client device, ensuring redundancy and rapid failure detection and recovery through degeneration processing.
This approach prevents split brain and maintains high-quality, responsive services by ensuring message delivery even in the presence of communication failures, reducing downtime and maintaining service continuity.
Smart Images

Figure 2024158306000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a system that achieves high availability. [Background technology]
[0002] A cluster configuration is used as a method to ensure availability. In a cluster configuration, one node operates as the primary system and the other nodes act as standby systems. If a failure occurs in the primary node, one of the standby nodes continues the service as the primary system.
[0003] In a cluster configuration, split brain is a problem. As a method for preventing split brain, for example, the method described in Patent Document 1 is known.
[0004] Patent document 1 states that "a computer installed in a first facility determines that its own system is isolated when it is unable to communicate directly with any of a plurality of external systems, one of which is installed in each of a plurality of second facilities. The computer determines that a first external system, of the plurality of external systems, for which a predetermined time has passed since the time when its last survival was confirmed, is in a stopped state. The computer also determines that a second external system, of the plurality of external systems, with which it is able to communicate directly, is in an alive state. Then, if there is a third external system with which it is unable to communicate directly and for which a predetermined time has not passed since the time when its last survival was confirmed, the computer determines, based on predetermined conditions, to put one of its own system and the third external system in a stopped state and the other in an alive state."
[0005] The technology described in Patent Document 1 allows a system to grasp the state of other systems, thereby making it possible to prevent split-brain. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] International Publication No. 2018 / 037535 Summary of the Invention [Problem to be solved by the invention]
[0007] A client device uses a service by communicating with the system via a network. If a failure occurs in communication between the node operating as the primary system and the client device, the service cannot be provided correctly. In this case, the primary system must be switched. However, the technology described in Patent Document 1 cannot address the above-mentioned issues. Also, if a packet loss or communication delay occurs on the above-mentioned communication path, the client device cannot receive a response within the expected time. This is a problem in a control system that expects punctuality of communication.
[0008] The present invention provides a system that prevents split-brain and achieves continuous high quality service. [Means for solving the problem]
[0009] A representative example of the invention disclosed in the present application is as follows: That is, a system including a platform system composed of a plurality of computers and a client device connected to the platform system, the platform system configures a cluster including one leader node functioning as a main system of a service and two or more follower nodes functioning as standby systems of the service, the cluster is managed based on a quorum-based cluster management algorithm, the client device transmits a first message having the same content to the leader node and at least one of the follower nodes, the leader node transmits a second message to the client device and at least one of the follower nodes in response to the first message from the client device, and the follower node forwards the first message to the leader node when it receives the first message from the client device, and forwards the second message to the client device when it receives the second message from the leader node. Effect of the Invention
[0010] According to the present invention, it is possible to prevent split-brain and realize continuous high quality service. Problems, configurations and effects other than those described above will become apparent from the following description of the embodiments. [Brief description of the drawings]
[0011] [Figure 1] FIG. 1 illustrates an example of a system configuration according to a first embodiment. [Diagram 2] FIG. 2 illustrates an example of a hardware configuration of a computer according to a first embodiment. [Diagram 3] 13 is a diagram illustrating an example of a data structure of session management information according to the first embodiment; [Figure 4] 13 is a diagram illustrating an example of a data structure of message management information according to the first embodiment. FIG. [Diagram 5] FIG. 4 is a diagram illustrating an example of a data structure of route management information according to the first embodiment. [Figure 6]11 is a diagram illustrating an example of a data structure of cluster management information according to the first embodiment; [Figure 7] 13 is a diagram illustrating an example of a data structure of message management information according to the first embodiment. FIG. [Figure 8] 11 is a flowchart illustrating an example of a message transmission process executed by a client device according to the first embodiment. [Figure 9A] 11 is a flowchart illustrating an example of a message receiving process executed by a node according to the first embodiment. [Figure 9B] 11 is a flowchart illustrating an example of a message receiving process executed by a node according to the first embodiment. [Figure 10] 11 is a flowchart illustrating an example of a message management information update process executed by the node according to the first embodiment. [Figure 11A] 11 is a flowchart illustrating an example of a route management information update process executed by the node according to the first embodiment. [Figure 11B] 11 is a flowchart illustrating an example of a route management information update process executed by the node according to the first embodiment. [Figure 12] 11 is a flowchart illustrating an example of a message receiving process executed by the client device according to the first embodiment. [Figure 13] FIG. 11 is a diagram illustrating an example of a data structure of message management information according to the second embodiment. [Figure 14] 13 is a flowchart illustrating an example of a message management information update process executed by a node according to a second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. However, the present invention is not to be interpreted as being limited to the description of the embodiment shown below. It will be easily understood by those skilled in the art that the specific configuration can be changed without departing from the concept or purpose of the present invention.
[0013] In the configurations of the invention described below, the same or similar configurations or functions are given the same reference numerals, and duplicated explanations are omitted.
[0014] In this specification, the terms "first," "second," "third," and the like are used to identify components and do not necessarily limit the number or order.
[0015] In order to facilitate understanding of the invention, the position, size, shape, range, etc. of each component shown in the drawings, etc. may not represent the actual position, size, shape, range, etc. Therefore, the present invention is not limited to the position, size, shape, range, etc. disclosed in the drawings, etc. EXAMPLES
[0016] Fig. 1 is a diagram illustrating an example of a system configuration of the first embodiment. Fig. 2 is a diagram illustrating an example of a hardware configuration of a computer of the first embodiment.
[0017] The system is composed of a base system 100 and a client device 101. The base system 100 and the client device 101 are connected via a network 102 such as a LAN (Local Area Network). The network 102 may be connected by either a wired or wireless method.
[0018] The infrastructure system 100 is a system that provides resources for providing services, and is made up of a plurality of computers 200. The computer 200 includes, for example, a processor 201, a main storage device 202, a secondary storage device 203, and a network interface 204.
[0019] In the following description, when a process is described with a functional unit as the subject, it indicates that the processor 201 is executing a program that realizes the functional unit.
[0020] The infrastructure system 100 may also include a network switch and a storage system.
[0021] The infrastructure system 100 has multiple nodes 110 that provide services. To ensure availability, a cluster is configured using the multiple nodes 110. The number of nodes 110 included in a cluster is assumed to be three or more. Note that it is desirable to configure a cluster using nodes 110 at different locations to avoid having a common point of failure.
[0022] In order to prevent split-brain, the cluster is managed based on a quorum-based cluster management algorithm such as RAFT. In the cluster, one node 110 functions as a leader (primary system), and the other nodes 110 function as followers (standby systems).
[0023] The node 110 is an instance on which an application that provides a service runs, and may be a computer 200, a virtual computer, or a container. The node 110 has an application execution unit 120 and a communication management unit 121, and also holds session management information 123, message management information 124, and path management information 125.
[0024] The application execution unit 120 executes an application that provides a service. The communication management unit 121 controls communication. The communication management unit 121 includes a proxy unit 130, a cluster management unit 131, a multiplexed communication unit 132, and a communication error detection unit 133.
[0025] The proxy unit 130 relays communication. The cluster management unit 131 manages the cluster based on a quorum-based cluster management algorithm. For example, the cluster management unit 131 monitors the aliveness of the node 110 and performs degeneration processing of the node 110. The multiplexed communication unit 132 multiplexes communication between the node 110 and the client device 101. The communication anomaly detection unit 133 detects communication anomalies.
[0026] It should be noted that with regard to each functional unit of the node 110, multiple functional units may be integrated into one functional unit, or one functional unit may be divided into multiple functional units for each function.
[0027] The session management information 123 is information for managing a communication session between the node 110 and the client device 101. The message management information 124 is information for managing the reception status of a message transmitted by the client device 101. The path management information 125 is information for managing the status of the communication path between the node 110 and the client device 101.
[0028] The client device 101 is a device that uses a service, and includes a processor, a main storage device, a sub-storage device, a network interface, an input device, and an output device, all of which are not shown.
[0029] The client device 101 has an application execution unit 140 and a communication management unit 141 , and also holds cluster management information 142 and message management information 143 .
[0030] The application execution unit 140 executes an application for using a service. The communication management unit 141 controls communication. Specifically, the communication management unit 141 relays communication and multiplexes communication.
[0031] The cluster management information 142 is information for managing the configuration of a cluster. The message management information 143 is information for managing the reception state of a message transmitted by the node 110.
[0032] The application execution unit 140 and the communication management unit 141 may be realized using a virtual computer or a container.
[0033] FIG. 3 is a diagram illustrating an example of a data structure of the session management information 123 according to the first embodiment.
[0034] The session management information 123 stores entries including a session ID 301, DS (Downstream) destination information 302, and SS (Sidestream) destination information 303. One entry exists for one session. Note that the fields included in the entry are merely examples and are not limited to these.
[0035] Session ID 301 is a field that stores a session ID. DS destination information 302 is a field that stores destination information of the client device 101 that is the message transmission source. The DS destination information 302 stores, for example, an IP address and a port number. SS destination information 303 is a field that stores destination information of the node 110 that is the message transmission source. The SS destination information 303 stores, for example, an IP address and a port number.
[0036] A message received from a client device 101, and a message received by the leader node 110 from the client device 101 via the follower node 110, contain a session ID. If this session ID is a first-time ID, an entry having that session ID is added to the session management information 123. Also, if the received message was sent from a client device 101, the destination information of that client device 101 is recorded in the DS destination information of an entry having the same session ID. If the message was received via a follower, the destination information of that follower node is recorded in the SS destination information of an entry having the same session ID.
[0037] FIG. 4 is a diagram illustrating an example of a data structure of the message management information 124 according to the first embodiment.
[0038] The message management information 124 stores entries including a session ID 401, a sequence number 402, a direct reception 403, and an indirect reception 404. One entry exists for each combination of a session ID and a sequence number.
[0039] The session ID 401 is a field for storing the ID of the session. The serial number 402 is a field for storing the serial number assigned to the message. The serial number is used to identify the message within the session.
[0040] Direct reception 403 is a field that stores a flag indicating whether or not a message has been received directly from client device 101 without going through another node 110. The initial value is set to "0", and if the message has been received directly, "1" is stored. Indirect reception 404 is a field that stores a flag indicating whether or not a message has been received via another node 110. The initial value is set to "0", and if the message has been received indirectly, "1" is stored.
[0041] FIG. 5 is a diagram illustrating an example of a data structure of the route management information 125 according to the first embodiment.
[0042] The route management information 125 stores entries including a route 501, a reception time 502, and a counter 503. There is one entry for the node 110 to which the client device 101 sends a message.
[0043] The route 501 stores identification information of the communication route between the client device 101 and the node 110. "Direct" indicates a communication route between the node 110 that holds the route management information 125 and the client device 101. "Indirect" indicates a communication route between the node 110 that holds the route management information 125 and the client device 101 via another node 110.
[0044] The reception time 502 is a field for storing the reception time of the last message received on the path. The counter 503 is a field for storing the number of times that the node 110 has not received a message transmitted via the communication path. The counter 503 is set to "0" as an initial value.
[0045] FIG. 6 is a diagram illustrating an example of the data structure of the cluster management information 142 according to the first embodiment.
[0046] The cluster management information 142 is a field for storing a cluster name 601, destination information 602, and type 603. One entry exists for a combination of a cluster and a node.
[0047] The cluster name 601 is a field that stores identification information of a cluster. The destination information 602 is a field that stores destination information of the nodes 110 included in the cluster. For example, an IP address and a port number are stored in the destination information 602. The type 603 is a field that stores the type of the node 110 in the cluster.
[0048] In this embodiment, the cluster management information 142 is set so that a message is sent to the leader node 110 and at least one follower node 110 .
[0049] The cluster management information 142 may be set manually in advance, or may be obtained from the infrastructure system 100 when starting to use the infrastructure system 100. In addition, when the configuration of the cluster is changed, the infrastructure system 100 transmits the updated cluster management information 142 at any timing.
[0050] FIG. 7 is a diagram illustrating an example of a data structure of the message management information 143 according to the first embodiment.
[0051] The message management information 143 stores an entry including a session ID 701 and a sequence number 702. One entry exists for each pair of a session ID and a sequence number.
[0052] The session ID 701 and the serial number 702 are the same fields as the session ID 401 and the serial number 402 .
[0053] FIG. 8 is a flowchart illustrating an example of a message transmission process executed by the client device 101 according to the first embodiment.
[0054] The communication management unit 141 of the client device 101 monitors the reception of a request to send a message from the application execution unit 140 to the node 110 (step S101).
[0055] When a transmission request is received, the communication management unit 141 refers to the cluster management information 142 to identify the destination node 110 (step S102).
[0056] Specifically, the communications management unit 141 acquires the name of the application included in the transmission request, and searches for an entry in which the cluster name 601 stores the name of the application.
[0057] The communication management unit 141 transmits the same message to the leader node 110 and at least one follower node 110 (step S103). After that, the communication management unit 141 continues to monitor the reception of a transmission request.
[0058] At this time, the message includes a session ID and a serial number. The serial number is determined by the communication management unit 141. The session ID distinguishes a series of transmissions and receptions between an application on the client device 101 and an application on the node 110, and a unique value is assigned when a series of transmissions and receptions is started. The series of transmissions and receptions here corresponds to, for example, a session in TCP communication from establishment to disconnection. The session ID can be guaranteed to be unique by using, for example, a combination of a source IP address and a port number. The serial number is a serial number managed for each session ID and for each direction of transmission and reception, and is incremented by one each time a new message is sent using that session ID.
[0059] 9A and 9B are flowcharts illustrating an example of a message receiving process executed by the node 110 according to the first embodiment.
[0060] The communication manager 121 of the node 110 monitors the reception of a message (step S201).
[0061] When a message is received, the communication management unit 121 determines whether the received message is a message sent from the client device 101 based on the sender information included in the message (step S202).
[0062] If the received message is a message sent from the client device 101, the communication manager 121 makes an inquiry to the cluster manager 131 to determine whether or not it is the leader node 110 (step S203).
[0063] If the communication manager 121 is not the leader node 110, the communication manager 121 queries the cluster manager 131 to identify the leader node 110, and transfers the message to the leader node 110 (step S204). After that, the communication manager 121 continues to monitor the reception of messages.
[0064] If the communication management unit 121 is the leader node 110, the communication management unit 121 executes an update process of the message management information 124 (step S205), and also executes an update process of the path management information 125 (step S206). The details of the update process of the message management information 124 will be described with reference to Fig. 10. The details of the update process of the path management information 125 will be described with reference to Figs. 11A and 11B.
[0065] The communication management unit 121 refers to the message management information 124 to determine whether or not the same message has already been received (step S207).
[0066] Specifically, the communication management unit 121 determines whether or not there is an entry whose combination of the session ID 401 and the serial number 402 matches the combination of the session ID and the serial number included in the received message. If there is an entry that satisfies the above-mentioned condition, the communication management unit 121 determines that the same message has already been received.
[0067] If the same message has already been received, the communications manager 121 discards the message and continues to monitor for received messages.
[0068] If the same message has not been received, the communications management unit 121 transfers the message to the application execution unit 120 (step S208). After that, the communications management unit 121 continues to monitor for received messages.
[0069] If it is determined in step S202 that the received message is not a message sent from the client device 101, that is, if it is determined that the received message is a message sent from the application execution unit 120 or the leader node 110, the communication management unit 121 determines whether or not it is the leader node 110 by querying the cluster management unit 131 (step S209).
[0070] If the communication management unit 121 is the leader node 110, the communication management unit 121 refers to the session management information 123, identifies the destination client device 101 and follower node 110, transmits the message to the client device 101, and also transfers the message to the follower node 110 (step S210). After that, the communication management unit 121 continues to monitor the reception of the message. At this time, the communication management unit 121 assigns a sequence number to the message.
[0071] If the communication management unit 121 is not the leader node 110, the communication management unit 121 refers to the session management information 123, identifies the destination client device 101, and transmits the message to the client device 101 (step S211). After that, the communication management unit 121 continues to monitor the reception of the message.
[0072] FIG. 10 is a flowchart illustrating an example of a process of updating the message management information 124 executed by the node 110 according to the first embodiment.
[0073] The communication management unit 121 refers to the message management information 124 to determine whether or not the same message has already been received (step S301). The process of step S301 is the same as the process of step S207.
[0074] If the same message has already been received, the communications management unit 121 updates the corresponding entry (step S302), and ends the process of updating the message management information 124.
[0075] Specifically, when a message is received directly from the client device 101, the communication management unit 121 updates the direct reception 403 of the corresponding entry to "1", and when a message is received via another node 110, the communication management unit 121 updates the indirect reception 404 of the corresponding entry to "1".
[0076] If the same message has not been received, the communications manager 121 adds an entry to the message management information 124 (step S303), and ends the process of updating the message management information 124.
[0077] Specifically, the communication management unit 121 adds an entry to the message management information 124, and sets the session ID and serial number included in the message to the session ID 401 and serial number 402 of the added entry. When the communication management unit 121 receives a message directly from the client device 101, it sets "1" to direct reception 403 of the added entry, and when the communication management unit 121 receives a message via another node 110, it sets "1" to indirect reception 404 of the added entry.
[0078] The communication management unit 121 may delete entries in which the direct reception 403 and the indirect reception 404 are "1" at any timing. This is because it is possible to confirm that the message has been received normally and therefore management is no longer necessary.
[0079] 11A and 11B are flowcharts illustrating an example of a process of updating the path management information 125 executed by the node 110 according to the first embodiment.
[0080] The communication management unit 121 updates the last reception time of the corresponding entry in the route management information 125 to the current time (step S401).
[0081] Specifically, the communications management unit 121 identifies the sender of the message, and searches for an entry in which the sender is stored in the route 501. The communications management unit 121 stores the current time in the reception time 502 of the searched entry.
[0082] The communication management unit 121 determines whether the communication path is "direct" (step S402).
[0083] If the communication path is not "direct", the communication management unit 121 clears the counter 503 of the corresponding "indirect" entry (step S403). Specifically, the value of the counter 503 is changed to "0".
[0084] The communications management unit 121 increments the value of the counter 503 for the "direct" entry by 1 (step S404).
[0085] The communication management unit 121 determines whether a communication failure has occurred in a portion common to all of the client devices 101 (for example, a router near the leader node 110) on the communication path between the leader node 110 and the client devices 101 (step S405).
[0086] Specifically, the communication management unit 121 determines whether or not the condition (1) and the condition (2) are satisfied. Note that the first threshold and the second threshold can be set to any value.
[0087] (1) The value (Ti-Td) obtained by subtracting the reception time Td of the “direct” entry from the reception time Ti of the “indirect” entry is equal to or greater than the first threshold value. (2) The value of the counter 503 of the "direct" entry is equal to or greater than the second threshold.
[0088] If condition (1) and condition (2) are satisfied, this indicates that messages transmitted by the client device 101 are being received only from the follower node 110 for a certain period of time. In other words, this indicates that the leader node 110 has not been able to receive messages from the client device 101. Therefore, if condition (1) and condition (2) are satisfied, the communication management unit 121 determines that a communication failure has occurred in the common communication path between the leader node 110 and all of the client devices 101.
[0089] If no communication failure has occurred on the communication path between the leader node 110 and the client device 101, the communication management unit 121 ends the process of updating the path management information 125.
[0090] If a communication failure occurs in the communication path between the leader node 110 and the client device 101, the communication management unit 121 executes degeneration processing of the leader node 110 (step S406), and then terminates the path management information 125. As a result, the leader node 110 is separated from the cluster, and a new leader node 110 is determined based on a quorum-based cluster management algorithm.
[0091] If it is determined in step S402 that the communication path is "direct", the communication manager 121 clears the counter 503 of the "direct" entry (step S407). Specifically, the value of the counter 503 is updated to "0".
[0092] The communications management unit 121 increments the value of the counter 503 of all "indirect" entries by 1 (step S408).
[0093] The communication management unit 121 determines whether or not there is a follower node 110 in which a communication failure occurs on the communication path between the client device 101 (step S409).
[0094] Specifically, the communication management unit 121 determines whether or not each “indirect” route satisfies the condition (3) and the condition (4). The third threshold and the fourth threshold can be set to any value. Also, different third threshold and fourth threshold can be set for each communication route.
[0095] (3) The value (Ti-Td) obtained by subtracting the reception time Td of the “direct” entry from the reception time Ti of the “indirect” entry is equal to or greater than a third threshold value. (4) The value of the counter 503 of the "indirect" entry is equal to or greater than the fourth threshold value.
[0096] If the conditions (3) and (4) are satisfied, it indicates that messages transmitted by the client device 101 are received only from the client device 101 for a certain period of time. In other words, it indicates that the follower node 110 cannot receive messages from the client device 101. Therefore, if the conditions (3) and (4) are satisfied, the communication management unit 121 determines that a communication failure has occurred in the communication path between the follower node 110 and the client device 101. Note that the soundness of the communication path between the leader node 110 and the follower node 110 is guaranteed by quorum-based survival monitoring such as RAFT as described above. In other words, if a failure occurs in the communication path between the leader node 110 and the follower node 110, the failure is detected separately by RAFT or the like, and the node is separated from the cluster and replaced by another healthy node 110. Therefore, if the leader node 110 does not receive a message via the follower node 110, it can be assumed that there is a problem with the communication path between the follower node 110 and the client device 101, not between the leader node 110 and the follower node 110.
[0097] If there is no follower node 110 in which a communication failure occurs on the communication path between the client device 101 and the follower node 110, the communication management unit 121 ends the process of updating the path management information 125.
[0098] If there is a follower node 110 in which a communication failure occurs on the communication path between the client device 101 and the follower node 110, the communication management unit 121 executes degeneration processing for the follower node 110 (step S410), and then terminates the path management information 125. As a result, the follower node 110 is separated from the cluster.
[0099] The communication management unit 121 of the leader node 110 may monitor the aliveness of the application execution unit 120, and when a failure is detected in the application execution unit 120, may execute degeneration processing of the leader node 110. Possible methods of monitoring the aliveness of the application execution unit 120 include monitoring a response to a request for aliveness confirmation and monitoring using a watchdog timer.
[0100] FIG. 12 is a flowchart illustrating an example of a message receiving process executed by the client device 101 according to the first embodiment.
[0101] The communication management unit 141 of the client device 101 monitors the reception of a message (step S501).
[0102] When a message is received, the communication manager 141 updates the message management information 143 (step S502).
[0103] Specifically, the communication management unit 141 determines whether or not there is an entry whose combination of a session ID 701 and a serial number 702 matches the combination of a session ID and a serial number included in the received message. If there is no entry that satisfies the above-mentioned condition, the communication management unit 121 adds an entry to the message management information 143. If there is an entry that satisfies the above-mentioned condition, the communication management unit 121 deletes the entry from the message management information 143.
[0104] The communication management unit 141 refers to the message management information 143 to determine whether or not the same message has already been received (step S503). The determination is made based on the processing result of step S502.
[0105] If the same message has already been received, the communications manager 141 discards the message and continues to monitor for received messages.
[0106] If the same message has not been received, the communications management unit 141 transfers it to the application execution unit 140 (step S504). After that, the communications management unit 141 continues to monitor for received messages.
[0107] In the system of the first embodiment, the client device 101 transmits the same message to the leader node 110 and the follower node 110, and the follower node 110 transfers the message to the leader node 110. The leader node 110 also transmits a message directly to the client device 101, and also transmits a message via the follower node 110. The follower node 110 transfers a message received from the leader node 110 to the client device 101. As a result, even if a communication failure or packet loss occurs on one of the communication paths between the leader node 110 and the client device 101, or between the follower node 110 and the client device 101, the client device 101 and the leader node 110 can transmit and receive messages without any particular delay, and therefore a highly responsive service can be continued.
[0108] Furthermore, the leader node 110 can detect a communication failure in the communication path between the node 110 and the client device 101 based on the message reception state, and can quickly switch the leader node 110 and disconnect the follower node 110.
[0109] The present invention is not dependent on the system configuration or network configuration and can be applied to various systems. Furthermore, the present invention does not require the use of dedicated equipment, so that the introduction cost can be reduced. EXAMPLES
[0110] In the second embodiment, when a communication delay occurs in a communication path, a degeneration process is executed for the node 110. The second embodiment will be described below, focusing on the differences from the first embodiment.
[0111] The system configuration of the second embodiment is the same as that of the first embodiment. The client device 101 of the second embodiment is the same as that of the first embodiment.
[0112] The configuration of the node 110 in the second embodiment is the same as that in the first embodiment. However, the second embodiment is different in the data structure of the message management information 124. Fig. 13 is a diagram showing an example of the data structure of the message management information 124 in the second embodiment.
[0113] The message management information 124 stores entries including a session ID 401, a sequence number 402, and a time stamp 451. One entry exists for each combination of a session ID and a sequence number.
[0114] The time stamp 451 is a group of fields that stores the time when the message was received. The time stamp 451 includes as many fields as the number of multiplexed messages.
[0115] In the second embodiment, when the follower node 110 transfers a message to the leader node 110, the follower node 110 transfers the message by including in the message the time at which the follower node 110 received the message.
[0116] In the second embodiment, the update process of the message management information 124 is different from that in the first embodiment. Fig. 14 is a flowchart for explaining an example of the update process of the message management information 124 executed by the node 110 in the second embodiment.
[0117] The communication management unit 121 refers to the message management information 124 to determine whether or not the same message has already been received (step S301). The process of step S301 is the same as the process of step S207.
[0118] If the same message has already been received, the communications manager 121 updates the corresponding entry (step S351), and then proceeds to step S353.
[0119] Specifically, when a message is received directly from the client device 101, the communication management unit 121 stores the time at which the communication management unit 121 received the message in the direct field of the timestamp 451 of the corresponding entry. When a message is received via a follower node 110, the communication management unit 121 stores the reception time included in the message in the follower node 110 field of the timestamp 451 of the corresponding entry.
[0120] If the same message has not been received, the communications manager 121 adds an entry to the message management information 124 (step S352), and then proceeds to step S353.
[0121] Specifically, the communication management unit 121 adds an entry to the message management information 124, and sets the session ID and serial number included in the message to the session ID 401 and serial number 402 of the added entry. When the communication management unit 121 receives a message directly from the client device 101, it sets the time at which the communication management unit 121 received the message in the direct field of the timestamp 451 of the added entry. When the communication management unit 121 receives a message via the follower node 110, it sets the reception time included in the message in the follower node 110 field of the timestamp 451 of the added entry.
[0122] After executing the process of step S351 or the process of step S352, the communication management unit 121 determines whether or not the same message has been received from both the client device 101 and the follower node 110 (step S353).
[0123] In addition, if a waiting time is set for receiving a message, and the waiting time has elapsed after receiving a message from either the client device 101 or the follower node 110, the communication management unit 121 determines that a timeout has occurred and sets the time obtained by adding a predetermined time to the time the first message was received in the field of the route that has not been received.
[0124] If the same message has not been received from both the client device 101 and the follower node 110, the communication management unit 121 ends the process of updating the message management information 124.
[0125] When the same message is received from both the client device 101 and the follower node 110, the communication management unit 121 calculates ΔTd shown in formula (1) and ΔTi shown in formula (2) for the direct and indirect pairs (step S354).
[0126] ΔTd = (direct reception time) - (indirect reception time)…(1)
[0127] ΔTi = (indirect reception time)-(direct reception time)…(2)
[0128] The communication management unit 121 calculates a moving average of ΔTd and ΔTi (step S355). For example, a moving average for 30 seconds is calculated. Note that, for the calculation of the moving average, ΔTd and ΔTi of the entry of the session in which messages are received from both the client device 101 and the follower node 110 are used.
[0129] The communication management unit 121 determines whether or not there is a communication path in which a communication delay occurs, based on the moving averages of ΔTd and ΔTi (step S356).
[0130] For example, if the moving average of ΔTd is greater than a threshold, the communication management unit 121 determines that a communication delay occurs in the communication path between the leader node 110 and the client device 101. If the moving average of ΔTd is greater than a threshold, the communication management unit 121 determines that a communication delay occurs in the communication path between the follower node 110 and the client device 101.
[0131] If there is no communication path in which a communication delay is occurring, the communication management unit 121 ends the process of updating the message management information 124.
[0132] If a communication path in which a communication delay is occurring exists, the communication management unit 121 executes degeneration processing of the node 110 that uses that communication path (step S357), and thereafter, ends the processing of updating the message management information 124.
[0133] Note that the method of detecting a slowdown in a communication path is merely an example and is not limited to this.
[0134] According to the second embodiment, the occurrence of a communication delay is used as a trigger to execute degeneration processing of the node 110, thereby making it possible to maintain high responsiveness of the service.
[0135] The present invention is not limited to the above-mentioned embodiment, but includes various modified examples. For example, the above-mentioned embodiment describes the configuration in detail to easily explain the present invention, and the present invention is not necessarily limited to the configuration including all the described configurations. Also, it is possible to add, delete, or replace a part of the configuration of each embodiment with another configuration.
[0136] In addition, each of the above configurations, functions, processing units, processing means, etc. may be realized in part or in whole by hardware, for example, by designing them as integrated circuits. The present invention can also be realized by software program code that realizes the functions of the embodiments. In this case, a storage medium on which the program code is recorded is provided to a computer, and a processor included in the computer reads the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-mentioned embodiments, and the program code itself and the storage medium storing it constitute the present invention. Examples of storage media for supplying such program code include flexible disks, CD-ROMs, DVD-ROMs, hard disks, SSDs (Solid State Drives), optical disks, magneto-optical disks, CD-Rs, magnetic tapes, non-volatile memory cards, ROMs, etc.
[0137] Furthermore, the program code for realizing the functions described in this embodiment can be implemented in a wide range of program or script languages, such as assembler, C / C++, perl, Shell, PHP, Python, Java (registered trademark), etc.
[0138] Furthermore, the program code of the software that realizes the functions of the embodiments may be distributed over a network and stored in a storage means such as a computer's hard disk or memory, or in a storage medium such as a CD-RW or CD-R, and the processor of the computer may read out and execute the program code stored in the storage means or storage medium.
[0139] In the above-mentioned embodiment, the control lines and information lines are shown as those considered necessary for the explanation, and not all the control lines and information lines are shown in the product. All the components may be connected to each other. [Explanation of symbols]
[0140] 100 Infrastructure System 101 Client device 102 Network 110 nodes 120, 140 Application execution unit 121, 141 Communications Management Department 123 Session Management Information 124 Message Management Information 125 Route Management Information 130 Proxy Section 131 Cluster Management Department 132 Multiplexing communication unit 133 Communication Anomaly Detection Unit 142 Cluster management information 143 Message Management Information 200 calculator 201 Processor 202 Main storage 203 Secondary storage device 204 Network Interface
Claims
1. A system including a platform system including a plurality of computers and a client device connected to the platform system, The infrastructure system configures a cluster including one leader node functioning as a main system of the service and two or more follower nodes functioning as standby systems of the service, the cluster is managed based on a quorum-based cluster management algorithm; The client device transmits a first message having the same content to the leader node and at least one of the follower nodes; the leader node transmits a second message to the client device and at least one of the follower nodes in response to the first message from the client device; The follower node is When the first message is received from the client device, forwarding the first message to the leader node; The system further comprises a step of forwarding the second message to the client device when the second message is received from the leader node.
2. 2. The system of claim 1, The leader node: Evaluating a communication delay of a communication path between the client device and the leader node and a communication delay of a communication path between the client device and the follower node based on a difference between a receiving time of the first message directly received from the client device and a receiving time of the first message via the follower node; When a communication delay occurs in a communication path between the client device and the leader node, the client device stops receiving the first message and ends the provision of the service. A system characterized by executing a blocking process of the follower node to stop the function as the follower node when a communication delay occurs in a communication path between the client device and the follower node.
3. 2. The system of claim 1, The leader node: monitoring a reception status of the first message; determining whether the first message is received directly from the client device based on the result of the monitoring; A system characterized by executing a blocking process of the leader node, which stops accepting the first message and terminates the provision of the service if the first message cannot be received directly from the client device.
4. 2. The system of claim 1, The leader node: monitoring a reception status of the first message; Based on a result of the monitoring, determine whether the follower node has received the first message; A system characterized in that, if the follower node is unable to receive the first message, a blocking process is executed on the follower node to stop the follower node from functioning as the follower node.
5. A method for controlling a system including a platform system including a plurality of computers and a client device connected to the platform system, comprising: The infrastructure system configures a cluster including one leader node functioning as a main system of the service and two or more follower nodes functioning as standby systems of the service, the cluster is managed based on a quorum-based cluster management algorithm; The method of controlling the system includes: The client device transmits a first message having the same content to the leader node and at least one of the follower nodes; When the follower node receives the first message from the client device, the follower node forwards the first message to the leader node; the leader node sending a second message to the client device and at least one of the follower nodes in response to the first message from the client device; and when the follower node receives the second message from the leader node, the follower node forwards the second message to the client device.
6. A method for controlling the system according to claim 5, comprising the steps of: A step of evaluating a communication delay of a communication path between the client device and the leader node and a communication delay of a communication path between the client device and the follower node based on a difference between a reception time of the first message directly received from the client device and a reception time of the first message via the follower node; When a communication delay occurs in a communication path between the client device and the leader node, the leader node stops accepting the first message and ends the provision of the service, executing a blocking process of the leader node; A system control method comprising: when a communication delay occurs in the communication path between the client device and the follower node, the leader node executes a blocking process of the follower node to stop it from functioning as the follower node.
7. A method for controlling the system according to claim 5, comprising the steps of: the leader node monitoring a reception status of the first message; determining, by the leader node, whether the leader node is able to receive the first message directly from the client device based on a result of the monitoring; and if the first message cannot be received directly from the client device, the leader node stops accepting the first message and terminates the provision of the service, thereby executing a blocking process of the leader node.
8. A method for controlling the system according to claim 5, comprising the steps of: the leader node monitoring a reception status of the first message; The leader node determines whether the follower node is able to receive the first message based on a result of the monitoring; A system control method comprising: if the follower node is unable to receive the first message, the leader node executes a blocking process for the follower node to stop it from functioning as the follower node.
Citation Information
Patent Citations
Alive management program, alive management method, and alive management device
WO2018037535A1
