[go: up one dir, main page]

JP2015215754A - CLUSTER SYSTEM AND Split-BrainSyndrome GENERATION PREVENTION METHOD - Google Patents

CLUSTER SYSTEM AND Split-BrainSyndrome GENERATION PREVENTION METHOD Download PDF

Info

Publication number
JP2015215754A
JP2015215754A JP2014097973A JP2014097973A JP2015215754A JP 2015215754 A JP2015215754 A JP 2015215754A JP 2014097973 A JP2014097973 A JP 2014097973A JP 2014097973 A JP2014097973 A JP 2014097973A JP 2015215754 A JP2015215754 A JP 2015215754A
Authority
JP
Japan
Prior art keywords
cluster
node
privileged
members
sub
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.)
Pending
Application number
JP2014097973A
Other languages
Japanese (ja)
Inventor
小林 弘明
Hiroaki Kobayashi
弘明 小林
義文 樫本
Yoshibumi Kashimoto
義文 樫本
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2014097973A priority Critical patent/JP2015215754A/en
Publication of JP2015215754A publication Critical patent/JP2015215754A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Hardware Redundancy (AREA)

Abstract

【課題】Split-Brain Syndromeを防止しつつ、特権ノード決定を行う際に、特権ノードが決まらないような状態をできるだけ起こらないようにする。【解決手段】分散システム100は、クラスタ10の外部に外部サーバ2を備え、外部サーバ2は、クラスタ10が分断された各サブクラスタの特権ノード候補から各サブクラスタのメンバ数の情報を集約し、最もメンバ数の多いサブクラスタ、または、メンバ数が最多かつ等しいサブクラスタが複数存在する場合には特定のロジックに基づいて選出した一つのサブクラスタの特権ノード候補に特権ノード昇格の了承を、それ以外の特権ノード候補に否決を通知する。各サブクラスタの特権ノード候補は、外部サーバ2から了承の通知を受けた場合、特権ノードに昇格してクラスタ10を構築し、外部サーバ2から否決の通知を受けた場合、当該サブクラスタを解体する。【選択図】図7[PROBLEMS] To prevent a split-brain syndrome and prevent a situation in which a privileged node is not determined as much as possible when determining a privileged node. A distributed system 100 includes an external server 2 outside a cluster 10, and the external server 2 aggregates information on the number of members of each subcluster from privileged node candidates of each subcluster from which the cluster 10 is divided. If there are multiple sub-clusters with the largest number of members, or multiple sub-clusters with the largest and equal number of members, approval of privilege node promotion is granted to privileged node candidates of one sub-cluster selected based on specific logic. Notify the other privileged node candidates of the rejection. If a privileged node candidate of each sub-cluster receives an acknowledgment from the external server 2, it is promoted to a privileged node to build the cluster 10, and if it receives a denial notification from the external server 2, disassembles the sub-cluster. To do. [Selection] Figure 7

Description

本発明は、分散システムにおいて、経路障害等に起因して発生するSplit-Brain Syndromeを防止するクラスタシステムおよびSplit-Brain Syndrome発生防止方法に関する。   The present invention relates to a cluster system and a split-brain syndrome generation prevention method for preventing split-brain syndrome that occurs due to a path failure or the like in a distributed system.

近年、クラウドコンピューティングの隆盛に伴い、多量なデータの処理や管理を効率的に行うことが求められている。そこで、複数のサーバを協調動作させることにより効率的な処理を実現する、分散処理技術が発展している。
分散処理を行う際に、分散システム(以降、クラスタと称す)を構成するサーバ(以降、ノードと呼ぶ)間で協調動作を行う場合がある。例えば、高可用性の求められるシステムにおいては、あるノードに障害が発生した場合にも他のノードで処理を継続できるように複製データを他のノードで保持する(データ冗長化)といった協調動作を行う例が挙げられる。このような協調動作を実施するためには、クラスタを構成するノードの情報(IPアドレス等)をクラスタに参加している全てのノードで把握している必要が生じる。
In recent years, with the rise of cloud computing, it is required to efficiently process and manage a large amount of data. Thus, distributed processing technology has been developed that realizes efficient processing by operating a plurality of servers in a coordinated manner.
When performing distributed processing, there is a case where a cooperative operation is performed between servers (hereinafter referred to as nodes) constituting a distributed system (hereinafter referred to as a cluster). For example, in a system that requires high availability, when a failure occurs in a certain node, a collaborative operation is performed such that the replicated data is held in another node (data redundancy) so that processing can be continued in another node. An example is given. In order to carry out such a cooperative operation, it is necessary for all the nodes participating in the cluster to grasp the information (IP address, etc.) of the nodes constituting the cluster.

そこで、クラスタを構成するノードの中から1台を、ノードを管理する特権を持つノード(以降、特権ノードと称す)として選出するノード管理方法が挙げられる。ここで、全ノードは、事前に特権ノードを選出するための同一の規則を知っており、特権ノードに障害が生じた際には残りのノードのうち1台が特権を引き継ぐこととする。このようにクラスタ内に閉じてノード管理を行うことで、特権ノードが単一障害点(SPOF:Single Point of Failure)となることはない。なお、ノード障害発生時には、特権ノード(特権ノードの障害時には次に特権ノードとなるノード)へと通知され、管理されているノードの情報が更新され、残りの全ノードに通知されるものとする。   Therefore, there is a node management method in which one of the nodes constituting the cluster is selected as a node having a privilege to manage the node (hereinafter referred to as a privileged node). Here, all nodes know the same rule for selecting a privileged node in advance, and when a failure occurs in a privileged node, one of the remaining nodes takes over the privilege. Thus, by closing the node in the cluster and performing node management, the privileged node does not become a single point of failure (SPOF). When a node failure occurs, it is notified to a privileged node (the node that will be the next privileged node when a privileged node fails), information on managed nodes is updated, and all remaining nodes are notified. .

クラスタシステムにおいて、経路障害等によりクラスタシステムを構成するノード間の通信が切断され、NW(ネットワーク)分断が発生する可能性がある。NW分断が発生すると、クラスタが複数のサブクラスタに分離し、かつそれぞれが動作を継続するSplit-Brain Syndromeが発生する可能性がある。   In a cluster system, communication between nodes constituting the cluster system may be disconnected due to a route failure or the like, and NW (network) partitioning may occur. When NW partitioning occurs, there is a possibility that a split-brain syndrome in which the cluster is separated into a plurality of sub-clusters and each continues to operate.

図16は、Split-Brain Syndromeの発生例およびSplit-Brain Syndromeの解消例を示す図である。
図16(a)に示すように、クラスタを構成するサーバ群であるノードA〜Eを相互接続して1台のサーバのように動作させるクラスタシステムにおいて、ノードA,BとノードC〜Eとを繋ぐ経路が、経路故障したとする。図16(b)では、ノードA,BとノードC〜Eとを繋ぐ経路に、経路故障したことを示す×印が付されている。また、クラスタのノードAに当該クラスタの特権ノードであることを示す王冠印が付されている。図16(b)の場合、経路故障によってクラスタを構成するノードA,BとノードC〜Eとに分断され、ノードA,BからはノードC〜Eが故障したように見え、またノードC〜EからはノードA,Bが故障したように見える。
FIG. 16 is a diagram illustrating an example of occurrence of Split-Brain Syndrome and an example of elimination of Split-Brain Syndrome.
As shown in FIG. 16 (a), in a cluster system in which nodes A to E, which are server groups constituting a cluster, are interconnected to operate like a single server, nodes A and B and nodes C to E Suppose that the path connecting the two has failed. In FIG. 16 (b), a mark indicating that the path has failed is attached to the path connecting the nodes A and B and the nodes C to E. In addition, a crown indicating that the node is a privileged node of the cluster is attached to the node A of the cluster. In the case of FIG. 16B, the nodes A and B and the nodes C to E constituting the cluster are divided by the path failure, and the nodes C and E appear to have failed from the nodes A and B. From E, nodes A and B appear to have failed.

クラスタシステムには、障害が発生した場合もクラスタを動的に再構成してサービスを維持する対障害機構が備わっている。図16(b)の符号aに示すように、双方のサブクラスタ毎に特権ノード(ここではノードAとノードC)が選出され、サブクラスタがそれぞれ動作を継続するSplit-Brain Syndromeが発生する。図16(b)では、一方のサブクラスタのノードAに当該クラスタの特権ノードであることを示す王冠印が付され、他方のサブクラスタのノードCに当該クラスタの特権ノードであることを示す王冠印が付されている。このような状況がSplit-Brain Syndrome発生の一例である。   The cluster system is equipped with a failure prevention mechanism that dynamically reconfigures a cluster and maintains services even when a failure occurs. As indicated by reference symbol a in FIG. 16B, a privileged node (node A and node C here) is selected for each of the sub-clusters, and a split-brain syndrome is generated in which the sub-clusters continue to operate. In FIG. 16B, a crown indicating that the node A of one sub-cluster is a privileged node of the cluster is attached, and a crown indicating that the node C of the other sub-cluster is a privileged node of the cluster. It is marked. Such a situation is an example of split-brain syndrome.

Split-Brain Syndromeが発生すると、データの一貫性の破綻やサービスの停止等の問題を招く可能性がある。例えば、クラスタ外からのサービスへのアクセスが不能な状態に陥ったり、複数のノードのデータベースへの書き込みが競合し、データベースを破壊したり一貫性を喪失するなど、さまざまな致命的現象を引き起こす可能性がある。   If Split-Brain Syndrome occurs, it may lead to problems such as data consistency failure and service interruption. For example, it is possible to cause various fatal phenomena such as inability to access services from outside the cluster, conflicts in writing to the database of multiple nodes, destroying the database, and inconsistency. There is sex.

一方、複数のデータ管理装置の中からマスタ(特権ノード)を1台選定する手法、または、データ管理装置の保持するデータの状態を同じに揃える手法として、分散調停プロトコルがある。分散調停プロトコルとして、例えば、データベースやファイルシステムに用いられるPaxosアルゴリズムが知られている(非特許文献1参照)。
また、非特許文献2には、所定のリース期間であるMaster Leaseについて記載されている。
On the other hand, there is a distributed arbitration protocol as a method for selecting one master (privileged node) from a plurality of data management devices or a method for aligning the data states held by the data management device to the same. As a distributed arbitration protocol, for example, a Paxos algorithm used for a database or a file system is known (see Non-Patent Document 1).
Non-Patent Document 2 describes Master Lease, which is a predetermined lease period.

NW分断が発生してクラスタが複数のサブクラスタに分割された際、Paxosアルゴリズム等を利用し、元のクラスタの過半数を満たすサブクラスタの特権ノード候補を特権ノードとしてクラスタを構築する。   When NW partitioning occurs and the cluster is divided into a plurality of sub-clusters, a Paxos algorithm or the like is used to construct a cluster using privileged node candidates of sub-clusters that satisfy a majority of the original cluster as privilege nodes.

図16(c)の符号aに示すように、Paxosアルゴリズムでは、元のクラスタのメンバ数の半数以下の場合は、解体する。図16(c)の符号bに示すように、元のクラスタのメンバ数の過半数を満たす場合は、クラスタを構築する。
このように、Paxosアルゴリズムは、過半数のメンバが残存するサブクラスタを残して他を解体することで、Split-Brain Syndromeを解消する。
As indicated by reference symbol a in FIG. 16C, the Paxos algorithm disassembles when the number of members of the original cluster is less than half. As indicated by reference symbol b in FIG. 16C, when a majority of the number of members of the original cluster is satisfied, a cluster is constructed.
In this way, the Paxos algorithm eliminates the split-brain syndrome by dismantling others while leaving the subcluster in which the majority of members remain.

Lamport, L. “The part-time parliament,” ACM Transactions on Computer Systems 16, 2 (1998), pp.133-169.Lamport, L. “The part-time parliament,” ACM Transactions on Computer Systems 16, 2 (1998), pp.133-169. Gray, C., Cheriton, D. “Leases: An efficient fault-tolerant mechanism for distributed file cache consistency,” In Proceedings of the 12th ACM Symposium on Operating Systems Principles (1989), pp. 202-210.Gray, C., Cheriton, D. “Leases: An efficient fault-tolerant mechanism for distributed file cache consistency,” In Proceedings of the 12th ACM Symposium on Operating Systems Principles (1989), pp. 202-210.

しかしながら、Paxosアルゴリズムを利用したSplit-Brain Syndrome検出・解消方法は、下記の課題があった。
図17および図18は、Paxosアルゴリズムを利用したSplit-Brain Syndrome検出・解消方法の課題を説明する図である。
However, the split-brain syndrome detection / resolution method using the Paxos algorithm has the following problems.
17 and 18 are diagrams for explaining the problem of the split-brain syndrome detection / resolution method using the Paxos algorithm.

(課題1)
図17(a)に示すように、クラスタを構成するノードA〜Fを管理する特権ノード(ここではノードA)が、クラスタ毎に1台存在している。図17(b)に示すように、ノードA〜CとノードD〜Fとを繋ぐ経路が、経路故障したとする。ノードA〜CとノードD〜Fとを繋ぐ経路に、経路故障したことを示す×印が付されている。また、クラスタのノードAとノードDとに当該クラスタの特権ノード候補であることを示す王冠印が付されている。
(Problem 1)
As shown in FIG. 17A, there is one privileged node (node A in this case) that manages the nodes A to F constituting the cluster for each cluster. As shown in FIG. 17B, it is assumed that the path connecting the nodes A to C and the nodes D to F has a path failure. A path connecting the nodes A to C and the nodes D to F is marked with a cross indicating that a path failure has occurred. In addition, a crown mark indicating that the node is a candidate for a privileged node of the cluster is attached to the node A and the node D of the cluster.

図17(b)の符号aに示すように、NW分断によりクラスタが2つのサブクラスタに分割され、なおかつ、2つのサブクラスタのメンバ数が同数(元のクラスタの半数)であった場合を想定する。   As shown by reference symbol a in FIG. 17B, it is assumed that the cluster is divided into two sub-clusters by NW division, and that the number of members of the two sub-clusters is the same number (half of the original cluster). To do.

この場合、Paxosアルゴリズムでは、元のクラスタのメンバ数の半数以下の場合に該当し、図17(c)の符号aに示すように、元のクラスタのメンバ数の半数より多いサブクラスタが存在しないためすべて解体する。すなわち、NW分断によりクラスタが2つのサブクラスタに分割され、なおかつ、2つのサブクラスタのメンバ数が同数(元のクラスタの半数)であった場合、運用可能なクラスタ数の確保が可能であるにも関わらず、クラスタ全体が解体される。   In this case, the Paxos algorithm corresponds to a case where the number of members is less than half of the number of members of the original cluster, and there are no more sub-clusters than half of the number of members of the original cluster, as indicated by reference numeral a in FIG. So dismantle everything. In other words, if the cluster is divided into two sub-clusters by NW division and the number of members of the two sub-clusters is the same number (half of the original cluster), the number of clusters that can be operated can be secured. Nevertheless, the entire cluster is dismantled.

(課題2)
図18(a)に示すように、クラスタを構成するノードA〜Eを管理する特権ノード(ここではノードA)が、クラスタ毎に1台存在している。図18(b)の符号aに示すように、ノードA,BとノードC〜Eとを繋ぐ経路とノードCとノードA,B,D,Eとを繋ぐ経路とが、分断(複数分断)したとする。複数分断した経路には、経路故障したことを示す×印が付されている。また、クラスタのノードAとノードCとノードDとに当該クラスタの特権ノード候補であることを示す王冠印が付されている。
(Problem 2)
As shown in FIG. 18A, there is one privileged node (node A here) that manages the nodes A to E constituting the cluster for each cluster. As shown by the symbol a in FIG. 18B, the path connecting the nodes A and B and the nodes C to E and the path connecting the node C and the nodes A, B, D, and E are divided (multiple division). Suppose that A plurality of divided paths are marked with a cross indicating that a path failure has occurred. In addition, a crown mark is attached to node A, node C, and node D of the cluster indicating that they are privileged node candidates of the cluster.

図18(b)の符号aに示すように、NW分断が複数発生してクラスタが複数に分割され、なおかつ、元のクラスタの過半数が残存するサブクラスタが存在しない場合を想定する。   As shown by a symbol a in FIG. 18B, a case is assumed in which a plurality of NW divisions occur to divide a cluster into a plurality of clusters, and there are no subclusters in which a majority of the original clusters remain.

この場合、Paxosアルゴリズムでは、元のクラスタのメンバ数の半数以下の場合に該当し、図18(c)の符号aに示すように、元のクラスタのメンバ数の半数より多いサブクラスタが存在しないためすべて解体する。すなわち、NW分断が複数発生してクラスタが複数に分割され、なおかつ、元のクラスタの過半数が残存するサブクラスタが存在しない場合、クラスタ全体が解体され、サービスの部分的な継続を行うことができない。
このように、Paxosアルゴリズムを利用したSplit-Brain Syndrome検出・解消方法では、分断されたサブクラスタのメンバ数が同数(元のクラスタの半数)の場合や元のクラスタのメンバ数の半数より多いサブクラスタが存在しない場合は、特権ノードを決めることができず、クラスタ全体が解体される。
In this case, the Paxos algorithm corresponds to the case where the number of members of the original cluster is less than half, and as shown by the symbol a in FIG. 18C, there are no more subclusters than half of the number of members of the original cluster. So dismantle everything. That is, if multiple NW partitioning occurs and the cluster is divided into multiple clusters, and there is no sub-cluster in which a majority of the original cluster remains, the entire cluster is dismantled and the service cannot be partially continued. .
As described above, in the split-brain syndrome detection / resolution method using the Paxos algorithm, when the number of divided sub-cluster members is the same number (half of the original cluster) or more than half of the number of members of the original cluster If the cluster does not exist, the privileged node cannot be determined and the entire cluster is dismantled.

このような背景を鑑みて本発明がなされたのであり、本発明は、Split-Brain Syndromeを防止しつつ、特権ノード決定を行う際に、特権ノードが決まらないような状態をできるだけ起こらないようにすることができるクラスタシステムおよびSplit-Brain Syndrome発生防止方法を提供することを課題とする。   The present invention has been made in view of such a background, and the present invention prevents split-brain syndrome while preventing privileged nodes from being determined as much as possible when performing privileged node determination. It is an object of the present invention to provide a cluster system and a split-brain syndrome prevention method.

前記した課題を解決するため、請求項1に記載の発明は、Paxosアルゴリズムを含む多数決分散合意形成アルゴリズムを適用して、クラスタを構成する複数のノードの中からノードを管理する特権を持つ特権ノードを選出するクラスタシステムであって、前記特権ノードを管理する外部サーバを前記クラスタの外部に備え、前記外部サーバは、前記クラスタが分断された各サブクラスタの特権ノード候補から各サブクラスタのメンバ数の情報を集約し、最もメンバ数の多いサブクラスタ、または、メンバ数が最多かつ等しいサブクラスタが複数存在する場合には特定のロジックに基づいて選出した一つのサブクラスタの特権ノード候補に特権ノード昇格の了承を、それ以外の特権ノード候補に否決を通知する管理部を備え、前記サブクラスタの特権ノード候補は、前記外部サーバから了承の通知を受けた場合、特権ノードに昇格してクラスタを構築し、前記外部サーバから否決の通知を受けた場合、当該サブクラスタを解体することを特徴とする。   In order to solve the above-mentioned problem, the invention according to claim 1 is a privileged node having a privilege to manage a node from among a plurality of nodes constituting a cluster by applying a majority vote distributed consensus forming algorithm including a Paxos algorithm. The external server that manages the privileged node is provided outside the cluster, and the external server includes the number of members of each subcluster from the privileged node candidates of each subcluster from which the cluster is divided. If there are multiple sub-clusters with the largest number of members or those with the largest and equal number of members, privilege nodes are selected as privilege node candidates for one sub-cluster selected based on specific logic. A management unit for notifying the approval of the promotion to the other privileged node candidates; When the right node candidate receives a notice of approval from the external server, the right node candidate is promoted to a privileged node to build a cluster, and when a notice of denial is received from the external server, the sub-cluster is disassembled. To do.

