JP2017054190A - Node and method for optimizing slot - Google Patents

Node and method for optimizing slot Download PDF

Info

Publication number
JP2017054190A
JP2017054190A JP2015175882A JP2015175882A JP2017054190A JP 2017054190 A JP2017054190 A JP 2017054190A JP 2015175882 A JP2015175882 A JP 2015175882A JP 2015175882 A JP2015175882 A JP 2015175882A JP 2017054190 A JP2017054190 A JP 2017054190A
Authority
JP
Japan
Prior art keywords
node
nodes
slot
load
distribution
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.)
Granted
Application number
JP2015175882A
Other languages
Japanese (ja)
Other versions
JP6387333B2 (en
Inventor
篤史 外山
Atsushi Toyama
篤史 外山
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 JP2015175882A priority Critical patent/JP6387333B2/en
Publication of JP2017054190A publication Critical patent/JP2017054190A/en
Application granted granted Critical
Publication of JP6387333B2 publication Critical patent/JP6387333B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To reduce the deviation of load toward a specific node in decreasing or increasing nodes that constitute a distributed processing system.SOLUTION: A node 1 constituting a distributed processing system comprises: a storage unit 30 for storing, in correlation to each of node IDs of a plurality of nodes 1, an allocation ID table 200 in which a slot indicating a concerned area in an ID space is stored; a node load measurement unit 14 for measuring the load information of the own node 1; and a slot optimization processing unit which, when a decrease or increase occurs, determines a node whose node ID is to be changed from among the plurality of nodes 1, changes the node ID of the determined node to a position in the ID space for reducing the deviation of load about the plurality of nodes 1 after the decrease or increase using the load information of the plurality of nodes 1, and stores the changed node ID in the allocation ID information.SELECTED DRAWING: Figure 3

Description

本発明は、ネットワーク上に分散配置されるノードをクラスタ化してデータを格納する分散処理システムにおいて、各ノードの負荷の偏りを低減する、ノードおよびスロット最適化方法に関する。   The present invention relates to a node and slot optimization method for reducing the load bias of each node in a distributed processing system that stores data by clustering nodes distributed on a network.

近年、クラウドコンピューティングの隆盛に伴い、多量のデータの処理や保持を効率的に行うことが求められている。そこで、複数のサーバを協調動作させることにより効率的な処理を実現する分散処理技術が発展している。   In recent years, with the rise of cloud computing, it has been required to efficiently process and retain 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, it is necessary to determine data to be handled by each server (hereinafter referred to as “node”) constituting a distributed processing system having a cluster configuration. At this time, in order to increase the processing capability of the entire distributed processing system, it is desirable that the number of data handled by each node is averaged.

代表的なデータの管理手法として、各データのkeyをハッシュ関数にかけた値(以下、「hash(key)」と称する。)をノード数Nで割った余り、即ち「hash(key) mod N」を番号として持つノードがデータを管理する手法がある。この場合、各ノードに事前に「0」から「N−1」までの番号を割り当てていることが前提となる。このような管理手法を用いた場合、ノードの追加・離脱が発生すると、Nの値が変化して、多くのデータについて、そのデータの保存を担当するノードが変更になるため、担当するデータを再配置することが必要になる。   As a representative data management method, a remainder obtained by dividing a value obtained by multiplying the key of each data by a hash function (hereinafter referred to as “hash (key)”) by the number of nodes N, that is, “hash (key) mod N”. There is a method in which a node having a number as a number manages data. In this case, it is assumed that numbers “0” to “N−1” are assigned to each node in advance. When such a management method is used, when a node is added or removed, the value of N changes, and the node in charge of storing the data changes for a lot of data. It will be necessary to rearrange.

そこで、ノードの追加・離脱に伴い担当するノードが変更になるデータ数を約1/Nに抑える方法として、コンシステント・ハッシュ(Consistent Hashing)法(非特許文献1参照)を用いたデータ管理手法がある。このコンシステント・ハッシュ法は、Amazon Dynamo(非特許文献2参照)等において用いられている。   Therefore, as a method for suppressing the number of data that the node in charge changes with the addition / detachment of a node to about 1 / N, a data management method using a consistent hashing method (see Non-Patent Document 1). There is. This consistent hash method is used in Amazon Dynamo (see Non-Patent Document 2) and the like.

このコンシステント・ハッシュ法を用いたデータ管理手法では、ノードとデータの双方にID(IDentifier)を割り当てる。そして、データのIDから閉じたID空間を時計回りに辿った場合に最初に当たったノードをそのデータの担当とする。ノードに対するIDの与え方の例としては、IPアドレスをハッシュ関数にかけた値(hash(IPアドレス))が挙げられる。   In this data management method using the consistent hash method, IDs (IDentifiers) are assigned to both nodes and data. Then, when the closed ID space is traced clockwise from the ID of the data, the node that hits first is assumed to be in charge of the data. An example of how to give an ID to a node is a value (hash (IP address)) obtained by multiplying an IP address by a hash function.

クラスタ構成の分散処理システムでは、各ノードの処理性能が等しい場合には、各ノードが担当するデータ量を等しくする、即ち、コンシステント・ハッシュ法のID空間(以下、単に「ID空間」と称する場合がある。)におけるノード間の距離(以下、「ノードの担当領域」または「スロット」と称する。)を等しくすることが望ましい。この点を実現するため、各ノードに仮想的に複数のIDを持たせる手法が用いられている(非特許文献3参照)。各ノードが複数の仮想IDを持つことで、仮想ID毎の担当領域の大きさは異なっていても、大数の法則に従いノード毎の担当領域大きさは平均化される。   In a clustered distributed processing system, when the processing performance of each node is equal, the amount of data handled by each node is made equal, that is, a consistent hash method ID space (hereinafter, simply referred to as “ID space”). It is desirable to make the distances between the nodes (hereinafter referred to as “node assigned areas” or “slots”) equal. In order to realize this point, a method of virtually giving a plurality of IDs to each node is used (see Non-Patent Document 3). By having each node have a plurality of virtual IDs, even if the size of the assigned area for each virtual ID is different, the assigned area size for each node is averaged according to the law of large numbers.

David Karger, et al.,“Consistent Hashing and Random Trees:Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web”,[online],1997,ACM,[平成27年8月25日検索],インターネット<URL:http://www.akamai.com/dl/technical_publications/ConsistenHashingandRandomTreesDistributedCachingprotocolsforrelievingHotSpotsontheworldwideweb.pdf>David Karger, et al., “Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web”, [online], 1997, ACM, [August 25, 2015 search], Internet <URL : http: //www.akamai.com/dl/technical_publications/ConsistenHashingandRandomTreesDistributedCachingprotocolsforrelievingHotSpotsontheworldwideweb.pdf> Giuseppe DeCandia,et al.,“Dynamo: Amazon’s Highly Available Key-value Store”, SOSP’07, October 14-17, 2007, Stevenson, Washington, USA,[online],[平成27年8月25日検索],インターネット<URL:http://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf>Giuseppe DeCandia, et al., “Dynamo: Amazon's Highly Available Key-value Store”, SOSP'07, October 14-17, 2007, Stevenson, Washington, USA, [online], [searched on August 25, 2015] , Internet <URL: http: //www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf> 入江 道生、他4名、「コンシステント・ハッシュ法におけるデータの複製を意識した負荷分散手法」、社団法人電子情報通信学会、2010年10月、信学技報、IN2010-77、P.69-74Michio Irie and 4 others, "Load distribution method that is conscious of data replication in consistent hash method", The Institute of Electronics, Information and Communication Engineers, October 2010, IEICE Technical Report, IN2010-77, P.69- 74

しかしながら、非特許文献3に記載の各ノードに仮想的に複数のIDを持たせる手法(仮想ノードを用いる手法)では、1つのノードに対し複数の仮想ノードが設定されるため、チェックすべきノード数が増加し、検索性能や処理性能が劣化するという欠点がある。そのため、例えば、映像サービスの提供においては、仮想ノードの利用が見送られるケースがある。   However, in the method of virtually giving a plurality of IDs to each node described in Non-Patent Document 3 (method using a virtual node), a plurality of virtual nodes are set for one node. There is a disadvantage that the number increases and search performance and processing performance deteriorate. Therefore, for example, in providing video services, there are cases where the use of virtual nodes is postponed.

また、コンシステント・ハッシュ法の分散システムにおいては、コンシステント・ハッシュのID空間上での時計回り探索により、各ノードの担当領域が決定される。よって、何らかの事由で特定のノードが減設された場合には、減設されたノードの時計回りに次に位置するノードに担当領域の移譲が行われる。その結果、特定ノードへ極端に負荷が集中する事象が発生し、ノード毎の負荷バランスが崩れるという問題がある。この点について、図12を参照して説明する。   In the distributed system of the consistent hash method, the assigned area of each node is determined by a clockwise search in the ID space of the consistent hash. Therefore, when a specific node is removed for some reason, the assigned area is transferred to the next node in the clockwise direction of the removed node. As a result, an event in which the load is extremely concentrated on a specific node occurs, causing a problem that the load balance of each node is lost. This point will be described with reference to FIG.

図12(a)は、コンシステント・ハッシュのID空間に配置された各ノードおよびデータと、各ノードの負荷を示している。コンシステント・ハッシュ法では、図12(a)の下図に示すように、ID空間上に位置するデータ(各図において丸「〇」で示す。)から、ID空間を時計回りに辿り最初に当たったノード(各図において、四角「□」で示す。)を、そのデータを担当するノードとする。図12(a)においては、ノード「A」,「B」,「C」それぞれは3つのデータの処理を担当し、ノード「D」は、2つのデータの処理を担当している。この場合の、各ノードの負荷を図12(a)の上図に示している。   FIG. 12A shows the nodes and data arranged in the ID space of the consistent hash and the load of each node. In the consistent hash method, as shown in the lower diagram of FIG. 12A, the ID space is traced clockwise from the data located in the ID space (indicated by a circle “◯” in each diagram), and the first hit is performed. The node (indicated by a square “□” in each figure) is the node in charge of the data. In FIG. 12A, each of the nodes “A”, “B”, and “C” is responsible for processing three data, and the node “D” is responsible for processing two data. The load on each node in this case is shown in the upper part of FIG.

図12(a)の状態において、ノード「C」が減設された場合を考える。この場合、図12(b)に示すように、減設されたノード「C」が担当していたデータは、ID空間上で時計回りに次のノードであるノード「D」が担当することになる。その結果、ノード「D」の負荷が、他のノードと比べ大きくなってしまうことになる(図12(b)の上図参照)。つまり、各ノードの負荷バランスが崩れてしまう。   Consider a case where node “C” is removed in the state of FIG. In this case, as shown in FIG. 12B, the data that was assigned to the removed node “C” is assigned to the node “D” that is the next node in the clockwise direction in the ID space. Become. As a result, the load of the node “D” becomes larger than that of other nodes (see the upper diagram of FIG. 12B). That is, the load balance of each node is lost.

また、ノードを増設することにより、負荷バランスを解消しようとしても、既存技術では、例えば、増加するノードの位置がランダムに決定されるため、ノードの最適な配置とならず、負荷バランスが解消されない場合が想定される。   Moreover, even if it is going to cancel load balance by adding nodes, in the existing technology, for example, the position of the increasing node is determined at random, so the optimal arrangement of the nodes is not achieved, and the load balance is not canceled. A case is assumed.

このような背景を鑑みて本発明がなされたのであり、本発明は、分散処理システムを構成するノードの減設・増設動作時において、特定ノードへの負荷の偏りを低減することができる、ノードおよびスロット最適化方法を提供することを課題とする。   The present invention has been made in view of such a background, and the present invention is a node that can reduce the load bias to a specific node during the reduction / expansion operation of the nodes constituting the distributed processing system. It is another object of the present invention to provide a slot optimization method.

前記した課題を解決するため、請求項1に記載の発明は、クラスタを構成する複数のノードそれぞれに、コンシステント・ハッシュ法によりデータを振り分けて処理させる分散処理システムの前記ノードであって、複数の前記ノードのノードIDそれぞれに対応付けて、ID空間上での担当領域を示すスロットが記憶される振り分けID情報を格納する記憶部と、自身のノードの負荷情報を計測するノード負荷計測部と、前記クラスタを構成する複数のノードに減設または増設が生じた場合、複数の前記ノードの中から、前記ノードIDを変更するノードを決定し、複数の前記ノードの前記負荷情報を用いて、前記減設または増設後の複数の前記ノードについての負荷の偏りを低減する前記ID空間上の位置に、前記決定したノードのノードIDを変更し、前記変更したノードIDを前記振り分けID情報に記憶するスロット最適化処理部と、を備えることを特徴とするノードとした。   In order to solve the above-described problem, the invention according to claim 1 is the node of the distributed processing system in which each of a plurality of nodes constituting the cluster distributes and processes data by a consistent hash method. A storage unit for storing distribution ID information in which a slot indicating a responsible area in the ID space is stored in association with each node ID of the node, and a node load measuring unit for measuring load information of the own node When a reduction or expansion occurs in a plurality of nodes constituting the cluster, a node to change the node ID is determined from the plurality of nodes, and the load information of the plurality of nodes is used. The node of the determined node at a position on the ID space that reduces the load bias of the plurality of nodes after the reduction or addition Change the D, and the node ID and the changed as nodes, characterized in that it comprises a slot optimization processing unit that stores the distribution ID information.

また、請求項6に記載の発明は、クラスタを構成する複数のノードそれぞれに、コンシステント・ハッシュ法によりデータを振り分けて処理させる分散処理システムの前記ノードのスロット最適化方法であって、前記ノードが、複数の前記ノードのノードIDそれぞれに対応付けて、ID空間上での担当領域を示すスロットが記憶される振り分けID情報を格納する記憶部を備えており、自身のノードの負荷情報を計測するステップと、前記クラスタを構成する複数のノードに減設または増設が生じた場合、複数の前記ノードの中から、前記ノードIDを変更するノードを決定し、複数の前記ノードの前記負荷情報を用いて、前記減設または増設後の複数の前記ノードについての負荷の偏りを低減する前記ID空間上の位置に、前記決定したノードのノードIDを変更し、前記変更したノードIDを前記振り分けID情報に記憶するステップと、を実行することを特徴とするスロット最適化方法とした。   The invention according to claim 6 is a slot optimization method for the node of a distributed processing system in which data is distributed and processed by a consistent hash method to each of a plurality of nodes constituting a cluster, Is provided with a storage unit that stores distribution ID information in which a slot indicating a responsible area in the ID space is stored in association with each of the node IDs of the plurality of nodes, and measures load information of its own node And when a plurality of nodes constituting the cluster is reduced or added, a node to change the node ID is determined from among the plurality of nodes, and the load information of the plurality of nodes is determined. Using the determined position on the ID space to reduce the load bias for the plurality of nodes after the reduction or expansion It changes the node ID of the over-de, and the node ID and the changed and slot optimization method characterized by performing the steps of: storing in the distribution ID information.

このようにすることで、クラスタを構成する複数のノードに減設または増設が生じた場合、複数のノードの中からノードIDを変更するノードを決定し、負荷の偏りをなくすようにして、決定したノードのノードIDを変更することができる。
よって、ノードの減設・増設時において、特定ノードへの負荷の偏りを低減することができる。
In this way, when a number of nodes constituting a cluster is reduced or added, a node whose node ID is to be changed is determined from the plurality of nodes, and the load is not biased. The node ID of the selected node can be changed.
Therefore, it is possible to reduce the load imbalance on the specific node when the node is reduced or added.

請求項2に記載の発明は、前記スロット最適化処理部が、特定のノードが減設される際に、前記ID空間上において減設されるノードの時計回りで次に位置する次ノードのノードIDを、前記減設されるノードから時計回りで次の次に位置する次々ノードのノードIDと、前記減設されるノードから反時計回りで1つ前に位置する前ノードのノードIDとの合計を等分割して算出し、前記算出した次ノードのノードIDを用いて、前記振り分けID情報を更新することを特徴とする請求項1に記載のノードとした。   According to a second aspect of the present invention, the slot optimization processing unit is a node of a next node positioned next in a clockwise direction to a node to be removed on the ID space when a specific node is to be removed. The node IDs of the next node positioned next to the next node in the clockwise direction from the node to be removed and the node ID of the previous node positioned one counterclockwise from the node to be removed 2. The node according to claim 1, wherein the node ID is calculated by equally dividing the total, and the distribution ID information is updated using the calculated node ID of the next node.

これにより、特定のノードが減設される際に、ID空間上において減設されるノードの時計回りで次に位置する次ノードのノードIDを、隣接ノード間で負荷が偏らないように適切に変更することができる。   As a result, when a specific node is removed, the node ID of the next node positioned next in the clockwise direction of the node to be removed in the ID space is appropriately set so that the load is not biased between adjacent nodes. Can be changed.

請求項3に記載の発明は、前記スロット最適化処理部が、特定のノードが減設される際に、前記ID空間上において減設されるノードの反時計回りで1つ前に位置する前ノードのノードIDを、前記減設されるノードから時計回りで次に位置する次ノードのノードIDと、前記減設されるノードから反時計回りで2つ前に位置する前々ノードのノードIDとの合計を等分割して算出し、前記算出した前ノードのノードIDを用いて、前記振り分けID情報を更新することを特徴とする請求項1に記載のノードとした。   According to a third aspect of the present invention, before the slot optimization processing unit is positioned one counterclockwise before the node to be removed on the ID space when the specific node is to be removed. The node ID of the node is the node ID of the next node positioned clockwise from the node to be removed, and the node ID of the previous node positioned two times counterclockwise from the node to be removed. And the distribution ID information is updated by using the calculated node ID of the previous node.

これにより、特定のノードが減設される際に、ID空間上において減設されるノードの反時計回りで1つ前に位置する前ノードのノードIDを、隣接ノード間で負荷が偏らないように適切に変更することができる。   As a result, when a specific node is removed, the load of the node ID of the previous node located one counterclockwise before the node to be removed in the ID space is not biased between adjacent nodes. Can be changed appropriately.

請求項4に記載の発明は、前記スロット最適化処理部が、特定のノードが増設される際に、前記振り分けID情報を参照し、複数の前記ノードのうち、前記スロットの大きさが最も大きいノードを抽出し、前記抽出したノードのスロットを分割する位置に、増設するノードを配置するように割り当て、前記増設するノードのノードIDを、前記増設するノードによりスロットが分割される前記抽出したノードのノードIDと、当該抽出したノードから反時計回りで1つ前に位置する前ノードのノードIDとの合計を等分割して算出し、算出した前記増設するノードのノードIDを用いて、前記振り分けID情報を更新することを特徴とする請求項1に記載のノードとした。   According to a fourth aspect of the present invention, the slot optimization processing unit refers to the distribution ID information when a specific node is added, and the size of the slot is the largest among the plurality of nodes. Nodes are extracted and assigned so that nodes to be added are arranged at positions where the slots of the extracted nodes are divided, and node IDs of the nodes to be added are assigned to the extracted nodes whose slots are divided by the nodes to be added Is calculated by equally dividing the total of the node ID of the previous node and the node ID of the previous node positioned one counterclockwise from the extracted node, and using the calculated node ID of the additional node, The node according to claim 1, wherein the distribution ID information is updated.

これにより、特定のノードが増設される際に、増設されるノードのID空間上でのノードIDを、隣接ノード間で負荷が偏らないように適切に設定することができる。   Thereby, when a specific node is added, the node ID in the ID space of the added node can be set appropriately so that the load is not biased between adjacent nodes.

請求項5に記載の発明は、前記スロット最適化処理部が、特定のノードの減設時または増設時において、各ノードのデータの移動量が最も少なくなるように起点となるノードを選択し、前記起点となるノードを基準として、各ノードの前記スロットの大きさが等しくなるように、各ノードのノードIDを決定し、前記決定した各ノードのノードIDを用いて、前記振り分けID情報を更新することを特徴とする請求項1に記載のノードとした。   In the invention according to claim 5, the slot optimization processing unit selects a starting node so that the amount of data movement of each node is minimized when a specific node is reduced or added, Using the starting node as a reference, determine the node ID of each node so that the slot sizes of each node are equal, and update the distribution ID information using the determined node ID of each node The node according to claim 1 is provided.

これにより、特定のノードの減設時または増設時において、各ノードの負荷が最も低くなるような起点となるノードを選択し、その起点となるノードを基準として、各ノードのスロットの大きさが等しくなるように、各ノードのノードIDを決定することができる。
よって、ノードの減設または増設時において、各ノードの負荷に偏りがないようにすることができる。
As a result, when a specific node is removed or added, the node that is the starting point that minimizes the load on each node is selected, and the size of the slot of each node is determined based on the starting node. The node ID of each node can be determined to be equal.
Therefore, it is possible to prevent the load on each node from being biased when the number of nodes is reduced or increased.

本発明によれば、分散処理システムを構成するノードの減設・増設動作時において、特定ノードへの負荷の偏りを低減する、ノードおよびスロット最適化方法を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the node and slot optimization method which reduces the bias | biasing of the load to a specific node at the time of the reduction | decrease / addition operation of the node which comprises a distributed processing system can be provided.

本実施形態に係るノードを含む分散処理システムの全体構成を示す図である。It is a figure which shows the whole structure of the distributed processing system containing the node which concerns on this embodiment. 本実施形態に係るノードが実行する負荷分散処理の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the load distribution process which the node which concerns on this embodiment performs. 本実施形態に係るノードの機能ブロック図である。It is a functional block diagram of a node concerning this embodiment. 本実施形態に係るノード識別子管理テーブルのデータ構成例を示す図である。It is a figure which shows the data structural example of the node identifier management table which concerns on this embodiment. 本実施形態に係る振り分けIDテーブルのデータ構成例を示す図である。It is a figure which shows the data structural example of the distribution ID table which concerns on this embodiment. 手法(1)Minimum Adjustment法の減設時における負荷分散処理を説明するための図である。It is a figure for demonstrating the load distribution process at the time of reduction of the method (1) Minimum Adjustment method. 手法(1)Minimum Adjustment法の増設時における負荷分散処理を説明するための図である。It is a figure for demonstrating the load distribution process at the time of expansion of the method (1) Minimum Adjustment method. 手法(2)Full Justification法の減設時における起点ノード選択処理を説明するための図である。It is a figure for demonstrating the origin node selection process at the time of reduction of the technique (2) Full Justification method. 手法(2)Full Justification法の増設時における起点ノード選択処理を説明するための図である。It is a figure for demonstrating the origin node selection process at the time of expansion of the method (2) Full Justification method. 本実施形態に係るノードが、手法(1)Minimum Adjustment法を実行する場合の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process in case the node which concerns on this embodiment performs the method (1) Minimum Adjustment method. 本実施形態に係るノードが、手法(2)Full Justification法を実行する場合の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process in case the node which concerns on this embodiment performs the method (2) Full Justification method. 従来技術における問題を説明するための図である。It is a figure for demonstrating the problem in a prior art.

<全体構成>
まず、本発明を実施するための形態(以下、「本実施形態」と称する。)に係るノード1を含む分散処理システム1000について説明する。
図1は、本実施形態に係るノード1を含む分散処理システム1000の全体構成を示す図である。
<Overall configuration>
First, a distributed processing system 1000 including a node 1 according to a mode for carrying out the present invention (hereinafter referred to as “this embodiment”) will be described.
FIG. 1 is a diagram showing an overall configuration of a distributed processing system 1000 including a node 1 according to the present embodiment.

この分散処理システム1000は、複数のノード1から構成される。各ノード1は、コンピュータなどの物理装置や仮想マシンなどの論理装置である。ロードバランサ3は、クライアント2から受信したメッセージを、単純なラウンドロビン等により振り分けて各ノード1に送信する。そして、ノード1の振り分け部12は、クライアント2からのメッセージを、例えば、コンシステント・ハッシュ法等に基づき、メッセージを担当するノード1に振り分ける。メッセージを担当するノード1では、信号処理部13において、信号処理を行い、クライアント2にサービスを提供する。   This distributed processing system 1000 includes a plurality of nodes 1. Each node 1 is a physical device such as a computer or a logical device such as a virtual machine. The load balancer 3 distributes the message received from the client 2 by simple round robin or the like and transmits it to each node 1. Then, the distribution unit 12 of the node 1 distributes the message from the client 2 to the node 1 in charge of the message based on, for example, a consistent hash method. In the node 1 in charge of the message, the signal processing unit 13 performs signal processing and provides a service to the client 2.

なお、ロードバランサ3が存在せず、クライアント2から任意のノード1(振り分け部12)にメッセージを送信することも可能である。また、振り分け部12と信号処理部13とは、同じノード1上に同時に存在してもよいし、別々のノード1上に存在してもよい。   Note that the load balancer 3 does not exist, and a message can be transmitted from the client 2 to an arbitrary node 1 (distribution unit 12). Further, the distribution unit 12 and the signal processing unit 13 may exist on the same node 1 at the same time, or may exist on different nodes 1.

<ノード>
次に、分散処理システム1000を構成するノード1について、具体的に説明する。
<Node>
Next, the node 1 constituting the distributed processing system 1000 will be specifically described.

≪概要≫
まず、本実施形態に係るノード1の処理の概要を説明する。
ノード1は、負荷分散処理(負荷の偏りを低減する処理)の手法として、手法(1)Minimum Adjustment法、手法(2)Full Justification法のいずれかを実行する。
≪Overview≫
First, an outline of processing of the node 1 according to the present embodiment will be described.
The node 1 executes any one of a method (1) Minimum Adjustment method and a method (2) Full Justification method as a method of load distribution processing (processing for reducing load imbalance).

手法(1)Minimum Adjustment法は、分散処理システム1000を構成するノード1に減設や増設が発生した場合に、その減設するノード(以下、「減設ノード」と称する場合がある。)や増設するノード(以下、「増設ノード」と称する場合がある。)に隣接するノード(以下、「隣接ノード」と称する場合がある。)間で、担当領域を等分割するようにしてノードIDを変更する。   Method (1) The Minimum Adjustment method is a node to be reduced (hereinafter, may be referred to as “reduced node”) when the node 1 constituting the distributed processing system 1000 is reduced or added. The node ID is divided so that the assigned area is equally divided between the nodes adjacent to the nodes to be added (hereinafter sometimes referred to as “additional nodes”) (hereinafter also referred to as “adjacent nodes”). change.

具体的には、図2(a)に示すように、コンシステント・ハッシュのID空間上に、ノード「A」〜「D」が配置され、各データの処理を実行している場合において、例えば、ノード「C」が減設したものとする。このとき、手法(1)Minimum Adjustment法では、ノード「C」に隣接するノードであるノード「D」またはノード「B」のいずれかのノードIDを変更することにより、負荷の偏りの低減を実現する。ここでは、減設ノード(ノード「C」)のID空間上での次のノードであるノード「D」のノードIDを変更するものとして説明する。手法(1)Minimum Adjustment法では、図2(b)に示すように、減設ノードであるノード「C」のID空間上において次のノードであるノード「D」と、さらにその次のノード(次々ノード)であるノード「A」とを対象として、ノード「D」とノード「A」の担当領域を等分割するようにノード「D」のノードIDを変更する(ここでは、ノード「D」を反時計回りに移動する。)。
これにより、ID空間上において、減設ノード(ノード「C」)の時計回りに次のノード(ノード「D」)の負荷が、極端に高くなることを抑制することができる。また、担当データを移動する必要のあるノードが、全ノードのうち、減設ノード(ノード「C」)に隣接するノード「D」のみとなるため、データの移動量を少なくすることができ、高速に減設に対応することができる。
Specifically, as shown in FIG. 2A, in the case where nodes “A” to “D” are arranged on the consistent hash ID space and each data processing is executed, for example, Assume that node “C” is removed. At this time, in the method (1) Minimum Adjustment method, the load deviation is reduced by changing the node ID of either the node “D” or the node “B” that is adjacent to the node “C”. To do. Here, description will be made assuming that the node ID of the node “D”, which is the next node on the ID space of the reduced node (node “C”), is changed. Method (1) In the Minimum Adjustment method, as shown in FIG. 2B, the node “D”, which is the next node in the ID space of the node “C”, which is the reduced node, and the next node ( The node ID of the node “D” is changed so as to equally divide the area in charge of the node “D” and the node “A” with respect to the node “A” which is the node one after another (here, the node “D”) Move counterclockwise.)
Thereby, in the ID space, it is possible to prevent the load of the next node (node “D”) from becoming extremely high in the clockwise direction of the reduced node (node “C”). In addition, since the node that needs to move the assigned data is only the node “D” adjacent to the reduced node (node “C”) among all the nodes, the amount of data movement can be reduced. It can cope with the reduction at high speed.

手法(2)Full Justification法は、分散処理システム1000に属するノード1の減設が発生した場合、または、ノード1を増設する場合に、各ノード1の担当領域が等分割されるように、特定ノード(後記する「起点ノード」)を基準として、起点ノード以外の他の全てのノード1のノードIDを変更する。   Method (2) The Full Justification method is specified so that when the node 1 belonging to the distributed processing system 1000 is removed or when the node 1 is added, the assigned area of each node 1 is equally divided. The node IDs of all the nodes 1 other than the starting node are changed using the node (“starting node” described later) as a reference.

具体的には、図2(a)に示すように、コンシステント・ハッシュのID空間上に、ノード「A」〜「D」が配置され、各データを処理している場合において、例えば、ノード「C」が減設したものとする。このとき、手法(2)Full Justification法では、図2(c)に示すように、特定ノード(図2(c)においては、ノード「B」)を起点ノードとして、各ノード1の担当領域(スロット)が等分割されるように、起点ノード以外のノード1のノードIDを変更(再設定)する。ここでは、ノード「A」とノード「D]のノードIDを変更する。
これにより、各ノード1の負荷が偏らず、均等に保つことができる。
Specifically, as shown in FIG. 2A, when nodes “A” to “D” are arranged on the consistent hash ID space and each data is processed, for example, the node It is assumed that “C” has been removed. At this time, in the method (2) Full Justification method, as shown in FIG. 2 (c), the area in charge of each node 1 (node “B” in FIG. 2 (c)) is set as the origin node. The node IDs of the nodes 1 other than the starting node are changed (reset) so that the slot) is equally divided. Here, the node IDs of the nodes “A” and “D” are changed.
As a result, the load on each node 1 can be kept uniform without being biased.

本実施形態に係るノード1は、手法(1)Minimum Adjustment法、手法(2)Full Justification法のいずれかの負荷分散処理を実行することにより、分散処理システム1000を構成するノード1の減設・増設動作時において、特定ノードへの負荷の偏りを低減ることができる。   The node 1 according to the present embodiment reduces the number of nodes 1 constituting the distributed processing system 1000 by executing the load distribution process of any one of the method (1) Minimum Adjustment method and the method (2) Full Justification method. During the expansion operation, it is possible to reduce the load imbalance on a specific node.

≪ノードの構成≫
次に、本実施形態に係る分散処理システム1000を構成するノード1について、具体的に説明する。なお、本実施形態に係るノード1は、分散処理システム1000の複数のノード1のうち、後記するノード識別子管理テーブル100(図4参照)および振り分けIDテーブル200(図5参照)を管理する特権ノードとなる場合と、特権ノードからノード識別子管理テーブル100および振り分けIDテーブル200の情報を受け取り自身のノード識別子管理テーブル100および振り分けIDテーブル200を更新する非特権ノードとなる場合とが存在する。なお、特権ノードが行う処理等については、後記する。
<< Node configuration >>
Next, the node 1 constituting the distributed processing system 1000 according to the present embodiment will be specifically described. The node 1 according to the present embodiment is a privileged node that manages a node identifier management table 100 (see FIG. 4) and a distribution ID table 200 (see FIG. 5), which will be described later, among the plurality of nodes 1 of the distributed processing system 1000. And the case where the node identifier management table 100 and the distribution ID table 200 are received from the privileged node and the node identifier management table 100 and the distribution ID table 200 are updated. The processing performed by the privileged node will be described later.