また、請求項8に記載の発明は、Paxosアルゴリズムを含む多数決分散合意形成アルゴリズムを適用して、クラスタを構成する複数のノードの中からノードを管理する特権を持つ特権ノードを選出するクラスタシステムのSplit-Brain Syndrome発生防止方法であって、前記特権ノードを管理する外部サーバを前記クラスタの外部に備え、前記外部サーバは、前記クラスタが分断された各サブクラスタの特権ノード候補から各サブクラスタのメンバ数の情報を集約するステップと、最もメンバ数の多いサブクラスタ、または、メンバ数が最多かつ等しいサブクラスタが複数存在する場合には特定のロジックに基づいて選出した一つのサブクラスタの特権ノード候補に特権ノード昇格の了承を、それ以外の特権ノード候補に否決を通知するステップと、を実行し、前記サブクラスタの特権ノード候補は、前記外部サーバから了承の通知を受けた場合、特権ノードに昇格してクラスタを構築するステップと、前記外部サーバから否決の通知を受けた場合、当該サブクラスタを解体するステップと、を実行することを特徴とするクラスタシステムのSplit-Brain Syndrome発生防止方法とした。   The invention according to claim 8 is a cluster system that selects a privileged node having a privilege to manage a node from among a plurality of nodes constituting a cluster by applying a majority vote consensus building algorithm including a Paxos algorithm. A split-brain syndrome prevention method, wherein an external server that manages the privileged node is provided outside the cluster, and the external server determines each subcluster from a privileged node candidate of each subcluster from which the cluster is divided. A step of aggregating information on the number of members and a sub-cluster with the largest number of members, or a privileged node of one sub-cluster selected based on specific logic when there are multiple sub-clusters with the largest number of members and the same number of members A step of notifying the candidate of the privilege node promotion approval and notifying the other privileged node candidates of the rejection. The privileged node candidate of the sub-cluster receives a notification of approval from the external server, promotes to a privileged node to build a cluster, and receives a rejection notification from the external server, A split-brain syndrome prevention method for a cluster system, characterized by executing a step of disassembling a sub-cluster.

このようにすることで、Split-Brain Syndromeを防止しつつ、特権ノード決定を行う際に、特権ノードが決まらないような状態をできるだけ起こらないようにすることができる。例えば、NW分断が複数発生してクラスタが複数に分割され、なおかつ、元のクラスタの過半数が残存するサブクラスタが存在しない場合、Paxosアルゴリズムでは、クラスタ全体が解体されてしまうが、本発明によれば、過半数を満たすサブクラスタが存在しない場合にも、クラスタの全体の解体を防ぎ、運用を継続することができる。   By doing so, it is possible to prevent a situation where a privileged node is not determined as much as possible when performing privileged node determination while preventing split-brain syndrome. For example, when a plurality of NW divisions occur and the cluster is divided into a plurality of clusters, and there is no sub-cluster in which a majority of the original clusters remain, the Paxos algorithm disassembles the entire cluster. For example, even when there is no sub-cluster that satisfies the majority, it is possible to prevent the entire cluster from being disassembled and continue operation.

また、請求項2に記載の発明は、前記サブクラスタの特権ノード候補が、前記外部サーバから了承または否決の応答がなく、かつ当該サブクラスタのメンバ数が過半数を満たす場合、前記多数決分散合意形成アルゴリズムを適用して、特権ノードとして自律的にクラスタを構築することを特徴とする。   Further, the invention according to claim 2 is that, when the privileged node candidate of the sub-cluster does not receive an approval or rejection response from the external server and the number of members of the sub-cluster satisfies a majority, A cluster is autonomously constructed as a privileged node by applying an algorithm.

このような構成によれば、何らかの障害が原因で外部サーバから「了承/否決」の応答がないとき、サブクラスタのメンバ数が過半数を満たす場合は、外部サーバからの応答を待たずに、Paxosアルゴリズムを含む多数決分散合意形成アルゴリズムを利用して特権ノードが自律的にクラスタを構築することができる。   According to such a configuration, when there is no “acknowledge / deny” response from the external server due to some failure, if the majority of sub-cluster members satisfy the majority, Paxos does not wait for a response from the external server. A privileged node can autonomously construct a cluster by using a majority vote distributed consensus building algorithm including an algorithm.

また、請求項3に記載の発明は、前記サブクラスタの特権ノード候補が、前記外部サーバから了承または否決の応答がなく、かつ当該サブクラスタのメンバ数が過半数を満たさない場合、所定タイムアウト期間経過後に自律的に当該サブクラスタを解体することを特徴とする。   Further, the invention according to claim 3 is that when a privileged node candidate of the sub-cluster has not responded to the approval or rejection from the external server and the number of members of the sub-cluster does not satisfy the majority, a predetermined timeout period has elapsed. The sub-cluster is dismantled autonomously later.

このような構成によれば、何らかの障害が原因で外部サーバから「了承/否決」の応答がなく、サブクラスタのメンバ数が過半数を満たさない場合は外部サーバからの応答タイムアウトで自律的にサブクラスタを解体することができる。よって、他にメンバ数が過半数を満たすサブクラスタが存在するときに、Split-Brain Syndromeを防止できる。   According to such a configuration, if there is no “acknowledge / decline” response from the external server due to some failure, and the subcluster member count does not satisfy the majority, the subcluster autonomously responds with a response timeout from the external server. Can be dismantled. Therefore, Split-Brain Syndrome can be prevented when there are other sub-clusters that have a majority of members.

また、請求項4に記載の発明は、前記クラスタの特権ノードが、自身が特権ノードであることを示す特権ノード情報およびクラスタメンバ数を、定期的およびクラスタのメンバ数が変化した時に前記外部サーバへ報告することを特徴とする。   According to a fourth aspect of the present invention, the privileged node information indicating that the cluster is a privileged node and the number of cluster members are periodically updated when the number of cluster members changes. It is characterized by reporting to.

このような構成によれば、外部サーバは、定期的報告を受けて分断前のクラスタ全体のメンバ数を把握し、クラスタのメンバ数が変化した時の報告を受けて現状のクラスタ状態(特権ノード情報、クラスタメンバ数)を把握することができる。   According to such a configuration, the external server receives the periodic report to grasp the number of members of the entire cluster before the division, receives the report when the number of cluster members changes, and receives the current cluster state (privileged node). Information, the number of cluster members).

また、請求項5に記載の発明は、前記サブクラスタの特権ノード候補が、当該サブクラスタのメンバ数が、自身が特権ノード候補であることを示す特権ノード候補情報およびサブクラスタメンバ数を含む特権ノード昇格要求を前記外部サーバへ発行することを特徴とする。   According to a fifth aspect of the present invention, the privileged node candidate of the subcluster includes privileged node candidate information indicating that the number of members of the subcluster is a privileged node candidate and the number of subcluster members. A node promotion request is issued to the external server.

このような構成によれば、外部サーバは、特権ノード候補であるノードとそのサブクラスタのサブクラスタメンバ数とを把握することができる。   According to such a configuration, the external server can grasp a node that is a privileged node candidate and the number of sub-cluster members of the sub-cluster.

また、請求項6に記載の発明は、前記外部サーバが、通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計が前記クラスタの総メンバ数の半数に満たない場合、通信可能な特権ノード候補に対し一律に否決を通知することを特徴とする。   In the invention according to claim 6, the external server can communicate when the total number of sub-cluster members reported from all privileged node candidates capable of communication is less than half of the total number of members of the cluster. This is characterized in that the rejection is uniformly notified to a privileged node candidate.

このような構成によれば、外部サーバと通信可能な特権ノード候補に対し一律「否決」を通知することで、外部サーバから検知できないところで過半数を満たすサブクラスタが存在し、請求項2に従って自律的に特権ノードが選出される場合にもSplit-Brain Syndromeを確実に防止することができる。   According to such a configuration, a uniform “denial” is notified to privileged node candidates communicable with the external server, so that there exists a sub-cluster that satisfies a majority when it cannot be detected from the external server. Even if a privileged node is elected, split-brain syndrome can be surely prevented.

また、請求項7に記載の発明は、前記外部サーバが、通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計が前記クラスタの総メンバ数の半数に満たない場合、保守者端末に特権ノード候補の通知を行うとともに、当該保守者端末から当該特権ノード候補の了承または否決の判断通知を受け、当該判断通知に従って、特権ノード候補に対し了承または否決を通知することを特徴とする。   Further, the invention according to claim 7 is directed to a case where the total number of sub-cluster members reported from all the privileged node candidates capable of communication is less than half of the total number of members of the cluster. Notifying the terminal of the privileged node candidate, receiving a notification of acceptance or rejection of the privileged node candidate from the maintenance person terminal, and notifying the approval or rejection of the privileged node candidate according to the determination notification To do.

このような構成によれば、通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計がクラスタの総メンバ数の半数に満たない場合、通信可能な特権ノード候補に対し一律「否決」を通知する場合に比べ、Split-Brain Syndromeを防止しつつ、より適切な運用を継続することができる。   According to such a configuration, when the total number of members of the sub-cluster reported from all the privileged node candidates capable of communication is less than half of the total number of members of the cluster, a uniform “denial” Compared with the case of notifying ", it is possible to continue more appropriate operation while preventing split-brain syndrome.

本発明によれば、Split-Brain Syndromeを防止しつつ、特権ノード決定を行う際に、特権ノードが決まらないような状態をできるだけ起こらないようにすることができる。   According to the present invention, it is possible to prevent a state in which a privileged node is not determined as much as possible when performing privileged node determination while preventing split-brain syndrome.

本実施形態に係る分散システムの構成例を示す図である。It is a figure which shows the structural example of the distributed system which concerns on this embodiment. 本実施形態に係るクラスタを構成するノードの機能例を示す図である。It is a figure which shows the function example of the node which comprises the cluster which concerns on this embodiment. 本実施形態に係るクラスタを構成するノードのノード管理テーブルの一例を示す図である。It is a figure which shows an example of the node management table of the node which comprises the cluster which concerns on this embodiment. 本実施形態に係るクラスタを構成するノードの死活監視テーブルの設定例を示す図である。It is a figure which shows the example of a setting of the alive monitoring table of the node which comprises the cluster which concerns on this embodiment. 本実施形態に係る外部サーバの機能例を示す図である。It is a figure which shows the function example of the external server which concerns on this embodiment. 本実施形態に係るクラスタを含む分散システムの動作を示す図である。It is a figure which shows operation | movement of the distributed system containing the cluster which concerns on this embodiment. 本実施形態に係るクラスタを含む分散システムの動作を示す図である。It is a figure which shows operation | movement of the distributed system containing the cluster which concerns on this embodiment. 本実施形態に係るクラスタを含む分散システムの外部サーバに障害が発生した場合の動作を示す図である。It is a figure which shows operation | movement when a failure generate | occur | produces in the external server of the distributed system containing the cluster which concerns on this embodiment. 本実施形態に係るクラスタシステムのクラスタの一部と外部サーバとの間に障害が発生した場合の動作を示す図である。It is a figure which shows operation | movement when a failure generate | occur | produces between a part of cluster of the cluster system which concerns on this embodiment, and an external server. 本実施形態に係るクラスタシステムのクラスタの一部と外部サーバとの間に障害が発生した場合の動作を示す図である。It is a figure which shows operation | movement when a failure generate | occur | produces between a part of cluster of the cluster system which concerns on this embodiment, and an external server. 本実施形態に係るクラスタシステムの外部サーバを利用したSplit-Brain Syndrome発生防止方法の手順を説明する図である。It is a figure explaining the procedure of the Split-Brain Syndrome generation | occurrence | production prevention method using the external server of the cluster system which concerns on this embodiment. 本実施形態に係るクラスタシステムの特権ノード/特権ノード候補の管理処理を示すフローチャートである。It is a flowchart which shows the management process of the privilege node / privilege node candidate of the cluster system which concerns on this embodiment. 本実施形態に係るクラスタシステムの外部サーバの特権ノード選定機能のメイン処理を示すフローチャートである。It is a flowchart which shows the main process of the privilege node selection function of the external server of the cluster system which concerns on this embodiment. 本実施形態に係るクラスタシステムの外部サーバの特権ノード選定機能のタイマ処理を示すフローチャートである。It is a flowchart which shows the timer process of the privileged node selection function of the external server of the cluster system which concerns on this embodiment. 本実施形態に係るクラスタシステムの特権ノード選出の流れを説明するシーケンス図である。It is a sequence diagram explaining the flow of privileged node selection of the cluster system which concerns on this embodiment. クラスタシステムのSplit-Brain Syndromeの発生例およびSplit-Brain Syndromeの解消例を示す図である。It is a figure which shows the generation example of Split-Brain Syndrome of a cluster system, and the cancellation example of Split-Brain Syndrome. クラスタシステムのPaxosアルゴリズムを利用したSplit-Brain Syndrome発生防止方法の課題を説明する図である。It is a figure explaining the subject of the Split-Brain Syndrome generation | occurrence | production prevention method using the Paxos algorithm of a cluster system. クラスタシステムのPaxosアルゴリズムを利用したSplit-Brain Syndrome発生防止方法の課題を説明する図である。It is a figure explaining the subject of the Split-Brain Syndrome generation | occurrence | production prevention method using the Paxos algorithm of a cluster system.

以下、図面を参照して本発明を実施するための形態(以下、「本実施形態」という)におけるクラスタシステム等について説明する。   A cluster system and the like in a mode for carrying out the present invention (hereinafter referred to as “the present embodiment”) will be described below with reference to the drawings.

(実施形態)
[分散システムの構成]
図1は、本実施形態に係るクラスタを含む分散システムの構成例を示す図である。
図1に示すように、分散システム100(クラスタシステム)は、クラスタ10を構成する複数のノード1と、クラスタ10の外部に設けられ、特権ノードを管理する外部サーバ2と、ネットワーク20と、各クライアント30とを含んで構成される。
(Embodiment)
[Configuration of distributed system]
FIG. 1 is a diagram illustrating a configuration example of a distributed system including clusters according to the present embodiment.
As shown in FIG. 1, a distributed system 100 (cluster system) includes a plurality of nodes 1 constituting a cluster 10, an external server 2 that is provided outside the cluster 10 and manages privileged nodes, a network 20, And a client 30.

ノード1は、クラスタ10を構成する、コンピュータ等の物理装置である。また、ノード1は、仮想マシン等の論理装置であってもよい。なお、図1では、ノード1は、物理サーバイメージで表している。ノード1は、クライアント30から送信されるメッセージを受信して処理を実行し、クライアント30に応答情報(サービス情報)を返信することによって、サービスを提供する機能を有する。
外部サーバ2は、特権ノードを決定するクラスタ10の外部の管理サーバである。
The node 1 is a physical device such as a computer that constitutes the cluster 10. The node 1 may be a logical device such as a virtual machine. In FIG. 1, the node 1 is represented by a physical server image. The node 1 has a function of providing a service by receiving a message transmitted from the client 30, executing a process, and returning response information (service information) to the client 30.
The external server 2 is a management server outside the cluster 10 that determines privileged nodes.

クラスタ10を構成するノード1が連携して動作を行うために、ノード1間で一貫性が必要とされるデータ(管理情報)に基づいて、各ノード1は、データの処理および保持を行っている。例えば、一貫性が必要とされるデータ(管理情報)には、クラスタ10を構成するノード1群の情報等がある。具体的には、一貫性が必要とされるデータ(管理情報)には、各ノード1のノード識別子が記憶されるノード管理テーブル(後記)や、死活を監視(alive monitoring)する対象のノードをリストアップした死活監視テーブル(後記)がある。   In order for the nodes 1 constituting the cluster 10 to operate in cooperation, each node 1 processes and holds data based on data (management information) that requires consistency between the nodes 1. Yes. For example, data (management information) that requires consistency includes information on a group of nodes constituting the cluster 10. Specifically, data (management information) that requires consistency includes a node management table (to be described later) in which the node identifier of each node 1 is stored, and a target node for alive monitoring. There is a life and death monitoring table (listed below).

クライアント30は、ユーザがネットワークサービスを享受するために、サービスへのメッセージ(入力情報等)をクラスタ10に送信したり、クラスタ10から当該メッセージに対応する応報情報(サービス情報)を受信して表示したりする機能を有する。クライアント30は、不図示の入出力部、制御部、記憶部等を持っている。
クライアント30からのメッセージは、ネットワーク20を介してクラスタ10を構成する何れかのノード1に送信される。各ノード1は、メッセージ処理を行い、クライアント30にサービスを提供する。
In order for the user to enjoy the network service, the client 30 transmits a message (input information or the like) to the service to the cluster 10 or receives and displays response information (service information) corresponding to the message from the cluster 10. It has a function to do. The client 30 has an input / output unit (not shown), a control unit, a storage unit, and the like.
A message from the client 30 is transmitted to any one of the nodes 1 constituting the cluster 10 via the network 20. Each node 1 performs message processing and provides a service to the client 30.

なお、クライアント30からノード1へ直接メッセージを送信せず、クライアント30とノード1の間にロードバランサ等を設置してメッセージをノード1に振り分けてもよい。このロードバランサ(不図示)は、クライアント30から送信されるメッセージを、単純なラウンドロビン法等により振り分ける機能を有する。   Instead of directly transmitting a message from the client 30 to the node 1, a message may be distributed to the node 1 by installing a load balancer or the like between the client 30 and the node 1. This load balancer (not shown) has a function of distributing a message transmitted from the client 30 by a simple round robin method or the like.

[ノード]
次に、ノード1の機能例について、図2を用いて説明する(適宜、図1参照)。
図2は、ノード1の機能例を示す図である。
図2に示すように、ノード1は、処理部11、記憶部12および通信部13を備える。
処理部11は、図示しないCPU(Central Processing Unit)およびメインメモリで構成され、記憶部12に記憶されているプログラムをメインメモリに展開して、ノード管理部111、メッセージ処理部112、死活監視部113、特権ノード選出部114、およびクラスタ離脱指示部115を機能として実現する。
[node]
Next, a function example of the node 1 will be described with reference to FIG. 2 (see FIG. 1 as appropriate).
FIG. 2 is a diagram illustrating a function example of the node 1.
As illustrated in FIG. 2, the node 1 includes a processing unit 11, a storage unit 12, and a communication unit 13.
The processing unit 11 includes a CPU (Central Processing Unit) and a main memory (not shown), expands a program stored in the storage unit 12 to the main memory, a node management unit 111, a message processing unit 112, and an alive monitoring unit. 113, the privileged node selection unit 114, and the cluster leave instruction unit 115 are realized as functions.

記憶部12は、メモリやハードディスク等で構成され、ノード管理テーブル(ノード管理情報)121、死活監視テーブル(死活監視情報)122およびデータ記憶部123を有する。データ記憶部123は、ノード1が管理するデータ等、およびPaxosアルゴリズムの提案番号b,提案内容Vを記憶する(詳細は後記)。
通信部13は、メッセージや応答情報を送受信するための通信インタフェースである。
The storage unit 12 includes a memory, a hard disk, and the like, and includes a node management table (node management information) 121, a life / death monitoring table (life / death monitoring information) 122, and a data storage unit 123. The data storage unit 123 stores data managed by the node 1, the proposal number b of the Paxos algorithm, and the proposal content V (details will be described later).
The communication unit 13 is a communication interface for transmitting and receiving messages and response information.