ノード1は、図1に示したように、ロードバランサ3と通信可能に接続されるともに、クラスタを構成する自身以外の他のノード1と通信可能に接続される。また、このノード1は、ロードバランサ3を介してクライアント2からメッセージを受け取ると、そのメッセージを、担当するノード1(自身を含む)に振り分け、そのメッセージの信号処理を実行する。また、特権ノードとなるノード1は、分散処理システム1000に属するノード1の減設・増設に関する情報を受信し、前記した、手法(1)Minimum Adjustment法、手法(2)Full Justification法のいずれかを実行することにより、ID空間上において対象となるノード1のノードIDを変更(具体的には、後記する振り分けIDテーブル200を更新)して、負荷の偏りの低減を実現する。
このノード1は、図3に示すように、制御部10と、入出力部20と、記憶部30とを含んで構成される。
As shown in FIG. 1, the node 1 is communicably connected to the load balancer 3 and is communicably connected to other nodes 1 other than itself constituting the cluster. Further, when the node 1 receives a message from the client 2 via the load balancer 3, the node 1 distributes the message to the responsible node 1 (including itself), and executes signal processing of the message. In addition, the node 1 that is a privileged node receives information on the reduction / expansion of the node 1 belonging to the distributed processing system 1000, and any one of the method (1) Minimum Adjustment method and the method (2) Full Justification method described above. By executing the above, the node ID of the target node 1 is changed in the ID space (specifically, the distribution ID table 200 described later is updated), thereby reducing the load bias.
As illustrated in FIG. 3, the node 1 includes a control unit 10, an input / output unit 20, and a storage unit 30.

入出力部20は、ロードバランサ3や、自身以外の他のノード1との間の情報の入出力を行う。また、この入出力部20は、通信回線を介して情報の送受信を行う通信インタフェース(図示省略)と、キーボード等の入力手段やモニタ等の出力手段等との間で入出力を行う入出力インタフェース(図示省略)とから構成される。   The input / output unit 20 inputs / outputs information to / from the load balancer 3 and other nodes 1 other than itself. Further, the input / output unit 20 is an input / output interface that performs input / output between a communication interface (not shown) that transmits / receives information via a communication line and an input unit such as a keyboard or an output unit such as a monitor. (Not shown).

記憶部30は、ハードディスクやフラッシュメモリ、RAM(Random Access Memory)等の記憶手段からなり、処理の対象となるデータ300や、ノード識別子管理テーブル100(図4参照)、振り分けIDテーブル(振り分けID情報)200(図5参照)、ノード1自身のノード負荷を計測した情報であるノード負荷計測情報400が記憶される。さらに、ノード1が特権ノードである場合には、各ノード1のノード負荷情報をまとめた(収集した)情報であるシステム負荷情報500が記憶される。なお、この記憶部30に記憶される各情報についての詳細は後記する。   The storage unit 30 includes storage means such as a hard disk, a flash memory, and a RAM (Random Access Memory), and includes data 300 to be processed, a node identifier management table 100 (see FIG. 4), a distribution ID table (distribution ID information). ) 200 (see FIG. 5), node load measurement information 400, which is information obtained by measuring the node load of the node 1 itself, is stored. Further, when the node 1 is a privileged node, system load information 500, which is information obtained by collecting (collecting) node load information of each node 1, is stored. Details of each piece of information stored in the storage unit 30 will be described later.

制御部10は、ノード1全体の制御を司り、ノード識別子管理部11、振り分け部12、信号処理部13、ノード負荷計測部14およびスロット最適化処理部15を含んで構成される。なお、この制御部10は、例えば、記憶部30に格納されたプログラムをCPU(Central Processing Unit)(図示省略)がRAM(図示省略)に展開し実行することで実現される。   The control unit 10 controls the entire node 1 and includes a node identifier management unit 11, a distribution unit 12, a signal processing unit 13, a node load measurement unit 14, and a slot optimization processing unit 15. The control unit 10 is realized, for example, by a CPU (Central Processing Unit) (not shown) developing and executing a program stored in the storage unit 30 on a RAM (not shown).

ノード識別子管理部11は、分散処理システム1000においてクラスタを構成する各ノード1のノード情報(IPアドレス等)および各ノード1が担当するID空間を管理する。
具体的には、ノード識別子管理部11は、自身が属する分散処理システム1000へのノードの離脱(減設)や追加(増設)が発生した場合に、その情報を外部から受信し、分散処理システム1000を構成するノード1の識別情報等が記憶されたノード識別子管理テーブル100を更新する。
The node identifier management unit 11 manages the node information (IP address and the like) of each node 1 configuring the cluster in the distributed processing system 1000 and the ID space handled by each node 1.
Specifically, the node identifier management unit 11 receives information from the outside when a node is detached (removed) or added (added) to the distributed processing system 1000 to which the node identifier belongs, and the distributed processing system The node identifier management table 100 in which the identification information and the like of the node 1 constituting 1000 is stored is updated.

図4は、本実施形態に係るノード識別子管理テーブル100のデータ構成例を示す図である。
図4に示すように、ノード識別子管理テーブル100には、分散処理システム1000を構成する各ノード1のノード識別子101とアドレス102(例えば、IPアドレス)とが対応付けられて格納される。
FIG. 4 is a diagram illustrating a data configuration example of the node identifier management table 100 according to the present embodiment.
As shown in FIG. 4, the node identifier management table 100 stores the node identifier 101 and the address 102 (for example, IP address) of each node 1 constituting the distributed processing system 1000 in association with each other.

このノード識別子101は、例えば、当該分散処理システム1000内において予め設定される特定のノード(例えば、ノード識別子101の昇順に設定)のノード識別子管理部11で付与され、当該分散処理システム1000内の各ノード1に配信される。なお、このノード識別子101は、コンシステント・ハッシュのID空間において仮想IDを用いる場合、仮想ID毎に付与される。   The node identifier 101 is given by, for example, the node identifier management unit 11 of a specific node (for example, set in ascending order of the node identifier 101) set in advance in the distributed processing system 1000. Distributed to each node 1. The node identifier 101 is assigned to each virtual ID when a virtual ID is used in the consistent hash ID space.

また、ノード識別子管理部11は、ノード1の減設・増設について受信した情報を、スロット最適化処理部15に出力するとともに、そのスロット最適化処理部15の処理結果(ノードIDの変更情報等)に基づき、ノード識別子管理テーブル100を更新(ノード1の減設・増設を反映)し、さらに、ノード1の担当するID空間(担当領域:スロット)を変更するため、振り分けIDテーブル200を更新する。   In addition, the node identifier management unit 11 outputs the received information about the deinstallation / expansion of the node 1 to the slot optimization processing unit 15 and the processing result of the slot optimization processing unit 15 (node ID change information, etc.) ), The node identifier management table 100 is updated (reflecting the reduction / expansion of the node 1), and the distribution ID table 200 is updated in order to change the ID space (area in charge: slot) in charge of the node 1. To do.

図5は、本実施形態に係る振り分けIDテーブル(振り分けID情報)200のデータ構成例を示す図である。
図5に示すように、振り分けIDテーブル200には、ノード識別子201に対応付けて、そのノード1が担当するID空間202(担当領域:スロット)が格納される。このノード識別子201は、図4のノード識別子101と同様の情報である。図5に示す例では、ID空間の全ID数が「0」〜「799」の「800」であり、例えば、ノード識別子201が「A」のノード1が、担当するID空間202として「0〜199」について担当することを示している。また、この振り分けIDテーブル200において、ノード識別子201が「A」のノード1(ノード「A」)のID空間上のノードIDは、「199」であり、以下同様に、ノード「B」のID空間上でのノードIDは「399」であり、ノード「C]のID空間上でのノードIDは「599」であり、ノード「D]のID空間上でのノードIDは「799」である。そして、ノード識別子管理部11は、振り分けIDテーブル200において、各ノード1のノードIDを昇順にソートし、連続したID空間202として管理する。
なお、本実施形態においては、閉じたID空間上において各IDを時計回りに配置し、データのIDから時計回りに辿った場合に最初に当たったノードをそのデータの担当として説明する。しかしながら、ID空間上において各IDを反時計回りに配置し、データのIDから反時計回りに辿った場合に最初に当たったノードをそのデータの担当とするように構成してもよい。つまり、所定の方向回りにID空間上におけるIDを設定することができる。
FIG. 5 is a diagram illustrating a data configuration example of a distribution ID table (distribution ID information) 200 according to the present embodiment.
As shown in FIG. 5, the distribution ID table 200 stores an ID space 202 (in charge area: slot) that the node 1 is in charge of in association with the node identifier 201. This node identifier 201 is the same information as the node identifier 101 of FIG. In the example shown in FIG. 5, the total number of IDs in the ID space is “800” of “0” to “799”. For example, the node 1 with the node identifier 201 “A” is “0” as the ID space 202 in charge. To 199 ”. In the distribution ID table 200, the node ID in the ID space of the node 1 (node “A”) with the node identifier 201 “A” is “199”, and similarly, the ID of the node “B” is the same. The node ID on the space is “399”, the node ID of the node “C” on the ID space is “599”, and the node ID of the node “D” on the ID space is “799”. . Then, the node identifier management unit 11 sorts the node IDs of the respective nodes 1 in ascending order in the distribution ID table 200 and manages them as a continuous ID space 202.
In the present embodiment, each ID is arranged clockwise in a closed ID space, and the node that first hits when the data is traced clockwise from the data ID will be described as the charge of the data. However, each ID may be arranged in a counterclockwise direction in the ID space, and when the data is traced counterclockwise from the ID of the data, the node that hits first may be assigned to the data. That is, an ID on the ID space can be set around a predetermined direction.

分散処理システム1000内の特権ノードのノード識別子管理部11は、各ノード1に対して、最新のノード識別子管理テーブル100および振り分けIDテーブル200を送信する。これにより、各ノード1のノード識別子管理部11は、ノード識別子管理テーブル100および振り分けIDテーブル200を常に最新の状態に更新して保持する。このようにすることにより、分散処理システム1000内の各ノード1には、同一のノード識別子管理テーブル100および振り分けIDテーブル200が保持される。   The node identifier management unit 11 of the privileged node in the distributed processing system 1000 transmits the latest node identifier management table 100 and the distribution ID table 200 to each node 1. Accordingly, the node identifier management unit 11 of each node 1 always updates and holds the node identifier management table 100 and the distribution ID table 200 in the latest state. By doing so, each node 1 in the distributed processing system 1000 holds the same node identifier management table 100 and distribution ID table 200.

また、特権ノードは、例えば、このノード識別子管理テーブル100(図4)の一番上の行のノード1から順に、特権ノードとなるように設定される。ノード1が新たに特権ノードになった場合、自身が特権ノードであることを示す情報を、各ノード1等に送信する。そして、特権ノードは、クラスタ内のノード1について、ID空間上での配置変更(ノードIDの変更等)があった場合に、自身の振り分けIDテーブル200を更新し、その更新情報を、各ノード1に配信する。   The privileged nodes are set so as to become privileged nodes in order from the node 1 in the top row of the node identifier management table 100 (FIG. 4), for example. When node 1 newly becomes a privileged node, information indicating that it is a privileged node is transmitted to each node 1 or the like. Then, the privileged node updates its own distribution ID table 200 when there is an arrangement change in the ID space (node ID change or the like) for the node 1 in the cluster, and the update information is updated for each node. Deliver to 1.

図3に戻り、振り分け部12は、ロードバランサ3等を介してクライアント2から受信したメッセージ内の情報(「振り分けキー」)をもとに「hash(key)」を算出し、振り分けIDテーブル200を参照して、そのメッセージの処理を担当するノード1を特定する。そして、振り分け部12は、特定したノード1のアドレスの情報を、ノード識別子管理テーブル100を参照して取得し、特定したノード1へメッセージの振り分け(送信)を行う。
また、信号処理部13は、自身のノード1が担当するデータに関するメッセージの信号処理を実行する。
Returning to FIG. 3, the distribution unit 12 calculates “hash (key)” based on information (“distribution key”) in the message received from the client 2 via the load balancer 3 or the like, and distributes the distribution ID table 200. To identify the node 1 in charge of processing the message. Then, the distribution unit 12 acquires information on the address of the identified node 1 with reference to the node identifier management table 100, and distributes (transmits) the message to the identified node 1.
In addition, the signal processing unit 13 performs signal processing of messages related to data handled by the node 1 itself.

ノード負荷計測部14は、例えば、所定の周期において、ノード負荷計測要求等を特権ノードから受信した場合に、自身のノード1のノード負荷(負荷情報)を計測し、自身の記憶部30内にノード負荷計測情報400として記憶する。そして、ノード負荷計測部14は、その計測したノード負荷(負荷情報)を、特権ノードに送信する。
ノード負荷計測部14が計測するノード負荷は、例えば、メモリ使用量、CPU使用率、データ個数等である。
For example, when a node load measurement request or the like is received from a privileged node in a predetermined cycle, the node load measurement unit 14 measures the node load (load information) of its own node 1 and stores it in its storage unit 30. Store as node load measurement information 400. Then, the node load measurement unit 14 transmits the measured node load (load information) to the privileged node.
The node load measured by the node load measuring unit 14 is, for example, a memory usage amount, a CPU usage rate, or the number of data.

以下説明する、スロット最適化処理部15は、各ノード1が備えるが、ノード1自身が特権ノードの場合に動作する。
ノード1のスロット最適化処理部15は、手法(1)Minimum Adjustment法、手法(2)Full Justification法のいずれかを実行することにより、ID空間上のノードIDを変更し、負荷の偏りの低減を実現する。なお、スロット最適化処理部15が、手法(1)Minimum Adjustment法、手法(2)Full Justification法のどちらを実行するかは、予め分散処理システム1000の管理者等により設定される。
The slot optimization processing unit 15 described below is provided in each node 1, but operates when the node 1 itself is a privileged node.
The slot optimization processing unit 15 of the node 1 changes the node ID in the ID space by executing any one of the method (1) Minimum Adjustment method and the method (2) Full Justification method, and reduces the load bias. Is realized. Note that an administrator of the distributed processing system 1000 or the like sets in advance which of the method (1) Minimum Adjustment method and the method (2) Full Justification method the slot optimization processing unit 15 executes.

(手法(1)Minimum Adjustment法)
手法(1)Minimum Adjustment法は、分散処理システム1000を構成するノード1に減設や増設が発生した場合に、減設ノードや増設ノードに隣接するノード(隣接ノード)間で、担当領域を等分割するようにしてノードIDを変更する。
(Method (1) Minimum Adjustment method)
Method (1) The Minimum Adjustment method is a method in which, when a node 1 constituting the distributed processing system 1000 is reduced or added, the assigned area is set between the reduced node and the node adjacent to the added node (adjacent node). The node ID is changed so as to be divided.

〔減設時の処理〕
スロット最適化処理部15が、手法(1)Minimum Adjustment法により、ノード減設時において実行する処理について説明する。
スロット最適化処理部15は、まず、ノードIDを変更するノード1として、減設ノードの時計回り側に位置するノード1(以下、「次ノード」と称する場合がある。)、若しくは、減設ノードの反時計回り側に位置するノード1(以下、「前ノード」と称する場合がある。)を決定する。ここで、スロット最適化処理部15は、減設ノードの時計回り側で2つ目に位置するノード1(以下、「次々ノード」と称する場合がある。)と、前ノードとについて、担当領域の大きさ(スロットのサイズ)、負荷の大きさ、データ個数の多さのいずれかを比較する。そして、スロット最適化処理部15は、次々ノードの値の方が小さければ、次ノードをノードIDを変更するノード1として決定し、前ノードの値の方が小さければ、前ノードをノードIDを変更するノード1として決定する。
[Processing at the time of reduction]
A process executed by the slot optimization processing unit 15 at the time of node reduction by the method (1) Minimum Adjustment method will be described.
First, the slot optimization processing unit 15 sets the node 1 whose node ID is to be changed as the node 1 located on the clockwise side of the reduced node (hereinafter, may be referred to as “next node”) or the reduced number. Node 1 located on the counterclockwise side of the node (hereinafter, may be referred to as “previous node”) is determined. Here, the slot optimization processing unit 15 determines the area in charge for the node 1 (hereinafter sometimes referred to as “second node”) positioned second on the clockwise side of the reduced node and the previous node. Are compared (slot size), load size, or the number of data. Then, if the value of the next node is smaller, the slot optimization processing unit 15 determines the next node as the node 1 whose node ID is to be changed. If the value of the previous node is smaller, the slot optimization processing unit 15 sets the previous node as the node ID. The node 1 to be changed is determined.

具体的には、スロット最適化処理部15は、担当領域の大きさ(スロットのサイズ)を基準とする場合には、減設ノードについての、次々ノードと前ノードのスロットのサイズを比較し、スロットのサイズが小さい側のノード1を選択する。スロット最適化処理部15は、負荷の大きさを基準とする場合には、減設ノードについての、次々ノードと前ノードの負荷を比較し、負荷が少ない側のノード1を選択する。また、スロット最適化処理部15は、データ個数の多さを基準とする場合には、減設ノードについての、次々ノードと前ノードのデータ個数を比較し、データ個数の少ない側のノード1を選択する。このようにすることで、ノード1間の負荷の偏りの増大をできるだけ回避するようにして、ノードIDを変更するノード1を決定することができる。   Specifically, the slot optimization processing unit 15 compares the size of the slot of the next node and the previous node for the reduced node when the size of the assigned area (slot size) is used as a reference, Node 1 with the smaller slot size is selected. When the load size is used as a reference, the slot optimization processing unit 15 compares the loads of the reduced node with the load of the next node and the previous node, and selects the node 1 on the side with the lower load. Further, when the number of data is based on the number of data, the slot optimization processing unit 15 compares the number of data of the next node and the previous node with respect to the reduced node, and determines the node 1 with the smaller number of data. select. By doing so, it is possible to determine the node 1 whose node ID is to be changed while avoiding an increase in the load bias between the nodes 1 as much as possible.

スロット最適化処理部15は、ノードIDを変更するノード1として、減設ノードの時計回り側に位置するノード1(次ノード)、若しくは、減設ノードの反時計回り側に位置するノード1(前ノード)のいずれかを決定すると、以下の式に基づき、ノードIDを算出する。   The slot optimization processing unit 15 sets the node 1 whose node ID is to be changed as the node 1 (next node) positioned on the clockwise side of the reduced node or the node 1 (located on the counterclockwise side of the reduced node) ( If any of the previous nodes is determined, the node ID is calculated based on the following equation.

[次ノードに決定した場合]
スロット最適化処理部15は、ノードIDを変更するノード1を次ノードに決定した場合、以下の式(1)により、変更するノードIDを算出する。
[If determined as the next node]
When the node 1 whose node ID is to be changed is determined as the next node, the slot optimization processing unit 15 calculates the node ID to be changed according to the following equation (1).

減設ノードの時計回り側に位置するノード(次ノード)のID=
(減設ノードの反時計回り側に位置するノード(前ノード)のID +
時計回り側で2つ目に位置するノード(次々ノード)のID)÷2 ・・・式(1)
ID of the node (next node) located on the clockwise side of the reduced node =
(ID of the node (previous node) located on the counterclockwise side of the reduced node +
ID of the second node (next node) located on the clockwise side) ÷ 2 Equation (1)

前記した図2(b)に示す例では、減設ノード(ノード「C」)の反時計回り側に位置するノード(前ノード:ノード「B」)のIDと、減設ノード(ノード「C」)の時計回り側で2つ目に位置するノード(次々ノード:ノード「A」)のIDとを足して、2で割る(等分割する)ことにより、減設ノードの時計回り側に位置するノード(次ノード:ノード「D」)のIDが算出される。
なお、等分割したIDの値が割り切れない場合は、例えば、小数点以下を切り捨てる等を予め設定しておく(以下同様)。また、コンシステント・ハッシュのID空間は、閉じたID空間(つまり環状)であるため、設定されたIDの最大値の次のIDは「0」に戻る。よって、IDが「0」をまたぐ場合は、それを考慮した上で式(1)を用いる。なお、後記する式(2)、式(3),式(5)の場合も同様である。
In the example shown in FIG. 2B described above, the ID of the node (previous node: node “B”) located counterclockwise of the reduced node (node “C”) and the reduced node (node “C”) )) Is added to the ID of the second node (second node: node “A”) located on the clockwise side, and divided by 2 (equally divided), so that it is positioned on the clockwise side of the reduced node. ID of the node (next node: node “D”) to be calculated is calculated.
If the equally divided ID value is not divisible, for example, a value after the decimal point is discarded (the same applies hereinafter). Further, since the ID space of the consistent hash is a closed ID space (that is, a ring), the ID next to the set maximum ID value returns to “0”. Therefore, when the ID crosses “0”, Equation (1) is used in consideration thereof. The same applies to formulas (2), (3), and (5) described later.

このようにして、スロット最適化処理部15は、減設ノードの次ノードの新たなIDを算出する。そして、スロット最適化処理部15は、算出した次ノードのIDを、ノード識別子管理部11に出力して、振り分けIDテーブル200を更新させる。これにより、減設ノードの時計回り側に位置するノード(次ノード)への負荷の偏りを低減することができる。   In this way, the slot optimization processing unit 15 calculates a new ID of the next node of the reduced node. Then, the slot optimization processing unit 15 outputs the calculated next node ID to the node identifier management unit 11 to update the distribution ID table 200. Thereby, it is possible to reduce the load bias to the node (next node) located on the clockwise side of the reduced node.

[前ノードに決定した場合]
スロット最適化処理部15は、ノードIDを変更するノード1を前ノードに決定した場合、以下の式(2)により、変更するノードIDを算出する。
[When the previous node is determined]
When the node 1 whose node ID is to be changed is determined as the previous node, the slot optimization processing unit 15 calculates the node ID to be changed according to the following equation (2).

減設ノードの反時計回り側に位置するノード(前ノード)のID=
(減設ノードの反時計回り側で2つ目に位置するノード(前々ノード)のID +
時計回り側に位置するノード(次ノード)のID)÷2 ・・・式(2)
ID of the node (previous node) located on the counterclockwise side of the reduced node =
(ID of the second node (previous node) on the counterclockwise side of the reduced node +
ID of the node (next node) located in the clockwise direction) ÷ 2 Equation (2)