<ノード管理部111>
ノード管理部111は、クラスタ10へのノード1の追加や離脱が発生した際に、クラスタ10を構成するノード1の情報を更新し、ノード管理テーブル121として管理する。ここで、「ノードの情報の更新」とは、自身が特権ノードの場合には、死活監視部113から通知されるノード1の障害情報(後述)や追加ノード1からのノード参加情報等に基づき、ノード管理テーブル121(図3参照)を更新し、その情報を残りの全ノード1に配信することを指す。また、自身が特権ノード以外のノード1の場合には、特権ノードから配信されるノード1の更新情報をノード管理テーブル121に反映することを指す。
ノード情報には、各ノード1の少なくともクラスタ10を構成するノード1を一意に識別するもの(例えば、クラスタ10を構成するノード1が同一サブネット内であればIP(Internet Protocol)アドレス)と必要に応じて付属情報(例えば、クラスタ参加時刻等)が含まれる。
<Node management unit 111>
The node management unit 111 updates the information of the node 1 constituting the cluster 10 and manages it as the node management table 121 when the node 1 is added to or removed from the cluster 10. Here, “update of node information” is based on failure information (described later) of node 1 notified from the alive monitoring unit 113, node participation information from the additional node 1, etc., when the node itself is a privileged node. This means that the node management table 121 (see FIG. 3) is updated and the information is distributed to all the remaining nodes 1. Further, when the node itself is a node 1 other than the privileged node, it means that the update information of the node 1 distributed from the privileged node is reflected in the node management table 121.
The node information needs to uniquely identify at least the node 1 constituting the cluster 10 of each node 1 (for example, an IP (Internet Protocol) address if the node 1 constituting the cluster 10 is in the same subnet). Corresponding information (for example, cluster participation time) is included accordingly.

<ノード管理テーブル121>
次に、ノード管理テーブル121の一例について、図3を用いて説明する(適宜、図2参照)。
図3は、ノード管理テーブル121の一例を示す図である。
ノード管理テーブル121は、記憶部12に記憶され、IPアドレス(ノード識別子)131および必要に応じて付属情報としてクラスタ参加時刻132を関連付けて記憶している。
<Node management table 121>
Next, an example of the node management table 121 will be described with reference to FIG. 3 (see FIG. 2 as appropriate).
FIG. 3 is a diagram illustrating an example of the node management table 121.
The node management table 121 is stored in the storage unit 12 and stores an IP address (node identifier) 131 and a cluster participation time 132 as ancillary information as necessary.

IPアドレス131は、ノード1を識別するように付与されるものであって、例えばコンシステントハッシュ(Consistent Hashing)法の管理(振り分け)手法で用いるID空間のIDまたは仮想IDと一意に対応しているものであってもよい。
クラスタ参加時刻132は、ノード1のクラスタ参加時刻を記憶する。
The IP address 131 is assigned so as to identify the node 1, and uniquely corresponds to an ID space ID or a virtual ID used in, for example, the management (distribution) method of the consistent hashing method. It may be.
The cluster participation time 132 stores the cluster participation time of the node 1.

<メッセージ処理部112>
図2に戻って、メッセージ処理部112は、受信したメッセージの処理を実行し処理結果をクライアントに返すことにより、サービスを提供する。この時、上述の例で示したように他のノード1に複製データを配置するようなシステムでは、ノード管理テーブル121を参照して事前に設定された規則(例えば、ノード管理テーブル121の自身の下の行のノード)に基づき複製先を特定し、データの複製を配置するような協調動作を行うこともある。
<Message processing unit 112>
Returning to FIG. 2, the message processing unit 112 provides a service by executing processing of the received message and returning a processing result to the client. At this time, as shown in the above-described example, in a system in which replicated data is arranged in another node 1, rules set in advance with reference to the node management table 121 (for example, the node management table 121 own A collaborative operation may be performed in which a duplication destination is specified based on the nodes in the lower row and data duplication is arranged.

<死活監視部113>
死活監視部113は、死活監視テーブル122を参照して、指定されたノード(例えば、自身の次の行のノード)と常に死活監視信号のやり取りを行い、クラスタ10を構成するノード1の障害を検出する。ノード1の障害を検出した場合、死活監視部113は、自身が特権ノードの場合はノード管理部111に、自身が特権ノード以外の場合には特権ノードに通知を行う。死活監視部113は、クラスタ10を構成するノード1の追加や離脱があった場合、ノード管理テーブル121の更新に同期して死活監視テーブル122を更新する。
<Life and death monitoring unit 113>
The life and death monitoring unit 113 refers to the life and death monitoring table 122 and always exchanges a life and death monitoring signal with a designated node (for example, a node in the next row of itself), and detects a failure of the node 1 constituting the cluster 10. To detect. When a failure of the node 1 is detected, the alive monitoring unit 113 notifies the node management unit 111 when the node itself is a privileged node, and notifies the privileged node when the node itself is other than the privileged node. The alive monitoring unit 113 updates the alive monitoring table 122 in synchronization with the update of the node management table 121 when the node 1 constituting the cluster 10 is added or removed.

<特権ノード選出部114>
特権ノード選出部114は、アルゴリズムが完結するまでの一連の流れでのみ1つの提案で合意が取れることを保証する多数決プロトコルであるPaxosアルゴリズムを適用して、特権ノードを選出する。
<Privileged node selection unit 114>
The privileged node selection unit 114 selects a privileged node by applying the Paxos algorithm, which is a majority protocol that guarantees that one proposal can be agreed only in a series of flows until the algorithm is completed.

特権ノード選出部114は、死活監視部113と連動して、すなわち、死活監視部113からのトリガにより連動して起動する。特権ノード選出部114は、死活監視部113によりあるメンバ(ノード)に障害が発生していることが分かったらその段階で動作を開始することになる。特権ノード選出部114は、ノード管理テーブル121を更新するために、一回Paxosアルゴリズムを実行することにより、死活監視部113により発見(検出)された情報と連動させる。なお、特権ノード選出部114は、死活監視部113と連動して動くものであればよく、死活監視部113に含まれる構成でもよい。Paxosアルゴリズムを用いた特権ノード選出部114の具体的な処理については後記する。   The privileged node selection unit 114 is activated in conjunction with the life and death monitoring unit 113, that is, in conjunction with a trigger from the life and death monitoring unit 113. The privileged node selection unit 114 starts operation at that stage when the life and death monitoring unit 113 finds that a failure has occurred in a certain member (node). In order to update the node management table 121, the privileged node selection unit 114 executes the Paxos algorithm once so as to be linked with information discovered (detected) by the alive monitoring unit 113. The privileged node selection unit 114 only needs to move in conjunction with the life / death monitoring unit 113, and may be configured to be included in the life / death monitoring unit 113. Specific processing of the privileged node selection unit 114 using the Paxos algorithm will be described later.

≪特権ノード≫
ここで、特権ノードについて説明する。
特権ノードは、所定の規則に則り、一意に決定される。具体的には、特権ノードは、ノード管理テーブル121または死活監視テーブル122内の一番上の行のノードから順に、若しくはクラスタ参加時刻が最も古いノードから順にといった規則に従い、一意に決定される。同様に、次に特権ノードとなるノード候補についても、上記所定の規則に則り、一意に決定される。
≪Privilege node≫
Here, the privileged node will be described.
The privileged node is uniquely determined according to a predetermined rule. Specifically, the privileged node is uniquely determined in accordance with a rule such that the node management table 121 or the alive monitoring table 122 starts with the node in the top row or starts with the node with the oldest cluster participation time. Similarly, the candidate node that will be the next privileged node is uniquely determined according to the predetermined rule.

例えば、特権ノードに障害が発生した際には、テーブル内の二行目のノード、または、クラスタ参加時刻が二番目に古いノード、というように次の候補が新しい特権ノードとなる権利を持つ。全メンバ(ノード)は、同一の死活監視テーブル122やノード管理テーブル121を持つため、次の特権メンバ候補は一意に特定することができる。   For example, when a failure occurs in a privileged node, the next candidate has a right to become a new privileged node, such as the node in the second row in the table or the node with the second oldest cluster participation time. Since all members (nodes) have the same life and death monitoring table 122 and node management table 121, the next privileged member candidate can be uniquely identified.

<死活監視テーブル122>
次に、死活監視テーブル122の設定例について、図4を用いて説明する。
図4は、死活監視テーブル122の設定例を示す図である。
死活監視テーブル122は、1台の物理装置を単位として作成され、監視対象のノードをリストアップしたものである。死活監視テーブル122は、監視対象のノードのIPアドレスを記憶している。
死活監視テーブル122は、論理装置単位でノードが構成されるパターンを考慮して、物理メンバ単位に少なくとも1回選択されるようにする。すなわち、物理メンバ単位に少なくとも1回は選択されることで、死活監視がされていないメンバ(ノード)は存在しないようにしている。
<Life monitoring table 122>
Next, a setting example of the life and death monitoring table 122 will be described with reference to FIG.
FIG. 4 is a diagram illustrating a setting example of the life and death monitoring table 122.
The alive monitoring table 122 is created for each physical device, and lists nodes to be monitored. The alive monitoring table 122 stores the IP address of the monitoring target node.
The alive monitoring table 122 is selected at least once for each physical member in consideration of a pattern in which nodes are configured for each logical device. That is, by selecting at least once for each physical member, there is no member (node) that is not monitored for life and death.

また、死活監視テーブル122は、クラスタ10(図1参照)を構成するノード1の追加や離脱があった場合、ノード管理テーブル121と同期的に更新されるものとする。ここで、例えば、ノード管理テーブル121には登録されているが死活監視テーブル122には登録されていないメンバ(ノード)があると、当該ノードは監視されないことになる。この状態を避けるため、ノード等の変更によりノード管理テーブル121が更新されると、必ず死活監視テーブル122についても更新されるように同期を取っている。   The life and death monitoring table 122 is updated synchronously with the node management table 121 when the node 1 constituting the cluster 10 (see FIG. 1) is added or removed. Here, for example, if there is a member (node) registered in the node management table 121 but not registered in the alive monitoring table 122, the node is not monitored. In order to avoid this state, when the node management table 121 is updated due to a change of a node or the like, synchronization is always performed so that the alive monitoring table 122 is also updated.

なお、ノード管理テーブル121と死活監視テーブル122とは、異なるものを用いてもよい場合がある。例えば、1台のサーバに対して仮想的にいくつものIDがあるような場合には、同じノードに対して複数のノードから監視を行うことになるので、この場合には物理ノードだけを抜き出したような死活監視テーブル122を用意しておくことが好ましい。   Note that different node management table 121 and alive monitoring table 122 may be used. For example, if there are virtually several IDs for one server, the same node will be monitored from multiple nodes. In this case, only the physical node is extracted. It is preferable to prepare such an alive monitoring table 122.

<クラスタ離脱指示部115>
クラスタ離脱指示部115は、特権ノード選出部114によるPaxosアルゴリズムを用いた特権ノード選出処理において、2回連続で提案がRejectされた場合、または過半数から応答を集められなかった場合、Split-Brain Syndromeが発生したと判定する。
クラスタ離脱指示部115は、2回連続で自身が特権ノードである旨の提案がRejectされた場合、または過半数から応答を集められなかった場合、自身の所属するクラスタ10の全ノードに対し、クラスタ10からの離脱指示を行い、クラスタ10からの離脱指示を受け取ったノードは当該クラスタ10から離脱することで、Split-Brain Syndromeを解消させる。なお、上記において、分断した他方のクラスタには指示が届かないため、あくまでも分断した一クラスタに対する離脱指示である。
<Cluster leaving instruction unit 115>
In the privileged node selection process using the Paxos algorithm by the privileged node selection unit 114, the cluster leaving instruction unit 115 receives split proposals twice in succession, or when a response cannot be collected from the majority, the split-brain syndrome Is determined to have occurred.
If the cluster leaving instruction unit 115 rejects a proposal that it is a privileged node for two consecutive times, or if a response is not collected from the majority, the cluster leaving instruction unit 115 applies the cluster to all the nodes of the cluster 10 to which it belongs. The node that has issued a leave instruction from the cluster 10 and has received the leave instruction from the cluster 10 leaves the cluster 10 to eliminate the split-brain syndrome. In the above description, since the instruction does not reach the other divided cluster, it is a leave instruction for one divided cluster.

また、クラスタ離脱指示部115は、Split-Brain Syndromeの発生を検出した場合、Split-brain Syndromeが発生したことを示す警報情報をアラームとして出力するものでもよい。この警報情報により、Split-Brain Syndromeの発生を管理者に気付かせることができる。   Further, the cluster leaving instruction unit 115 may output alarm information indicating that a split-brain syndrome has occurred as an alarm when the occurrence of the split-brain syndrome is detected. With this alarm information, the administrator can be aware of the occurrence of Split-Brain Syndrome.

[外部サーバ]
次に、外部サーバ2の機能例について、図5を用いて説明する。
図5は、外部サーバ2の機能例を示す図である。
図5に示すように、外部サーバ2は、管理部21、記憶部22および通信部23を備える。
管理部21は、図示しないCPUおよびメインメモリで構成され、記憶部22に記憶されているプログラムをメインメモリに展開して、各サブクラスタの特権ノード候補/特権ノードを管理する。管理部21は、分断されたサブクラスタのメンバ数が過半数に満たないという、限られた場面において、サブクラスタのメンバ数の最も多いサブクラスタの特権ノード候補を、特権ノードにさせるものである。
[External server]
Next, a function example of the external server 2 will be described with reference to FIG.
FIG. 5 is a diagram illustrating an example of functions of the external server 2.
As shown in FIG. 5, the external server 2 includes a management unit 21, a storage unit 22, and a communication unit 23.
The management unit 21 includes a CPU and a main memory (not shown), expands a program stored in the storage unit 22 to the main memory, and manages privileged node candidates / privileged nodes of each sub-cluster. In a limited situation where the number of divided subcluster members is less than a majority, the management unit 21 causes privileged node candidates of the subcluster having the largest number of subcluster members to be privileged nodes.

管理部21は、クラスタ10(図1参照)が分断された各サブクラスタの特権ノード候補から各サブクラスタのメンバ数の情報を集約し、記憶部22に格納する。管理部21は、この集計結果に基づいて、最もメンバ数の多いサブクラスタ、または、メンバ数が最多かつ等しいサブクラスタが複数存在する場合には特定のロジックに基づいて選出した一つのサブクラスタの特権ノード候補に特権ノード昇格の「了承」を通信部23により通知し、それ以外の特権ノード候補に「否決」を通知する。   The management unit 21 aggregates information on the number of members of each sub-cluster from the privileged node candidates of each sub-cluster where the cluster 10 (see FIG. 1) is divided, and stores the information in the storage unit 22. Based on the result of the aggregation, the management unit 21 selects a sub-cluster having the largest number of members or one sub-cluster selected based on specific logic when there are a plurality of sub-clusters having the largest number of members and the same number. The communication unit 23 notifies the privilege node candidate of “approval” of privilege node promotion, and notifies the other privilege node candidates of “denial”.

管理部21は、外部サーバ2と通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計がクラスタ10の総メンバ数の半数に満たない場合、外部サーバ2と通信可能な特権ノード候補に対し一律に「否決」を通信部23により通知する。   When the total number of sub-cluster members reported from all privileged node candidates that can communicate with the external server 2 is less than half of the total number of members of the cluster 10, the management unit 21 can communicate with the external server 2. The communication unit 23 notifies the candidates of “denied” uniformly.

管理部21は、外部サーバ2と通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計がクラスタ10の総メンバ数の半数に満たない場合、通信部23を介して保守者に特権ノード候補の通知を行うとともに、当該保守者から当該特権ノード候補の「了承/否決」の判断通知を受ける。   When the total number of sub-cluster members reported from all privileged node candidates capable of communicating with the external server 2 is less than half of the total number of members of the cluster 10, the management unit 21 notifies the maintenance person via the communication unit 23. In addition to notifying the privileged node candidate, the maintenance person receives a notification of “approval / denial” of the privileged node candidate.

記憶部22は、メモリやハードディスク等で構成され、各サブクラスタの特権ノード候補から各サブクラスタのメンバ数の情報の集約結果を記憶する。また、記憶部22は、各サブクラスタの特権ノード候補から報告されたクラスタ状態(特権ノード情報、クラスタメンバ数)、および特権ノード候補から発行された特権ノード昇格要求(特権ノード候補情報、サブクラスタメンバ数)を記憶する。
通信部23は、各サブクラスタの特権ノード候補/特権ノードとの間で報告や応答情報を送受信するための通信インタフェースである。
The storage unit 22 is configured by a memory, a hard disk, and the like, and stores an aggregation result of information on the number of members of each subcluster from privileged node candidates of each subcluster. The storage unit 22 also reports the cluster status (privileged node information, number of cluster members) reported from the privileged node candidates of each subcluster, and privileged node promotion requests (privileged node candidate information, subclusters) issued from the privileged node candidates. Number of members).
The communication unit 23 is a communication interface for transmitting and receiving reports and response information between privileged node candidates / privileged nodes of each sub-cluster.

以下、上述のように構成されたクラスタシステムの動作について説明する。
(原理説明)
本発明は、サブクラスタのメンバ数が過半数に満たないという、限られた場面において、クラスタの外部に設置した外部サーバが、サブクラスタのメンバ数の最も多いサブクラスタの特権ノード候補を特権ノードとして「了承」し、他のサブクラスタの特権ノード候補を「否決」して当該サブクラスタを解体させるものである。また、本発明は、外部サーバを利用したSplit-Brain Syndrome発生防止方法である。
The operation of the cluster system configured as described above will be described below.
(Principle explanation)
In the present invention, in a limited situation where the number of members of a subcluster is less than a majority, an external server installed outside the cluster uses the privileged node candidate of the subcluster with the largest number of members of the subcluster as a privileged node. “Accept” and “reject” privileged node candidates of other sub-clusters to disassemble the sub-clusters. The present invention is also a split-brain syndrome prevention method using an external server.

本発明は、自律的にクラスタを構築できるというPaxosアルゴリズムの長所は最大限に活かしつつ、Paxosアルゴリズムではクラスタ解体となるところは外部サーバの助けをかりることで、クラスタの全体の解体を防ぎ、運用を継続する仕組みを提供するものである。
以下、その特徴について記述する。
The present invention makes full use of the advantages of the Paxos algorithm that can construct a cluster autonomously, but the Paxos algorithm uses the help of an external server to prevent the entire cluster from being dismantled and operated. It provides a mechanism to continue
The characteristics are described below.

(1)Paxosアルゴリズム等の多数決分散合意形成アルゴリズムを利用することで、クラスタ内部で自律的にSplit-Brain Syndromeを検出・解消するクラスタシステムである。
(2)クラスタの特権ノードを管理する外部サーバ2をクラスタ外部に設ける。外部サーバ2は、各サブクラスタの特権ノード候補から各サブクラスタのメンバ数の情報を集約する。
(3)外部サーバ2は、当該集約の結果、最もメンバ数の多いサブクラスタ、もしくは、メンバ数が最多かつ等しいサブクラスタが複数存在する場合には特定のロジックに基づいて選出した一つのサブクラスタの特権ノード候補に特権ノード昇格の「了承」を、それ以外の特権ノード候補に「否決」を通知する。
(4)了承の通知を受けた特権ノード候補が特権ノードに昇格する。これにより、過半数を満たすサブクラスタが存在しない場合にも、クラスタの全体の解体を防ぎ、運用を継続することができる。
(1) A cluster system that detects and resolves a split-brain syndrome autonomously within a cluster by using a majority vote consensus building algorithm such as the Paxos algorithm.
(2) An external server 2 that manages the privileged nodes of the cluster is provided outside the cluster. The external server 2 aggregates information on the number of members of each subcluster from the privileged node candidates of each subcluster.
(3) As a result of the aggregation, the external server 2 has a sub-cluster with the largest number of members, or a single sub-cluster selected based on specific logic when there are a plurality of sub-clusters with the largest and equal number of members. “Accept” for the privilege node promotion is notified to the privileged node candidates, and “Negative” is notified to the other privileged node candidates.
(4) A privileged node candidate that has been notified of approval is promoted to a privileged node. As a result, even when there is no sub-cluster satisfying the majority, the entire cluster can be prevented from being dismantled and the operation can be continued.