図6に示す例では、図6(a)に示すID空間上で、ノード「C」が減設した場合に、図6(b)に示すように、減設ノード(ノード「C」)の反時計回り側で2つ目に位置するノード(前々ノード:ノード「A」)のIDと、減設ノード(ノード「C」)の時計回り側に位置するノード(次ノード:ノード「D」)のIDとを足して、2で割る(等分割)することにより、減設ノードの反時計回り側に位置するノード(前ノード:ノード「B」)のIDが算出される。   In the example shown in FIG. 6, when the node “C” is removed on the ID space shown in FIG. 6A, as shown in FIG. 6B, the reduced node (node “C”) The ID of the second node (previous node: node “A”) located on the counterclockwise side and the node (next node: node “D” located on the clockwise side of the reduced node (node “C”) ")) And dividing by 2 (equal division), the ID of the node (previous node: node" B ") located on the counterclockwise side of the reduced node is calculated.

このようにして、スロット最適化処理部15は、減設ノードの反時計回り側に位置するノード(前ノード)の新たなIDを算出する。そして、スロット最適化処理部15は、算出した前ノードのIDを、ノード識別子管理部11に出力して、振り分けIDテーブル200を更新させる。これにより、前ノードのIDが、ID空間上で時計回り側に移動する。よって、減設ノードの時計回り側に位置するノード(次ノード)への負荷の偏りを低減することができる。   In this way, the slot optimization processing unit 15 calculates a new ID of a node (previous node) located on the counterclockwise side of the reduced node. Then, the slot optimization processing unit 15 outputs the calculated ID of the previous node to the node identifier management unit 11 to update the distribution ID table 200. As a result, the ID of the previous node moves clockwise in the ID space. Therefore, it is possible to reduce the load bias to the node (next node) located on the clockwise side of the reduced node.

なお、上記においては、スロット最適化処理部15は、まず、ノードIDを変更するノード1として、減設ノードの時計回り側に位置するノード1(次ノード)、若しくは、減設ノードの反時計回り側に位置するノード1(前ノード)のいずれかを決定するものとして説明した。しかしながら、スロット最適化処理部15に、ノードIDを変更するノード1として、減設ノードの次ノード、減設ノードの前ノードのいずれかを予め設定しておき、式(1)または式(2)のいずれかを用いて、変更後のノードIDを算出するようにしてもよい。   In the above, the slot optimization processing unit 15 first sets the node 1 whose node ID is changed as the node 1 (next node) positioned on the clockwise side of the reduced node or the counterclockwise of the reduced node. It has been described that one of the nodes 1 (previous node) located on the rotation side is determined. However, the node 1 whose node ID is to be changed is set in the slot optimization processing unit 15 in advance as either the next node of the reduced node or the previous node of the reduced node, and Expression (1) or Expression (2) ) May be used to calculate the changed node ID.

〔増設時の処理〕
スロット最適化処理部15が、手法(1)Minimum Adjustment法において、ノード増設時において実行する処理について説明する。スロット最適化処理部15は、各ノード1のスロットの大きさを比較し、最も大きいスロットを等分割する位置に、増設するノードを配置する。以下、具体的に説明する。
[Processing for expansion]
A process executed by the slot optimization processing unit 15 when adding a node in the method (1) Minimum Adjustment method will be described. The slot optimization processing unit 15 compares the sizes of the slots of each node 1 and arranges a node to be added at a position where the largest slot is equally divided. This will be specifically described below.

まず、スロット最適化処理部15は、振り分けIDテーブル200(図5)を参照し、増設前の各ノード1の担当領域の大きさ(スロットのサイズ)が、最も大きいノード1を抽出し、その抽出したノード1の担当領域を分割する位置に、新たに増設するノード1(増設ノード)を配置するように割り当てる。なお、この担当領域が分割されるノード1を、以下、「分割ノード」と称する場合がある。   First, the slot optimization processing unit 15 refers to the distribution ID table 200 (FIG. 5), extracts the node 1 with the largest size (slot size) of the assigned area of each node 1 before the addition, Allocation is performed so that a newly added node 1 (additional node) is arranged at a position where the assigned area of the extracted node 1 is divided. Note that the node 1 into which the assigned area is divided may be hereinafter referred to as “divided node”.

続いて、スロット最適化処理部15は、以下の式(3)により、増設ノードのノードIDを算出する。   Subsequently, the slot optimization processing unit 15 calculates the node ID of the additional node by the following equation (3).

増設ノードのID=
(増設ノードによりスロットを分割されるノード(分割ノード)のID +
分割ノードの反時計回り側に位置するノード(前ノード)のID )÷2
・・・式(3)
Expansion node ID =
(ID of the node (divided node) whose slot is divided by the expansion node +
ID of the node (previous node) located on the counterclockwise side of the split node) / 2
... Formula (3)

具体的には、図7(a)に示すように、ID空間上にノード「A」「B」「D」が配置され、各データを処理している場合において、ノード「C」を増設する指示をノード1が受けたものとする。ここで、スロット最適化処理部15は、振り分けIDテーブル200を参照し、担当領域の大きさ(スロットのサイズ)が最も大きいノード1として、ノード「D」を抽出する。この場合、スロット最適化処理部15は、式(3)を用いて、ノード「D」のノードIDと、ノード「B」のノードIDとを、足して2で割る(等分割する)ことにより、増設ノードであるノード「C」のノードIDを算出する(図7(b)参照)。   Specifically, as shown in FIG. 7A, when nodes “A”, “B”, and “D” are arranged in the ID space and each data is processed, the node “C” is added. Assume that node 1 has received the instruction. Here, the slot optimization processing unit 15 refers to the distribution ID table 200 and extracts the node “D” as the node 1 having the largest assigned area size (slot size). In this case, the slot optimization processing unit 15 adds the node ID of the node “D” and the node ID of the node “B” by adding 2 (equal division) using Expression (3). Then, the node ID of the node “C” which is the additional node is calculated (see FIG. 7B).

このようにして、スロット最適化処理部15は、増設ノードのノードIDを算出する。そして、スロット最適化処理部15は、算出した増設ノードのノードIDを、ノード識別子管理部11に出力して、振り分けIDテーブル200を更新させる。これにより、ノード1の増設時において、分割ノードと増設ノードの間の負荷の偏りを回避することができる。   In this way, the slot optimization processing unit 15 calculates the node ID of the extension node. Then, the slot optimization processing unit 15 outputs the calculated node ID of the additional node to the node identifier management unit 11 to update the distribution ID table 200. As a result, when the node 1 is added, it is possible to avoid a load bias between the split node and the added node.

(手法(2)Full Justification法)
次に、手法(2)Full Justification法について説明する。
手法(2)Full Justification法は、分散処理システム1000に属するノード1の減設が発生した場合、または、ノード1を増設する場合に、各ノード1の担当領域が等分割されるように、特定のノード(後記する「起点ノード」)以外の他の全てのノード1のノードIDを変更する。
(Method (2) Full Justification method)
Next, method (2) Full Justification method will be described.
Method (2) The Full Justification method is specified so that when the node 1 belonging to the distributed processing system 1000 is removed or when the node 1 is added, the assigned area of each node 1 is equally divided. The node IDs of all the nodes 1 other than the node (“starting node” described later) are changed.

〔減設時の処理〕
スロット最適化処理部15が、手法(2)Full Justification法により、ノード減設時において実行する処理について説明する。
スロット最適化処理部15は、まず、データの移動量が最も少ないノードを起点ノードとして選択し(起点ノード選択処理)、その後、選択した起点ノードを基準として、各ノード1の担当領域の大きさ(スロットのサイズ)が等分割されるように、起点ノード以外の各ノード1のノードIDを決定する(ノードIDの更新処理)。
[Processing at the time of reduction]
The processing that the slot optimization processing unit 15 executes at the time of node reduction by the method (2) Full Justification method will be described.
The slot optimization processing unit 15 first selects a node having the smallest data movement amount as a starting node (starting node selection processing), and then the size of the assigned area of each node 1 with the selected starting node as a reference. The node ID of each node 1 other than the starting node is determined so that (slot size) is equally divided (node ID update processing).

図8は、手法(2)Full Justification法の減設時における起点ノード選択処理を説明するための図である。スロット最適化処理部15は、各ノード1のデータの移動量が最も少なくなるように起点ノードを選択する。
そのため、スロット最適化処理部15は、減設後の各ノード1の平均負荷(ノード平均負荷μ)を算出する。そして、式(4)に示すように、そのノード平均負荷μからのユークリッド距離合計dが最も小さいノード「N」を選択する。
FIG. 8 is a diagram for explaining the starting node selection process when the method (2) Full Justification method is removed. The slot optimization processing unit 15 selects the starting node so that the data movement amount of each node 1 is minimized.
Therefore, the slot optimization processing unit 15 calculates the average load (node average load μ) of each node 1 after the reduction. Then, as shown in Expression (4), the node “N” having the smallest Euclidean distance total d N from the node average load μ is selected.

Figure 2017054190
Figure 2017054190

図8(a)に示すように、4つのノード1(ノード「A」「B」「C」「D」)がID空間上に配置されている場合において、ノード「C」が減設した場合を考える。図8においては、説明を分かりやすくするため、各ノードの負荷をデータ(図の丸「〇」)で示し、各データ「〇」の負荷はすべて同じ「1」であるものとして説明する。
まず、スロット最適化処理部15は、ノード「C]が減設した後の、ノード平均負荷μを、μ=12/3=4として算出する。ここで、N(ノード数)が「3」であり、データ数が、「12」である。
As shown in FIG. 8A, when four nodes 1 (nodes “A”, “B”, “C”, and “D”) are arranged in the ID space, the node “C” is removed. think of. In FIG. 8, in order to make the explanation easy to understand, the load of each node is indicated by data (circle “◯” in the figure), and the load of each data “◯” is assumed to be the same “1”.
First, the slot optimization processing unit 15 calculates the node average load μ after the node “C” is removed as μ = 1/12/3 = 4, where N (number of nodes) is “3”. And the number of data is “12”.

このとき、図8(b)に示すように、ノード「A」を起点とし、各ノード1(ノード「A」「B」「D」)の担当領域の大きさ(スロットのサイズ)を等分割した場合において、ユークリッド距離合計dは、ノード「A」、ノード「B」、ノード「D」の順に合計し、
=|3−4|+|5−4|+|4−4|=1+1+0=2
となる。
At this time, as shown in FIG. 8B, the node “A” is the starting point, and the size of the assigned area (slot size) of each node 1 (nodes “A”, “B”, and “D”) is equally divided. In this case, the total Euclidean distance d A is summed in the order of the node “A”, the node “B”, and the node “D”,
d A = | 3-4 | + | 5-4 | + | 4-4 | = 1 + 1 + 0 = 2
It becomes.

また、図8(c)に示すように、ノード「B」を起点とし、各ノード1(ノード「A」「B」「D」)の担当領域の大きさ(スロットのサイズ)を等分割した場合において、ユークリッド距離合計dは、ノード「A」、ノード「B」、ノード「D」の順に合計し、
=|3−4|+|5−4|+|4−4|=1+1+0=2
となる。
Further, as shown in FIG. 8C, the size (slot size) of the assigned area of each node 1 (nodes “A”, “B”, “D”) is equally divided starting from the node “B”. in the case, the Euclidean distance sum d B sums in the order of node "a", the node "B", the node "D",
d B = | 3-4 | + | 5-4 | + | 4-4 | = 1 + 1 + 0 = 2
It becomes.

また、図8(d)に示すように、ノード「D」を起点とし、各ノード1(ノード「A」「B」「D」)の担当領域の大きさ(スロットのサイズ)を等分割した場合において、ユークリッド距離合計dは、ノード「A」、ノード「B」、ノード「D」の順に合計し、
=|4−4|+|4−4|+|4−4|=0+0+0=0
となる。
Further, as shown in FIG. 8D, the size (slot size) of the assigned area of each node 1 (nodes “A”, “B”, and “D”) is equally divided starting from the node “D”. In this case, the Euclidean distance sum d D is summed in the order of the node “A”, the node “B”, and the node “D”,
d D = | 4-4 | + | 4-4 | + | 4-4 | = 0 + 0 + 0 = 0
It becomes.

以上より、スロット最適化処理部15は、図8に示す場合においては、ノード平均負荷μ(=4)からのユークリッド距離合計dが最も小さいノード「D」(d=0)を起点ノードとして選択する。 As described above, in the case shown in FIG. 8, the slot optimization processing unit 15 uses the node “D” (d D = 0) having the smallest total Euclidean distance d N from the node average load μ (= 4) as the starting node. Choose as.

そして、スロット最適化処理部15は、選択した起点ノードを基準として、担当領域の大きさ(スロットのサイズ)が等分割となるように、各ノード1のノードIDを、次の式(5)を用いて算出する。   Then, the slot optimization processing unit 15 sets the node ID of each node 1 to the following formula (5) so that the size of the assigned area (slot size) is equally divided with reference to the selected starting node. Calculate using.

ノードID=ID空間全体の大きさ÷N×k+起点ノードのノードID ・・・式(5)
ここで、N=(減設後の)ノード数、0≦k<N(kは正の整数)である。
Node ID = size of the entire ID space / N × k + node ID of the starting node Expression (5)
Here, N = number of nodes (after reduction), 0 ≦ k <N (k is a positive integer).

このようにして、スロット最適化処理部15は、ノード1を減設する場合において、最もデータの移動量が少ない起点ノードを選択し、その起点ノードを基準として、各ノード1の担当領域の大きさ(スロットのサイズ)が等分割されるように、起点ノード以外のノード1それぞれのノードIDを算出する。そして、スロット最適化処理部15は、算出した起点ノード以外のノード1それぞれのノードIDをノード識別子管理部11に出力して、振り分けIDテーブル200を更新させる。これにより、各ノードの負荷に偏りがないようにすることができる。   In this way, when the node 1 is removed, the slot optimization processing unit 15 selects the starting node with the smallest amount of data movement, and the size of the area in charge of each node 1 is based on the starting node. The node IDs of the nodes 1 other than the starting node are calculated so that the (slot size) is equally divided. Then, the slot optimization processing unit 15 outputs the node ID of each node 1 other than the calculated starting node to the node identifier management unit 11 to update the distribution ID table 200. Thereby, it is possible to prevent the load on each node from being biased.