[外部サーバ2を利用したSplit-Brain Syndrome検出方法の基本動作]
まず、外部サーバ2を利用したSplit-Brain Syndrome検出方法の基本動作について説明する。
分散システム100は、クラスタ10を構成するノード1を管理する特権ノードが、クラスタ毎に1台存在するクラスタシステムを前提とする。
分散システム100は、Paxosアルゴリズムを含む多数決分散合意形成アルゴリズムを適用して、クラスタ10を構成する複数のノードの中からノードを管理する特権を持つ特権ノードを選出する。
本実施形態では、クラスタごとに1台、特権ノード(代表ノード)を存在させ、いずれかのノードの離脱を契機に特権ノードを再選出するPaxosアルゴリズム(非特許文献1参照)を導入する。
[Basic operation of split-brain syndrome detection method using external server 2]
First, the basic operation of the split-brain syndrome detection method using the external server 2 will be described.
The distributed system 100 is premised on a cluster system in which one privileged node that manages the node 1 constituting the cluster 10 exists for each cluster.
The distributed system 100 selects a privileged node having a privilege to manage a node from among a plurality of nodes constituting the cluster 10 by applying a majority vote distributed agreement forming algorithm including the Paxos algorithm.
In the present embodiment, a Paxos algorithm (see Non-Patent Document 1) is introduced, in which one privilege node (representative node) is present for each cluster, and a privilege node is re-selected when one of the nodes leaves.

(動作例1)
図6は、本実施形態に係るクラスタを含む分散システムの動作を示す図である。図17の(課題1)に対応する動作例である。
図6のケースは、クラスタ10(メンバ総数:12)にNW分断が発生してクラスタ10が2つのサブクラスタ(サブクラスタA(メンバ総数:6)とサブクラスタB(メンバ総数:6))に分割された場合である。なお、クラスタ10を構成するノード1は「○(白丸)」で表され、また後記するように特権ノード候補は「◎(二重丸)」で表されている。
(Operation example 1)
FIG. 6 is a diagram illustrating the operation of the distributed system including clusters according to the present embodiment. 18 is an operation example corresponding to (Problem 1) in FIG.
In the case of FIG. 6, NW division occurs in the cluster 10 (total number of members: 12), and the cluster 10 is divided into two sub-clusters (sub-cluster A (total number of members: 6) and sub-cluster B (total number of members: 6)). This is the case when it is divided. Note that the node 1 constituting the cluster 10 is represented by “◯ (white circle)”, and the privileged node candidate is represented by “◎ (double circle)” as described later.

このような場合、従来のPaxosアルゴリズム等の多数決分散合意形成アルゴリズムでは、NW分断により分割されたサブクラスタA(メンバ総数:6)とサブクラスタB(メンバ総数:6)のメンバ数が同数(元のクラスタの半数)であるので、運用可能なクラスタ数の確保が可能であるにも関わらず、クラスタ全体が解体されていた。   In such a case, in the conventional majority distributed agreement formation algorithm such as Paxos algorithm, the number of members of sub-cluster A (total number of members: 6) and sub-cluster B (total number of members: 6) divided by NW division is the same (original Therefore, the entire cluster was disassembled even though it was possible to secure the number of operable clusters.

本実施形態では、クラスタの特権ノードを管理する外部サーバ2をクラスタ外部に設ける。外部サーバ2は、各サブクラスタA,Bの特権ノード候補「1」,「2」(◎(二重丸))から各サブクラスタA,Bのメンバ数の情報の報告を受信し、各サブクラスタA,Bのメンバ数の情報を集約する。外部サーバ2は、最もメンバ数の多いサブクラスタ、もしくは、メンバ数が最多かつ等しいサブクラスタが複数存在する場合には特定のロジックに基づいて選出した一つのサブクラスタ(この場合、サブクラスタA)の特権ノード候補「1」(◎(二重丸))に特権ノード昇格の「了承」を、それ以外(この場合、サブクラスタB)の特権ノード候補「2」(◎(二重丸))に「否決」を通知する。なお、特定のロジックは、どのようなものでもよく、例えばノードIDの新しいものを選ぶ態様でもよい。   In this embodiment, the external server 2 that manages privileged nodes of the cluster is provided outside the cluster. The external server 2 receives a report of information on the number of members of each of the subclusters A and B from the privileged node candidates “1” and “2” (丸 (double circle)) of each of the subclusters A and B. Information on the number of members of clusters A and B is collected. The external server 2 has a sub-cluster with the largest number of members, or a single sub-cluster selected based on specific logic when there are a plurality of sub-clusters with the largest number of members and the same number (in this case, sub-cluster A). Privilege node candidate “1” (◎ (double circle)) is granted “acknowledgement” of privilege node promotion, otherwise (sub-cluster B) privilege node candidate “2” (◎ (double circle)) Is notified of the “denial”. The specific logic may be any type, for example, a mode in which a new node ID is selected.

また、外部サーバ2は、図6の符号aに示すように、メンバ数が最多かつ等しいサブクラスタが複数存在する場合にも、特定のロジックに基づいて特権ノード候補の中から特権ノードを一つに選定する。
「了承」の通知を受けたサブクラスタAの特権ノード候補「1」(◎(二重丸))が特権ノードに昇格することで、過半数を満たすサブクラスタが存在しない場合にも、クラスタの全体の解体を防ぎ、運用を継続することができる。
In addition, as shown by symbol a in FIG. 6, the external server 2 selects one privileged node from among privileged node candidates based on specific logic even when there are a plurality of subclusters having the largest number of members and the same number. Select
Even if there is no sub-cluster that satisfies the majority by the promotion of the privileged node candidate “1” (◎ (double circle)) of the sub-cluster A that has received the notification of “acknowledgement” to the privileged node, Can be prevented and the operation can be continued.

(動作例2)
図7は、本実施形態に係るクラスタを含む分散システムの動作を示す図である。図18の(課題2)に対応する動作例である。
図7のケースは、クラスタ10(メンバ総数:12)にNW分断が発生してクラスタ10が3つのサブクラスタ(サブクラスタA(メンバ総数:3)とサブクラスタB(メンバ総数:5)とサブクラスタC(メンバ総数:4))に分割され、いずれのサブクラスタも元のクラスタの過半数となっていない場合である。
(Operation example 2)
FIG. 7 is a diagram illustrating the operation of the distributed system including the cluster according to the present embodiment. 19 is an operation example corresponding to (Problem 2) in FIG.
In the case of FIG. 7, NW division occurs in the cluster 10 (total number of members: 12), and the cluster 10 has three subclusters (subcluster A (total number of members: 3), subcluster B (total number of members: 5), and sub Cluster C (total number of members: 4)), and no sub-cluster is a majority of the original cluster.

このような場合、従来のPaxosアルゴリズム等の多数決分散合意形成アルゴリズムでは、NW分断が複数発生してクラスタが複数に分割され、なおかつ、元のクラスタの過半数が残存するサブクラスタが存在しない、すなわち元のクラスタのメンバ数の半数より多いサブクラスタが存在しないので、すべて解体されていた。   In such a case, in the majority vote consensus building algorithm such as the conventional Paxos algorithm, a plurality of NW divisions occur, the cluster is divided into a plurality, and there is no sub-cluster in which a majority of the original cluster remains, that is, the original Since there are no more subclusters than half of the members of the cluster, all of them were dismantled.

本実施形態では、NW分断が発生した場合、各サブクラスタA,B,Cの特権ノード候補「1」〜「3」(◎(二重丸))は、外部サーバ2に対して自分のサブクラスタのメンバ数を報告する。外部サーバ2は、各サブクラスタA,B,Cの特権ノード候補「1」〜「3」(◎(二重丸))から各サブクラスタA,B,Cのメンバ数の情報の報告を受信し、各サブクラスタA,B,Cのメンバ数の情報を集約する。外部サーバ2は、最もメンバ数の多いサブクラスタ、もしくは、メンバ数が最多かつ等しいサブクラスタが複数存在する場合には特定のロジックに基づいて選出した一つのサブクラスタ(この場合、サブクラスタB)の特権ノード候補「2」(◎(二重丸))に特権ノード昇格の「了承」を、それ以外(この場合、サブクラスタA,C)の特権ノード候補「1」,「3」(◎(二重丸))に「否決」を通知する。   In this embodiment, when NW partitioning occurs, the privileged node candidates “1” to “3” (((double circle)) of each of the sub-clusters A, B, and C Report the number of cluster members. The external server 2 receives a report on the number of members of each sub-cluster A, B, C from the privileged node candidates “1” to “3” (」(double circle)) of each sub-cluster A, B, C Then, the information on the number of members of each of the sub-clusters A, B, and C is collected. The external server 2 has a sub-cluster having the largest number of members, or one sub-cluster selected based on specific logic when there are a plurality of sub-clusters having the largest number of members and the same number (in this case, sub-cluster B). Privilege node candidate “2” (◎ (double circle)) is granted “acknowledgement” of privilege node promotion, and privilege node candidate candidates “1”, “3” (◎ in this case (sub-clusters A and C)) (Double circle)) is notified.

このように、外部サーバ2は、図7の符号aに示すように、外部サーバ2は、最もメンバ数の多いサブクラスタの特権ノード候補に対して「了承」、その他の特権ノード候補に対して「否決」を応答する。   In this way, the external server 2 is “accepted” for the privileged node candidate of the sub-cluster having the largest number of members, as shown by the symbol a in FIG. Responds with "No".

「了承」の通知を受けたサブクラスタBの特権ノード候補「2」(◎(二重丸))が特権ノードに昇格し、クラスタを構築するとともに、「否決」の通知を受けたサブクラスタA,Cの特権ノード候補「1」,「3」(◎(二重丸))はクラスタを解体する。これにより、NW分断が複数発生してクラスタが複数に分割され、なおかつ、元のクラスタの過半数が残存するサブクラスタが存在しない場合にも、クラスタの全体の解体を防ぎ、運用を継続することができる。   The candidate for the privileged node “2” (◎ (double circle)) of the sub-cluster B that has received the notification of “acknowledgement” is promoted to a privileged node to construct the cluster, and the sub-cluster A that has received the notification of “denial” , C privileged node candidates “1” and “3” (◎ (double circle)) disassemble the cluster. As a result, even when multiple NW partitioning occurs and the cluster is divided into multiple clusters, and there is no sub-cluster in which a majority of the original cluster remains, the entire cluster can be prevented from being dismantled and continued to operate. it can.

[外部サーバ2に障害が発生した場合の動作]
次に、外部サーバ2に障害が発生した場合の動作について説明する。
図8は、本実施形態に係るクラスタを含む分散システムの外部サーバ2に障害が発生した場合の動作を示す図である。
本実施形態では、何らかの障害が原因で外部サーバ2から「了承/否決」の応答がないとき、サブクラスタのメンバ数が過半数を満たす場合は外部サーバ2からの応答を待たずに特権ノードが自律的にクラスタを構築し、かつ、サブクラスタのメンバ数が過半数を満たさない場合は外部サーバ2からの応答タイムアウトで自律的にサブクラスタを解体する。
[Operation when a failure occurs in the external server 2]
Next, an operation when a failure occurs in the external server 2 will be described.
FIG. 8 is a diagram illustrating an operation when a failure occurs in the external server 2 of the distributed system including the cluster according to the present embodiment.
In this embodiment, when there is no “acknowledge / deny” response from the external server 2 due to some failure, the privileged node autonomously waits for a response from the external server 2 if the sub-cluster members satisfy the majority. If the cluster is constructed and the number of members of the sub-cluster does not satisfy the majority, the sub-cluster is dismantled autonomously with a response timeout from the external server 2.

図8のケースでは、クラスタ10(メンバ総数:12)にNW分断が発生してクラスタ10が3つのサブクラスタ(サブクラスタA(メンバ総数:3)とサブクラスタB(メンバ総数:7)とサブクラスタC(メンバ総数:2))に分割された場合を想定する。この場合、図8の破線矢印に示すように、各サブクラスタA,B,Cの特権ノード候補「1」〜「3」(◎(二重丸))は、外部サーバ2に対して、各サブクラスタA,B,Cのメンバ数の情報の報告を送信する。しかしながら、外部サーバ2に障害が発生している場合、外部サーバ2は、各サブクラスタA,B,Cのメンバ数の情報を集約できない、または該当する特権ノード候補(◎(二重丸))に特権ノード昇格の「了承」を、それ以外の特権ノード候補(◎(二重丸))に「否決」を通知することができない。   In the case of FIG. 8, NW division occurs in the cluster 10 (total number of members: 12), and the cluster 10 has three sub-clusters (sub-cluster A (total number of members: 3), sub-cluster B (total number of members: 7), and sub Assume that the data is divided into cluster C (total number of members: 2)). In this case, as indicated by the broken-line arrows in FIG. 8, privileged node candidates “1” to “3” (((double circle)) of each of the sub-clusters A, B, and C A report of information on the number of members of sub-clusters A, B, and C is transmitted. However, if a failure has occurred in the external server 2, the external server 2 cannot aggregate information on the number of members of each sub-cluster A, B, or C, or the corresponding privileged node candidate (◎ (double circle)) “Accept” for promotion of privileged node cannot be notified, and “Negative” cannot be notified to other privileged node candidates (((double circle)).

図8のケースでは、サブクラスタBの特権ノード候補「2」(◎(二重丸))については、Paxosアルゴリズム(非特許文献1参照)によって、過半数を満たすサブクラスタの特権ノード候補は自律的に特権ノードへ昇格する。しかし、サブクラスタA,Cの特権ノード候補「1」,「3」(◎(二重丸))ついても、外部サーバ2に対して特権ノードへの昇格要求を発行して、外部サーバ2からの特権ノード昇格の「了承」または「否決」の応答を待っている。ここでは、外部サーバ2に障害が発生(外部サーバ2自体の障害または通信経路の障害のいずれも含む)していると想定しているので、サブクラスタA,Cの特権ノード候補「1」,「3」(◎(二重丸))に外部サーバ2から「了承/否決」の応答が通知されることはない。   In the case of FIG. 8, for the privileged node candidate “2” (」(double circle)) of the subcluster B, the privileged node candidate of the subcluster satisfying the majority is autonomous by the Paxos algorithm (see Non-Patent Document 1). To a privileged node. However, even for the privileged node candidates “1” and “3” (◎ (double circle)) of the sub-clusters A and C, the promotion request to the privileged node is issued to the external server 2 and the external server 2 Waiting for a response of “acknowledgement” or “denial” of the privilege node promotion. Here, since it is assumed that a failure has occurred in the external server 2 (including a failure in the external server 2 itself or a failure in the communication path), the privileged node candidates “1” of the sub-clusters A and C, The response “accept / deny” is not notified from the external server 2 to “3” (((double circle)).

そこで、図8の符号aに示すように、各サブクラスタA,B,Cの特権ノード候補「1」〜「3」(◎(二重丸))は、外部サーバ2に対して昇格要求送信後、タイマを起動し、外部サーバ2から「否決」の応答がない場合、過半数を満たさないサブクラスタの特権ノード候補「1」,「3」(◎(二重丸))は、前記タイマの応答タイムアウトでクラスタを解体する。
また、図8の符号bに示すように、外部サーバ2から「了承」の応答がない場合でも、過半数を満たすサブクラスタの特権ノード候補「2」(◎(二重丸))は、前記タイマの応答タイムアウトで特権ノードへ昇格する。
Therefore, as shown by the symbol a in FIG. 8, the privileged node candidates “1” to “3” (二 重 (double circle)) of each of the sub-clusters A, B, and C are transmitted to the external server 2 as promotion requests. After that, when the timer is started and there is no “decision” response from the external server 2, the privileged node candidates “1” and “3” (◎ (double circle)) of the sub-cluster that does not satisfy the majority are Dismantle the cluster with a response timeout.
Further, as shown by the symbol b in FIG. 8, even when there is no “acknowledge” response from the external server 2, the privileged candidate node “2” (((double circle)) of the sub-cluster satisfying the majority is the timer. Is promoted to privileged node with a response timeout of.

このように、外部サーバ2に対して昇格要求送信後、タイマを起動し、外部サーバ2から了承/否決の応答がないときであっても、サブクラスタのメンバ数が過半数を満たす場合は外部サーバ2からの応答を待たずに特権ノードが自律的にクラスタを構築し、かつ、サブクラスタのメンバ数が過半数を満たさない場合は外部サーバ2からの応答タイムアウトで自律的にサブクラスタを解体する。   As described above, after the promotion request is transmitted to the external server 2, the timer is started, and even if there is no approval / disapproval response from the external server 2, if the number of sub-cluster members satisfies the majority, the external server If the privileged node autonomously constructs a cluster without waiting for a response from 2 and the number of members of the subcluster does not satisfy the majority, the subcluster is dismantled autonomously by a response timeout from the external server 2.

[クラスタの一部と外部サーバ2との間に障害が発生した場合の動作(その1)]
次に、クラスタの一部と外部サーバ2との間に障害が発生した場合の動作について説明する。
図9は、本実施形態に係るクラスタシステムのクラスタの一部と外部サーバ2との間に障害が発生した場合の動作を示す図である。
本実施形態では、クラスタの一部と外部サーバ2との間に部分的な障害が発生したとき、外部サーバ2と通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計がクラスタの総メンバ数の半数に満たない場合、外部サーバ2から検知できないところで特権ノードが選出される可能性を考慮し、外部サーバ2は通信可能な特権ノード候補に対し一律「否決」を通知する。以下、具体的に説明する。
[Operation when a failure occurs between a part of the cluster and the external server 2 (part 1)]
Next, an operation when a failure occurs between a part of the cluster and the external server 2 will be described.
FIG. 9 is a diagram illustrating an operation when a failure occurs between a part of the cluster of the cluster system according to the present embodiment and the external server 2.
In the present embodiment, when a partial failure occurs between a part of the cluster and the external server 2, the total number of sub-cluster members reported from all privileged node candidates that can communicate with the external server 2 is the cluster. In consideration of the possibility that a privileged node is selected in a case where it cannot be detected from the external server 2, the external server 2 uniformly notifies the communicable privileged node candidate of “no”. This will be specifically described below.

図9のケースでは、クラスタ10(メンバ総数:12)にNW分断が発生してクラスタ10が3つのサブクラスタ(サブクラスタA(メンバ総数:3)とサブクラスタB(メンバ総数:7)とサブクラスタC(メンバ総数:2))に分割された場合を想定する。この場合、図9の破線および実線矢印に示すように、クラスタの一部(ここではサブクラスタB,C)と外部サーバ2に障害が発生している場合、クラスタの一部(ここではサブクラスタB,C)は外部サーバ2に対してサブクラスタB,Cのメンバ数の情報の報告を送信することができない。この場合の外部サーバ2と通信可能な全特権ノード候補は、サブクラスタAの特権ノード候補「1」(◎(二重丸))(メンバ数:3)である。したがって、外部サーバ2は、各サブクラスタB,Cのメンバ数の情報を集約できない、または該当する特権ノード候補(◎(二重丸))に特権ノード昇格の「了承」を、それ以外の特権ノード候補(◎(二重丸))に「否決」を通知することができない。   In the case of FIG. 9, NW partitioning occurs in the cluster 10 (total number of members: 12), and the cluster 10 has three sub-clusters (sub-cluster A (total number of members: 3), sub-cluster B (total number of members: 7), and sub Assume that the data is divided into cluster C (total number of members: 2)). In this case, as indicated by broken lines and solid arrows in FIG. 9, when a failure occurs in a part of the cluster (here, sub-clusters B and C) and the external server 2, a part of the cluster (here, the sub-cluster). B, C) cannot send a report of information on the number of members of the sub-clusters B and C to the external server 2. In this case, all privileged node candidates that can communicate with the external server 2 are the privileged node candidate “1” (((double circle)) (number of members: 3) of the sub-cluster A. Therefore, the external server 2 cannot aggregate information on the number of members of each of the sub-clusters B and C, or grants “acceptance” for privilege node promotion to the corresponding privilege node candidate (◎ (double circle)) and other privileges. The node candidate (「(double circle)) cannot be notified of“ denial ”.

図9の符号aに示すように、外部サーバ2は、自身からクラスタメンバの半数以上の状態が見えない(サブクラスタAの特権ノード候補「1」(◎(二重丸))(メンバ数:3)のみが見えている)状態である。   9, the external server 2 cannot see the state of more than half of the cluster members from itself (sub-cluster A privileged node candidate “1” (◎ (double circle)) (number of members: Only 3) is visible).

一方、図9の符号bに示すように、特権ノード候補「2」(◎(二重丸))は、過半数を満たすため、Paxosアルゴリズム等の多数決分散合意形成アルゴリズムによって、外部サーバ2からの応答がなくても特権ノードに自律的に昇格してクラスタを構築する。   On the other hand, as shown by the symbol b in FIG. 9, the privileged node candidate “2” (◎ (double circle)) satisfies the majority, so that a response from the external server 2 is obtained by a majority decision consensus building algorithm such as the Paxos algorithm. Even if there is no cluster, it is promoted autonomously to a privileged node to build a cluster.

したがって、図9のケースでは、特権ノード候補「2」(◎(二重丸))は、外部サーバ2からの応答がなくても特権ノードに昇格してクラスタを構築する一方、外部サーバ2から見えるクラスタは、サブクラスタAの特権ノード候補「1」(◎(二重丸))(メンバ数:3)のみである。外部サーバ2が、このサブクラスタAの特権ノード候補「1」(◎(二重丸))に特権ノード昇格の「了承」を通知してしまうと、サブクラスタA,Bがそれぞれ動作を継続するSplit-Brain Syndromeが発生するおそれがある。このような不具合は、クラスタの一部と外部サーバ2との間に障害が発生した場合に起こり得る。   Accordingly, in the case of FIG. 9, the privileged node candidate “2” (二 重 (double circle)) is promoted to a privileged node and constructed as a cluster even if there is no response from the external server 2, while from the external server 2. The cluster that can be seen is only the privileged node candidate “1” (サ ブ (double circle)) (number of members: 3) of the sub-cluster A. When the external server 2 notifies the privileged node candidate “1” (◎ (double circle)) of the sub-cluster A of “acceptance” for promotion of the privileged node, the sub-clusters A and B continue to operate. Split-Brain Syndrome may occur. Such a problem may occur when a failure occurs between a part of the cluster and the external server 2.

そこで、図9の符号aに示すように、外部サーバ2は、自身からクラスタメンバの半数以上の状態が見えない場合、一律「否決」を通知する。すなわち、外部サーバ2は、外部サーバ2と通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計がクラスタの総メンバ数の半数に満たない場合、直ちに「否決」を通知する。   Therefore, as indicated by reference symbol a in FIG. 9, the external server 2 uniformly notifies “decision” when the state of more than half of the cluster members cannot be seen from itself. In other words, when the total number of sub-cluster members reported from all privileged node candidates communicable with the external server 2 is less than half of the total number of members of the cluster, the external server 2 immediately notifies “No”.

このように、クラスタの一部と外部サーバ2との間に部分的な障害が発生したとき、外部サーバ2と通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計がクラスタの総メンバ数の半数に満たない場合、外部サーバ2から検知できないところで特権ノードが選出される可能性を考慮し、外部サーバ2は通信可能な特権ノード候補に対し一律「否決」を通知する。これにより、クラスタの一部と外部サーバ2との間に障害が発生した場合であってもSplit-Brain Syndromeを防止することができる。   Thus, when a partial failure occurs between a part of the cluster and the external server 2, the total number of sub-cluster members reported from all privileged node candidates that can communicate with the external server 2 is If less than half of the total number of members, considering the possibility that a privileged node will be selected when it cannot be detected from the external server 2, the external server 2 notifies the communicable privileged node candidate of a uniform “denial”. Thereby, even when a failure occurs between a part of the cluster and the external server 2, the split-brain syndrome can be prevented.

[クラスタの一部と外部サーバ2との間に障害が発生した場合の動作(その2)]
次に、クラスタの一部と外部サーバ2との間に障害が発生した場合の動作について説明する。
図10は、本実施形態に係るクラスタシステムのクラスタの一部と外部サーバ2との間に障害が発生した場合の動作を示す図である。
本実施形態では、クラスタの一部と外部サーバ2との間に部分的な障害が発生したとき、外部サーバ2と通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計がクラスタの総メンバ数の半数に満たない場合、外部サーバ2から検知できないところで特権ノードが選出される可能性を考慮し、外部サーバ2は保守者(保守者端末)に特権ノード候補の通知を行い、「了承/否決」の判断を保守者が行う。
[Operation when a failure occurs between a part of the cluster and the external server 2 (part 2)]
Next, an operation when a failure occurs between a part of the cluster and the external server 2 will be described.
FIG. 10 is a diagram illustrating an operation when a failure occurs between a part of the cluster of the cluster system according to the present embodiment and the external server 2.
In the present embodiment, when a partial failure occurs between a part of the cluster and the external server 2, the total number of sub-cluster members reported from all privileged node candidates that can communicate with the external server 2 is the cluster. In consideration of the possibility that a privileged node is selected in a case where it cannot be detected from the external server 2, the external server 2 notifies the maintenance node (maintenance terminal) of the privileged node candidate. The maintenance person makes an “approval / denial” decision.

図10のケースでは、図9のケースと同様に、クラスタ10(メンバ総数:12)にNW分断が発生してクラスタ10が3つのサブクラスタ(サブクラスタA(メンバ総数:3)とサブクラスタB(メンバ総数:7)とサブクラスタC(メンバ総数:2))に分割された場合を想定する。この場合、図10の破線および実線矢印に示すように、クラスタの一部(ここではサブクラスタB,C)と外部サーバ2に障害が発生している場合、クラスタの一部(ここではサブクラスタB,C)は外部サーバ2に対してサブクラスタB,Cのメンバ数の情報の報告を送信することができない。また、外部サーバ2は、各サブクラスタB,Cのメンバ数の情報を集約できない、または該当する特権ノード候補(◎(二重丸))に特権ノード昇格の「了承」を、それ以外の特権ノード候補(◎(二重丸))に「否決」を通知することができない。   In the case of FIG. 10, as in the case of FIG. 9, NW division occurs in the cluster 10 (total number of members: 12), and the cluster 10 has three subclusters (subcluster A (total number of members: 3) and subcluster B). It is assumed that the number of members is divided into (total number of members: 7) and sub-cluster C (total number of members: 2)). In this case, as indicated by broken lines and solid arrows in FIG. 10, when a failure occurs in a part of the cluster (here, subclusters B and C) and the external server 2, a part of the cluster (here, the subcluster) B, C) cannot send a report of information on the number of members of the sub-clusters B and C to the external server 2. Further, the external server 2 cannot aggregate the information on the number of members of each of the sub-clusters B and C, or grants “approval” of privilege node promotion to the corresponding privilege node candidate (◎ (double circle)) and other privileges. The node candidate (「(double circle)) cannot be notified of“ denial ”.

そこで、図10の符号aに示すように、外部サーバ2は、自身からクラスタメンバの半数以上の状態が見えないため、保守者(保守者端末)へ特権ノード候補の通知を行い、保守者が特権ノードを判断する。前記図9の場合は、外部サーバ2は、自身からクラスタメンバの半数以上の状態が見えないため、一律「否決」を通知していたが、図10の場合は、外部サーバ2は、外部サーバ2は保守者(保守者端末)に特権ノード候補の通知を行い、保守者(保守者端末)から「否決/可決」の判断を受けて、該当特権ノード候補「1」(◎(二重丸))に「了承/否決」を通知する。
また、図10の符号bに示すように、特権ノード候補「2」(◎(二重丸))は、過半数を満たすため、外部サーバ2からの応答がなくても特権ノードに昇格する。
Therefore, as indicated by reference symbol a in FIG. 10, since the external server 2 cannot see the state of more than half of the cluster members from itself, it notifies the maintenance person (maintenance person terminal) of the privileged node candidate, and the maintenance person Determine the privileged node. In the case of FIG. 9, since the external server 2 cannot see the state of more than half of the cluster members from itself, it has been notified of “decision” uniformly, but in the case of FIG. 10, the external server 2 is the external server. 2 notifies the maintenance person (maintenance person's terminal) of the privileged node candidate, receives the determination of “denial / passed” from the maintenance person (maintenance person's terminal), and receives the corresponding privilege node candidate “1” (◎ (double circle) )) Is notified of "approval / denial".
Further, as indicated by a symbol b in FIG. 10, the privileged node candidate “2” (◎ (double circle)) satisfies the majority, and is promoted to a privileged node even if there is no response from the external server 2.

このように、クラスタの一部と外部サーバ2との間に部分的な障害が発生したとき、外部サーバ2と通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計がクラスタの総メンバ数の半数に満たない場合、外部サーバ2から検知できないところで特権ノードが選出される可能性を考慮し、外部サーバ2は保守者(保守者端末)に最適な特権ノード候補の通知を行い、「了承/否決」の判断を保守者(保守者端末)が介在して行う。   Thus, when a partial failure occurs between a part of the cluster and the external server 2, the total number of sub-cluster members reported from all privileged node candidates that can communicate with the external server 2 is If less than half of the total number of members, the external server 2 notifies the maintenance person (maintenance person terminal) of the optimal privilege node candidate in consideration of the possibility of selecting a privileged node where it cannot be detected from the external server 2. The determination of “acknowledgement / denial” is made by the maintenance person (maintenance person terminal).

これにより、クラスタの一部と外部サーバ2との間に障害が発生した場合であってもSplit-Brain Syndromeを防止することができる。また、図9のように一律「否決」を通知する場合に比べ、より適切な運用を継続することができる。例えば、図10のケースにおいて、サブクラスタB(メンバ総数:12)がさらに2つに分断(クラスタ10が4つに分断)されたような場合、図9の例では、一律「否決」により、全てのサブクラスタが解体されるが、「了承/否決」の判断を保守者(保守者端末)が介在して行うことで、分断されたサブクラスタBのうち一部のサブクラスタについては、クラスタを構築させることが可能となる。   Thereby, even when a failure occurs between a part of the cluster and the external server 2, the split-brain syndrome can be prevented. In addition, more appropriate operation can be continued as compared with the case where a uniform “denial” is notified as shown in FIG. 9. For example, in the case of FIG. 10, when the sub-cluster B (total number of members: 12) is further divided into two (cluster 10 is divided into four), in the example of FIG. Although all sub-clusters are dismantled, the maintenance person (maintenance person terminal) makes an “acknowledge / denial” decision, so that some sub-clusters of the divided sub-clusters B are clustered. Can be constructed.

[外部サーバ2を利用したSplit-Brain Syndrome発生防止方法の手順]
次に、外部サーバ2を利用したSplit-Brain Syndrome発生防止方法の手順について説明する。
図11は、本実施形態に係るクラスタシステムの外部サーバ2を利用したSplit-Brain Syndrome発生防止方法の手順を説明する図である。図11(a)は特権ノード候補の選定(手順1)、図11(b)は外部サーバ2への報告および回答(手順2,3)、図11(c)はクラスタの構築・解体(手順4)を示す。
[Procedure for Split-Brain Syndrome Prevention Method Using External Server 2]
Next, the procedure of the Split-Brain Syndrome occurrence prevention method using the external server 2 will be described.
FIG. 11 is a diagram for explaining the procedure of the split-brain syndrome generation prevention method using the external server 2 of the cluster system according to the present embodiment. 11A shows selection of privileged node candidates (procedure 1), FIG. 11B shows reports and responses to the external server 2 (procedures 2 and 3), and FIG. 11C shows cluster construction / disassembly (procedure). 4).

(手順1):特権ノード候補の選定(図11(a)参照)
手順1では、クラスタの分断された箇所(サブクラスタ)毎に特権ノード候補を選定する。
図11(a)に示すように、クラスタ10(メンバ総数:13)にNW分断が発生してクラスタ10が3つのサブクラスタ(サブクラスタA(メンバ総数:6)とサブクラスタB(メンバ総数:3)とサブクラスタC(メンバ総数:4))に分割されている。この場合、各サブクラスタA,B,C毎に特権ノード候補「1」〜「3」(◎(二重丸))を選定する。
(Procedure 1): Selection of privileged node candidates (see FIG. 11A)
In procedure 1, a privileged node candidate is selected for each divided part (subcluster) of the cluster.
As shown in FIG. 11A, NW partitioning occurs in the cluster 10 (total number of members: 13), and the cluster 10 has three sub-clusters (sub-cluster A (total number of members: 6)) and sub-cluster B (total number of members: 3) and sub-cluster C (total number of members: 4)). In this case, privileged node candidates “1” to “3” (◎ (double circle)) are selected for each of the sub-clusters A, B, and C.

(手順2):外部サーバ2への報告(図11(b)参照)
手順2では、特権ノード候補は、下記手順(2−A)または手順(2−B)を実行する。
(Procedure 2): Report to the external server 2 (see FIG. 11B)
In procedure 2, the privileged node candidate executes the following procedure (2-A) or procedure (2-B).

(2−A) サブクラスタのメンバ数が、分断前のクラスタ全体のメンバ数の過半数を満たす場合、特権ノード(注:「特権ノード候補」ではない。)としてクラスタ状態(特権ノード情報、クラスタメンバ数)を外部サーバ2へ報告する。なお、図11は、この(2−A)のケースには該当しない。   (2-A) When the number of members of the sub-cluster satisfies a majority of the total number of members before the division, the cluster state (privileged node information, cluster members) is set as a privileged node (note: not a “privileged node candidate”). Number) to the external server 2. Note that FIG. 11 does not correspond to the case (2-A).

(2−B) 図11(b)に示すように、サブクラスタのメンバ数が、分断前のクラスタ全体のメンバ数の半数以下の場合、特権ノード候補として、特権ノード昇格要求(特権ノード候補情報、サブクラスタメンバ数)を外部サーバ2へ発行(報告)する。図11(b)の場合、サブクラスタA,B,Cのメンバ数が、分断前のクラスタ全体のメンバ数の半数以下であるので、特権ノード候補(◎(二重丸))として、特権ノード昇格要求(特権ノード候補情報、サブクラスタメンバ数)を外部サーバ2へ発行する。   (2-B) As shown in FIG. 11B, when the number of members of the sub-cluster is equal to or less than half the number of members of the entire cluster before the division, a privileged node promotion request (privileged node candidate information) , The number of sub-cluster members) is issued (reported) to the external server 2. In the case of FIG. 11B, since the number of members of the sub-clusters A, B, and C is less than half the number of members of the entire cluster before the division, the privileged node is designated as a privileged node candidate (◎ (double circle)). An promotion request (privileged node candidate information, number of subcluster members) is issued to the external server 2.

(手順3):外部サーバ2からの回答(図11(b)参照)
手順3では、上記手順(2−A)の「報告」がある場合とない場合、さらにこの「報告」がない場合でメンバ数に応じて、外部サーバ2は、以下の各手順のいずれかを実行する。
(Procedure 3): Reply from the external server 2 (see FIG. 11B)
In the procedure 3, the external server 2 performs one of the following procedures depending on the number of members when the “report” of the procedure (2-A) is present or not, and when there is no “report”. Run.

(3−A) 外部サーバ2は、上記手順(2−A)の「報告」がある場合、それ以外の特権ノード候補からの昇格要求に対し「否決」を通知する。   (3-A) When there is a “report” in the above procedure (2-A), the external server 2 notifies the “rejection” in response to a promotion request from other privileged node candidates.