〔増設時の処理〕
スロット最適化処理部15が、手法(2)Full Justification法において、ノード増設時において実行する処理について説明する。
スロット最適化処理部15は、減設時の処理と同様に、まず、データの移動量が最も少ないノードを起点ノードとして選択し(起点ノード選択処理)、その後、選択した起点ノードを基準として、各ノード1の担当領域の大きさ(スロットのサイズ)が等分割されるように、起点ノード以外の各ノード1のノードIDを決定する(ノードIDの更新処理)。
[Processing for expansion]
The processing executed by the slot optimization processing unit 15 when adding a node in the method (2) Full Justification method will be described.
The slot optimization processing unit 15 first selects a node with the smallest amount of data movement as a starting node (starting node selection processing), and then uses the selected starting node as a reference, similarly to the process at the time of removal. The node IDs of the nodes 1 other than the starting node are determined so that the size of the assigned area of each node 1 (slot size) is equally divided (node ID update processing).

図9は、手法(2)Full Justification法の増設時における起点ノード選択処理を説明するための図である。スロット最適化処理部15は、各ノード1のデータの移動量が最も少なくなるように起点ノードを選択する。
そのため、スロット最適化処理部15は、増設後の各ノードの平均負荷(ノード平均負荷μ)を算出する。そして、前記した式(4)に示すように、そのノード平均負荷μからのユークリッド距離合計dが最も小さいノード「N」を選択する。
FIG. 9 is a diagram for explaining a starting node selection process when the method (2) Full Justification method is added. The slot optimization processing unit 15 selects the starting node so that the data movement amount of each node 1 is minimized.
Therefore, the slot optimization processing unit 15 calculates the average load (node average load μ) of each node after expansion. Then, as shown in Expression (4), the node “N” having the smallest Euclidean distance total d N from the node average load μ is selected.

図9(a)に示すように、3つのノード1(ノード「A」「B」「D」)がID空間上に配置されている場合において、ノード「C」を増設する場合を考える。図9においては、説明を分かりやすくするため、各ノードの負荷をデータ(図の丸「〇」)で示し、各データ「〇」の負荷はすべて同じ「1」であるものとして説明する。   As shown in FIG. 9A, when three nodes 1 (nodes “A”, “B”, and “D”) are arranged in the ID space, a case where the node “C” is added is considered. In FIG. 9, for ease of explanation, the load of each node is indicated by data (circle “◯” in the figure), and the load of each data “◯” is assumed to be the same “1”.

まず、スロット最適化処理部15は、振り分けIDテーブル200(図5)を参照し、増設前の各ノード1の担当領域の大きさ(スロットのサイズ)が最も大きいノード1を抽出し、その抽出したノード1の担当領域を分割する位置に、新たに増設するノード1を配置するように割り当てる。なお、各ノード1の担当領域の大きさ(スロットのサイズ)が同じ場合には、ランダムに新たに増設するノード1の位置を割り当てる。
図9(a)においては、ノード「D」の担当領域に、新たなノード「C」を増設するものとして説明する。
First, the slot optimization processing unit 15 refers to the distribution ID table 200 (FIG. 5), extracts the node 1 with the largest size (slot size) of the assigned area of each node 1 before the addition, and extracts the node 1 The node 1 to be newly added is assigned to a position where the assigned area of the node 1 is divided. When the size of the assigned area of each node 1 (slot size) is the same, the position of the node 1 to be newly added is randomly assigned.
In FIG. 9A, a description will be given assuming that a new node “C” is added to the area in charge of the node “D”.

次に、スロット最適化処理部15は、ノード「C」を増設した後の、ノード平均負荷μを計算する。ここでは、ノード平均負荷μ=12/4=3となる。ここで、N(ノード数)が「4」であり、データ数が、「12」である。   Next, the slot optimization processing unit 15 calculates the node average load μ after adding the node “C”. Here, the node average load μ = 1/12/4 = 3. Here, N (number of nodes) is “4”, and the number of data is “12”.

このとき、図9(b)に示すように、ノード「A」を起点として、各ノード1(ノード「A」「B」「C」「D」)の担当領域の大きさ(スロットのサイズ)を等分割した場合において、ユークリッド距離合計dは、ノード「A」、ノード「B」、ノード「C」、ノード「D」の順に合計し、
=|3−3|+|4−3|+|2−3|+|3−3|=0+1+1+0=2
となる。
At this time, as shown in FIG. 9B, the size (slot size) of the assigned area of each node 1 (nodes “A”, “B”, “C”, and “D”) starting from the node “A” , Euclidean distance total d A is summed in the order of node “A”, node “B”, node “C”, and node “D”,
d A = | 3-3 | + | 4-3 | + | 2-3 | + | 3-3 | = 0 = 0 + 1 + 1 + 0 = 2
It becomes.

また、図9(c)に示すように、ノード「B」を起点とし、各ノード1(ノード「A」「B」「C」「D」)の担当領域の大きさ(スロットのサイズ)を等分割した場合において、ユークリッド距離合計dは、ノード「A」、ノード「B」、ノード「C」、ノード「D」の順に合計し、
=|3−3|+|3−3|+|3−3|+|3−3|=0+0+0+0=0
となる。
Further, as shown in FIG. 9C, the size (slot size) of the assigned area of each node 1 (nodes “A”, “B”, “C”, and “D”) starts from the node “B”. in case of equally dividing the Euclidean distance sum d B, the node "a", the node "B", the node "C", and the sum in the order of node "D",
d B = | 3-3 | + | 3-3 | + | 3-3 | + | 3-3 | = 0 + 0 + 0 + 0 = 0
It becomes.

また、図9(d)に示すように、ノード「D」を起点とし、各ノード1(ノード「A」「B」「C」「D」)の担当領域の大きさ(スロットのサイズ)を等分割した場合において、ユークリッド距離合計dは、ノード「A」、ノード「B」、ノード「C」、ノード「D」の順に合計し、
=|3−3|+|4−3|+|3−3|+|2−3|=0+1+0+1=2
となる。
Also, as shown in FIG. 9D, the size (slot size) of the assigned area of each node 1 (nodes “A”, “B”, “C”, and “D”) starting from the node “D” is set. In the case of equal division, the Euclidean distance total d D is summed in the order of the node “A”, the node “B”, the node “C”, and the node “D”,
d D = | 3-3 | + | 4-3 | + | 3-3 | + | 2-3 | = 0 + 1 + 0 + 1 = 2
It becomes.

以上より、スロット最適化処理部15は、図9に示す場合においては、ノード平均負荷μ(=3)からのユークリッド距離合計dが最も小さいノード「B」(d=0)を起点ノードとして選択する。 As described above, in the case shown in FIG. 9, the slot optimization processing unit 15 starts the node “B” (d B = 0) having the smallest Euclidean distance total d N from the node average load μ (= 3). Choose as.

そして、スロット最適化処理部15は、選択した起点ノードを基準として、担当領域の大きさ(スロットのサイズ)が等分割となるように、各ノード1のノードIDを、前記した式(5)を用いて算出する。ただし、ここで、N=(増設後の)ノード数である。   Then, the slot optimization processing unit 15 assigns the node ID of each node 1 to the above-described formula (5) so that the size of the assigned area (slot size) is equally divided with reference to the selected starting node. Calculate using. Here, N = the number of nodes (after expansion).

このようにして、スロット最適化処理部15は、ノード1を増設する場合において、最もデータの移動量が少ない起点ノードを選択し、その起点ノードを基準として、各ノード1の担当領域の大きさ(スロットのサイズ)が等分割されるように、起点ノード以外のノード1それぞれのノードIDを算出する。そして、スロット最適化処理部15は、算出した起点ノード以外のノード1それぞれのノードIDをノード識別子管理部11に出力して、振り分けIDテーブル200を更新させる。これにより、各ノードの負荷に偏りがないようにすることができる。
なお、上記の説明では、各ノード1の平均負荷(ノード平均負荷)を「μ」として、式(4)により、ユークリッド距離合計dを算出した。しかしながら、これに限定されず、スロット最適化処理部15は、各ノード1の平均スロットサイズや、各ノードの平均データ個数を用いて、ユークリッド距離合計dを算出し、起点ノードを選択してもよい。
In this way, when adding the node 1, the slot optimization processing unit 15 selects the starting node with the smallest amount of data movement, and the size of the area in charge of each node 1 is based on the starting node. The node IDs of the nodes 1 other than the starting node are calculated so that (slot size) is equally divided. Then, the slot optimization processing unit 15 outputs the node ID of each node 1 other than the calculated starting node to the node identifier management unit 11 to update the distribution ID table 200. Thereby, it is possible to prevent the load on each node from being biased.
In the above description, the average load (node average load) of each node 1 is “μ”, and the Euclidean distance total d N is calculated by Equation (4). However, the present invention is not limited to this, and the slot optimization processing unit 15 calculates the Euclidean distance total d N using the average slot size of each node 1 and the average number of data of each node, and selects the starting node. Also good.

<処理の流れ>
次に、本実施形態に係るノード1が実行する、負荷分散処理(負荷の偏りを低減する処理)の流れについて、スロット最適化処理部15が実行する、手法(1)Minimum Adjustment法、手法(2)Full Justification法のそれぞれについて説明する。なお、以下に説明する負荷分散処理は、分散処理システム1000を構成するノード1のうち、特権ノードが行う処理である。
<Process flow>
Next, for the flow of load distribution processing (processing for reducing load imbalance) executed by the node 1 according to the present embodiment, a method (1) Minimum Adjustment method, a method ( 2) Each of the Full Justification methods will be described. Note that the load distribution process described below is a process performed by a privileged node among the nodes 1 constituting the distributed processing system 1000.

≪手法(1)Minimum Adjustment法≫
図10は、本実施形態に係るノード1が、負荷分散処理として、手法(1)Minimum Adjustment法を実行する場合の処理の流れを示すフローチャートである。
≪Method (1) Minimum Adjustment method≫
FIG. 10 is a flowchart illustrating a process flow when the node 1 according to the present embodiment executes the technique (1) Minimum Adjustment method as the load distribution process.

まず、ノード1のスロット最適化処理部15は、分散処理システム1000を構成する各ノード1から、各ノードそれぞれの負荷情報(例えば、メモリ使用量、CPU使用率、データ個数等)を、所定の時間間隔で受信する(ステップS1)。   First, the slot optimization processing unit 15 of the node 1 obtains load information (for example, memory usage, CPU usage rate, number of data, etc.) of each node from each node 1 constituting the distributed processing system 1000 according to a predetermined value. Receive at time intervals (step S1).

続いて、スロット最適化処理部15は、分散処理システム1000を構成するノード1が減設されたか否かを判定する(ステップS2)。ここで、スロット最適化処理部15は、ノード1のノード識別子管理部11が、分散処理システム1000の管理装置から特定ノードの減設指示を受信したり、各ノード1の死活監視を行い特定のノード1が減設したことを検知したりすることにより、ノード1の減設(減設ノード)を認識することができる。スロット最適化処理部15は、ノード1が減設されていない場合には(ステップS2→No)、ステップS7に進む。一方、ノード1が減設された場合には(ステップS2→Yes)、次のステップS3に進む。   Subsequently, the slot optimization processing unit 15 determines whether or not the node 1 constituting the distributed processing system 1000 has been removed (Step S2). Here, in the slot optimization processing unit 15, the node identifier management unit 11 of the node 1 receives an instruction to remove a specific node from the management apparatus of the distributed processing system 1000, or monitors whether each node 1 is active or not. By detecting that the node 1 has been removed, it is possible to recognize the removal of the node 1 (removed node). If the node 1 has not been removed (step S2 → No), the slot optimization processing unit 15 proceeds to step S7. On the other hand, when the node 1 is removed (step S2 → Yes), the process proceeds to the next step S3.

ステップS3において、スロット最適化処理部15は、減設ノードに隣接するノード1のうち、ノードIDを変更するノード1を決定する。
具体的には、スロット最適化処理部15は、減設ノードの時計回り側で2つ目に位置するノード1(次々ノード)と、減設ノードの反時計回り側に位置するノード1(前ノード)についての、担当領域の大きさ(スロットのサイズ)、負荷の大きさ、データ個数の多さのいずれかを比較する。そして、スロット最適化処理部15は、次々ノードの値の方が小さければ、次ノードをノードIDを変更するノード1として決定し、前ノードの値の方が小さければ、前ノードをノードIDを変更するノード1として決定する。
In step S3, the slot optimization processing unit 15 determines a node 1 whose node ID is to be changed among the nodes 1 adjacent to the reduced node.
Specifically, the slot optimization processing unit 15 includes a node 1 (second node) positioned second on the clockwise side of the removed node, and a node 1 (previous node) positioned on the counterclockwise side of the removed node. The node is compared with the size of the assigned area (slot size), the load size, or the number of data. Then, if the value of the next node is smaller, the slot optimization processing unit 15 determines the next node as the node 1 whose node ID is to be changed. If the value of the previous node is smaller, the slot optimization processing unit 15 sets the previous node as the node ID. The node 1 to be changed is determined.

そして、スロット最適化処理部15は、ノードIDを変更するノード1を次ノードに決定した場合には(ステップS4→Yes)、次のステップS5に進む。一方、スロット最適化処理部15は、ノードIDを変更するノード1を前ノードに決定した場合には(ステップS4→No)、次のステップS6に進む。   If the node 1 whose node ID is to be changed is determined as the next node (step S4 → Yes), the slot optimization processing unit 15 proceeds to the next step S5. On the other hand, when the node 1 whose node ID is to be changed is determined as the previous node (step S4 → No), the slot optimization processing unit 15 proceeds to the next step S6.