(3−B) 外部サーバ2は、上記手順(2−A)の「報告」がなく、かつ、クラスタメンバの半数以上の状態が外部サーバ2からタイムアウト期間(T2)中に見える場合、特権ノード昇格要求を集約し、サブクラスタメンバ数の最も多いサブクラスタの特権ノード候補に対し「了承」を、それ以外の特権ノード候補に対し「否決」を通知する。メンバ数が最多かつ同数のサブクラスタが存在する場合にも所定ロジックに基づき、一つの特権ノード候補のみに「了承」を通知する。図11(b)の場合、外部サーバ2は、サブクラスタメンバ数の最も多いサブクラスタAの特権ノード候補「1」(◎(二重丸))に対し「了承」を、それ以外の特権ノード候補「2」,「3」(◎(二重丸))に対し「否決」を通知する。なお、上記タイムアウト期間(T2)とは、外部サーバ2が、サブクラスタの特権ノード候補からの報告を待つ一定期間である。   (3-B) If the external server 2 does not have the “report” in the above procedure (2-A) and more than half of the cluster members are visible from the external server 2 during the timeout period (T2), the privileged node The promotion requests are aggregated, and “Accept” is notified to the privileged node candidate of the subcluster having the largest number of subcluster members, and “Negative” is notified to the other privileged node candidates. Even when there are the largest number of members and the same number of sub-clusters, only one privileged node candidate is notified of “acknowledgment” based on the predetermined logic. In the case of FIG. 11B, the external server 2 gives “accept” to the privileged node candidate “1” (((double circle)) of the subcluster A having the largest number of subcluster members, and other privileged nodes. The candidates “2” and “3” (((double circle)) are notified of “denied”. The timeout period (T2) is a fixed period in which the external server 2 waits for a report from a privileged node candidate of the sub-cluster.

(3−C) 外部サーバ2は、上記手順(2−A)の「報告」がなく、かつ、クラスタメンバの半数以上の状態が外部サーバ2からタイムアウト期間(T2)中に見えない場合、下記手順(3−C−1)または手順(3−C−2)を実行する。手順(3−C−1)では、外部サーバ2は、外部サーバ2から見えるすべての特権ノード候補に対し「否決」を通知する(図9参照)。手順(3−C−2)では、外部サーバ2は、保守者(保守者端末)に通知し、保守者介在で「了承/否決」を通知する(図10参照)。   (3-C) If the external server 2 does not have the “report” in the above procedure (2-A) and more than half of the cluster members cannot be seen from the external server 2 during the timeout period (T2), Step (3-C-1) or step (3-C-2) is executed. In the procedure (3-C-1), the external server 2 notifies a “denial” to all privileged node candidates visible from the external server 2 (see FIG. 9). In the procedure (3-C-2), the external server 2 notifies the maintenance person (maintenance person terminal) and notifies “acknowledgement / denial” through the maintenance person (see FIG. 10).

(手順4):クラスタの構築・解体(図11(c)参照)
手順4では、特権ノード候補は、下記手順(4−A)、手順(4−B)または手順(4−C)を実行する。
(Procedure 4): Cluster construction / disassembly (see FIG. 11C)
In procedure 4, the privileged node candidate executes the following procedure (4-A), procedure (4-B), or procedure (4-C).

(4−A) 特権ノード候補は、外部サーバ2から「了承」通知を受信した場合、図11(c)の○印に示すように、サブクラスタAの特権ノード候補1を特権ノード「★(星印)」に昇格し、クラスタを構築する。   (4-A) When the privileged node candidate receives the “acknowledge” notification from the external server 2, the privileged node candidate 1 of the sub-cluster A is designated as the privileged node “★ ( Promote to "star" and build a cluster.

(4−B) 特権ノード候補は、外部サーバ2から「否決」通知を受信した場合、図11(c)の×印に示すように、クラスタ(ここではサブクラスタB,C)を解体する。   (4-B) When the privileged node candidate receives the “denial” notification from the external server 2, the privileged node candidate disassembles the clusters (here, the sub-clusters B and C) as indicated by the crosses in FIG.

(4−C) 特権ノード候補は、外部サーバ2から、一定期間(タイムアウトT1)通知がない場合、図11(c)の×印に示すように、クラスタを解体する。   (4-C) If there is no notification from the external server 2 for a certain period of time (timeout T1), the privileged node candidate disassembles the cluster as shown by a cross in FIG.

次に、特権ノード/特権ノード候補および外部サーバ2の管理処理について説明する。まず、特権ノード/特権ノード候補の管理処理について述べる。   Next, the management process of the privileged node / privileged node candidate and the external server 2 will be described. First, management processing of privileged nodes / privileged node candidates will be described.

[特権ノード/特権ノード候補の管理処理]
図12は、本実施形態に係るクラスタシステムの特権ノード/特権ノード候補の管理処理を示すフローチャートであり、図11(c)の(手順4)に対応する。
本フローは、メンバ数変動をイベント(契機)にスタートする。ステップS11において、特権ノード選出部114は、特権ノード候補の認識しているクラスタメンバ数(メンバ数m)を集約する。このクラスタメンバ数(メンバ数m)の集約は、後記図15のPaxosアルゴリズム(非特許文献1参照)の第一フェーズ(Prepare phase)において、応答を返信してきたAcceptor(受理ノード)の数を集計することにより行う。
[Management processing of privileged nodes / privileged node candidates]
FIG. 12 is a flowchart showing the management processing of privileged nodes / privileged node candidates in the cluster system according to this embodiment, and corresponds to (Procedure 4) in FIG.
This flow starts with a change in the number of members as an event. In step S11, the privileged node selection unit 114 aggregates the number of cluster members (number of members m) recognized by the privileged node candidate. The aggregation of the number of cluster members (number of members m) is the sum of the number of Acceptors (accepting nodes) that have returned responses in the first phase (Prepare phase) of the Paxos algorithm (see Non-Patent Document 1) shown in FIG. To do.

ステップS12において、特権ノード選出部114は、特権ノード候補の認識しているメンバ数mがNW分断前のクラスタの全メンバ数N/2より大きい(m>N/2)か否かを判別する。
m>N/2の場合、ステップS13で特権ノード選出部114は、特権ノードへ昇格し、クラスタを構築し、クラスタの特権ノードは、クラスタ状態(特権ノード情報、クラスタメンバ数)を定期的およびクラスタのメンバ数が変化した時に外部サーバ2へ報告して本フローを終了する。
m≦N/2の場合、ステップS14で特権ノード選出部114は、特権ノード候補として、特権ノード昇格要求(特権ノード候補情報、クラスタメンバ数)を外部サーバ2へ送信(発行)する。
In step S12, the privileged node selection unit 114 determines whether the number of members m recognized by the privileged node candidate is greater than the total number of members N / 2 before the NW division (m> N / 2). .
In the case of m> N / 2, the privileged node selection unit 114 is promoted to a privileged node and builds a cluster in step S13, and the privileged node of the cluster periodically changes the cluster status (privileged node information, number of cluster members) and When the number of cluster members changes, the external server 2 is notified and this flow is terminated.
When m ≦ N / 2, the privileged node selection unit 114 transmits (issues) a privileged node promotion request (privileged node candidate information, number of cluster members) to the external server 2 as a privileged node candidate in step S14.

次いで、ステップS15で特権ノード選出部114は、外部サーバ2から通知があるか否かを判別する。
上記ステップS15で外部サーバ2から「了承」を受信した場合、ステップS13に進む。上記したように、ステップS13で特権ノード選出部114は、特権ノードへ昇格し、クラスタを構築し、クラスタ状態(特権ノード情報、クラスタメンバ数)を外部サーバ2へ報告する。
上記ステップS15で外部サーバ2から「否決」を受信した場合、または外部サーバ2からの返答がない(タイムアウトT1)場合、ステップS16で特権ノード選出部114は、クラスタを解体して本フローを終了する。
Next, in step S <b> 15, the privileged node selection unit 114 determines whether there is a notification from the external server 2.
If “acknowledgement” is received from the external server 2 in step S15, the process proceeds to step S13. As described above, in step S13, the privileged node selection unit 114 is promoted to a privileged node, builds a cluster, and reports the cluster status (privileged node information, number of cluster members) to the external server 2.
If the “No” is received from the external server 2 in step S15 or if there is no response from the external server 2 (timeout T1), the privileged node selection unit 114 disassembles the cluster and ends this flow in step S16. To do.

[外部サーバ2の管理処理]
次に、外部サーバ2の管理処理について説明する。
外部サーバ2は、「通常機能」と「特権ノード選定機能」とを有し、「特権ノード選定機能」はさらに<メイン処理>(後記図13参照)と、<タイマ処理>(後記図14参照)とを実行する。
[Management processing of external server 2]
Next, the management process of the external server 2 will be described.
The external server 2 has a “normal function” and a “privileged node selection function”. The “privileged node selection function” further includes <main processing> (see FIG. 13 to be described later) and <timer processing> (see FIG. 14 to be described later). ) And execute.

(通常機能)
外部サーバ2は、「通常機能」において、現在のクラスタの全メンバ数を把握(特権ノードへ周期確認)する。また、現在の特権ノードを把握(特権ノードへ周期確認)する。
(Normal function)
In the “normal function”, the external server 2 grasps the total number of members of the current cluster (period confirmation to the privileged node). Also, the current privilege node is grasped (period confirmation to the privilege node).

(特権ノード選定機能)
外部サーバ2は、特権ノード候補からの特権ノード昇格要求(特権ノード候補情報、クラスタメンバ数)を受け付ける。
外部サーバ2は、上記要求受付後、自身が保持する特定のタイマ満了(タイムアウト期間T2の満了)まで、回答を待ち合わせるとともに、保持している直近の特権ノードの状態を確認する。
(Privileged node selection function)
The external server 2 receives a privileged node promotion request (privileged node candidate information, number of cluster members) from a privileged node candidate.
After receiving the request, the external server 2 waits for a response until the specific timer held by itself (expiration of the timeout period T2) and confirms the status of the last privileged node held.

外部サーバ2は、上記期間に全特権ノード候補から受け付けた内容(クラスタメンバ数)と、外部サーバ2で保持している直近の特権ノードの状態(クラスタメンバ数)の集約を行う。   The external server 2 aggregates the contents (number of cluster members) received from all privileged node candidates during the above period and the status (number of cluster members) of the latest privileged node held by the external server 2.

ここで、外部サーバ2で保持している直近のクラスタの全体メンバ数をNとする。また、各特権ノード候補(現在の特権ノードを含む)から報告されたメンバ数をm,m,m,m,…とする。なお、報告されるメンバ数の個数は、高々、分断後のサブクラスタ数である。また、全特権ノード候補(現在の特権ノードを含む)から報告されたメンバ数の合計Mは、M=m+m+m+m+…である。 Here, the total number of members of the most recent cluster held by the external server 2 is N. Also, let the number of members reported from each privileged node candidate (including the current privileged node) be m 0 , m 1 , m 2 , m 3 ,. Note that the number of members reported is at most the number of sub-clusters after division. The total number M of members reported from all privileged node candidates (including the current privileged node) is M = m 0 + m 1 + m 2 + m 3 +.

外部サーバ2は、M>N/2の場合、最大のクラスタメンバ数を有する特権ノード候補へ「了承」を、他特権ノード候補へ「否決」を通知する。
外部サーバ2は、M≦N/2の場合、全特権ノード候補へ「否決」を通知する。または、外部サーバ2は、M≦N/2の場合、保守者(保守者端末)に通知する。
When M> N / 2, the external server 2 notifies the privileged node candidate having the maximum number of cluster members of “acceptance” and notifies other privileged node candidates of “denial”.
When M ≦ N / 2, the external server 2 notifies the all-privilege node candidate of “No”. Alternatively, the external server 2 notifies the maintenance person (maintenance person terminal) when M ≦ N / 2.

図13は、本実施形態に係るクラスタシステムの外部サーバ2の特権ノード選定機能のメイン処理を示すフローチャートであり、図11(b)の(手順2,3)に対応する。
本フローは、特権ノード昇格要求(メンバ数m)受信をイベント(契機)にスタートする。ステップS21において、管理部21は、特権ノード昇格要求(メンバ数m)が外部サーバ2で保持している直近のクラスタの全体メンバ数N/2より大きい(m>N/2)か否かを判別する。
FIG. 13 is a flowchart showing a main process of the privileged node selection function of the external server 2 in the cluster system according to the present embodiment, and corresponds to (procedures 2 and 3) in FIG.
This flow starts upon reception of a privileged node promotion request (number of members m 0 ) as an event (trigger). In step S21, the management unit 21 determines whether the privilege node promotion request (number of members m 0 ) is larger than the total number of members N / 2 of the latest cluster held by the external server 2 (m 0 > N / 2). Is determined.

>N/2の場合、ステップS22で管理部21は、最大のクラスタメンバ数を有する特権ノード候補へ「了承」を、他特権ノード候補へ「否決」を通知して本フローを終了する。
≦N/2の場合、ステップS23で管理部21は、メンバ数mを全特権ノード候補(現在の特権ノードを含む)から報告されたメンバ数の合計Mとする(m→M)。
ステップS24では、管理部21は、タイムアウト期間T2を計時するタイマを起動する。
If m 0 > N / 2, in step S22, the management unit 21 notifies the privileged node candidate having the maximum number of cluster members of “approval” and notifies other privileged node candidates of “denial”, and ends this flow. .
When m 0 ≦ N / 2, in step S23, the management unit 21 sets the number of members m 0 as the total number M of members reported from all privileged node candidates (including the current privileged node) (m 0 → M ).
In step S24, the management unit 21 starts a timer that times out the timeout period T2.

ステップS25において、管理部21は、特権ノード昇格要求(メンバ数m)を受信する。ここで、nはサブクラスタの識別番号である。サブクラスタの識別番号nと分断後のサブクラスタ数は、「0≦n≦分断後のサブクラスタ数」と表記できる。例えば、クラスタが3つに分断された場合、0≦n≦2になる。
ステップS26において、管理部21は、特権ノード昇格要求(メンバ数m)が外部サーバ2で保持している直近のクラスタの全体メンバ数N/2より大きい(m>N/2)か否かを判別する。
In step S < b > 25, the management unit 21 receives a privileged node promotion request (number of members m n ). Here, n is a sub-cluster identification number. The identification number n of the subcluster and the number of subclusters after division can be expressed as “0 ≦ n ≦ number of subclusters after division”. For example, when the cluster is divided into three, 0 ≦ n ≦ 2.
In step S <b> 26, the management unit 21 determines whether or not the privilege node promotion request (number of members m n ) is larger than the total number of members N / 2 of the most recent cluster held by the external server 2 (m n > N / 2). Is determined.

>N/2の場合、上記ステップS22に進む。ステップS22では、最大のクラスタメンバ数を有する特権ノード候補へ「了承」を、他特権ノード候補へ「否決」を通知して本フローを終了する。
≦N/2の場合、ステップS27で管理部21は、メンバ数の合計M+メンバ数mを、全特権ノード候補(現在の特権ノードを含む)から報告されたメンバ数の合計Mとする(M←M+m)。
If m n > N / 2, the process proceeds to step S22. In step S22, "Accept" is notified to the privileged node candidate having the maximum number of cluster members, and "No" is notified to the other privileged node candidates, and this flow is finished.
When m n ≦ N / 2, in step S27, the management unit 21 sets the total number of members M + the number of members m n to the total number M of members reported from all privileged node candidates (including the current privileged node). (M ← M + mn ).

ステップS28において、管理部21は、外部サーバ2で保持している直近のクラスタの全体メンバ数Nが全特権ノード候補(現在の特権ノードを含む)から報告されたメンバ数の合計Mより小さい(M<N)か否かを判別する。   In step S28, the management unit 21 has the total number of members N of the latest cluster held in the external server 2 smaller than the total number M of members reported from all privileged node candidates (including the current privileged node) ( It is determined whether or not M <N).

M<Nの場合、上記ステップS25に戻る。
M≧Nの場合、ステップS29において、管理部21は、最大のクラスタメンバ数を有する特権ノード候補へ「了承」を、他特権ノード候補へ「否決」を通知して本フローを終了する。
If M <N, the process returns to step S25.
If M ≧ N, in step S29, the management unit 21 notifies the privileged node candidate having the maximum number of cluster members of “approval” and notifies other privileged node candidates of “denial”, and ends this flow.

図14は、本実施形態に係るクラスタシステムの外部サーバ2の特権ノード選定機能のタイマ処理を示すフローチャートである。図14のタイマ処理フローは、図13のメイン処理において、前記タイマが起動してタイムアウト期間T2のタイムアウト値を計時(タイムアウト発生)を契機に実行される。   FIG. 14 is a flowchart showing timer processing of the privileged node selection function of the external server 2 in the cluster system according to the present embodiment. The timer process flow of FIG. 14 is executed in the main process of FIG. 13 when the timer is started and the timeout value of the timeout period T2 is measured (timeout occurs).

本フローは、タイムアウト検出をイベント(契機)にスタートする。ステップS31において、管理部21は、全特権ノード候補(現在の特権ノードを含む)から報告されたメンバ数の合計Mが外部サーバ2で保持している直近のクラスタの全体メンバ数N/2より大きい(M>N/2)か否かを判別する。   This flow starts with a time-out detection as an event. In step S31, the management unit 21 determines that the total number M of members reported from all privileged node candidates (including the current privileged node) is the total number N / 2 of the latest clusters held in the external server 2. It is determined whether or not it is large (M> N / 2).

M>N/2の場合、ステップS32において、管理部21は、最も多いメンバ数を有する特権ノード候補へ「了承」を、他特権ノード候補へ「否決」を通知して本フローを終了する。なお、このステップS32は、前記図7の動作に対応している。   When M> N / 2, in step S32, the management unit 21 notifies the privilege node candidate having the largest number of members of “approval” and notifies other privilege node candidates of “denial”, and ends this flow. This step S32 corresponds to the operation of FIG.

M≦N/2の場合、ステップS33において、管理部21は、外部サーバ2から検知できないところで特権ノードが選出される可能性を考慮し、外部サーバ2は通信可能な特権ノード候補に対し一律「否決」を通知して本フローを終了する(前記図9の動作に対応)。または、管理部21は、保守者(保守者端末)に最適な特権ノード候補の通知を行う(前記図10の動作に対応)。この場合、「了承/否決」の判断を保守者(保守者端末)が介在して行うことになる。   In the case of M ≦ N / 2, in step S33, the management unit 21 considers the possibility that a privileged node is selected when it cannot be detected from the external server 2, and the external server 2 uniformly sets “ This flow is finished (corresponding to the operation of FIG. 9). Alternatively, the management unit 21 notifies the privileged node candidate optimal for the maintenance person (maintenance person terminal) (corresponding to the operation of FIG. 10). In this case, the determination of “acknowledgement / denial” is performed by the maintenance person (maintenance person terminal).

次に、外部サーバ2を利用したSplit-Brain Syndrome検出方式について説明する。
[Split-brain Syndromeの発生]
前記図16に示すように、経路障害等で1つのクラスタが複数のクラスタに分断されると、各クラスタ内で他方のクラスタのノードからの死活監視信号の応答がなくなる。そして、特権ノードの存在しない(特権ノードと分断された)クラスタでは新たな特権ノードが選出され、双方のクラスタで特権ノードがノード管理テーブル121の更新を行うことでSplit-Brain Syndrineとなる場合が考えられる。
Next, a split-brain syndrome detection method using the external server 2 will be described.
[Occurrence of split-brain syndrome]
As shown in FIG. 16, when one cluster is divided into a plurality of clusters due to a path failure or the like, there is no response to the alive monitoring signal from the node of the other cluster in each cluster. In a cluster where a privileged node does not exist (separated from a privileged node), a new privileged node is selected, and the privileged node updates the node management table 121 in both clusters to become Split-Brain Syndrine. Conceivable.

[Paxosアルゴリズム]
一般的に、Paxosアルゴリズム(非特許文献1参照)とは、分散環境において、信頼性の低いプロセスの集合(本実施形態における複数ノードの集合で構成されるクラスタ)が1つの値に関する合意をとるためのアルゴリズムである。Paxosアルゴリズムは、同時に半数までの障害発生の場合であれば、分散システムを解体させず、分散システムを構成するノード数を変動させる。また各ノードの処理時間が保証できない場合でも、分散システム内で必ず1つの提案で合意が取れるまたは何も合意されない、ということを保証することが可能である。
[Paxos algorithm]
In general, the Paxos algorithm (see Non-Patent Document 1) is a distributed environment in which a set of processes with low reliability (a cluster composed of a set of multiple nodes in this embodiment) agrees on one value. Is an algorithm for The Paxos algorithm changes the number of nodes constituting the distributed system without disassembling the distributed system if up to half of the failures occur simultaneously. Further, even if the processing time of each node cannot be guaranteed, it is possible to guarantee that an agreement can always be reached or no agreement can be reached in the distributed system.

[本実施形態の動作説明]
本実施形態について、より詳細に説明する。本方式によれば、分散システム100(図1参照)において、経路障害等に起因して発生するSplit-brain Syndromeの発生の可能性を検出することができる。なお、以下の一連の処理は、死活監視部113(図2参照。以下同様)に連動する特権ノード選出部114、およびクラスタ離脱指示部115により実現される。
[Description of operation of this embodiment]
This embodiment will be described in more detail. According to this method, it is possible to detect the possibility of occurrence of a split-brain syndrome that occurs due to a path failure or the like in the distributed system 100 (see FIG. 1). Note that the following series of processing is realized by the privileged node selection unit 114 and the cluster leaving instruction unit 115 that are linked to the alive monitoring unit 113 (see FIG. 2; the same applies hereinafter).

本実施形態では、特権ノードとして障害発生ノードをノード管理テーブル121から削除する処理を実行する前に、本方式を利用して特権ノードとして動作する(すなわち、ノード管理テーブル121の更新を行う)権利を持つことをクラスタ内で合意することとする。特権ノードの合意とノード管理テーブル121の更新は大きく分けて3つのフェーズで実行される。   In the present embodiment, the right to operate as a privileged node using this method (that is, to update the node management table 121) before executing the process of deleting the failed node from the node management table 121 as a privileged node. To agree within the cluster. The agreement of privileged nodes and the update of the node management table 121 are roughly divided into three phases.

<第一フェーズ(Prepare phase)>
第一フェーズ(Prepare phase)は、提案内容を提案できる提案者を選定する。
第一フェーズ(Prepare phase)では、Paxosアルゴリズム(非特許文献1参照)に準拠するように、特権ノードあるいは特権ノード候補のノード(以降、Proposer(提案者:提案ノード)と呼ぶ)は、ノード1(後記図15参照)の離脱を通知された場合、残りのノード1(以降、Acceptor(受理ノード)と呼ぶ)に対して、提案番号付きのPrepareリクエストを送信する(後記図15のステップS1参照)。上記残りのノードとは、ノード管理テーブル121に存在する全ノードであり、仮にあるノード1の離脱通知を受けたことによるノード管理テーブル121の更新の場合でもそのノード1を含むものである。
<Prepare phase>
In the first phase (Prepare phase), the proposer who can propose the proposal content is selected.
In the first phase (Prepare phase), in order to comply with the Paxos algorithm (see Non-Patent Document 1), a privileged node or a privileged node candidate node (hereinafter referred to as a Proposer (proposer: proposal node)) is a node 1 When notification of leaving (see FIG. 15 below) is notified, a Prepare request with a proposal number is transmitted to the remaining node 1 (hereinafter referred to as an Acceptor (accepting node)) (see step S1 in FIG. 15 below). ). The remaining nodes are all nodes existing in the node management table 121, and include the node 1 even when the node management table 121 is updated due to the notification of leaving the node 1.

Acceptorは、受理している最大の提案番号より大きな提案番号のPrepareリクエストを受けた場合、その大きな提案番号より小さな提案番号は拒否することを約束し、Promise応答を返す(後記図15のステップS2参照)。例えば、あるノード(Acceptor「A」)がいままでに受理していた最大の提案番号が「5」番だった場合、それより大きな提案番号(例えば「10」番)がくればそれより大きな提案番号を受けているので受理する。以降、「9」番以下の提案番号の提案を受けても受理しない。因みに、他のノードは、Acceptor「A」が提案番号「10」番を受理したことをAcceptor「A」からのPromise応答を受けて知っているので、Acceptor「A」に対し提案番号「10」番より小さい提案番号の提案を送信することはない。   When Acceptor receives a Prepare request with a proposal number larger than the largest accepted proposal number, Acceptor promises to reject proposal numbers smaller than the larger proposal number and returns a Promise response (step S2 in FIG. 15 described later). reference). For example, if the maximum proposal number received by a node (Acceptor “A”) is “5”, a larger proposal number (for example, “10”) will result in a larger proposal number. Accept the number because it has been received. Thereafter, even if a proposal number of “9” or less is received, it is not accepted. Incidentally, since the other node knows that the acceptor “A” has received the proposal number “10” in response to the promise response from the acceptor “A”, the proposal number “10” is sent to the acceptor “A”. The proposal with the proposal number smaller than the number is not transmitted.

Acceptorは、小さな提案番号のPrepareリクエストを受けた場合は、Reject応答を返す(後記図15のステップS2参照)。Acceptorは、Prepareリクエストを受けた時点で他の小さな提案番号bを持つ提案を受理し、かつPaxosアルゴリズムの一連の流れが完結していない場合、その提案番号bと提案内容VをPromise応答と共に返す。なお、第一フェーズでは、提案番号bのみをPromise応答と共に返すAcceptorもあり得る(提案を受けているかどうかで処理が分岐する)。   When the Acceptor receives a Prepare request with a small proposal number, the Acceptor returns a Reject response (see step S2 in FIG. 15 described later). Acceptor accepts a proposal having another small proposal number b at the time of receiving a Prepare request, and returns a proposal number b and a proposal content V together with a Promise response when a series of Paxos algorithms is not completed. . In the first phase, there may be an Acceptor that returns only the proposal number b together with the Promise response (the process branches depending on whether the proposal is received).

例えば、上記の例の場合において、あるAcceptor「A」から提案番号「5」番を最大の提案番号として受理して、他のノードにPromise応答を返しているとする。ここで、別のメンバ(Acceptor「B」)から提案番号「8」番のPrepareリクエストを受けた場合、Acceptor「B」は、Acceptor「A」からの提案番号「5」番より大きい提案番号「8」番であるため受理する。受理はするものの、Acceptor「B」は、既に受理している提案番号「5」番と提案内容VをPromise応答と共に返すようにする。なお、第一フェーズでは、提案は行わず、提案番号の予約をするのみとなる。
なお、一連の流れが完結していない場合とは、提案を受けている途中、すなわち以下に説明する第三フェーズ(Commit phase)に移行していない状態をいう。
For example, in the case of the above example, it is assumed that a proposal number “5” is accepted as a maximum proposal number from a certain Acceptor “A” and a Promise response is returned to another node. Here, when a Prepare request with the proposal number “8” is received from another member (Acceptor “B”), the Acceptor “B” has a proposal number “5” that is larger than the proposal number “5” from the Acceptor “A”. Because it is number 8 ”, it is accepted. Although accepted, Acceptor “B” returns the proposal number “5” and the proposal content V that have already been accepted together with the Promise response. In the first phase, no proposal is made and only the proposal number is reserved.
The case where a series of flows is not completed means a state in which a proposal is being received, that is, a state in which the process has not shifted to the third phase (Commit phase) described below.

Proposerは、過半数のAcceptorからPromise応答を受信した場合、次のフェーズ(第二フェーズ)に進む。Proposerは、一定時間待って過半数からのPromise応答を集めることができない(タイムアウト内に過半数からのPromise応答を集めることができない)場合、再度Prepareから開始する。   When the Proposer receives a Promise response from the majority of Acceptors, it proceeds to the next phase (second phase). If the Proposer cannot collect the Promise responses from the majority after waiting for a certain time (cannot collect the Promise responses from the majority within the timeout), it starts again from Prepare.

ProposerがPaxosアルゴリズムの一連の流れが完結する前に連続して提案できる回数を2回とする。2回連続で過半数からのPromise応答を集めることができない場合、次のフェーズ(第二フェーズ)に進む。つまり、Proposerが、過半数のノードからPromise応答が返っていなくても次のフェーズ(第二フェーズ)に移行する(後記図15のステップS3参照)。   The number of times that the Proposer can make proposals consecutively before the series of Paxos algorithms is completed is two. If the Promise responses from the majority cannot be collected twice consecutively, proceed to the next phase (second phase). That is, the Proposer shifts to the next phase (second phase) even if Promise responses are not returned from the majority of nodes (see step S3 in FIG. 15 described later).

なお、離脱したノードが、復活する場合には、障害等が取り除かれた後に、新規ノードとして設定されることを前提とする。このため、離脱したノードが、不完全な状態で復活することはない。
また、一般的に、Paxosアルゴリズムでは、新たなPaxosアルゴリズムの実行にあたり、提案しようとするノードが前回完結したPaxosアルゴリズムのProposerであった場合には、第一フェーズを省略し、後記する第二および第三フェーズのみを実行することが認められている。
In the case where the detached node is restored, it is assumed that it is set as a new node after the failure is removed. For this reason, the detached node will not be restored in an incomplete state.
In general, in the Paxos algorithm, when executing a new Paxos algorithm, if the node to be proposed is a Proposer of the Paxos algorithm that was completed last time, the first phase is omitted, It is allowed to carry out only the third phase.

<第二フェーズ(Vote phase)>
第二フェーズ(Vote phase)は、提案者が提案内容を提案するフェーズである。
第二フェーズ(Vote phase)では、Paxosアルゴリズム(非特許文献1参照)に準拠するように、Proposerは、過半数のAcceptorからPromise応答を受信した時点でAcceptリクエストをAcceptorに送信する(後記図15のステップS4参照)。Acceptリクエストには、提案番号bと提案内容Vが含まれ、提案番号bは第一フェーズで利用した提案番号bを採用する。つまり、第二フェーズにおける提案番号bは、自身が第一フェーズ(Prepare phase)で提案してPromise応答を受けた提案番号である。他のAcceptorから見れば、その約束した提案番号bから提案が来たので第二フェーズでAcceptリクエストを受けることになる。提案内容Vは、第一フェーズのPromise応答内で提案番号bと提案内容Vを受理していた場合には、その中から最も大きな提案番号bを持つ提案を、受理していない場合は任意の内容を採用する。ここでは、提案内容Vとは、あるノードが特権ノードとして、ノードの離脱に伴うノード管理テーブル121の更新を行うという提案である。
<Second phase>
The second phase (Vote phase) is a phase in which the proposer proposes proposal contents.
In the second phase (Vote phase), the Proposer transmits an Accept request to the Acceptor when receiving a Promise response from the majority of Acceptors so as to comply with the Paxos algorithm (see Non-Patent Document 1) (see FIG. 15 described later). (See step S4). The Accept request includes the proposal number b and the proposal content V, and the proposal number b used in the first phase is adopted. In other words, the proposal number b in the second phase is a proposal number that was proposed in the first phase (Prepare phase) and received a Promise response. From another Acceptor's point of view, since the proposal came from the promised proposal number b, the Accept request is received in the second phase. If the proposal content V has received the proposal number b and the proposal content V in the Promise response of the first phase, the proposal with the largest proposal number b from among them is optional. Adopt the content. Here, the proposal content V is a proposal that a node is a privileged node and updates the node management table 121 when the node leaves.

ところで、Paxosアルゴリズム(非特許文献1参照)では、Proposerは、必ず一番大きな提案番号bを付された提案内容Vを提案しなければならない。すなわち、Paxosアルゴリズム(非特許文献1参照)では、Proposerは、同時に複数出現する可能性がある。このため、複数のProposerから同時にAcceptリクエストを受けることがあり、このような場合のため、Paxosアルゴリズム(非特許文献1参照)では、Proposerは、複数の提案の中から、自身の提案でなくても一番大きい提案番号bの提案を選ばなくてはならない。そのため、Proposerは、提案番号bと提案内容Vが含まれるAcceptリクエストをAcceptorに送信するようにしている。   By the way, in the Paxos algorithm (see Non-Patent Document 1), the Proposer must always propose the proposal content V assigned the largest proposal number b. That is, in the Paxos algorithm (see Non-Patent Document 1), a plurality of Proposers may appear at the same time. For this reason, an Accept request may be received from a plurality of Proposers at the same time. For such a case, in the Paxos algorithm (see Non-Patent Document 1), the Proposer is not an own proposal from among a plurality of proposals. The proposal with the largest proposal number b must be selected. Therefore, the Proposer transmits an Accept request including the proposal number b and the proposal content V to the Acceptor.

本実施形態において、Acceptorは、提案番号bが第一フェーズで受理している提案番号b以上の値を持つAcceptリクエストを受けた場合、その提案を受理し特権ノードあるいは特権ノード候補のノード(Paxosアルゴリズム(非特許文献1参照)ではLearnerと呼び、本方式ではProposerのノードがLearnerとしての役割を兼任している)にACKを返す。Acceptorは、提案番号bが第一フェーズで受理している提案番号b未満の値を持つAcceptリクエストを受けた場合、Reject応答を返す(後記図15のステップS5参照)。   In this embodiment, when the Acceptor receives an Accept request whose proposal number b is greater than or equal to the proposal number b accepted in the first phase, the Acceptor accepts the proposal and receives a privilege node or a privileged node candidate node (Paxos In the algorithm (refer to Non-Patent Document 1), it is called Learner, and in this method, the Proposer node also serves as a Learner), and returns ACK. When the Acceptor receives an Accept request having a value less than the proposal number b accepted in the first phase, the Acceptor returns a Reject response (see step S5 in FIG. 15 described later).

Learner(ここではProposer)は、過半数のAcceptorからACKを受信した場合、外部サーバ2にACKを受けたAcceptorの数を報告し(後記図15のステップS6参照)、次のフェーズ(第三フェーズ)に進む。
一定時間待って過半数のAcceptorからのACKを集めることができない(タイムアウト内に過半数からのACKを集めることができない)場合、外部サーバ2にACKを受けたAcceptorの数を報告し、外部サーバ2からの了承をもって次のフェーズ(第三フェーズ)に進む。外部サーバ2から否決された場合もしくは一定時間待っても外部サーバ2からの応答が無かった場合、自サブクラスタを解体する。
When Learner (Proposer in this case) receives ACK from a majority of Acceptors, it reports the number of Acceptors that have received ACK to external server 2 (see step S6 in FIG. 15 below), and the next phase (third phase) Proceed to
If it is not possible to collect ACKs from the majority of Acceptors after waiting for a certain period of time (when ACKs from the majority cannot be collected within the timeout), report the number of Acceptors that received ACK to the external server 2, and from the external server 2 With the approval, proceed to the next phase (third phase). If it is rejected from the external server 2 or if there is no response from the external server 2 after waiting for a certain time, the local subcluster is disassembled.

ここで、Proposerが、過半数のノードからACKを受信した場合、第三フェーズ(Commit phase)に移行する(後記図15のステップS7参照)。   Here, when the Proposer receives ACK from the majority of nodes, the process proceeds to the third phase (Commit phase) (see step S7 in FIG. 15 described later).

<第三フェーズ(Commit phase)>
第三フェーズ(Commit phase)は、更新情報(Commit)を通知する。
第三フェーズ(Commit phase)では、Learnerは、過半数のAcceptorからACKを受信した場合、もしくは外部サーバ2から了承された場合、特権ノードとしてのノード管理テーブル121(ID表)を更新する権利を得ることとなる。そして、ノード管理テーブル121を更新して離脱したノードを除くAcceptorに対し、更新したノード管理テーブル121または更新したノードの情報を配信する。ノード管理テーブル121(ID表)をそのまま送信すると配信負荷が大きくなるため、ノード管理テーブル121の送信に代えて、更新したノードの情報(差分情報)を配信するようにしてもよい。
Acceptorは、ノード管理テーブル121(ID表)の更新情報を受信した場合、ACKを返す。
<Commit phase>
In the third phase (Commit phase), update information (Commit) is notified.
In the third phase (Commit phase), the Learner obtains the right to update the node management table 121 (ID table) as a privileged node when ACK is received from a majority of Acceptors or when the external server 2 accepts the ACK. It will be. Then, the updated node management table 121 or the updated node information is distributed to the Acceptor excluding the node that has left the node management table 121 after updating. If the node management table 121 (ID table) is transmitted as it is, the distribution load increases. Therefore, instead of transmitting the node management table 121, updated node information (difference information) may be distributed.
The Acceptor returns ACK when receiving update information of the node management table 121 (ID table).

[特権ノード選出の流れ]
以上で述べた特権ノード選出の流れについて、図15を参照して説明する。
図15は、本実施形態に係るクラスタシステムの特権ノード選出の流れを説明するシーケンス図である。
まず、特権ノードあるいは特権ノード候補のノード1(「Proposer」)は、ノードの離脱を通知された場合、ノード管理テーブル121(図2参照)に存在する全ノード1(「Acceptor」)に対して、提案番号付きのPrepareリクエストを送信する(ステップS1)。
[Flow of selecting privileged nodes]
The flow of privileged node selection described above will be described with reference to FIG.
FIG. 15 is a sequence diagram illustrating the flow of selecting a privileged node in the cluster system according to the present embodiment.
First, the privileged node or the privileged node candidate node 1 (“Proposer”) is notified of all nodes 1 (“Acceptor”) existing in the node management table 121 (see FIG. 2) when being notified of the withdrawal of the node. Then, a Prepare request with a proposal number is transmitted (step S1).

Acceptorは、受理している最大の提案番号b以上の提案番号bのPrepareリクエストを受けた場合、その提案番号b未満の提案番号bは拒否することを約束し、その提案番号bと提案内容VをPromise応答と共に返す(ステップS2)。なお、上述したように、提案内容VをPromise応答と共に返すケースには、既に第二フェーズまで実行している別提案を受けていた場合がある。また、Acceptorは、受理している最大の提案番号bより小さな提案番号bのPrepareリクエストを受けた場合は、Reject応答を返す(ステップS2)。
以上は第一フェーズ(Prepare phase)における処理である。
When Acceptor receives a Prepare request with a proposal number b greater than or equal to the largest accepted proposal number b, the Acceptor promises to reject the proposal number b less than the proposal number b, and the proposal number b and the proposal content V Is returned together with the Promise response (step S2). As described above, the case where the proposal content V is returned together with the Promise response may have received another proposal that has already been executed up to the second phase. When the Acceptor receives a Prepare request with a proposal number b smaller than the largest accepted proposal number b, the Acceptor returns a Reject response (step S2).
The above is the processing in the first phase (Prepare phase).

次に、Proposerは、過半数のAcceptorからPromise応答を受信した場合、第二フェーズ(Vote phase)に移行する。Proposerは、過半数のノードからPromise応答が返っていなくても次のフェーズ(第二フェーズ)に移行する(ステップS3)。
Proposerは、過半数のAcceptorからPromise応答を受信した時点でAcceptリクエストをAcceptorに送信する(ステップS4)。Acceptリクエストには、提案番号bと提案内容Vが含まれ、提案番号bは第一フェーズで利用した番号を採用する(Paxosアルゴリズム(非特許文献1参照)に準拠)。なお、提案内容Vは、第一フェーズのPromise応答内で提案番号bと提案内容Vを受理していた場合には、その中から最も大きな提案番号bを持つ提案を、受理していない場合は任意の内容を採用する。
Next, when the Proposer receives a Promise response from the majority of Acceptors, the Proposer proceeds to the second phase (Vote phase). Proposer shifts to the next phase (second phase) even if a Promise response is not returned from the majority of nodes (step S3).
When the Proposer receives a Promise response from the majority of Acceptors, the Proposer transmits an Accept request to the Acceptors (step S4). The Accept request includes the proposal number b and the proposal content V, and the proposal number b adopts the number used in the first phase (based on the Paxos algorithm (see Non-Patent Document 1)). If the proposal content V has received the proposal number b and the proposal content V in the first-phase Promise response, the proposal with the largest proposal number b is not received. Adopt any content.

Acceptorは、提案番号bが第一フェーズで受理している提案番号b以上の値を持つAcceptリクエストを受けた場合、その提案を受理し特権ノードあるいは特権ノード候補のノード(Proposer、ここではLearner)にACKを返す(ステップS5)。Acceptorは、提案番号bが第一フェーズで受理している提案番号b未満の値を持つAcceptリクエストを受けた場合、Reject応答を返す。   When Acceptor receives an Accept request whose proposal number b is greater than or equal to the proposal number b accepted in the first phase, the acceptor accepts the proposal and receives a privilege node or a privileged node candidate node (Proposer, here, Learner) ACK is returned to (step S5). When the Acceptor receives an Accept request having a value less than the proposal number b accepted in the first phase, the Acceptor returns a Reject response.

Proposerは、外部サーバ2に対してACKを受けたAcceptor数を報告する(ステップS6)。
外部サーバ2は、最大のAcceptor数を報告した特権ノード/特権ノード候補へ「了承」を通知し、それ以外へ「否決」を通知する(ステップS7,S7a)。
ここではProposerは、Learnerとして既に動作中である(ステップS8)。
The Proposer reports the number of Acceptors that received ACK to the external server 2 (Step S6).
The external server 2 notifies “privileged” to the privileged node / privileged node candidate that has reported the maximum number of Acceptors, and notifies “denied” to others (steps S7 and S7a).
Here, Proposer is already operating as a Learner (step S8).

Proposerは、過半数のAcceptorからACKが返っている場合、または外部サーバ2から了承された場合、次フェーズ(第三フェーズ)に移行する(ステップS9)。   When the ACK is returned from the majority of Acceptors or when approved by the external server 2, the Proposer moves to the next phase (third phase) (Step S9).

次に、Proposer(Learner)は、過半数のAcceptorからACKを受信した時点で提案が合意に至ったことを認識する。すなわち、この段階で特権ノードとしてのノード管理テーブル121を更新する権利を得ることとなる。そして、ノード管理テーブル121(ID表)を更新して離脱したノードを除くAcceptorに更新したノード管理テーブル121(ID表)または更新したノードの情報を配信する(ステップS10)。
Acceptorは、ノード管理テーブル121(ID表)の更新情報を受信した場合、ACKを返す(図示省略)。
Next, the Proposer (Learner) recognizes that the proposal has been agreed upon when an ACK is received from the majority of Acceptors. That is, at this stage, the right to update the node management table 121 as a privileged node is obtained. Then, the node management table 121 (ID table) is updated and the updated node management table 121 (ID table) or updated node information is distributed to the Acceptor excluding the detached node (step S10).
When acceptor receives update information of the node management table 121 (ID table), the Acceptor returns ACK (not shown).

上記の処理により、同時に複数の特権ノードがノード管理テーブル121(ID表)を更新することを防ぐことが可能である。すなわち、経路障害等が発生し複数のクラスタに分断した場合に、互いにノード離脱処理を行い複数クラスタのまま処理が継続することはない。   With the above processing, it is possible to prevent a plurality of privileged nodes from updating the node management table 121 (ID table) at the same time. That is, when a route failure or the like occurs and the node is divided into a plurality of clusters, the node leaving process is mutually performed and the process does not continue with the plurality of clusters.

以上説明したように、本実施形態の分散システム100は、クラスタ10の外部に外部サーバ2を備え、外部サーバ2は、クラスタ10が分断された各サブクラスタの特権ノード候補から各サブクラスタのメンバ数の情報を集約し、最もメンバ数の多いサブクラスタ、または、メンバ数が最多かつ等しいサブクラスタが複数存在する場合には特定のロジックに基づいて選出した一つのサブクラスタの特権ノード候補に特権ノード昇格の了承を、それ以外の特権ノード候補に否決を通知する。各サブクラスタの特権ノード候補は、外部サーバ2から了承の通知を受けた場合、特権ノードに昇格してクラスタ10を構築し、外部サーバ2から否決の通知を受けた場合、当該サブクラスタを解体する。   As described above, the distributed system 100 according to this embodiment includes the external server 2 outside the cluster 10, and the external server 2 is a member of each subcluster from the privileged node candidates of each subcluster from which the cluster 10 is divided. If the number of sub-clusters with the largest number of members or multiple sub-clusters with the largest and equal number of members exists, the privileged privileged node is selected as a privileged node candidate for one sub-cluster selected based on specific logic. Notify approval of node promotion, and reject to other privileged node candidates. If a privileged node candidate of each sub-cluster receives an acknowledgment from the external server 2, it is promoted to a privileged node to build the cluster 10, and if it receives a denial notification from the external server 2, disassembles the sub-cluster. To do.

この構成により、Split-Brain Syndromeを防止しつつ、特権ノード決定を行う際に、特権ノードが決まらないような状態をできるだけ起こらないようにすることができる。例えば、NW分断が複数発生してクラスタが複数に分割され、なおかつ、元のクラスタの過半数が残存するサブクラスタが存在しない場合、Paxosアルゴリズムでは、クラスタ全体が解体されてしまうが、本実施形態によれば、過半数を満たすサブクラスタが存在しない場合にも、クラスタの全体の解体を防ぎ、運用を継続することができる。   With this configuration, it is possible to prevent a split-brain syndrome and prevent a privileged node from being determined as much as possible when making a privileged node decision. For example, if a plurality of NW divisions occur and the cluster is divided into a plurality of clusters, and there is no sub-cluster in which a majority of the original clusters remain, the Paxos algorithm disassembles the entire cluster. Accordingly, even when there is no sub-cluster that satisfies the majority, the entire cluster can be prevented from being dismantled and the operation can be continued.