ノードIDを変更するノード1を次ノードに決定した場合(ステップS4→Yes)、ステップS5において、スロット最適化処理部15は、前記した式(1)を用いて、次ノードのノードIDを算出する。そして、ステップS10に進む。   When node 1 whose node ID is to be changed is determined as the next node (step S4 → Yes), in step S5, the slot optimization processing unit 15 calculates the node ID of the next node using the above-described equation (1). To do. Then, the process proceeds to step S10.

一方、ノードIDを変更するノード1を前ノードに決定した場合(ステップS4→No)、ステップS6において、スロット最適化処理部15は、前記した式(2)を用いて、前ノードのIDを算出する。そして、ステップS10に進む。   On the other hand, when the node 1 whose node ID is to be changed is determined as the previous node (step S4 → No), in step S6, the slot optimization processing unit 15 uses the above-described equation (2) to determine the ID of the previous node. calculate. Then, the process proceeds to step S10.

また、ステップS2においてノード1が減設されていないと判定された場合(ステップS2→No)、スロット最適化処理部15は、分散処理システム1000を構成するノード1を増設するか否かを判定する(ステップS7)。ここで、スロット最適化処理部15は、ノード1のノード識別子管理部11が、分散処理システム1000の管理装置から、ノード1の増設指示を受信したこと等により、ノード1を増設するか否かを判定することができる。スロット最適化処理部15は、ノード1を増設しない(増設指示を受けていない)と判定した場合には(ステップS7→No)、ステップS1に戻り、所定の時間間隔で各ノードそれぞれから新たな負荷情報を受信して、処理を続ける。一方、スロット最適化処理部15は、ノード1を増設すると判定した場合には(ステップS7→Yes)、次のステップS8に進む。   If it is determined in step S2 that the node 1 is not removed (step S2 → No), the slot optimization processing unit 15 determines whether or not to add the node 1 constituting the distributed processing system 1000. (Step S7). Here, the slot optimization processing unit 15 determines whether or not to add the node 1 because the node identifier management unit 11 of the node 1 has received an instruction to add the node 1 from the management apparatus of the distributed processing system 1000. Can be determined. If the slot optimization processing unit 15 determines that the node 1 is not added (no extension instruction has been received) (step S7 → No), the slot optimization processing unit 15 returns to step S1 and adds a new one from each node at predetermined time intervals. Receive load information and continue processing. On the other hand, if it is determined that the node 1 is to be added (step S7 → Yes), the slot optimization processing unit 15 proceeds to the next step S8.

ステップS8において、スロット最適化処理部15は、振り分けIDテーブル200を参照して、増設前の各ノード1の担当領域の大きさ(スロットのサイズ)を比較し、担当領域が最も大きいノード1を抽出して、その抽出したノード1の担当領域を分割する位置に、新たに増設するノード1を割り当てる。なお、各ノード1の担当領域の大きさ(スロットのサイズ)が同じ場合には、ランダムに新たに増設するノード1の位置を割り当てる。そして、次のステップS9に進む。   In step S8, the slot optimization processing unit 15 refers to the distribution ID table 200, compares the size of the assigned area (slot size) of each node 1 before expansion, and determines the node 1 with the largest assigned area. The node 1 to be newly added is assigned to the position where the extracted area in charge of the node 1 is divided. When the size of the assigned area of each node 1 (slot size) is the same, the position of the node 1 to be newly added is randomly assigned. Then, the process proceeds to next Step S9.

ステップS9において、スロット最適化処理部15は、前記した式(3)を用いて、増設ノードのノードIDを算出する。そして、ステップS10に進む。   In step S9, the slot optimization processing unit 15 calculates the node ID of the extension node using the above-described equation (3). Then, the process proceeds to step S10.

ステップS10において、ノード識別子管理部11は、ステップS5、ステップS6、または、ステップS9において算出した変更後のノードIDまたは増設ノードのノードIDを、スロット最適化処理部15から取得し、振り分けIDテーブル200およびノード識別子管理テーブル100を更新する。
具体的には、ノード識別子管理部11は、ノード1を減設する場合には、振り分けIDテーブル200において、減設ノードのノード識別子201を削除するとともに、減設ノードの次ノードまたは前ノードのノードIDを変更する(ID空間202の担当領域を変更する)。また、ノード識別子管理部11は、減設ノードのレコード(ノード識別子101およびアドレス102)をノード識別子管理テーブル100から削除する。
一方、ノード識別子管理部11は、ノード1を増設する場合には、増設ノードのノードIDに基づき、振り分けIDテーブル200において、増設するノード1のレコードを追加する。さらに、ノード識別子管理部11は、ノード識別子管理テーブル100において、増設するノード1のレコードを追加する。
In step S10, the node identifier management unit 11 acquires the changed node ID or the node ID of the additional node calculated in step S5, step S6, or step S9 from the slot optimization processing unit 15, and assigns the distribution ID table. 200 and the node identifier management table 100 are updated.
Specifically, when the node identifier 1 is removed, the node identifier management unit 11 deletes the node identifier 201 of the removed node in the distribution ID table 200, and the next node or the previous node of the removed node. The node ID is changed (the area in charge of the ID space 202 is changed). Further, the node identifier management unit 11 deletes the record (node identifier 101 and address 102) of the reduced node from the node identifier management table 100.
On the other hand, when adding the node 1, the node identifier management unit 11 adds a record of the node 1 to be added to the distribution ID table 200 based on the node ID of the extension node. Further, the node identifier management unit 11 adds a record of the node 1 to be added in the node identifier management table 100.

続いて、ノード識別子管理部11は、更新した振り分けIDテーブル200およびノード識別子管理テーブル100を、分散処理システム1000を構成する各ノード1に送信する(ステップS11)。これにより、各ノード1において、振り分けIDテーブル200およびノード識別子管理テーブル100が更新され、システム全体として同期をとることができる。そして、ノード1は、負荷分散処理を終了する。   Subsequently, the node identifier management unit 11 transmits the updated distribution ID table 200 and node identifier management table 100 to each node 1 configuring the distributed processing system 1000 (step S11). Thereby, in each node 1, the distribution ID table 200 and the node identifier management table 100 are updated, and synchronization can be achieved as the entire system. Then, the node 1 ends the load distribution process.

≪手法(2)Full Justification法≫
図11は、本実施形態に係るノード1が、負荷分散処理(負荷の偏りを低減する処理)として、手法(2)Full Justification法を実行する場合の処理の流れを示すフローチャートである。
≪Method (2) Full Justification method≫
FIG. 11 is a flowchart showing the flow of processing when the node 1 according to the present embodiment executes the technique (2) Full Justification method as load distribution processing (processing for reducing load bias).

まず、ノード1のスロット最適化処理部15は、分散処理システム1000を構成する各ノード1から、各ノードそれぞれの負荷情報(例えば、メモリ使用量、CPU使用率、データ個数等)を、所定の時間間隔で受信する(ステップS20)。   First, the slot optimization processing unit 15 of the node 1 obtains load information (for example, memory usage, CPU usage rate, number of data, etc.) of each node from each node 1 constituting the distributed processing system 1000 according to a predetermined value. Receive at time intervals (step S20).

続いて、スロット最適化処理部15は、分散処理システム1000を構成するノード1が減設されたか否かを判定する(ステップS21)。ここで、スロット最適化処理部15は、分散処理システム1000を構成するノード1が減設されたと判定した場合には(ステップS21→Yes)、ステップS24に進む。一方、スロット最適化処理部15は、減設されたと判定しなかった場合には(ステップS21→No)、次のステップS22に進む。   Subsequently, the slot optimization processing unit 15 determines whether or not the node 1 constituting the distributed processing system 1000 has been removed (step S21). If the slot optimization processing unit 15 determines that the node 1 constituting the distributed processing system 1000 has been removed (step S21 → Yes), the slot optimization processing unit 15 proceeds to step S24. On the other hand, if the slot optimization processing unit 15 does not determine that it has been removed (step S21 → No), the process proceeds to the next step S22.

ステップS22において、スロット最適化処理部15は、分散処理システム1000を構成するノード1を増設するか否かを判定する。ここで、スロット最適化処理部15は、ノード1のノード識別子管理部11が、分散処理システム1000の管理装置から、ノード1の増設指示を受信したこと等により、ノード1を増設するか否かを判定することができる。スロット最適化処理部15は、ノード1を増設しない(増設指示を受けていない)と判定した場合には(ステップS22→No)、ステップS20に戻り、所定の時間間隔で各ノードそれぞれから新たな負荷情報を受信して、処理を続ける。一方、スロット最適化処理部15は、ノード1を増設すると判定した場合には(ステップS22→Yes)、次のステップS23に進む。   In step S <b> 22, the slot optimization processing unit 15 determines whether or not to add the node 1 configuring the distributed processing system 1000. Here, the slot optimization processing unit 15 determines whether or not to add the node 1 because the node identifier management unit 11 of the node 1 has received an instruction to add the node 1 from the management apparatus of the distributed processing system 1000. Can be determined. If the slot optimization processing unit 15 determines that the node 1 is not added (no extension instruction has been received) (step S22 → No), the slot optimization processing unit 15 returns to step S20 and starts a new operation from each node at a predetermined time interval. Receive load information and continue processing. On the other hand, if it is determined that the node 1 is to be added (step S22 → Yes), the slot optimization processing unit 15 proceeds to the next step S23.

ステップS23において、スロット最適化処理部15は、振り分けIDテーブル200を参照して、増設前の各ノード1の担当領域の大きさ(スロットのサイズ)を比較し、担当領域が最も大きいノード1を抽出して、その抽出したノード1の担当領域を分割する位置に、新たに増設するノード1を割り当てる。なお、各ノード1の担当領域の大きさ(スロットのサイズ)が同じ場合には、ランダムに新たに増設するノード1の位置を割り当てる。そして、次のステップS24に進む。   In step S23, the slot optimization processor 15 refers to the distribution ID table 200, compares the size of the assigned area (slot size) of each node 1 before expansion, and determines the node 1 with the largest assigned area. The node 1 to be newly added is assigned to the position where the extracted area in charge of the node 1 is divided. When the size of the assigned area of each node 1 (slot size) is the same, the position of the node 1 to be newly added is randomly assigned. Then, the process proceeds to next Step S24.

ステップS24において、スロット最適化処理部15は、減設(または増設)後のノード数と、各ノード1の負荷情報を用いて、ノード平均負荷μを算出する。   In step S24, the slot optimization processing unit 15 calculates the node average load μ using the number of nodes after reduction (or addition) and the load information of each node 1.

続いて、スロット最適化処理部15は、前記した式(4)を用いて、各ノード1を起点として場合のユークリッド距離合計dを算出する(ステップS25)。
そして、スロット最適化処理部15は、算出した各ノード1についてのユークリッド距離合計dのうち、そのユークリッド距離合計dが最も小さいノード1を、起点ノードとして選択する(ステップS26)。
Subsequently, the slot optimization processing unit 15 calculates the total Euclidean distance d N with each node 1 as a starting point using the above-described equation (4) (step S25).
The slot optimization processing unit 15, among the Euclidean distance sum d N for each node 1 calculated, the smallest node 1 that Euclidean distance sum d N, is selected as starting node (step S26).

次に、スロット最適化処理部15は、選択した起点ノードを基準として、担当領域の大きさ(スロットのサイズ)が等分割となるように、各ノード1のノードIDを、前記した式(5)を用いて算出する(ステップS27)。   Next, the slot optimization processing unit 15 sets the node ID of each node 1 to the above equation (5) so that the size of the assigned area (slot size) is equally divided with reference to the selected starting node. ) To calculate (step S27).

続いて、ノード識別子管理部11は、ステップS27において算出した変更後のノードIDを、スロット最適化処理部15から取得し、振り分けIDテーブル200およびノード識別子管理テーブル100を更新する(ステップS28)。
具体的には、ノード識別子管理部11は、振り分けIDテーブル200において、ノード1を減設する場合は、減設ノードのレコード(ノード識別子101およびアドレス102)を削除するとともに、ノードIDを変更したノード1について、ID空間202の担当領域を変更する。また、ノード識別子管理部11は、振り分けIDテーブル200において、ノード1を増設する場合は、増設するノードのレコードを追加する。さらに、ノード識別子管理部11は、ノード識別子管理テーブル100において、減設の場合は、減設ノードのレコードを削除し、増設の場合は、増設ノードのレコードを追加する。
Subsequently, the node identifier management unit 11 acquires the changed node ID calculated in step S27 from the slot optimization processing unit 15, and updates the distribution ID table 200 and the node identifier management table 100 (step S28).
Specifically, in the distribution ID table 200, the node identifier management unit 11 deletes the record (node identifier 101 and address 102) of the reduced node and changes the node ID when deleting the node 1. For node 1, the area in charge of the ID space 202 is changed. Further, when adding node 1 in the distribution ID table 200, the node identifier management unit 11 adds a record of the node to be added. Further, in the node identifier management table 100, the node identifier management unit 11 deletes the record of the reduced node in the case of reduction, and adds the record of the extension node in the case of expansion.

続いて、ノード識別子管理部11は、更新した振り分けIDテーブル200およびノード識別子管理テーブル100を、分散処理システム1000を構成する各ノード1に送信する(ステップS29)。これにより、各ノード1において、振り分けIDテーブル200およびノード識別子管理テーブル100が更新され、システム全体として同期をとることができる。そして、ノード1は、負荷分散処理を終了する。   Subsequently, the node identifier management unit 11 transmits the updated distribution ID table 200 and node identifier management table 100 to each node 1 constituting the distributed processing system 1000 (step S29). Thereby, in each node 1, the distribution ID table 200 and the node identifier management table 100 are updated, and synchronization can be achieved as the entire system. Then, the node 1 ends the load distribution process.

以上説明したように、本実施形態に係るノード1およびスロット最適化方法によれば、分散処理システム1000の特権ノードとなるノード1が、負荷分散の手法として、手法(1)Minimum Adjustment法、手法(2)Full Justification法のいずれかを実行する。これにより、分散処理システム1000を構成するノード1の減設・増設動作時において、特定ノードへの負荷の偏りを低減することができる。   As described above, according to the node 1 and the slot optimization method according to the present embodiment, the node 1 serving as the privileged node of the distributed processing system 1000 can use the method (1) Minimum Adjustment method and method as a load distribution method. (2) Execute one of the full justification methods. As a result, it is possible to reduce the load imbalance on specific nodes during the reduction / expansion operation of the nodes 1 constituting the distributed processing system 1000.

なお、手法(1)Minimum Adjustment法は、手法(2)Full Justification法に比べ、データの移動量が少ないため、処理が高速であるという特徴がある。よって、分散処理システム1000を構成するノード1の減設・増設の頻度が高い場合に特に有効である。一方、手法(2)Full Justification法は、手法(1)Minimum Adjustment法に比べ、データの移動量が多いため処理が低速になるが、特定ノードへ負荷が偏らずに均等とすることができる。よって、分散処理システム1000を構成するノード1の減設・増設の頻度が低い場合に特に有効である。   Note that the method (1) Minimum Adjustment method has a feature that the processing speed is high because the amount of data movement is small compared to the method (2) Full Justification method. Therefore, this is particularly effective when the frequency of the reduction / expansion of the nodes 1 constituting the distributed processing system 1000 is high. On the other hand, although the method (2) Full Justification method is slower than the method (1) Minimum Adjustment method because the amount of data movement is large, the processing is slow, but the load can be evenly distributed to specific nodes. Therefore, this is particularly effective when the frequency of the node 1 constituting the distributed processing system 1000 is low.

1 ノード
2 クライアント
3 ロードバランサ
10 制御部
11 ノード識別子管理部
12 振り分け部
13 信号処理部
14 ノード負荷計測部
15 スロット最適化処理部
20 入出力部
30 記憶部
100 ノード識別子管理テーブル
200 振り分けIDテーブル(振り分けID情報)
300 データ
400 ノード負荷計測情報
500 システム負荷情報
1000 分散処理システム
DESCRIPTION OF SYMBOLS 1 Node 2 Client 3 Load balancer 10 Control part 11 Node identifier management part 12 Distribution part 13 Signal processing part 14 Node load measurement part 15 Slot optimization processing part 20 Input / output part 30 Storage part 100 Node identifier management table 200 Distribution ID table ( (Distribution ID information)
300 Data 400 Node load measurement information 500 System load information 1000 Distributed processing system

Claims (6)

クラスタを構成する複数のノードそれぞれに、コンシステント・ハッシュ法によりデータを振り分けて処理させる分散処理システムの前記ノードであって、
複数の前記ノードのノードIDそれぞれに対応付けて、ID空間上での担当領域を示すスロットが記憶される振り分けID情報を格納する記憶部と、
自身のノードの負荷情報を計測するノード負荷計測部と、
前記クラスタを構成する複数のノードに減設または増設が生じた場合、複数の前記ノードの中から、前記ノードIDを変更するノードを決定し、複数の前記ノードの前記負荷情報を用いて、前記減設または増設後の複数の前記ノードについての負荷の偏りを低減する前記ID空間上の位置に、前記決定したノードのノードIDを変更し、前記変更したノードIDを前記振り分けID情報に記憶するスロット最適化処理部と、
を備えることを特徴とするノード。
A node of a distributed processing system that distributes and processes data by a consistent hash method to each of a plurality of nodes constituting a cluster,
A storage unit for storing distribution ID information in which a slot indicating a responsible area in the ID space is stored in association with each of the node IDs of the plurality of nodes;
A node load measurement unit that measures load information of its own node;
When a reduction or expansion occurs in a plurality of nodes constituting the cluster, a node to change the node ID is determined from among the plurality of nodes, and the load information of the plurality of nodes is used, The node ID of the determined node is changed to a position on the ID space that reduces the load deviation of the plurality of nodes after being reduced or added, and the changed node ID is stored in the distribution ID information. A slot optimization processor;
A node characterized by comprising:
前記スロット最適化処理部は、
特定のノードが減設される際に、前記ID空間上において減設されるノードの時計回りで次に位置する次ノードのノードIDを、前記減設されるノードから時計回りで次の次に位置する次々ノードのノードIDと、前記減設されるノードから反時計回りで1つ前に位置する前ノードのノードIDとの合計を等分割して算出し、前記算出した次ノードのノードIDを用いて、前記振り分けID情報を更新すること
を特徴とする請求項1に記載のノード。
The slot optimization processing unit includes:
When a specific node is removed, the node ID of the next node located next in the clockwise direction of the node to be removed in the ID space is set to the next next in the clockwise direction from the node to be removed. The total of the node ID of the next node that is located and the node ID of the previous node that is located one counterclockwise before the node to be removed is equally divided and calculated, and the calculated node ID of the next node The node according to claim 1, wherein the distribution ID information is updated using.
前記スロット最適化処理部は、
特定のノードが減設される際に、前記ID空間上において減設されるノードの反時計回りで1つ前に位置する前ノードのノードIDを、前記減設されるノードから時計回りで次に位置する次ノードのノードIDと、前記減設されるノードから反時計回りで2つ前に位置する前々ノードのノードIDとの合計を等分割して算出し、前記算出した前ノードのノードIDを用いて、前記振り分けID情報を更新すること
を特徴とする請求項1に記載のノード。
The slot optimization processing unit includes:
When a specific node is removed, the node ID of the previous node located one counterclockwise before the node to be removed in the ID space is changed clockwise from the node to be removed. Is calculated by equally dividing the total of the node ID of the next node located at the node ID and the node ID of the previous node located two times counterclockwise from the reduced node. The node according to claim 1, wherein the distribution ID information is updated using a node ID.
前記スロット最適化処理部は、
特定のノードが増設される際に、前記振り分けID情報を参照し、複数の前記ノードのうち、前記スロットの大きさが最も大きいノードを抽出し、前記抽出したノードのスロットを分割する位置に、増設するノードを配置するように割り当て、
前記増設するノードのノードIDを、前記増設するノードによりスロットが分割される前記抽出したノードのノードIDと、当該抽出したノードから反時計回りで1つ前に位置する前ノードのノードIDとの合計を等分割して算出し、算出した前記増設するノードのノードIDを用いて、前記振り分けID情報を更新すること
を特徴とする請求項1に記載のノード。
The slot optimization processing unit includes:
When a specific node is added, referring to the distribution ID information, the node having the largest slot size is extracted from the plurality of nodes, and the slot of the extracted node is divided into positions. Assign to arrange the nodes to be expanded,
The node ID of the node to be added is the node ID of the extracted node into which the slot is divided by the node to be added, and the node ID of the previous node located one counterclockwise from the extracted node. The node according to claim 1, wherein the node ID is calculated by equally dividing the total, and the distribution ID information is updated using the calculated node ID of the node to be added.
前記スロット最適化処理部は、
特定のノードの減設時または増設時において、各ノードのデータの移動量が最も少なくなるように起点となるノードを選択し、前記起点となるノードを基準として、各ノードの前記スロットの大きさが等しくなるように、各ノードのノードIDを決定し、前記決定した各ノードのノードIDを用いて、前記振り分けID情報を更新すること
を特徴とする請求項1に記載のノード。
The slot optimization processing unit includes:
When a specific node is removed or added, the starting node is selected so that the amount of data movement of each node is minimized, and the size of the slot of each node is based on the starting node. 2. The node according to claim 1, wherein a node ID of each node is determined so as to be equal to each other, and the distribution ID information is updated using the determined node ID of each node.
クラスタを構成する複数のノードそれぞれに、コンシステント・ハッシュ法によりデータを振り分けて処理させる分散処理システムの前記ノードのスロット最適化方法であって、
前記ノードは、
複数の前記ノードのノードIDそれぞれに対応付けて、ID空間上での担当領域を示すスロットが記憶される振り分けID情報を格納する記憶部を備えており、
自身のノードの負荷情報を計測するステップと、
前記クラスタを構成する複数のノードに減設または増設が生じた場合、複数の前記ノードの中から、前記ノードIDを変更するノードを決定し、複数の前記ノードの前記負荷情報を用いて、前記減設または増設後の複数の前記ノードについての負荷の偏りを低減する前記ID空間上の位置に、前記決定したノードのノードIDを変更し、前記変更したノードIDを前記振り分けID情報に記憶するステップと、
を実行することを特徴とするスロット最適化方法。
A slot optimization method for the node of the distributed processing system in which each of a plurality of nodes constituting a cluster distributes and processes data by a consistent hash method,
The node is
A storage unit that stores distribution ID information in which a slot indicating a responsible area on the ID space is stored in association with each node ID of the plurality of nodes;
Measuring the load information of its own node;
When a reduction or expansion occurs in a plurality of nodes constituting the cluster, a node to change the node ID is determined from among the plurality of nodes, and the load information of the plurality of nodes is used, The node ID of the determined node is changed to a position on the ID space that reduces the load deviation of the plurality of nodes after being reduced or added, and the changed node ID is stored in the distribution ID information. Steps,
The slot optimization method characterized by performing.
JP2015175882A 2015-09-07 2015-09-07 Node and slot optimization methods Active JP6387333B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015175882A JP6387333B2 (en) 2015-09-07 2015-09-07 Node and slot optimization methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015175882A JP6387333B2 (en) 2015-09-07 2015-09-07 Node and slot optimization methods

Publications (2)

Publication Number Publication Date
JP2017054190A true JP2017054190A (en) 2017-03-16
JP6387333B2 JP6387333B2 (en) 2018-09-05

Family

ID=58316633

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015175882A Active JP6387333B2 (en) 2015-09-07 2015-09-07 Node and slot optimization methods

Country Status (1)

Country Link
JP (1) JP6387333B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090157684A1 (en) * 2007-12-17 2009-06-18 Frank-Uwe Andersen Load distribution in distributed database system
JP2013178677A (en) * 2012-02-28 2013-09-09 Nippon Telegr & Teleph Corp <Ntt> Distributed processing system, dispatcher, and distributed processing management device
JP2013182575A (en) * 2012-03-05 2013-09-12 Nippon Telegr & Teleph Corp <Ntt> Server and program
WO2013190743A1 (en) * 2012-06-18 2013-12-27 日本電気株式会社 Distributed system, load distribution method, node device, and program
JP2014142945A (en) * 2007-12-26 2014-08-07 Symantec Corp Balanced consistent hashing for distributed resource management
JP2015018508A (en) * 2013-07-12 2015-01-29 日本電信電話株式会社 Distributed processing system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090157684A1 (en) * 2007-12-17 2009-06-18 Frank-Uwe Andersen Load distribution in distributed database system
JP2014142945A (en) * 2007-12-26 2014-08-07 Symantec Corp Balanced consistent hashing for distributed resource management
JP2013178677A (en) * 2012-02-28 2013-09-09 Nippon Telegr & Teleph Corp <Ntt> Distributed processing system, dispatcher, and distributed processing management device
JP2013182575A (en) * 2012-03-05 2013-09-12 Nippon Telegr & Teleph Corp <Ntt> Server and program
WO2013190743A1 (en) * 2012-06-18 2013-12-27 日本電気株式会社 Distributed system, load distribution method, node device, and program
JP2015018508A (en) * 2013-07-12 2015-01-29 日本電信電話株式会社 Distributed processing system

Also Published As

Publication number Publication date
JP6387333B2 (en) 2018-09-05

Similar Documents

Publication Publication Date Title
JP6643760B2 (en) Short link processing method, device, and server
JP5719323B2 (en) Distributed processing system, dispatcher and distributed processing management device
CN110489059B (en) Data cluster storage method and device and computer equipment
JP5664098B2 (en) Composite event distribution apparatus, composite event distribution method, and composite event distribution program
KR101928529B1 (en) Code Distributed Hash Table based MapReduce System and Method
US10908834B2 (en) Load balancing for scalable storage system
US20060206621A1 (en) Movement of data in a distributed database system to a storage location closest to a center of activity for the data
Shalita et al. Social hash: an assignment framework for optimizing distributed systems operations on social networks
JP5014398B2 (en) Search data management device
CN111723073B (en) Data storage processing method, device, processing system and storage medium
JP5957965B2 (en) Virtualization system, load balancing apparatus, load balancing method, and load balancing program
JP2014041550A (en) Data migration processing system and data migration processing method
JP5723309B2 (en) Server and program
JP6189266B2 (en) Data processing apparatus, data processing method, and data processing program
JP6387333B2 (en) Node and slot optimization methods
WO2022220830A1 (en) Geographically dispersed hybrid cloud cluster
JP5745445B2 (en) Management device and program
US9319245B2 (en) Information processing device, recording medium storing information search program, and information search method
JP5723330B2 (en) Distributed processing system and distributed processing method
JP6219771B2 (en) Load distribution apparatus, load distribution method, and load distribution system
KR102503958B1 (en) Apparatus for placing query in distributed networks environment and method thereof
Binti Mohd Ali et al. Optimization on Replication Performance via Balance Quorum (BQ) and Data Center Selection Method (DCSM) Algorithms in Cloud Environment
JP2017091248A (en) Node and method for suppressing gravitation
Zhou et al. Hotspot Sensitive Dynamic Scaling for Distributed Cache Systems
JP5890452B2 (en) Cluster system server device and program thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170905

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180529

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180605

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180730

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180807

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180813

R150 Certificate of patent or registration of utility model

Ref document number: 6387333

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150