したがって、NW分断によりクラスタが2つのサブクラスタに分割され、なおかつ、2つのサブクラスタのメンバ数が同数であった場合でも、外部サーバ2からの了承をもって一方のサブクラスタを残し、Split-Brain Syndromeが発生していない状態で運用を継続できる。前記図17の(課題1)を解決することができる。   Therefore, even if the cluster is divided into two sub-clusters due to NW division and the number of members of the two sub-clusters is the same, one sub-cluster is left with the approval from the external server 2, and the split-brain syndrome Operation can be continued with no occurrence. The (Problem 1) in FIG. 17 can be solved.

また、NW分断が複数発生してクラスタが複数に分割され、なおかつ、元のクラスタの過半数が残存するサブクラスタが存在しない場合でも、外部サーバ2からの了承をもって一つのサブクラスタを残し、Split-Brain Syndromeが発生していない状態で運用を継続できる。前記図18の(課題2)を解決することができる。   Even if multiple NW divisions occur and the cluster is divided into multiple clusters, and there is no subcluster in which the majority of the original cluster remains, one subcluster is left with the approval from the external server 2, and Split- Operation can be continued in the absence of Brain Syndrome. The (Problem 2) in FIG. 18 can be solved.


また、本実施形態では、サブクラスタの特権ノード候補は、外部サーバ2から了承または否決の応答がなく、かつ当該サブクラスタのメンバ数が過半数を満たす場合、Paxosアルゴリズムを含む多数決分散合意形成アルゴリズムを適用して、特権ノードとして自律的にクラスタ10を構築する。これにより、何らかの障害が原因で外部サーバから「了承/否決」の応答がないとき、サブクラスタのメンバ数が過半数を満たす場合は、外部サーバからの応答を待たずに、Paxosアルゴリズムを含む多数決分散合意形成アルゴリズムを利用して特権ノードが自律的にクラスタを構築することができる。
.
Further, in this embodiment, the privileged node candidate of the sub-cluster, when there is no response of acceptance or rejection from the external server 2 and the number of members of the sub-cluster satisfies the majority, the majority distributed agreement formation algorithm including the Paxos algorithm is used. Applying it, the cluster 10 is autonomously constructed as a privileged node. As a result, when there is no “acknowledge / decline” response from the external server due to some failure, if the majority of the sub-cluster members meet the majority, the majority distribution including the Paxos algorithm is not waited for the response from the external server. A privileged node can autonomously construct a cluster using a consensus building algorithm.

また、本実施形態では、サブクラスタの特権ノード候補は、外部サーバ2から了承または否決の応答がなく、かつ当該サブクラスタのメンバ数が過半数を満たさない場合、所定タイムアウト期間経過後に自律的に当該サブクラスタを解体する。これにより、何らかの障害が原因で外部サーバから了承/否決の応答がないとき、サブクラスタのメンバ数が過半数を満たさない場合は外部サーバからの応答タイムアウトで自律的にサブクラスタを解体することができる。   In this embodiment, the privileged node candidate of the sub-cluster autonomously receives the response after the predetermined timeout period elapses when there is no acknowledgment or rejection response from the external server 2 and the number of members of the sub-cluster does not satisfy the majority. Dismantle the subcluster. As a result, when there is no approval / disapproval response from the external server due to some failure, if the number of members of the subcluster does not satisfy the majority, the subcluster can be dismantled autonomously by a response timeout from the external server. .

また、本実施形態では、クラスタの特権ノードは、自身が特権ノードであることを示す特権ノード情報およびクラスタメンバ数を、定期的およびクラスタのメンバ数が変化した時に外部サーバ2へ報告する。これにより、外部サーバ2は、定期的報告を受けて分断前のクラスタ全体のメンバ数を把握し、クラスタのメンバ数が変化した時の報告を受けて現状のクラスタ状態(特権ノード情報、クラスタメンバ数)を把握することができる。   In this embodiment, the privileged node of the cluster reports the privileged node information indicating that it is a privileged node and the number of cluster members to the external server 2 periodically and when the number of members of the cluster changes. As a result, the external server 2 receives the periodic report, grasps the number of members of the entire cluster before the division, receives the report when the number of members of the cluster has changed, and receives the current cluster status (privileged node information, cluster members). Number).

また、本実施形態では、サブクラスタの特権ノード候補は、サブクラスタのメンバ数が、分断前のクラスタ全体のメンバ数の半数以下の場合、自身が特権ノード候補であることを示す特権ノード候補情報およびサブクラスタメンバ数を含む特権ノード昇格要求を外部サーバ2へ発行する。これにより、外部サーバ2は、特権ノード候補であるノードとそのサブクラスタのサブクラスタメンバ数とを把握することができる。   In the present embodiment, the privileged node candidate information indicating that the privileged node candidate of the subcluster is itself a privileged node candidate when the number of members of the subcluster is equal to or less than half the number of members of the entire cluster before the division. And issues a privileged node promotion request including the number of sub-cluster members to the external server 2. As a result, the external server 2 can grasp the nodes that are privileged node candidates and the number of sub-cluster members of the sub-cluster.

また、本実施形態では、外部サーバ2は、通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計がクラスタ10の総メンバ数の半数に満たない場合、通信可能な特権ノード候補に対し一律に否決を通知することで、外部サーバ2と通信可能な特権ノード候補に対し一律「否決」を通知する。これにより、外部サーバ2から検知できないところで過半数を満たすサブクラスタが存在し、多数決分散合意形成アルゴリズムに従って自律的に特権ノードが選出される場合にもSplit-Brain Syndromeを確実に防止することができる。   In this embodiment, the external server 2 can communicate with the privileged node candidate when the total number of members of the sub-cluster reported from all the privileged node candidates that can communicate is less than half of the total number of members of the cluster 10. Is uniformly notified of the rejection, the privileged node candidate communicable with the external server 2 is uniformly notified of the “rejection”. This makes it possible to reliably prevent split-brain syndrome even when sub-clusters satisfying the majority exist where they cannot be detected from the external server 2 and privileged nodes are autonomously selected according to the majority-distribution consensus building algorithm.

また、本実施形態では、外部サーバ2は、通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計がクラスタ10の総メンバ数の半数に満たない場合、保守者(保守者端末)に特権ノード候補の通知を行うとともに、当該保守者から当該特権ノード候補の了承または否決の判断通知を受け、当該判断通知に従って、特権ノード候補に対し了承または否決を通知する。これにより、一律「否決」を通知する場合に比べ、Split-Brain Syndromeを防止しつつ、より適切な運用を継続することができる。   Further, in the present embodiment, the external server 2 determines that the maintenance person (maintenance person terminal) if the total number of sub-cluster members reported from all the privileged node candidates that can communicate is less than half of the total number of members of the cluster 10. ) Is notified of the privileged node candidate and also received a notification of approval or rejection of the privileged node candidate from the maintenance person, and the approval or rejection of the privileged node candidate is notified according to the notification of determination. As a result, it is possible to continue the more appropriate operation while preventing the split-brain syndrome compared to the case of notifying the uniform “decision”.

1 ノード
2 外部サーバ
10,10A,10B クラスタ
11 処理部
12,22 記憶部
13,23 通信部
20 ネットワーク
21 管理部
30 クライアント
100 分散システム(クラスタシステム)
111 ノード管理部
112 メッセージ処理部
113 死活監視部
114 特権ノード選出部
115 クラスタ離脱指示部
121 ノード管理テーブル(ノード管理情報)(ID表)
122 死活監視テーブル(死活監視情報)
b 提案番号
V 提案内容
1 node 2 external server 10, 10A, 10B cluster 11 processing unit 12, 22 storage unit 13, 23 communication unit 20 network 21 management unit 30 client 100 distributed system (cluster system)
111 Node management unit 112 Message processing unit 113 Alive monitoring unit 114 Privileged node selection unit 115 Cluster leave instruction unit 121 Node management table (node management information) (ID table)
122 Alive monitoring table (life monitoring information)
b Proposal number V Proposal content

Claims (8)

Paxosアルゴリズムを含む多数決分散合意形成アルゴリズムを適用して、クラスタを構成する複数のノードの中からノードを管理する特権を持つ特権ノードを選出するクラスタシステムであって、
前記特権ノードを管理する外部サーバを前記クラスタの外部に備え、
前記外部サーバは、
前記クラスタが分断された各サブクラスタの特権ノード候補から各サブクラスタのメンバ数の情報を集約し、最もメンバ数の多いサブクラスタ、または、メンバ数が最多かつ等しいサブクラスタが複数存在する場合には特定のロジックに基づいて選出した一つのサブクラスタの特権ノード候補に特権ノード昇格の了承を、それ以外の特権ノード候補に否決を通知する管理部を備え、
前記サブクラスタの特権ノード候補は、
前記外部サーバから了承の通知を受けた場合、特権ノードに昇格してクラスタを構築し、
前記外部サーバから否決の通知を受けた場合、当該サブクラスタを解体する
ことを特徴とするクラスタシステム。
A cluster system that selects a privileged node having a privilege to manage a node from a plurality of nodes constituting a cluster by applying a majority voted consensus building algorithm including a Paxos algorithm,
An external server for managing the privileged node is provided outside the cluster,
The external server is
When the information on the number of members of each sub-cluster is aggregated from the privileged node candidates of each sub-cluster where the cluster has been divided, and there are multiple sub-clusters with the largest number of members or with the largest number of equal members Comprises a management unit for notifying the privilege node promotion approval to the privilege node candidate of one sub-cluster selected based on specific logic, and notifying the other privilege node candidates of the rejection,
The privileged node candidate of the sub-cluster is
When a notification of acceptance is received from the external server, it is promoted to a privileged node to build a cluster,
A cluster system comprising: disassembling the sub-cluster when receiving a rejection notice from the external server.
前記サブクラスタの特権ノード候補は、
前記外部サーバから了承または否決の応答がなく、かつ当該サブクラスタのメンバ数が過半数を満たす場合、前記多数決分散合意形成アルゴリズムを適用して、特権ノードとして自律的にクラスタを構築することを特徴とする請求項1に記載のクラスタシステム。
The privileged node candidate of the sub-cluster is
When there is no approval or rejection response from the external server and the number of members of the sub-cluster satisfies a majority, the majority vote distributed agreement formation algorithm is applied, and a cluster is autonomously constructed as a privileged node, The cluster system according to claim 1.
前記サブクラスタの特権ノード候補は、
前記外部サーバから了承または否決の応答がなく、かつ当該サブクラスタのメンバ数が過半数を満たさない場合、所定タイムアウト期間経過後に自律的に当該サブクラスタを解体することを特徴とする請求項1または請求項2に記載のクラスタシステム。
The privileged node candidate of the sub-cluster is
The subcluster is autonomously dismantled after a predetermined time-out period when there is no acknowledgment or rejection response from the external server and the number of members of the subcluster does not satisfy the majority. Item 3. The cluster system according to Item 2.
前記クラスタの特権ノードは、自身が特権ノードであることを示す特権ノード情報およびクラスタメンバ数を、定期的およびクラスタのメンバ数が変化した時に前記外部サーバへ報告することを特徴とする請求項1ないし請求項3のいずれか一項に記載のクラスタシステム。   2. The privileged node of the cluster reports privileged node information indicating that it is a privileged node and the number of cluster members to the external server periodically and when the number of members of the cluster changes. The cluster system according to any one of claims 3 to 4. 前記サブクラスタの特権ノード候補は、
当該サブクラスタのメンバ数が、自身が特権ノード候補であることを示す特権ノード候補情報およびサブクラスタメンバ数を含む特権ノード昇格要求を前記外部サーバへ発行することを特徴とする請求項1ないし請求項4のいずれか一項に記載のクラスタシステム。
The privileged node candidate of the sub-cluster is
The privileged node promotion request including privilege node candidate information indicating that the number of members of the subcluster is a privileged node candidate and the number of subcluster members is issued to the external server. Item 5. The cluster system according to any one of items 4.
前記外部サーバは、
通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計が前記クラスタの総メンバ数の半数に満たない場合、通信可能な特権ノード候補に対し一律に否決を通知することを特徴とする請求項2 に記載のクラスタシステム。
The external server is
When the total number of sub-cluster members reported from all communicable privileged node candidates is less than half of the total number of members of the cluster, the communicable privileged node candidates are uniformly notified of rejection. The cluster system according to claim 2.
前記外部サーバは、
通信可能な全特権ノード候補から報告されたサブクラスタのメンバ数の合計が前記クラスタの総メンバ数の半数に満たない場合、保守者端末に特権ノード候補の通知を行うとともに、当該保守者端末から当該特権ノード候補の了承または否決の判断通知を受け、当該判断通知に従って、特権ノード候補に対し了承または否決を通知することを特徴とする請求項2に記載のクラスタシステム。
The external server is
When the total number of sub-cluster members reported from all communicable privileged node candidates is less than half of the total number of members of the cluster, the maintenance node is notified of the privileged node candidates and from the maintenance node The cluster system according to claim 2, wherein a notification of acceptance or rejection of the privileged node candidate is received, and approval or rejection is notified to the privileged node candidate according to the determination notification.
Paxosアルゴリズムを含む多数決分散合意形成アルゴリズムを適用して、クラスタを構成する複数のノードの中からノードを管理する特権を持つ特権ノードを選出するクラスタシステムのSplit-Brain Syndrome発生防止方法であって、
前記特権ノードを管理する外部サーバを前記クラスタの外部に備え、
前記外部サーバは、
前記クラスタが分断された各サブクラスタの特権ノード候補から各サブクラスタのメンバ数の情報を集約するステップと、
最もメンバ数の多いサブクラスタ、または、メンバ数が最多かつ等しいサブクラスタが複数存在する場合には特定のロジックに基づいて選出した一つのサブクラスタの特権ノード候補に特権ノード昇格の了承を、それ以外の特権ノード候補に否決を通知するステップと、を実行し、
前記サブクラスタの特権ノード候補は、
前記外部サーバから了承の通知を受けた場合、特権ノードに昇格してクラスタを構築するステップと、
前記外部サーバから否決の通知を受けた場合、当該サブクラスタを解体するステップと、
を実行することを特徴とするクラスタシステムのSplit-Brain Syndrome発生防止方法。
A split-brain syndrome prevention method for a cluster system that selects a privileged node having a privilege to manage a node from a plurality of nodes constituting a cluster by applying a majority voting distributed consensus algorithm including a Paxos algorithm,
An external server for managing the privileged node is provided outside the cluster,
The external server is
Aggregating information on the number of members of each sub-cluster from the privileged node candidates of each sub-cluster from which the cluster was divided;
If there are multiple sub-clusters with the largest number of members, or sub-clusters with the largest and equal number of members, the approval of privileged node promotion is given to the privileged node candidates of one subcluster selected based on specific logic. A step of notifying the privileged node candidate other than
The privileged node candidate of the sub-cluster is
When receiving a notification of consent from the external server, the step of promoting to a privileged node and building a cluster;
When receiving a notice of rejection from the external server, disassembling the sub-cluster,
A split-brain syndrome prevention method for a cluster system characterized by
JP2014097973A 2014-05-09 2014-05-09 CLUSTER SYSTEM AND Split-BrainSyndrome GENERATION PREVENTION METHOD Pending JP2015215754A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014097973A JP2015215754A (en) 2014-05-09 2014-05-09 CLUSTER SYSTEM AND Split-BrainSyndrome GENERATION PREVENTION METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014097973A JP2015215754A (en) 2014-05-09 2014-05-09 CLUSTER SYSTEM AND Split-BrainSyndrome GENERATION PREVENTION METHOD

Publications (1)

Publication Number Publication Date
JP2015215754A true JP2015215754A (en) 2015-12-03

Family

ID=54752584

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014097973A Pending JP2015215754A (en) 2014-05-09 2014-05-09 CLUSTER SYSTEM AND Split-BrainSyndrome GENERATION PREVENTION METHOD

Country Status (1)

Country Link
JP (1) JP2015215754A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022160937A (en) * 2021-04-07 2022-10-20 株式会社日立製作所 Distributed consensus method, distributed system and distributed consensus program
JP2024125362A (en) * 2018-06-12 2024-09-18 ウェカ.アイオー リミテッド Storage systems spanning multiple failure domains

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6363495B1 (en) * 1999-01-19 2002-03-26 International Business Machines Corporation Method and apparatus for partition resolution in clustered computer systems
JP2005025289A (en) * 2003-06-30 2005-01-27 Fujitsu Ltd Data protection program and data protection method in external storage device shared among a plurality of computers
JP2011210106A (en) * 2010-03-30 2011-10-20 Nippon Telegr & Teleph Corp <Ntt> Message queue management system, lock server, message queue management method, and message queue management program
JP2011253391A (en) * 2010-06-02 2011-12-15 Trytech Co Ltd Distributed computing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6363495B1 (en) * 1999-01-19 2002-03-26 International Business Machines Corporation Method and apparatus for partition resolution in clustered computer systems
JP2005025289A (en) * 2003-06-30 2005-01-27 Fujitsu Ltd Data protection program and data protection method in external storage device shared among a plurality of computers
JP2011210106A (en) * 2010-03-30 2011-10-20 Nippon Telegr & Teleph Corp <Ntt> Message queue management system, lock server, message queue management method, and message queue management program
JP2011253391A (en) * 2010-06-02 2011-12-15 Trytech Co Ltd Distributed computing system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
鳴海 貴允、岩田 英明、嵐 大亮: "クラスタリング分断後のクラスタリング再構築方式の検討", 電子情報通信学会技術研究報告, vol. 113, no. 472, JPN6017016395, 27 February 2014 (2014-02-27), JP, pages 329 - 332, ISSN: 0003697180 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2024125362A (en) * 2018-06-12 2024-09-18 ウェカ.アイオー リミテッド Storage systems spanning multiple failure domains
JP2022160937A (en) * 2021-04-07 2022-10-20 株式会社日立製作所 Distributed consensus method, distributed system and distributed consensus program
JP7225298B2 (en) 2021-04-07 2023-02-20 株式会社日立製作所 Distributed consensus method, distributed system and distributed consensus program

Similar Documents

Publication Publication Date Title
US11894972B2 (en) System and method for data replication using a single master failover protocol
US11899684B2 (en) System and method for maintaining a master replica for reads and writes in a data store
CN109729111B (en) Method, apparatus and computer program product for managing distributed systems
US12197299B2 (en) Building system with ledger based software gateways
JP5798644B2 (en) Consistency within the federation infrastructure
CN111526186A (en) Distributed server cluster configuration method based on Raft
CN112328421B (en) System fault processing method and device, computer equipment and storage medium
US7984094B2 (en) Using distributed queues in an overlay network
US11593583B2 (en) Method and system to implement cluster failure prediction to facilitate split brain resolution
JP2020505839A (en) Computer-implemented system and method for updating a network&#39;s knowledge of a network&#39;s topology
US10367676B1 (en) Stable leader selection for distributed services
CN104769919A (en) Load Balancing Access to Replicated Databases
CN102946405A (en) SMB2 extension
JP2017534133A (en) Distributed storage and replication system and method
WO2016010972A1 (en) Dynamically changing members of a consensus group in a distributed self-healing coordination service
CN107562522A (en) A kind of Distributed Application management method based on ZooKeeper
US8068443B2 (en) Using distributed timers in an overlay network
CN113646749B (en) IOT partition management and load balancing
US20120159021A1 (en) Storage topology manager
JP6091376B2 (en) Cluster system and split-brain syndrome detection method
CN117120993A (en) Geographically dispersed hybrid cloud clusters
JP2015215754A (en) CLUSTER SYSTEM AND Split-BrainSyndrome GENERATION PREVENTION METHOD
JP5664662B2 (en) Management system, management apparatus, management method, and management program
US10305987B2 (en) Method to syncrhonize VSAN node status in VSAN cluster
JP4459999B2 (en) Non-stop service system using voting and information updating and providing method in the system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160722

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170428

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170516

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170710

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20171212