JP6433926B2 - Rebalancing device, rebalancing method, and program - Google Patents
Rebalancing device, rebalancing method, and program Download PDFInfo
- Publication number
- JP6433926B2 JP6433926B2 JP2016003875A JP2016003875A JP6433926B2 JP 6433926 B2 JP6433926 B2 JP 6433926B2 JP 2016003875 A JP2016003875 A JP 2016003875A JP 2016003875 A JP2016003875 A JP 2016003875A JP 6433926 B2 JP6433926 B2 JP 6433926B2
- Authority
- JP
- Japan
- Prior art keywords
- rebalancing
- node
- load
- nodes
- rebalance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、分散システムにおいて、複数のノード間での負荷の偏りを是正する技術に関連するものである。 The present invention relates to a technique for correcting a load imbalance among a plurality of nodes in a distributed system.
近年、クラウドコンピューティングの隆盛に伴い、多量なデータの処理や保持を効率的に行うことが求められている。そこで、複数のサーバを協調動作させることにより効率的な処理を実現する分散処理技術が発展している。分散処理を行う際には、クラスタを構成して分散システムを構築する各サーバ(以降、ノードともいう)が担当するデータを決定する必要がある。この際、分散システム全体でのデータの処理能力を高めるためには、各ノードが担当するデータ数は平均化されていることが望ましい。 In recent years, with the rise of cloud computing, it has been required to efficiently process and hold 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 for each server (hereinafter also referred to as a node) that configures a cluster and constructs a distributed system. At this time, in order to increase the data processing capacity of the entire distributed system, the number of data handled by each node is preferably averaged.
ところで、代表的なデータの管理手法には、各データのkey(キー)をハッシュ関数にかけた値(以降、hash(key):ハッシュキーともいう)を、ノード数Nで割った余り、即ちhash(key)mod Nを番号として持つノードが、データを管理する手法がある。但し、その際、ノードに事前に0からN−1まで番号を割り当てている。このような管理手法を用いた場合、ノードを追加又は離脱すると、Nの値が変化し、多くのデータでは担当するノードが変更になるため、担当ノードの再配置が必要になる。 By the way, as a representative data management method, a remainder obtained by dividing a value obtained by multiplying the key (key) of each data by a hash function (hereinafter also referred to as hash (key): hash key) by the number of nodes N, that is, hash. There is a method in which a node having (key) mod N as a number manages data. At this time, however, numbers from 0 to N-1 are assigned to the nodes 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 is changed for a lot of data, so that the node in charge needs to be rearranged.
そこで、ノードの追加・離脱に伴い担当するノードが変更になるデータ数を約1/Nに抑える方法として、コンシステント・ハッシュ[Consistent Hashing](非特許文献1)を用いたデータ管理手法があり、Amazon Dynamo等で用いられている(非特許文献2)。コンシステント・ハッシュ法を用いたデータ管理手法では、例えば図15に符号5で示す円形状のID空間において、ノードA,B,C,D,Eと、○及び●印で示す負荷が異なる負荷データとの双方にID(identification)を割り当てる。データのIDからID空間5を時計回りに辿り、最初に突き当たったノードが当該データの担当ノードになる。ノードA〜Eに対するIDの与え方の例としては、IP(Internet Protocol)アドレスをハッシュ関数にかけた値{これを、hash(IPアドレス)ともいう}が挙げられる。
Therefore, there is a data management method using a consistent hash [Consistent Hashing] (Non-patent Document 1) as a method of suppressing the number of data that the node in charge changes with the addition / detachment of the node to about 1 / N. , Amazon Dynamo, etc. (Non-Patent Document 2). In the data management method using the consistent hash method, for example, in the circular ID space indicated by
クラスタ構成の分散システムでは、例えば各ノードの性能が等しい場合には、各ノードA〜Eが担当するデータ量は等しい、即ち、コンシステント・ハッシュ法のID空間5における、ノード間の距離(以降、ノードの担当領域ともいう)が等しいことが望ましい。
In a distributed system having a cluster configuration, for example, when the performance of each node is equal, the amount of data handled by each node A to E is equal, that is, the distance between nodes in the
この点を解決するため、各ノードA〜Eに仮想的に複数のIDを持たせる手法が用いられている(非特許文献3)。各ノードA〜Eが複数の仮想IDを持つことで、仮想ID毎の担当領域は異なっていても、大数の法則に従い、ノードA〜Eの担当領域は平均化される。このようなコンシステント・ハッシュ法や仮想ID等の従来技術により、ノード間で担当するデータ数を均一化し、負荷を分散させることが可能となる。 In order to solve this point, a method of virtually giving a plurality of IDs to each of the nodes A to E is used (Non-Patent Document 3). Since each node A to E has a plurality of virtual IDs, even if the assigned area for each virtual ID is different, the assigned areas of the nodes A to E are averaged according to the law of large numbers. Conventional techniques such as the consistent hash method and virtual ID make it possible to equalize the number of data handled between nodes and distribute the load.
しかしながら、各ノードA〜Eの内の特定ノードにて、アクセス頻度の多いデータや、処理時間の長いデータ(高負荷データ)が偏って発生するため、各ノードA〜Eが担当するデータ数自体は均等であっても、ノード間で負荷の偏りが発生する。 However, since data with a high access frequency and data with a long processing time (high load data) are unevenly generated at specific nodes among the nodes A to E, the number of data handled by the nodes A to E itself Even if they are equal, load imbalance occurs between nodes.
このようなコンシステント・ハッシュ法の分散システムにおける負荷増大に対する対策としては、分散システムに、例えば図15に示す新たなノードFを増設して分散システムをスケールアウトさせ、高負荷となったノード(高負荷ノード)、例えば高負荷ノードCが担当するデータ数を縮小させて負荷を低減する手法がとられている。 As a countermeasure against such a load increase in the distributed system of the consistent hash method, for example, a new node F shown in FIG. 15 is added to the distributed system, and the distributed system is scaled out. High load node), for example, a method of reducing the load by reducing the number of data handled by the high load node C.
また、ノードのコンシステント・ハッシュ上での空間配置変更(これを、リバランスという)を行い適切に負荷が分散されていれば、増設を行うことなく現行のノード台数で対処可能なケースもある。非特許文献4には、スケールアウト/リバランスで対処すべき状況を識別し、更に、リバランスで対処すべき状況においては、コンシステント・ハッシュ空間(ID空間5)上の隣接ノード間(例えばEであれば、2つの矢印で示す隣のA又はD)でリバランスを実行して、ノード間の負荷の偏りを是正する手法が提案されている。また、リバランスについて、非特許文献4以外にも、種々の技術が検討されている。
In addition, there is a case where the current number of nodes can be dealt with without additional installation if the load is distributed appropriately by changing the spatial arrangement on the consistent hash of the node (this is called rebalancing). .
既存のリバランス方法は時間経過を考慮していないため、リバランス設計のための計算に係る時間によっては、実負荷が適正値であるにも関わらず、リバランスが実行されてしまうという課題がある。 Since the existing rebalancing method does not consider the passage of time, there is a problem that depending on the time for calculation for rebalancing design, the rebalancing is executed even though the actual load is an appropriate value. is there.
例えば、図16(a)に示すID空間において、ノードBの負荷(図16のBとB´の担当領域の負荷)と、ノードEの負荷(図16のEとE´の担当領域の負荷)が許容範囲外にある。従って、リバランスを行うことが決定される。 For example, in the ID space shown in FIG. 16A, the load on the node B (the load in the area in charge of B and B ′ in FIG. 16) and the load on the node E (the load in the area in charge of E and E ′ in FIG. 16). ) Is outside the allowable range. Therefore, it is determined to perform rebalancing.
そして、図16(a)に示す状態から、リバランス設計のための計算に係る時間(Δt)が経過した後(リバランスをする前)、図16(b)に示す状態になったとする。図16(b)に示す状態は、負荷の高かったノードE(E´)における負荷が減少し、負荷の低かったノードBにおける負荷が増加したことを示している。これにより、負荷のアンバランスは許容範囲に収まっている。 Then, assume that the state shown in FIG. 16B is reached after the time (Δt) related to the calculation for the rebalance design has elapsed from the state shown in FIG. The state shown in FIG. 16B indicates that the load at node E (E ′) having a high load has decreased and the load at node B having a low load has increased. Thereby, the load imbalance is within an allowable range.
しかし、従来技術では、図16(a)の時点でリバランスを行うことを決定したら、図16(b)に示す状態になるか否かに関わらずに、リバランスを実行する。従って、例えば、図16(b)に示す状態からリバランスを実行したために、アンバランスが生じ、再度リバランスを実行しなければならない、といったことが生じ得る。 However, in the prior art, if it is decided to perform rebalancing at the time of FIG. 16A, the rebalancing is executed regardless of whether or not the state shown in FIG. Therefore, for example, since the rebalance is executed from the state shown in FIG. 16B, an unbalance may occur and the rebalance must be executed again.
本発明は上記の点に鑑みてなされたものであり、分散システムにおける複数のノード間での負荷の偏りを是正するリバランスを実施する技術において、時間の経過に伴う負荷状態に基づき、リバランスの実行可否を決定することを可能とする技術を提供することを目的とする。 The present invention has been made in view of the above points. In a technique for performing rebalancing to correct a load imbalance among a plurality of nodes in a distributed system, the rebalancing is performed based on the load state with time. It is an object of the present invention to provide a technique that makes it possible to determine whether or not to execute the above.
本発明の実施の形態によれば、通信サービスを利用する複数のクライアントマシンからの情報がネットワークを介して振り分けられる複数のノードを有する分散システムにおいて用いられるリバランス装置であって、
前記複数のノードの負荷量に基づいて、当該複数のノード間の負荷量の偏りを抑制するリバランスが必要であるか否かを判定するリバランス処理手段と、
前記リバランス処理手段により、リバランスが必要であると判定された場合において、前記リバランス後の前記複数のノードの予測負荷状態に基づいて、前記リバランスをキャンセルするか否かを判定するキャンセル処理手段とを備え、
前記キャンセル処理手段は、
前記リバランス処理手段によりリバランスが必要であると判定された第1の時点において、当該第1の時点における前記複数のノードの負荷量の平均値からの差分をノード毎に算出し、前記第1の時点から、前記リバランス処理手段によるリバランス設計にかかる時間が経過した第2の時点において、ノード毎に、当該第2の時点におけるノードの負荷量から前記差分を引くことにより、前記予測負荷状態を算出する
ことを特徴とするリバランス装置が提供される。
According to an embodiment of the present invention, there is provided a rebalancing apparatus used in a distributed system having a plurality of nodes to which information from a plurality of client machines using a communication service is distributed via a network,
Rebalancing processing means for determining whether or not rebalancing is necessary to suppress the uneven load amount between the plurality of nodes based on the load amounts of the plurality of nodes;
When the rebalancing processing unit determines that rebalancing is necessary, based on the predicted load state of the plurality of nodes after the rebalancing, canceling whether to cancel the rebalancing or not Processing means ,
The cancellation processing means
At a first time point when the rebalance processing unit determines that rebalancing is necessary, a difference from an average value of load amounts of the plurality of nodes at the first time point is calculated for each node, By subtracting the difference from the load amount of the node at the second time point for each node at the second time point when the time required for the rebalance design by the rebalance processing unit has elapsed from the
また、本発明の実施の形態によれば、通信サービスを利用する複数のクライアントマシンからの情報がネットワークを介して振り分けられる複数のノードを有する分散システムにおいて用いられるリバランス装置が実行するリバランス方法であって、
前記複数のノードの負荷量に基づいて、当該複数のノード間の負荷量の偏りを抑制するリバランスが必要であるか否かを判定するリバランス判定ステップと、
前記リバランス判定ステップにより、リバランスが必要であると判定された場合において、前記リバランス後の前記複数のノードの予測負荷状態に基づいて、前記リバランスをキャンセルするか否かを判定するキャンセル判定ステップとを備え、
前記キャンセル判定ステップにおいて、前記リバランス装置は、
前記リバランス判定ステップによりリバランスが必要であると判定された第1の時点において、当該第1の時点における前記複数のノードの負荷量の平均値からの差分をノード毎に算出し、前記第1の時点から、リバランス設計にかかる時間が経過した第2の時点において、ノード毎に、当該第2の時点におけるノードの負荷量から前記差分を引くことにより、前記予測負荷状態を算出する
ことを特徴とするリバランス方法が提供される。
In addition, according to the embodiment of the present invention, the rebalancing method executed by the rebalancing apparatus used in the distributed system having a plurality of nodes to which information from a plurality of client machines using the communication service is distributed via the network Because
A rebalance determination step for determining whether or not rebalancing is required to suppress the uneven load amount between the plurality of nodes based on the load amounts of the plurality of nodes;
Cancellation for determining whether or not to cancel the rebalancing based on the predicted load state of the plurality of nodes after the rebalancing when the rebalancing determination step determines that rebalancing is necessary A determination step ,
In the cancellation determination step, the rebalance device
At a first time point when rebalancing is determined by the rebalance determining step, a difference from an average value of load amounts of the plurality of nodes at the first time point is calculated for each node, The predicted load state is calculated by subtracting the difference from the load amount of the node at the second time point for each node at the second time point when the time required for rebalance design has elapsed from the
本発明の実施の形態によれば、分散システムにおける複数のノード間での負荷の偏りを是正するリバランスを実施する技術において、時間の経過に伴う負荷状態に基づき、リバランスの実行可否を決定することを可能とする技術が提供される。 According to an embodiment of the present invention, in a technique for rebalancing to correct a load imbalance among a plurality of nodes in a distributed system, whether or not rebalancing can be performed is determined based on a load state over time. Techniques are provided that enable this to be done.
以下、図面を参照して本発明の実施の形態(本実施の形態)を説明する。なお、以下で説明する実施の形態は一例に過ぎず、本発明が適用される実施の形態は、以下の実施の形態に限られるわけではない。 Hereinafter, an embodiment (this embodiment) of the present invention will be described with reference to the drawings. The embodiment described below is only an example, and the embodiment to which the present invention is applied is not limited to the following embodiment.
例えば、以下で説明する例では、クラスタを構成するノード自身が、リバランス必要性判定、リバランス設計、リバランスのキャンセル判定を行うこととしているが、リバランス必要性判定、リバランス設計・実行、リバランスのキャンセル判定を、クラスタを構成するノード以外の装置が実行してもよい。この場合、当該装置が各ノードの負荷情報を収集し、リバランス必要性判定、リバランス設計、リバランスのキャンセル判定、振分ID表の配付等を行う。 For example, in the example described below, the nodes constituting the cluster themselves perform rebalancing necessity determination, rebalancing design, and rebalancing cancellation determination. However, rebalancing necessity determination, rebalancing design and execution are performed. The rebalancing cancellation determination may be executed by a device other than the nodes constituting the cluster. In this case, the device collects load information of each node and performs rebalancing necessity determination, rebalancing design, rebalancing cancellation determination, distribution ID table distribution, and the like.
なお、リバランス処理・リバランシングキャンセル判定処理を行う主体が、ノード自身の場合、ノード以外の装置の場合のいずれの場合も、当該主体をリバランス装置と称することができる。 In addition, when the main body that performs the rebalancing process / rebalancing cancellation determination process is the node itself or an apparatus other than the node, the main body can be referred to as a rebalancing apparatus.
また、以下で説明するリバランスの方法は一例である。本発明に係るリバランシングキャンセル判定方法は、以下で説明するリバランスの方法に限らず、他のリバランスの方法(例:非特許文献4)にも適用可能である。 The rebalancing method described below is an example. The rebalancing cancellation determination method according to the present invention is not limited to the rebalancing method described below, but can be applied to other rebalancing methods (eg, Non-Patent Document 4).
ただし、以下で説明するリバランスの方法は、非特許文献4のように隣接ノード間での空間配置変更に限定されず、効率的に負荷の偏りを是正できる優れたリバランスの方法である。
However, the rebalancing method described below is not limited to changing the spatial arrangement between adjacent nodes as in
(システムの全体構成、ノードの構成)
図1は、本実施の形態に係る分散システムの構成例を示すブロック図である。
(Overall system configuration, node configuration)
FIG. 1 is a block diagram illustrating a configuration example of a distributed system according to the present embodiment.
図1に示す分散システム10は、コンシステント・ハッシュ法を用いた複数のノード15を利用し、データ管理を行うシステムである。当該分散システム10では、分散システム10を構成するノード15間で負荷の偏りが生じた際に、現行ノード15の負荷の偏り状況を踏まえて、効率的にリバランスを行い負荷の偏りを是正する。ただし、リバランスが必要であると判断した場合、所定時間経過後の負荷状態に基づき、リバランスを実行するか否か(キャンセルするか否か)を判定し、キャンセルしない場合にリバランスを実行する。
A distributed
分散システム10は、複数のクライアントマシン(単に、クライアントともいう)11にインターネット等のネットワーク12を介して接続されたロードバランサ13と、クラスタ14を構成する複数のノード15とを備えて構成されている。
The distributed
各ノード15は、コンピュータ等の物理装置や仮想マシン等の論理装置、言い換えれば、物理的又は仮想的なサーバ等である。クライアント11からのメッセージが、ロードバランサ13によって各ノード15に振り分けられる。この振り分けは、単純なラウンドロビン法等により行われる。
Each
ノード15は、制御部18及び記憶部19を備えて構成されている。但し、制御部18及び記憶部19は、ソフトウェア(プログラム)が上記装置(コンピュータ)によって実行されることにより実現されている。当該プログラムは、ネットワークを介して配信してもよいし、メモリ等の記憶媒体に記憶して配付してもよい。なお、制御部18及び記憶部19は、それぞれハードウェア(例:処理ロジックを組み込んだ集積回路)によって構成してもよい。
The
図2(a)に示すように、制御部18は、ノード識別子管理部18aと、振分部18bと、信号処理部18cと、ノード負荷計測部18dと、分散システム負荷リバランス部(単に、リバランス部ともいう)18eと、リバランシングキャンセル機能部18fとを備える。
As shown in FIG. 2A, the
図2(b)に示すように、記憶部19は、ノード識別子管理表19aと、振分ID表19bと、データ19cと、ノード負荷計測データ19dと、分散システム負荷集計データ19eと、呼制御状態フラグ19fと、ノード毎負荷差分表・ノード毎予測負荷比較表19gと、前回測定データ19hとを記憶する。なお、ノード識別子管理表19aを管理表19aともいい、分散システム負荷集計データ19eを集計データ19e、呼制御状態フラグ19fをフラグ19fともいう。
As shown in FIG. 2B, the
振分部18bは、クライアント11からのメッセージ(情報)を、例えばコンシステント・ハッシュ法等に基づき、メッセージを担当するノード15に振り分ける。
The
信号処理部18cは、クライアント11からのメッセージに応じて、所定の信号処理を行い、クライアント11にサービスを提供する。つまり、メッセージを担当するノード15では、信号処理部18cにて所定の信号処理を行ってクライアント11にサービスを提供する。この振分部18b及び信号処理部18cの処理動作については後述で更に詳細に説明する。
The
但し、分散システム10においては、ロードバランサ13が存在せず、クライアント11から任意のノード15(振分部18b)にメッセージを送信することも可能である。また、振分部18bと信号処理部18cは、図2のように同じノード15上に同時に存在させてもよいし、別ノード15上に存在させてもよい。
However, in the distributed
制御部18において、ノード識別子管理部18a(あるいはリバランス部18e)は、分散システム10上のノード情報をノード識別子管理表19aに蓄積することにより、各ノード15が担当するID空間を管理する。このID空間は、コンシステント・ハッシュ法ではコンシステント・ハッシュ上の空間(ハッシュ空間)である。
In the
このハッシュ空間を、例えば図3に示すように、複数のノードA〜Eで分割し、各ノードA〜Eの担当領域を決めて管理する。この際、ノードAが担当するハッシュ空間は、ノードEから時計回りにノードAまでの領域であり、このハッシュ空間に存在するデータを担当ノードAが保持(もしくは処理)する。他のノードB〜Eも同様である。なお、ハッシュ空間(担当領域)のサイズが大きい程に、多くのデータを保持(処理)できるようになっている。 For example, as shown in FIG. 3, the hash space is divided by a plurality of nodes A to E, and assigned areas of the nodes A to E are determined and managed. At this time, the hash space handled by the node A is an area from the node E to the node A in the clockwise direction, and the responsible node A holds (or processes) data existing in the hash space. The same applies to the other nodes B to E. In addition, as the size of the hash space (area in charge) is larger, more data can be held (processed).
図2(a)に戻って、振分部18bは、振分ID表19bに基づき、メッセージ等のデータの振分先の決定に関する処理を行う。
Returning to FIG. 2A, the
信号処理部18cは、ノード15における信号処理を行う。この信号処理時のアクセス対象となるデータ19cが記憶部19に記憶される。
The
ノード負荷計測部18dは、自ノード15の負荷を計測し、この計測結果を記憶部19にノード負荷計測データ19dとして記録すると共に、必要に応じて定められる特権ノード15(図3に示す例えばノードB)に送付する。
The node
分散システム負荷リバランス部18eは、分散システム10全体のノード負荷に基づいて、負荷の平均値及び標準偏差等の算出を行い、これらの算出結果である分散システム負荷集計データ19eを記憶部19に記憶する。更に、リバランス部18eは、その記憶された集計データ19eに基づくリバランスの必要性判定、並びにリバランス設計を行って、リバランシングキャンセル機能部18fにより、リバランスのキャンセルをしないと判定された場合に、リバランスを実行する。リバランシングキャンセル機能部18fについては後述する。
The distributed system load rebalancing unit 18e calculates the average value and standard deviation of the load based on the node load of the entire distributed
また、記憶部19に記憶される呼制御状態フラグ19fは、新規呼を制御する状態か否かを判別するための情報である。
The call control state flag 19f stored in the
(振分部18b及び信号処理部18cにおける処理について)
ここで、前述した図2に示すノード15の振分部18b及び信号処理部18cによるメッセージの振分処理及び信号処理について更に詳細に説明する。
(About processing in the
Here, message distribution processing and signal processing by the
振分部18bは、クライアント11から発呼されるメッセージ内の情報をもとに、信号処理を担当するノード15を特定し、当該ノード15にメッセージの振り分けを行う。メッセージは、新規呼(例えば、SIP(Session Initiation Protocol)においてはInitial−INVITE等)と後続呼(SIPにおいてはBYE等)に分けられる。
The
新規呼か後続呼かの識別は、呼のメッセージに後述の振分キーが埋め込まれているか否かで判定できる。例えば、SIPにおいては、To/FromヘッダのTag等で判定できる。 Whether the call is a new call or a subsequent call can be determined based on whether or not a distribution key described later is embedded in the call message. For example, in SIP, it can be determined by Tag of To / From header or the like.
振分キーは、"データ識別子(SIPにおいてはcall−id)+ハッシュ値"で構成されている。ハッシュ値は、データ識別子からハッシュ関数をかけて導出された値である。 The distribution key is configured by “data identifier (call-id in SIP) + hash value”. The hash value is a value derived from the data identifier by applying a hash function.
一方、上述した新規呼か後続呼かの識別の判定の結果、後続呼の場合、振分部18bにて、振分ID表19b上のノード15毎の担当領域である振分ID空間{図4(b)に示し後述する}と、振分キー内のハッシュ値とを比較して担当するノード15を特定する。更に、担当するノード15のアドレスを、後述の図4(a)に示すノード識別子管理表19aから特定し、この特定されたノード15に転送する。
On the other hand, in the case of a subsequent call as a result of the above-described determination of whether the call is a new call or a subsequent call, the
一方、上述した判定の結果、新規呼の場合、振分キーが存在しないため、メッセージからCall−id(データ識別子)を抽出し、これをハッシュ関数に導入してハッシュ値を導出する。更に、振分部18bにて、振分ID表19b上のノード15毎の担当領域である振分ID空間{図4(b)に示し後述する}と、導出したハッシュ値とを比較して担当するノード15を特定する。更に、担当するノード15のアドレスを、後述の図4(a)に示すノード識別子管理表19aから特定し、この特定されたノード15に転送する。
On the other hand, as a result of the determination described above, since a distribution key does not exist in the case of a new call, a Call-id (data identifier) is extracted from the message and introduced into a hash function to derive a hash value. Further, the
新規呼を信号処理部18cで受信した場合も、メッセージからCall−id(データ識別子)を抽出し、これをハッシュ関数に導入してハッシュ値を導出して、振分キーを生成する。また、信号処理部18cによる信号処理後に、クライアント11(SIPにおいてはUACやUAS等)に送付するメッセージに振分キーを埋め込んで(SIPにおいてはTo/FromヘッダのTag)送付する。
Even when a new call is received by the
以降、クライアント11からの後続呼には本振分キーを埋め込みの上、メッセージを送付し、振分部18bにて本振分キーのハッシュ値を基に振り分けが行われることで、当該呼が処理されたノード15に後続呼が届くことが可能となる。
Thereafter, a message is sent after embedding the real distribution key in the subsequent call from the
(ノード識別子管理部18aについて)
次に、上述したノード識別子管理部18aについて、より詳細に説明する。
(About the node
Next, the node
ノード識別子管理部18aは、分散システム10へのノード15の追加や離脱が発生した際に、分散システム10を構成するノード15の識別子情報(ノード識別子)を更新し、これを、図4(a)に示すノード識別子管理表19aとして管理する。図4(a)の例においては、ノード識別子(又はノードID)(例えば、「Node1」)に、アドレス(例えば、「10.45.0.1」)が対応付けられている。そのノード識別子は、特権ノードのノード識別子管理部18aで付与され、全ノード15へと配信される。
The node
コンシステント・ハッシュ法においては、ノード識別子に、図4(b)に示す仮想ノード識別子(又は仮想ノードID)が従属している。この仮想ノードIDは、振分ID空間の任意のID(ハッシュ値による)である。例えば図4(a)に示すノード識別子「Node1」には、図4(b)の振分ID表19bに示す少なくとも1つ以上の仮想ノードID「Node1−1」,「Node1−2」が従属している。言い換えれば、ノード15に1つ以上の仮想ノードが従属している。但し、これは基本構成であって、ノード15に仮想ノードが従属しない場合もある。
In the consistent hash method, the virtual node identifier (or virtual node ID) shown in FIG. 4B is subordinate to the node identifier. This virtual node ID is an arbitrary ID (by hash value) in the distribution ID space. For example, the node identifier “Node1” shown in FIG. 4A is subordinate to at least one or more virtual node IDs “Node1-1” and “Node1-2” shown in the distribution ID table 19b of FIG. 4B. doing. In other words, one or more virtual nodes are subordinate to the
このように、前述のノード識別子管理表19aの更新と合わせて、ノード15が担当する振分ID空間の担当領域を更新し、これを振分ID表19bとして管理する。振分ID表19bには、例えば、仮想ノードID「Node1−1」に、担当する振分ID空間の担当領域として「0〜199(D=200)」のデータサイズが対応付けられ、仮想ノードID「Node1−2」に、担当する振分ID空間の担当領域として「600〜999(D=400)」のデータサイズが対応付けられている。即ち、D=200は、担当領域のデータサイズが200であることを示す。他のD=400等も同じである。
Thus, in conjunction with the update of the node identifier management table 19a described above, the assigned area of the distribution ID space handled by the
(ノード負荷計測部18dの処理について)
次に、上述したノード負荷計測部18dにより計測される負荷の情報収集と、この収集された負荷の特権ノードへの送付について説明する。
(Regarding the processing of the node
Next, information collection of the load measured by the node
ノード負荷計測部18dは、所定の周期で当該ノード15の負荷を計測し、これをノード負荷計測データ19dとして記憶部19に記録して蓄積する。また、ノード負荷計測部18dは、所定の周期で特権ノード(例えば図3に示すノードB)に蓄積したノード負荷計測データ19dを送付する。
The node
また、特権ノードは、各ノード15から収集した全ノードの負荷データを、全ノード15へ配信する。各ノード15は、この負荷データをノード負荷計測データ19dとして記憶部19に記録することができる。
Further, the privileged node distributes the load data of all nodes collected from each
上述したノード負荷計測部18dにおいて所定周期で計測されるノード15の負荷として、CPU(Central Processing Unit)使用率、メモリ使用率、アクセス頻度等の、ノード15にて取得可能なあらゆるパラメータを使用することができる。また、どの数値がボトルネックとなるか、更に、どの程度の値であればリバランスすべき閾値となるかは、分散システムのシステム特性に応じて異なり、複数のパラメータの組み合わせにより判断するケースもある。従って、特定のパラメータ種別に限定せず利用可能とする。
As the load of the
また、ノード負荷計測部18dによる負荷の計測単位は、図5の(a)ノードIDによるノード単位、(b)仮想ノードIDによる仮想ノードID単位、(c)データ単位の内、どの単位で計測しても構わない。また、図5(b)の仮想ノード単位で負荷を計測する場合、それを集計して(a)のノード単位を算出可能であり、(c)のデータ単位で負荷を計測する場合、それを集計して(b)の仮想ノード単位や(a)のノード単位の負荷を算出可能である。なお、図5においては、ノード負荷計測部18dにより計測される負荷は、アクセス頻度(アクセス回数)を例に示してある。
Further, the unit of load measurement by the node
このような図5(a)〜(c)の表は、2つのノード15で構成される分散システム10におけるものであり、次のような構成となっている。
Such tables in FIGS. 5A to 5C are for the distributed
図5(a)に示す1つのノード15(例えばノードID=Node1)において、図5(b)に示す2つの仮想ノードID(Node1_1,Node1_2)による2つの仮想ノードを保持する。更に、図5(c)に示す1つの仮想ノードID(例えばNode1_1)による仮想ノード当り2つのデータ(data1,data2)を保有する場合を想定してある。他のノードも同様である。 In one node 15 (for example, node ID = Node1) shown in FIG. 5A, two virtual nodes with two virtual node IDs (Node1_1, Node1_2) shown in FIG. 5B are held. Furthermore, it is assumed that two data (data1, data2) per virtual node with one virtual node ID (for example, Node1_1) shown in FIG. The same applies to the other nodes.
この場合に、負荷の計測単位を図5(b)に示すように仮想ノード単位とし、収集する負荷としてのアクセス頻度(回数)を、10秒周期(10:15:00→10:15:10→10:15:20)で収集して、蓄積するケースを想定してある。 In this case, the load measurement unit is a virtual node unit as shown in FIG. 5B, and the access frequency (number of times) as a load to be collected is a 10 second period (10: 15: 00 → 10: 15: 10). → 10:15:20) The case of collecting and accumulating is assumed.
(分散システム負荷リバランス部18eによるリバランスの判定処理について)
次に、上述した分散システム負荷リバランス部18eによるノード15の負荷の偏り算出及びリバランス必要性判断の処理について説明する。以下で説明する分散システム負荷リバランス部18eにおけるリバランス必要性判断、リバランス設計、実行(振分ID表配付)の処理は、どのノード15が行ってもよいが、ここでは、特権ノードが行うことを想定している。
(Regarding rebalancing determination processing by the distributed system load rebalancing unit 18e)
Next, a description will be given of the process of calculating the load deviation of the
リバランス部18eは、所定の周期で各ノード15から収集したノードの負荷データ(ノード負荷計測データ19d)に基づき、分散システム10全体のノード15の負荷の平均値及び標準偏差、偏差並びに偏差/標準偏差(偏差を標準偏差で除した値)の算出を行う。更に、リバランス部18eは、それらの算出結果を、図6に一例を示すように集計データ19eとして記録し、この記録した集計データ19eに基づき、後述の3つの条件(1)〜(3)の何れか1つを満たす場合、ノード15間の負荷の偏りを是正するリバランスが必要であると判定する。何れも満たさない場合はリバランスが不要であると判定する。
Based on the node load data (node
図6に示す集計データ19eには、収集時の時刻、ノードID(ノード識別子)、平均値(アクセス頻度)、標準偏差、実測値(アクセス頻度)、偏差(平均値からの差分)、及び偏差/標準偏差が記録される。なお、平均値及び実測値は、アクセス頻度の平均値及び実測値である。
The
条件(1)、リバランス部18eは、集計データ19eに基づき、いずれかのノード15の負荷が、当該ノード15が許容する負荷の上限値(予め定められた上限値)を超えていないか否かをチェックし、上限値を超えるノードが存在する場合に、リバランスが必要であると判定する。
Condition (1), the rebalance unit 18e, based on the
条件(2)、リバランス部18eは、集計データ19eに基づき、ノード15全体の負荷の標準偏差が所定の閾値(第1閾値)以下であるか否かを確認し、閾値を超えている場合に、リバランスが必要であると判定する。
Condition (2), the rebalance unit 18e checks whether or not the standard deviation of the load of the
条件(3)、リバランス部18eは、集計データ19eに基づき、ノード15毎の負荷の偏差/標準偏差が所定の閾値(第2閾値)以下であるか否かを確認し、閾値を超えているノード15がある場合に、リバランスが必要であると判定する。
Condition (3), the rebalance unit 18e checks whether or not the load deviation / standard deviation for each
但し、図6に示す集計データ19eにおいては、負荷の計測単位を図5(a)に示すノード単位(仮想ノード単位の場合もある)とし、負荷の平均値及び実測値をアクセス頻度とする。更に、平均値や標準偏差を算出する際の時間間隔を20秒間(例えば、10:14:40〜10:15:00)とする。図6の例は、10:15:00の時刻における上記算出値等である。また、各ノード15が許容する負荷の上限値をアクセス頻度の実測値についての上限値として、これを「90」{条件(1)}とし、標準偏差の閾値を「15」{条件(2)}、偏差/標準偏差の閾値(乖離閾値ともいう)を「1.2」{条件(3)}とした際の例である。なお、平均値や標準偏差を算出する際の時間間隔は、リバランスの必要性を判定する時間間隔であってもよい。
However, in the aggregated
この例では、条件(1)、(2)は満たさない。しかし、図6ではノード識別子の「Node1」、「Node3」、「Node4」の偏差/標準偏差が「1.5」であり、閾値「1.2」を超えており、条件(3)を満たしているため、リバランスが必要であると判定される。ただし、後述するリバランシングキャンセル機能部18fにより、リバランスをキャンセルすると判定された場合には、このタイミングでのリバランスは実行されない。
In this example, the conditions (1) and (2) are not satisfied. However, in FIG. 6, the deviation / standard deviation of the node identifiers “
(分散システム負荷リバランス部18eによるリバランスの設計、及び実行処理について)
ここで、リバランシングキャンセル機能部18fによりリバランスがキャンセルされない場合における、リバランス部18eが実行するリバランスの設計、及び実行処理について説明する。
(Rebalancing design and execution processing by the distributed system load rebalancing unit 18e)
Here, the rebalancing design and execution processing executed by the rebalancing unit 18e when the rebalancing is not canceled by the rebalancing
リバランスは、負荷の高いノード15の担当領域(担当のID空間)中の移譲領域(後述)を、負荷の低いノード15へ移譲することで負荷の偏りを是正する。この時、負荷の乖離を是正するために、担当領域の必要な移譲領域のサイズを推定の上、その移譲領域のみを移譲する。但し、移譲領域は、担当領域の全てであったり、担当領域の100%未満の割合の領域であったりする。
The rebalance corrects the load bias by transferring a transfer area (described later) in the assigned area (responsible ID space) of the
本実施の形態において、この移譲の方法は、次の(T1)〜(T4)のようになる。 In the present embodiment, this transfer method is as follows (T1) to (T4).
(T1)全てのノード15の中で最も負荷の高いノード15の担当領域中の移譲領域を、最も低いノード15に対して移譲していくものとする。
(T1) It is assumed that the transfer area in the assigned area of the
(T2)移譲領域の移譲は次の場合に終了するものとする。即ち、上記の条件(1)〜(3)の何れかを満たす要因となった偏差の全てが存在しなくなった場合(T2−1)、若しくは、その偏差の一部(予め指定の偏差解消割合を満たす偏差)を解消する移譲領域の移譲が決定した場合(T2−2)、若しくは、移譲領域の移譲を許容可能な移譲先ノード15が存在しなくなった場合(T2−3)に終了するものとする。
(T2) The transfer of the transfer area ends in the following case. That is, when all of the deviations that cause any of the above conditions (1) to (3) no longer exist (T2-1), or a part of the deviation (previously designated deviation cancellation ratio) The process ends when the transfer of the transfer area that resolves (deviation satisfying) is determined (T2-2), or when there is no
(T3)移譲領域の移譲単位は、ノード単位や仮想ノード単位でも構わないし、仮想ノード単位でなく、仮想ノードの担当領域の半分を割譲する単位や、1つのハッシュ値によるデータのみの移譲単位でも構わない。 (T3) The transfer unit of the transfer area may be a node unit or a virtual node unit, not a virtual node unit, but a unit for transferring half of the area in charge of the virtual node, or a transfer unit of only data using one hash value I do not care.
(T4)リバランス部18eがリバランスを行う際に事前に実行するリバランス設計は、負荷の計測単位を上述したノード単位、仮想ノード単位及びデータ単位の内、どの単位で実行していたかで、可能なリバランス設計の粒度が、次に記載するように変わる。 (T4) The rebalancing design executed in advance when the rebalancing unit 18e performs rebalancing determines in which unit the load measurement unit is executed from among the node unit, the virtual node unit, and the data unit described above. The granularity of possible rebalance designs varies as described below.
即ち、ノード単位の負荷計測の場合、後述のリバランス粒度が粗い場合のみの方式となる。 That is, in the case of load measurement in node units, the method is only used when the rebalance granularity described later is coarse.
仮想ノード単位の負荷計測の場合、後述のリバランス粒度が粗い場合及びリバランス粒度が中間(粗いと細かいとの中間)の場合の方式が可能となる。 In the case of load measurement in units of virtual nodes, it is possible to use a method in which the rebalance granularity described later is coarse and the rebalance granularity is intermediate (intermediate between coarse and fine).
データ単位の負荷計測の場合、後述のリバランス粒度が粗い場合、中間の場合及び細かい場合の3つ全ての方式が採用可能となる。 In the case of load measurement in units of data, all three methods can be employed when the rebalance granularity described later is coarse, intermediate, and fine.
まず、リバランス粒度が粗い場合について説明する。 First, the case where the rebalance particle size is coarse will be described.
ノード15全体における負荷の総量を、ノード15全ての仮想ノードID数で割った仮想ノード当たりの平均負荷量「Lv_ave」を算出する。次に、ノード15間において最も負荷の高いノード15に着目し、このノード15について解消すべき負荷量の偏差(この偏差の符号は+であることから、プラス偏差ともいう)「Ltarget」を算出する。この偏差は、例えば、当該ノード15について、図6で示されているプラスの偏差(実測値の平均値との差分)である。
An average load amount “Lv_ave” per virtual node obtained by dividing the total load amount of the
次に、「Ltarget」を「Lv_ave」で割った値を、解消すべき負荷量を解消するために必要な仮想ノードID数「Vtarget_num」と考える。 Next, a value obtained by dividing “Ltarget” by “Lv_ave” is considered as the number of virtual node IDs “Vtarget_num” necessary for eliminating the load to be eliminated.
この最も負荷の高いノード15の仮想ノードの中から無作為に「Vtarget_num」の仮想ノードIDを抽出する。この時、「Vtarget_num」に小数が含まれる場合は、上記(T3)にその概要を記載したように、所定の仮想ノードIDの仮想ノードの担当領域を例えば小数に基づき割譲してもよい。これは、例えば「1.5」の場合、仮想ノード1つの担当領域の割譲と、仮想ノード2つ目の担当領域を半分にして割譲することである。更に、小数部分を切り捨てや切り上げ、又は四捨五入する等して整数個の仮想ノードIDを抽出してもよい。
The virtual node ID of “Vtarget_num” is randomly extracted from the virtual nodes of the
上述したように、無作為に抽出された仮想ノードID「Vtarget_num」の仮想ノードの担当領域中の移譲領域を移譲する際に、全てのノード15の中で、最も負荷の低いノード15から順に移譲していく。この際、移譲によって移譲先のノード15の負荷が高まりすぎないように、許容可能な担当領域の移譲サイズを求める必要がある。
As described above, when the transfer area in the assigned area of the virtual node with the virtual node ID “Vtarget_num” extracted at random is transferred, the transfer is performed in order from the
具体的には、移譲先のノード15は、負荷量の偏差(この偏差の符号は−であることから、マイナス偏差ともいう)までは受け入れ許容可能である。このため、負荷量のマイナス偏差を平均負荷量「Lv_ave」で割った値である負荷量解消に必要な仮想ノードID数「Vget_num1」が、許容可能な仮想ノードID数となる。
Specifically, the
ここで、移譲先のノード15の担当領域が許容量を越える場合は、次に負荷の低いノード15について、同様の手順で許容可能な仮想ノードID数「Vget_num2」を求めていき、Vtarget_num<Vget_num1+Vget_num2+…となって、全ての必要な担当領域中の移譲領域の移譲が完了すれば終了となる。
Here, when the assigned area of the
以降同様の処理を、次に負荷の高いノードに対しても実行し、全ての負荷乖離の解消が必要なノード15において、負荷の乖離を是正する担当領域中の移譲領域の移譲が完了するか、若しくは、移譲領域の移譲が可能なノードが存在しなくなるまで実行する。
Thereafter, the same processing is executed for the next highest load node, and the transfer of the transfer area in the assigned area that corrects the load divergence is completed in all the
次に、リバランス粒度が中間の場合について説明する。 Next, a case where the rebalance granularity is intermediate will be described.
基本的に上述したリバランス粒度が粗い場合と同じであるため、粗い場合との差分のみを説明する。 Since it is basically the same as the case where the rebalance granularity described above is coarse, only the difference from the coarse case will be described.
上述したように、移譲元のノード15の仮想ノードの中から無作為に仮想ノードを抽出するのではなく、解消すべき負荷量のプラス偏差を発生させている仮想ノードを選択的に抽出し、この抽出した仮想ノードの担当領域中の移譲領域を移譲するものとする。この場合、仮想ノード単位で負荷量を計測しているため、計測負荷は粒度が粗い場合よりも高くなるが、負荷の乖離を是正するための移譲領域の移譲を、より正確に行うことが可能となる。
As described above, instead of randomly extracting virtual nodes from the virtual nodes of the
次に、リバランス粒度が細かい場合について説明する。 Next, the case where the rebalance granularity is fine will be described.
基本的に上述したリバランス粒度が粗い場合と同じであるため、粗い場合との差分のみを説明する。 Since it is basically the same as the case where the rebalance granularity described above is coarse, only the difference from the coarse case will be described.
上述したように、移譲元のノード15の仮想ノードの中から無作為に仮想ノードを抽出するのではなく、解消すべき負荷量のプラス偏差を発生させているデータのハッシュ値を選択的に抽出し、そのハッシュ値のみを移譲するものとする。この場合、データ単位で負荷量を計測しているため、計測負荷はリバランス粒度が中間の場合よりも高くなるが、負荷の乖離を是正するための移譲領域の移譲を、より正確に行うことが可能となる。また、移譲の単位も最小化することができる。
As described above, instead of randomly extracting virtual nodes from the virtual nodes of the
リバランス部18eは、リバランスが必要であると判定した場合に、負荷の偏りを是正するリバランス設計を、上述した手順で実行し、振分ID表19bに反映させる。ただし、振分ID表19bの全ノード15への送付については、リバランスがキャンセルされない場合に実行する。
When it is determined that rebalancing is necessary, the rebalancing unit 18e executes the rebalancing design for correcting the load bias in the above-described procedure, and reflects the rebalancing design in the distribution ID table 19b. However, the transmission to all the
例えば、図7(a)に示すように、リバランス前の振分ID表19bは、仮想ノードID「Node1−1」に、担当する振分ID空間の担当領域として「0〜199(D=200)」のデータサイズが対応付けられ、「Node2−1」に「200〜399(D=200)」、「Node3−1」に「400〜599(D=200)」、「Node1−2」に「600〜999(D=400)」のデータサイズが対応付けられているとする。 For example, as shown in FIG. 7A, the distribution ID table 19b before rebalancing is assigned to the virtual node ID “Node1-1” as “0-199 (D = 200) ”,“ Node 2-1 ”is“ 200 to 399 (D = 200) ”,“ Node 3-1 ”is“ 400 to 599 (D = 200) ”, and“ Node 1-2 ”. Are associated with a data size of “600 to 999 (D = 400)”.
ここで、例えば図7(a)に示す「Node1−2」の仮想ノードの担当領域「600〜999(D=400)」を全て、他の仮想ノードID「Node3_2」の仮想ノードへ移譲するものとする。この場合、図7(b)に示すように、仮想ノードID「Node3_2」の仮想ノードの担当領域が「600〜999(D=400)」のサイズとなる。 Here, for example, all the assigned areas “600 to 999 (D = 400)” of the virtual node “Node 1-2” illustrated in FIG. 7A are transferred to the virtual node having the other virtual node ID “Node3_2”. And In this case, as shown in FIG. 7B, the area in charge of the virtual node with the virtual node ID “Node3_2” has a size of “600 to 999 (D = 400)”.
また、図7(a)に示す「Node1−2」の仮想ノードの担当領域「600〜999(D=400)」の半分を、他の仮想ノードID「Node3_2」の仮想ノードへ移譲するものとする。この場合、図7(c)に示すように、仮想ノードID「Node1_2」の仮想ノードの担当領域が「600〜799(D=200)」のサイズとなり、仮想ノードID「Node3_2」の仮想ノードの担当領域が「800〜999(D=200)」のサイズとなる。 Also, half of the assigned area “600 to 999 (D = 400)” of the virtual node “Node 1-2” illustrated in FIG. 7A is transferred to the virtual node having the other virtual node ID “Node3_2”. To do. In this case, as shown in FIG. 7C, the virtual node with the virtual node ID “Node1_2” has a size of “600 to 799 (D = 200)”, and the virtual node with the virtual node ID “Node3_2” The area in charge is “800 to 999 (D = 200)”.
<リバランス設計の他の例>
リバランス部18eが以下で説明する処理によりリバランス設計を行うようにしてもよい。
<Other examples of rebalancing design>
The rebalance unit 18e may perform rebalance design by the process described below.
ここでは、分散システム10の各ノード15のリソースの総量(負荷の総量)が、使用リソース量(使用負荷量)に対して十分であるにも関わらず、使用リソース量に偏りが生じているとする。この際に、リバランス部18eが、上述した処理のように担当領域中の移譲領域を移譲する対象ノードや、該当ノード15の適切な移譲サイズを指定することなく、各ノード15が持つ仮想ノード数を、ノード15毎の現状の負荷の状況に応じて、ノード15毎に必要な負荷量とする仮想ノード数に再設定するリバランスを行うようにする。
Here, although the total amount of resources (total load) of each
この際、リバランス部18eは、各ノード15の仮想ノード数を、負荷の状況に合わせて下式(1)により算出し、この算出された各ノード15の仮想ノード数に基づきリバランスする。
At this time, the rebalancing unit 18e calculates the number of virtual nodes of each
このリバランスにおいては、算出された仮想ノード数に基づき、各仮想ノードの振分ID空間の先頭から仮想ノードIDと振分ID空間の再マッピングを行う。再マッピングは、担当領域の総延長(総サイズ)を算出した仮想ノード数で除し、1仮想ノード当たりの振分ID空間サイズを求め、振分ID空間の先頭から新たな振分ID空間サイズ毎に、仮想ノードID毎の仮想ノード数を再設定していく。 In this rebalancing, the virtual node ID and the distribution ID space are remapped from the top of the distribution ID space of each virtual node based on the calculated number of virtual nodes. In the remapping, the total extension (total size) of the assigned area is divided by the calculated number of virtual nodes to obtain a distribution ID space size per virtual node, and a new distribution ID space size from the top of the distribution ID space. Each time, the number of virtual nodes for each virtual node ID is reset.
リバランス後の仮想ノード数=現状の仮想ノード数×(全ノードの負荷の平均値/該当ノードの負荷の実測値) …(式1)
但し、式(1)中の「該当ノードの負荷の実測値」は、現状の仮想ノードを有するノードの負荷の実測値である。また、式(1)はリバランス部18eの図示せぬ記憶部に保持されるものとする。
Number of virtual nodes after rebalancing = current number of virtual nodes × (average value of loads of all nodes / actual value of loads of relevant nodes) (Equation 1)
However, the “actually measured load value of the corresponding node” in the equation (1) is an actually measured value of the load of the node having the current virtual node. In addition, Expression (1) is held in a storage unit (not shown) of the rebalance unit 18e.
以下、ここでのリバランス処理について具体的に説明する。 Hereinafter, the rebalancing process here will be specifically described.
リバランス部18eは、まず、各ノード15が持つ仮想ノード数を再設定する。この再設定の処理を図8(a)及び(b)を参照して説明する。但し、図8(a)及び(b)に示す仮想ノードID「Node1−1」,「Node1−2」は、ノードID「Node1」のノード1に従属する仮想ノード1−1,1−2に対応するものとする。他の仮想ノードIDにおいても同様であり、例えば、仮想ノードID「Node5−1」,「Node5−2」,「Node5−3」は、ノードID「Node5」のノード5に従属する仮想ノード5−1,5−2,5−3に対応するものとする。
First, the rebalancing unit 18e resets the number of virtual nodes that each
図8(a)に示す振分ID表19bには、仮想ノードID「Node1−1」に、担当する振分ID空間の担当領域として「0〜199(D=200)」のデータサイズが対応付けられ、「Node1−2」に、「200〜399(D=200)」のデータサイズが対応付けられている。他の仮想ノードIDにおいても図示する通りである。 In the distribution ID table 19b shown in FIG. 8A, the virtual node ID “Node1-1” corresponds to the data size “0 to 199 (D = 200)” as the assigned area of the assigned ID space. A data size of “200 to 399 (D = 200)” is associated with “Node 1-2”. The same applies to other virtual node IDs.
更に、各ノード1〜5の仮想ノード数は、ノード1の仮想ノード数が2個、ノード2の仮想ノード数が1個、ノード3の仮想ノード数が1個、ノード4の仮想ノード数が2個、ノード5の仮想ノード数が2個である。
Further, the number of virtual nodes of each of the
このような条件において、リバランス部18eは、ノード1〜5が持つ仮想ノード数を現状の負荷の状況に応じて、必要な負荷量に再設定する。以降、この再設定の処理について説明する。
Under such conditions, the rebalance unit 18e resets the number of virtual nodes held by the
まず、リバランス部18eは、各ノード1〜5の仮想ノード数を変更する。例えば、各ノード1〜5の現状の仮想ノード数は、図8(a)に示すように、ノード1が2個、ノード2が1個、ノード3が1個、ノード4が2個、ノード5が2個の合計8個である。これを、各ノード1〜5の負荷の現状に応じて、図8(b)に示すように、ノード1が1個、ノード2が2個、ノード3が2個、ノード4が2個、ノード5が3個の合計10個に変更する。
First, the rebalance unit 18e changes the number of virtual nodes of each of the nodes 1-5. For example, as shown in FIG. 8A, the current number of virtual nodes in each of the
この仮想ノード数の変更を行う場合に上記式(1)を用いる。仮想ノード数の変更は、例えば図8(a)に示す各ノード1〜5の個数「2個、1個、1個、2個、2個」=8個を、図8(b)に示す各ノード1〜5の個数「1個、2個、2個、2個、3個」=10個に変更することである。
The above formula (1) is used when changing the number of virtual nodes. For example, the number of virtual nodes is changed as shown in FIG. 8B in which the number of
図8(a)の現状では、全ノード1〜5のハッシュ空間サイズ(担当領域のサイズ)は「0〜1599」の1600であり、仮想ノード数は8個なので、仮想ノード当たりの担当領域のサイズは、1600÷8=200である。このD=200の担当領域のサイズの内、該当ノード1の負荷の実測値は、例えば「80」や「150」のようになる。このような全ノード1〜5の実測値から、全ノード1〜5の負荷の平均値が求められるので、その平均値及び実測値を上記式(1)に代入する。
In the current state of FIG. 8A, the hash space size (size of the assigned area) of all the
例えば、仮想ノードID=「Node1−1」の振分ID空間の担当領域(サイズD=200)では負荷の実測値が「140」、「Node1−2」では負荷の実測値が「160」であるとすると、ノード1の負荷の実測値は「300」である。この際、全ノード1〜5の負荷の平均値が「150」とする。この場合、ノード1のリバランス後の仮想ノード数は、2×(150/300)=1となる。同様に、他のノード2〜5においてもリバランス後の仮想ノード数を求め、各ノード1〜5の仮想ノード数を、その求められた仮想ノード数に変更する。但し、式(1)に当て嵌めた計算結果が、1.6等の小数点を伴う場合、切り上げ、切り捨て、四捨五入とすることを予め決めておく。
For example, in the assigned area (size D = 200) of the distribution ID space of virtual node ID = “Node 1-1”, the actual load value is “140”, and in “Node 1-2”, the actual load value is “160”. If there is, the measured value of the load of the
次に、リバランス部18eは、仮想ノード当たりのハッシュ空間サイズを変更する。図8(a)に示す現状では、上述したように、仮想ノード当たりのハッシュ空間サイズDは、1600÷8=200である。 Next, the rebalance unit 18e changes the hash space size per virtual node. In the current state shown in FIG. 8A, as described above, the hash space size D per virtual node is 1600/8 = 200.
これを、上述した変更後の仮想ノード数=10個を用いると、仮想ノード当たりのハッシュ空間サイズは、1600÷10=160となる。このハッシュ空間サイズを用いて、図8(b)に示すように、1個当たりの仮想ノードのハッシュ空間サイズDを「160」とする。 If the number of virtual nodes after change = 10 is used, the hash space size per virtual node is 1600/10 = 160. Using this hash space size, as shown in FIG. 8B, the hash space size D of each virtual node is set to “160”.
次に、リバランス部18eは、その変更後のハッシュ空間サイズD=「160」の仮想ノードを、前述で変更した後の各ノード1〜5の仮想ノード数だけ割り振って行く。即ち、ノード1では変更後の仮想ノードが1個なので、図8(b)に示すように、ノード1において、変更後のハッシュ空間サイズD=「160」の仮想ノード{仮想ノードID「Node1−1」}が1個割り振られる。
Next, the rebalance unit 18e allocates the virtual nodes having the changed hash space size D = “160” by the number of virtual nodes of the
同様に、ノード2では変更後の仮想ノードが2個なので、サイズD=「160」の仮想ノード{仮想ノードID「Node2−1,Node2−2」}が2個割り振られる。以降、同様に図示するように、ノード3〜5まで変更後の仮想ノード2個〜3個が割り振られる。
Similarly, since there are two virtual nodes after the change in
上記のようなリバランス設計の結果、図8(b)に示すようなリバランス後の振分ID表が得られ、キャンセルがない場合に、これが各ノード15に配付される。各ノード15は、当該振分ID表に従って、振り分け処理を実行する。
As a result of the rebalance design as described above, a post-rebalance distribution ID table as shown in FIG. 8B is obtained, and this is distributed to each
(リバランシングキャンセル機能部18fの処理について)
以下、リバランシングキャンセル機能部18fの処理について説明する。リバランシングキャンセル機能部18fの処理についてもどのノード15で行ってもよいが、ここでは、前述したように、リバランス設計、及びリバランス後の振分ID表の配付を行う特権ノードが行うことを想定している。
(Regarding the processing of the rebalancing cancel
Hereinafter, the processing of the rebalancing cancel
リバランシングキャンセル機能部18fは、リバランス部18eにより、リバランスが必要であると判定された場合に、まず、ノード負荷計測部18dにより得られた全ノード15の負荷データに基づき、ノード毎負荷差分表19gを作成し、記憶部19に記憶する。
When the rebalancing cancel
図9の左側に、ノード毎負荷差分表19gの例を示す。図9の例に示すように、ノード毎負荷差分表19gは、ノード15毎の実測負荷と、平均値(全ノードの合計負荷÷ノード数、ここでは70)からの差分(偏差)からなる。なお、本例では、ノード単位の計算例を示しているが、ここでのノードは、「仮想ノード」であってもよい。
On the left side of FIG. 9, an example of a node-by-node load difference table 19g is shown. As shown in the example of FIG. 9, the node-by-node load difference table 19g includes an actually measured load for each
そして、ノード負荷計測部18dは、ノード毎負荷差分表19gを作成した時刻(=リバランスが必要であると判定された時刻であり、これをtとおく)における各ノードの負荷データ(差分のみでもよい)を、前回測定データ19hとして、記憶部19に格納する。前回測定データ19hが既に格納されている場合、既に格納されている「前回測定データ19h」は削除され、今回の「前回測定データ19h」が格納される。
Then, the node
次に、リバランシングキャンセル機能部18fは、tからリバランス設計にかかる時間(Δt)の後(つまり、時刻t+Δtの時点)に、現時点のノード負荷計測データ19d(各ノード15の負荷の実測データ)を取得し、当該現時点のノード負荷計測データ19dと、前回測定データ19hとから、ノード毎予測負荷比較表19g(キャンセル判定に係る表という意味でノード毎負荷差分表と同じ19gを付している)を作成する。なお、Δtは、予め定めた時間であってもよいし、リバランス部18eが計算に係るノード数等からΔtを推定し、リバランス部18eがリバランシングキャンセル機能部18fに対してΔtを通知することとしてもよい。なお、ノード負荷計測データ19dの更新時間間隔は、Δtよりも短い。
Next, the rebalancing cancel
図9の右側に、ノード毎予測負荷比較表19gの例を示す。当該ノード毎予測負荷比較表19gに示されるように、ノード毎予測負荷比較表19gは、現時点(t+Δt)でのノード毎の負荷と、tの時刻での差分("前差"と呼ぶ)と、予測負荷とを有する。予測負荷は、リバランスを実行したと仮定した場合における、各ノードの負荷である。リバランスにより、差分が解消されることが想定されるから、ここでの予測負荷は、「現時点での負荷‐前差」で求めている。例えば、図9の例で、ノードAにおける現時点(t+Δt)での負荷は125であり、前差が+68であるから、予測負荷は125−68=57となっている。 An example of the predicted load comparison table 19g for each node is shown on the right side of FIG. As shown in the per-node predicted load comparison table 19g, the per-node predicted load comparison table 19g is a load per node at the current time (t + Δt) and a difference at time t (referred to as “previous difference”). ) And a predicted load. The predicted load is the load on each node when it is assumed that rebalancing has been executed. Since it is assumed that the difference is eliminated by the rebalancing, the predicted load here is obtained by “current load-previous difference”. For example, in the example of FIG. 9, the load at the current time (t + Δt) in the node A is 125 and the front difference is +68, so the predicted load is 125−68 = 57.
そして、リバランシングキャンセル機能部18fは、以下の判定基準(1)、(2)のうちのいずれかが満たされるか否かを判定し、いずれかが満たされる場合に、tのタイミングで必要であると判定されたリバランスをキャンセルする。いずれも満たされない場合は、リバランスを実行することを決定する。
Then, the rebalancing
判定基準(1):ノード数に増減がある。 Determination criterion (1): There is an increase or decrease in the number of nodes.
判定基準(2):負荷予測値が、許容範囲外になるノードが存在する。 Criteria (2): There is a node whose predicted load value is outside the allowable range.
上記判定基準(1)のノード数の増減については、例えば、リバランシングキャンセル機能部18fが、リバランス部18eからリバランス設計結果(振分ID表)を取得することで判定できる。ここで、ノード数が増加する場合とは、例えば、負荷の増大が大きく、現状のノード数では不足し、ノードを追加することが必要になる場合等である。また、ノード数が減少する場合とは、例えば、負荷の減少が大きく、現状のノード数では大きすぎ、非効率であるため、ノードを削減する場合等である。
The increase / decrease in the number of nodes in the determination criterion (1) can be determined by, for example, the rebalancing
また、判定基準(2)について、許容範囲は予め定めておく値である。図9の例では、許容範囲を平均値から±20%としている。そして、図9の例では、ノードGが許容範囲外となるため、リバランスをキャンセルすると判定される。 In addition, regarding the criterion (2), the allowable range is a predetermined value. In the example of FIG. 9, the allowable range is ± 20% from the average value. In the example of FIG. 9, since the node G is out of the allowable range, it is determined to cancel the rebalance.
一方、図10に示す例では、全ノードについて、許容範囲内であるため、リバランスを実行すると判定される。 On the other hand, in the example shown in FIG. 10, since all nodes are within the allowable range, it is determined that rebalancing is to be executed.
また、判定基準(2)に関して、許容範囲外となるノードの個数が予め定めた閾値を超えた場合に、判定基準(2)を満たす、こととしてもよい。一例として、判定基準(2)を「許容範囲外のノードの個数>全ノード数の20%」とし、これを満たした場合にキャンセルする。この場合、図9、10の例では、予測値が3個以上許容範囲外の場合にキャンセルする。 Further, regarding the criterion (2), the criterion (2) may be satisfied when the number of nodes outside the allowable range exceeds a predetermined threshold. As an example, the criterion (2) is “the number of nodes outside the allowable range> 20% of the total number of nodes”, and if this is satisfied, the determination is canceled. In this case, in the examples of FIGS. 9 and 10, when three or more predicted values are outside the allowable range, the cancellation is performed.
ここで、リバランスをキャンセルするとは、例えば、リバランシングキャンセル機能部18fがリバランス部18eに対し、リバランス設計で得られた新たな振分ID表を、各ノード15に配付せずに破棄することを指示することである。また、リバランスを実行することを決定した場合、リバランシングキャンセル機能部18fは、リバランス部18eに対し、リバランス設計で得られた新たな振分ID表を、各ノード15に配付することを指示する。
Here, canceling the rebalance means, for example, that the rebalancing
図11を参照して、リバランシングキャンセル機能部18fの処理の効果を説明する。図11は、例えば、あるノードについての負荷の推移を示したものである。時刻tにおいてリバランスが必要であると判定される。その後、当該ノードの負荷が低下し、t+Δtの時点では、許容範囲(リバランスを行う必要のない範囲)に入っている。しかし、従来技術では、このような負荷の時間変化を考慮しないため、リバランスを行ってしまい、負荷が許容範囲外となり、再度リバランスが実行される。
With reference to FIG. 11, the effect of the processing of the rebalancing cancel
一方、リバランシングキャンセル機能部18fの判定機能により、t+Δtの時点でリバランスをキャンセルすると判定するので、無駄なリバランスを実行することなく、許容範囲の負荷を保つことができる。
On the other hand, the determination function of the rebalancing
(動作例)
次に、本実施の形態に係る分散システム10において、ノード15間の負荷の偏りを是正するリバランスの必要性の判定、及び、キャンセル判定等を実行する際の動作例を、図12〜図14のフローチャートを参照して説明する。本動作例は、例えば図3に示すハッシュ空間を前提とする。また、以下の動作例は、最初に説明したリバランス設計方法に対応する。
(Operation example)
Next, in the distributed
まず、図12に示すステップS1において、所定のノード(例:図3のノードB)の分散システム負荷リバランス部18eは、所定の周期で各ノードA〜Eから収集したノード負荷計測データ19dに基づき、各ノードA〜Eの負荷の平均値及び標準偏差、偏差並びに偏差/標準偏差の算出を行う。
First, in step S1 shown in FIG. 12, the distributed system load rebalancing unit 18e of a predetermined node (example: node B of FIG. 3) uses the node
次に、ステップS2において、リバランス部18eは、上記ステップS1での算出結果を集計データ19e(例:図6)として記憶部19に記録する。
Next, in step S2, the rebalance unit 18e records the calculation result in step S1 in the
ステップS3において、リバランス部18eは、上記ステップS2で記録したデータ19eに基づき、上述した3つの条件(1)〜(3)の何れか1つを満たすか否かを判定する。この結果、満たさなければ(No)、リバランスの処理を終了する。
In step S3, the rebalance unit 18e determines whether any one of the three conditions (1) to (3) described above is satisfied based on the
一方、その判定の結果、何れか1つを満たす場合、ステップS3において、リバランシングキャンセル機能部18fが、リバランシングキャンセル判定を実施する。
On the other hand, if any one of them is satisfied as a result of the determination, the rebalancing cancel
リバランシングキャンセル判定については図14を参照する。リバランシングキャンセル機能部18fは、リバランスが必要であると判定された時点(t)におけるノード毎負荷差分表19gを作成し、その後、t+Δtの時点で、当該ノード毎負荷差分表19gと、その時点のノード負荷計測データ19dとに基づいて、ノード毎予測負荷比較表19gを作成する(ステップS41)。そして、ステップS42において、リバランシングキャンセル機能部18fは、前述した判定基準(1)、判定基準(2)のうちのいずれかを満たすかどうかを判定し、満たす場合はリバランスをキャンセルし(ステップS43)、満たさない場合はキャンセルしない(ステップS44)。
Refer to FIG. 14 for rebalancing cancellation determination. The rebalancing
図12に戻り、リバランスをキャンセルする場合は、ステップS1に戻り、次のタイミングで、上記と同様に、リバランス実施の必要性を判定する。 Returning to FIG. 12, when canceling the rebalance, the process returns to step S <b> 1, and the necessity for rebalancing is determined at the next timing in the same manner as described above.
リバランスをキャンセルしない場合、ステップS5において、各ノードA〜Eの負荷量を検知し、例えば、高負荷ノードAの担当領域中の移譲領域を他ノードB,Cに移譲することで負荷の偏りを是正する、といった判断を行う。 When the rebalance is not canceled, the load amount of each node A to E is detected in step S5. For example, by transferring the transfer area in the assigned area of the high load node A to the other nodes B and C, the load bias To make corrections.
ステップS6において、リバランス部18eは、移譲元ノードの担当領域中の移譲領域のサイズ(=負荷量)を求め、ステップS7において、移譲先ノードの担当領域の許容可能なサイズを求める。 In step S6, the rebalancing unit 18e calculates the size (= load amount) of the transfer area in the transfer area of the transfer source node, and in step S7, determines the allowable size of the transfer area of the transfer destination node.
次に、図13に示すステップS8において、リバランス部18eは、移譲元ノードの移譲対象の担当領域を移譲可能な移譲先ノードが有るか否かを判定する。この判定は、移譲先ノードの担当領域の許容可能なサイズが、移譲元ノードの担当領域中の移譲領域を移譲可能であるか否かを検知して行う。この結果、移譲可能な移譲先ノーが無ければ(No)、リバランスの処理を終了する。 Next, in step S8 shown in FIG. 13, the rebalancing unit 18e determines whether or not there is a transfer destination node that can transfer the assigned area of the transfer source node. This determination is made by detecting whether or not the allowable size of the area in charge of the transfer destination node can transfer the transfer area in the area in charge of the transfer source node. As a result, if there is no transferable transfer destination no (No), the rebalancing process is terminated.
一方、移譲可能な移譲先ノードが有れば(Yes)、ステップS9において、リバランス部18eは、移譲元ノードの担当領域中の移譲領域を、移譲先ノードへ移譲する。 On the other hand, if there is a transfer destination node that can be transferred (Yes), in step S9, the rebalance unit 18e transfers the transfer area in the assigned area of the transfer source node to the transfer destination node.
この後、図13に示すステップS10において、リバランス部18eは、移譲元ノードの担当領域中の移譲領域の残りが有るか否かを判定する。この結果、残りが無ければ(No)、言い換えれば、移譲対象の担当領域が全て移譲完遂されていれば、リバランスの処理を終了する。 Thereafter, in step S10 shown in FIG. 13, the rebalancing unit 18e determines whether or not there is a remaining transfer area in the assigned area of the transfer source node. As a result, if there is no remaining (No), in other words, if all of the transfer target areas have been transferred, the rebalancing process ends.
一方、上記ステップS10の判定で残りが有れば(Yes)、ステップS11において、リバランス部18eは、移譲元ノードの残りの移譲領域が移譲可能な、移譲先ノードが有るか否かを判定する。この結果、移譲先ノードが無ければ(No)、リバランスの処理を終了する。 On the other hand, if there is a remaining in the determination in step S10 (Yes), in step S11, the rebalance unit 18e determines whether there is a transfer destination node to which the remaining transfer area of the transfer source node can be transferred. To do. As a result, if there is no transfer destination node (No), the rebalancing process is terminated.
上記ステップS11の判定の結果、残りの移譲領域が移譲可能な移譲先ノードが有れば(Yes)、ステップS12において、リバランス部18eは、移譲元ノードの残りの移譲領域を、上記ステップS10で存在が認められた移譲先ノードへ移譲する。 As a result of the determination in step S11, if there is a transfer destination node to which the remaining transfer area can be transferred (Yes), in step S12, the rebalancing unit 18e determines the remaining transfer area of the transfer source node in step S10. It is transferred to the transfer destination node whose existence is recognized in.
この後、上記ステップS10に戻って、リバランス部18eは、処理が終了するまでステップS10〜S12を繰り返す。また、前述したように、ステップS6以降の処理は、移譲元ノード毎に繰り返される。 Thereafter, returning to step S10, the rebalance unit 18e repeats steps S10 to S12 until the processing is completed. Further, as described above, the processing after step S6 is repeated for each transfer source node.
上記の処理により、リバランス後の振分ID表19bが作成され、各ノードに配付されることで、リバランシング後の振り分け処理が実行され、負荷の偏りが解消される。 By the above processing, the distribution ID table 19b after rebalancing is created and distributed to each node, whereby the distribution processing after rebalancing is executed, and the load bias is eliminated.
(実施の形態のまとめ)
以上、説明したように、本実施の形態により、通信サービスを利用する複数のクライアントマシンからの情報がネットワークを介して振り分けられる複数のノードを有する分散システムにおいて用いられるリバランス装置であって、前記複数のノードの負荷量に基づいて、当該複数のノード間の負荷量の偏りを抑制するリバランスが必要であるか否かを判定するリバランス処理手段と、前記リバランス処理手段により、リバランスが必要であると判定された場合において、前記リバランス後の前記複数のノードの予測負荷状態に基づいて、前記リバランスをキャンセルするか否かを判定するキャンセル処理手段とを備えるリバランス装置が提供される。当該リバランス装置は、前記複数のノードにおけるいずれかのノードであってもよいし、前記複数のノード以外の装置であってもよい。
(Summary of embodiment)
As described above, according to the present embodiment, a rebalancing apparatus used in a distributed system having a plurality of nodes to which information from a plurality of client machines using a communication service is distributed via a network, Based on the load amounts of a plurality of nodes, the rebalance processing means for determining whether or not the rebalance that suppresses the uneven load amount among the plurality of nodes is necessary, and the rebalance processing means And a cancel processing means for determining whether or not to cancel the rebalance based on the predicted load state of the plurality of nodes after the rebalance. Provided. The rebalancing device may be any node in the plurality of nodes, or may be a device other than the plurality of nodes.
前記キャンセル処理手段は、例えば、前記リバランス処理手段によりリバランスが必要であると判定された第1の時点から、前記リバランス処理手段によるリバランス設計にかかる時間が経過した第2の時点における前記複数のノードの負荷量と、前記第1の時点における前記複数のノードの負荷量とに基づいて、前記予測負荷状態を算出する。 The cancel processing means is, for example, at a second time when a time required for rebalance design by the rebalance processing means has elapsed from a first time when the rebalance processing means determines that rebalancing is necessary. The predicted load state is calculated based on the load amounts of the plurality of nodes and the load amounts of the plurality of nodes at the first time point.
また、例えば、前記予測負荷状態が、ノード数の増減を要する負荷状態であるか、又は、前記予測負荷状態が、許容範囲外の負荷量を持つ所定数のノードが存在する負荷状態である場合に、前記キャンセル処理手段は、前記リバランスをキャンセルすると判定する。 Further, for example, when the predicted load state is a load state that requires an increase or decrease in the number of nodes, or the predicted load state is a load state in which a predetermined number of nodes having a load amount outside an allowable range exists. In addition, the cancel processing means determines to cancel the rebalance.
また、前記キャンセル処理手段は、例えば、前記第1の時点において、当該第1の時点における前記複数のノードの負荷量の平均値からの差分をノード毎に算出し、前記第2の時点において、ノード毎に、当該第2の時点におけるノードの負荷量から前記差分を引くことにより、前記予測負荷状態を算出する。 In addition, for example, at the first time point, the cancel processing unit calculates a difference from an average value of load amounts of the plurality of nodes at the first time point for each node, and at the second time point, For each node, the predicted load state is calculated by subtracting the difference from the load amount of the node at the second time point.
なお、分散システム負荷リバランス部18eは、リバランス処理手段の例である。リバランシングキャンセル機能部18fは、キャンセル処理手段の例である。
The distributed system load rebalancing unit 18e is an example of a rebalance processing unit. The rebalancing cancel
本実施の形態に係る技術によれば、分散システムにおいて、時間経過の観点を含めてリバランスの実行が適切であるかを高速で判断し、実行すべきでない状況を特定することができる。よって、無駄なリバランスの実行を抑制できる。 According to the technique according to the present embodiment, in a distributed system, it is possible to determine at high speed whether rebalancing is appropriate, including the viewpoint of the passage of time, and to specify a situation that should not be performed. Therefore, execution of useless rebalancing can be suppressed.
(第1項)
通信サービスを利用する複数のクライアントマシンからの情報がネットワークを介して振り分けられる複数のノードを有する分散システムにおいて用いられるリバランス装置であって、
前記複数のノードの負荷量に基づいて、当該複数のノード間の負荷量の偏りを抑制するリバランスが必要であるか否かを判定するリバランス処理手段と、
前記リバランス処理手段により、リバランスが必要であると判定された場合において、前記リバランス後の前記複数のノードの予測負荷状態に基づいて、前記リバランスをキャンセルするか否かを判定するキャンセル処理手段と
を備えることを特徴とするリバランス装置。
(第2項)
前記キャンセル処理手段は、
前記リバランス処理手段によりリバランスが必要であると判定された第1の時点から、前記リバランス処理手段によるリバランス設計にかかる時間が経過した第2の時点における前記複数のノードの負荷量と、前記第1の時点における前記複数のノードの負荷量とに基づいて、前記予測負荷状態を算出する
ことを特徴とする第1項に記載のリバランス装置。
(第3項)
前記予測負荷状態が、ノード数の増減を要する負荷状態であるか、又は、前記予測負荷状態が、許容範囲外の負荷量を持つ所定数のノードが存在する負荷状態である場合に、前記キャンセル処理手段は、前記リバランスをキャンセルすると判定する
ことを特徴とする第1項又は第2項に記載のリバランス装置。
(第4項)
前記キャンセル処理手段は、
前記第1の時点において、当該第1の時点における前記複数のノードの負荷量の平均値からの差分をノード毎に算出し、前記第2の時点において、ノード毎に、当該第2の時点におけるノードの負荷量から前記差分を引くことにより、前記予測負荷状態を算出する
ことを特徴とする第2項に記載のリバランス装置。
(第5項)
通信サービスを利用する複数のクライアントマシンからの情報がネットワークを介して振り分けられる複数のノードを有する分散システムにおいて用いられるリバランス装置が実行するリバランス方法であって、
前記複数のノードの負荷量に基づいて、当該複数のノード間の負荷量の偏りを抑制するリバランスが必要であるか否かを判定するリバランス判定ステップと、
前記リバランス判定ステップにより、リバランスが必要であると判定された場合において、前記リバランス後の前記複数のノードの予測負荷状態に基づいて、前記リバランスをキャンセルするか否かを判定するキャンセル判定ステップと
を備えることを特徴とするリバランス方法。
(第6項)
前記キャンセル判定ステップにおいて、前記リバランス装置は、
前記リバランス判定ステップによりリバランスが必要であると判定された第1の時点から、リバランス設計にかかる時間が経過した第2の時点における前記複数のノードの負荷量と、前記第1の時点における前記複数のノードの負荷量とに基づいて、前記予測負荷状態を算出する
ことを特徴とする第5項に記載のリバランス方法。
(第7項)
前記キャンセル判定ステップにおいて、前記予測負荷状態が、ノード数の増減を要する負荷状態であるか、又は、前記予測負荷状態が、許容範囲外の負荷量を持つ所定数のノードが存在する負荷状態である場合に、前記リバランス装置は、前記リバランスをキャンセルすると判定する
ことを特徴とする第5項又は第6項に記載のリバランス方法。
(第8項)
コンピュータを、第1項ないし第4項のうちいずれか1項に記載のリバランス装置における各手段として機能させるためのプログラム。
以上、本発明の実施例について詳述したが、本発明は斯かる特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。
(Section 1)
A rebalancing device used in a distributed system having a plurality of nodes to which information from a plurality of client machines using a communication service is distributed via a network,
Rebalancing processing means for determining whether or not rebalancing is necessary to suppress the uneven load amount between the plurality of nodes based on the load amounts of the plurality of nodes;
When the rebalancing processing unit determines that rebalancing is necessary, based on the predicted load state of the plurality of nodes after the rebalancing, canceling whether to cancel the rebalancing or not Processing means and
A rebalancing device comprising:
(Section 2)
The cancellation processing means
The load amounts of the plurality of nodes at the second time point when the time required for the rebalance design by the rebalance processing unit has elapsed from the first time point when the rebalance processing unit determines that rebalancing is necessary. And calculating the predicted load state based on load amounts of the plurality of nodes at the first time point.
The rebalancing device according to
(Section 3)
If the predicted load state is a load state that requires an increase or decrease in the number of nodes, or the predicted load state is a load state in which a predetermined number of nodes having a load amount outside the allowable range exists, the cancellation is performed. The processing means determines to cancel the rebalance
The rebalancing apparatus according to
(Section 4)
The cancellation processing means
At the first time point, a difference from the average load amount of the plurality of nodes at the first time point is calculated for each node, and at the second time point, for each node, at the second time point The predicted load state is calculated by subtracting the difference from the load amount of the node.
The rebalancing device according to
(Section 5)
A rebalancing method executed by a rebalancing device used in a distributed system having a plurality of nodes to which information from a plurality of client machines using a communication service is distributed via a network,
A rebalance determination step for determining whether or not rebalancing is required to suppress the uneven load amount between the plurality of nodes based on the load amounts of the plurality of nodes;
Cancellation for determining whether or not to cancel the rebalancing based on the predicted load state of the plurality of nodes after the rebalancing when the rebalancing determination step determines that rebalancing is necessary Judgment step and
A rebalancing method comprising:
(Section 6)
In the cancellation determination step, the rebalance device
Load amounts of the plurality of nodes at the second time point when the time required for rebalance design has elapsed from the first time point when the rebalance determination step determines that rebalancing is necessary, and the first time point The predicted load state is calculated based on the load amounts of the plurality of nodes at
6. The rebalancing method according to
(Section 7)
In the cancellation determination step, the predicted load state is a load state that requires an increase or decrease in the number of nodes, or the predicted load state is a load state in which a predetermined number of nodes having a load amount outside an allowable range exists. In some cases, the rebalancing device determines to cancel the rebalancing.
7. The rebalancing method according to
(Section 8)
The program for functioning a computer as each means in the rebalancing apparatus of any one of
As mentioned above, although the Example of this invention was explained in full detail, this invention is not limited to such specific embodiment, In the range of the summary of this invention described in the claim, various deformation | transformation・ Change is possible.
10 分散システム
11 クライアントマシン
12 ネットワーク
13 ロードバランサ
14 クラスタ
15 ノード
18 制御部
18a ノード識別子管理部
18b 振分部
18c 信号処理部
18d ノード負荷計測部
18e 分散システム負荷リバランス部
18f リバランシングキャンセル機能部
19 記憶部
19a ノード識別子管理表
19b 振分ID表
19c データ
19d ノード負荷計測データ
19e 分散システム負荷集計データ
19f 呼制御状態フラグ
19g ノード毎負荷差分表、ノード毎予測負荷比較表
19h 前回測定データ
DESCRIPTION OF
Claims (5)
前記複数のノードの負荷量に基づいて、当該複数のノード間の負荷量の偏りを抑制するリバランスが必要であるか否かを判定するリバランス処理手段と、
前記リバランス処理手段により、リバランスが必要であると判定された場合において、前記リバランス後の前記複数のノードの予測負荷状態に基づいて、前記リバランスをキャンセルするか否かを判定するキャンセル処理手段とを備え、
前記キャンセル処理手段は、
前記リバランス処理手段によりリバランスが必要であると判定された第1の時点において、当該第1の時点における前記複数のノードの負荷量の平均値からの差分をノード毎に算出し、前記第1の時点から、前記リバランス処理手段によるリバランス設計にかかる時間が経過した第2の時点において、ノード毎に、当該第2の時点におけるノードの負荷量から前記差分を引くことにより、前記予測負荷状態を算出する
ことを特徴とするリバランス装置。 A rebalancing device used in a distributed system having a plurality of nodes to which information from a plurality of client machines using a communication service is distributed via a network,
Rebalancing processing means for determining whether or not rebalancing is necessary to suppress the uneven load amount between the plurality of nodes based on the load amounts of the plurality of nodes;
When the rebalancing processing unit determines that rebalancing is necessary, based on the predicted load state of the plurality of nodes after the rebalancing, canceling whether to cancel the rebalancing or not Processing means ,
The cancellation processing means
At a first time point when the rebalance processing unit determines that rebalancing is necessary, a difference from an average value of load amounts of the plurality of nodes at the first time point is calculated for each node, By subtracting the difference from the load amount of the node at the second time point for each node at the second time point when the time required for the rebalance design by the rebalance processing unit has elapsed from the time point 1, the prediction is performed. A rebalancing device that calculates a load state .
ことを特徴とする請求項1に記載のリバランス装置。 If the predicted load state is a load state that requires an increase or decrease in the number of nodes, or the predicted load state is a load state in which a predetermined number of nodes having a load amount outside the allowable range exists, the cancellation is performed. The rebalancing apparatus according to claim 1, wherein the processing unit determines to cancel the rebalancing.
前記複数のノードの負荷量に基づいて、当該複数のノード間の負荷量の偏りを抑制するリバランスが必要であるか否かを判定するリバランス判定ステップと、
前記リバランス判定ステップにより、リバランスが必要であると判定された場合において、前記リバランス後の前記複数のノードの予測負荷状態に基づいて、前記リバランスをキャンセルするか否かを判定するキャンセル判定ステップとを備え、
前記キャンセル判定ステップにおいて、前記リバランス装置は、
前記リバランス判定ステップによりリバランスが必要であると判定された第1の時点において、当該第1の時点における前記複数のノードの負荷量の平均値からの差分をノード毎に算出し、前記第1の時点から、リバランス設計にかかる時間が経過した第2の時点において、ノード毎に、当該第2の時点におけるノードの負荷量から前記差分を引くことにより、前記予測負荷状態を算出する
ことを特徴とするリバランス方法。 A rebalancing method executed by a rebalancing device used in a distributed system having a plurality of nodes to which information from a plurality of client machines using a communication service is distributed via a network,
A rebalance determination step for determining whether or not rebalancing is required to suppress the uneven load amount between the plurality of nodes based on the load amounts of the plurality of nodes;
Cancellation for determining whether or not to cancel the rebalancing based on the predicted load state of the plurality of nodes after the rebalancing when the rebalancing determination step determines that rebalancing is necessary A determination step ,
In the cancellation determination step, the rebalance device
At a first time point when rebalancing is determined by the rebalance determining step, a difference from an average value of load amounts of the plurality of nodes at the first time point is calculated for each node, The predicted load state is calculated by subtracting the difference from the load amount of the node at the second time point for each node at the second time point when the time required for rebalance design has elapsed from the time point 1. A rebalancing method characterized by
ことを特徴とする請求項3に記載のリバランス方法。 In the cancellation determination step, the rebalancing device is configured such that the predicted load state is a load state that requires an increase or decrease in the number of nodes, or the predicted load state has a predetermined number of nodes having a load amount outside an allowable range. The rebalancing method according to claim 3 , wherein the rebalancing device determines that the rebalancing is canceled when a load state exists.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016003875A JP6433926B2 (en) | 2016-01-12 | 2016-01-12 | Rebalancing device, rebalancing method, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016003875A JP6433926B2 (en) | 2016-01-12 | 2016-01-12 | Rebalancing device, rebalancing method, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2017126131A JP2017126131A (en) | 2017-07-20 |
| JP6433926B2 true JP6433926B2 (en) | 2018-12-05 |
Family
ID=59364356
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2016003875A Active JP6433926B2 (en) | 2016-01-12 | 2016-01-12 | Rebalancing device, rebalancing method, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6433926B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115803715B (en) * | 2020-08-28 | 2025-02-21 | 阿里巴巴集团控股有限公司 | Intelligent Process Routing in Partitioned Database Management Systems |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000163288A (en) * | 1998-11-30 | 2000-06-16 | Nec Corp | Data storage system, data relocation method and recording medium |
| JP5969315B2 (en) * | 2012-08-23 | 2016-08-17 | 日本電信電話株式会社 | Data migration processing system and data migration processing method |
| JP6001480B2 (en) * | 2013-03-25 | 2016-10-05 | Kddi株式会社 | Migration processing method and processing apparatus |
-
2016
- 2016-01-12 JP JP2016003875A patent/JP6433926B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2017126131A (en) | 2017-07-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107231399B (en) | Capacity expansion method and device for high-availability server cluster | |
| JP5557590B2 (en) | Load balancing apparatus and system | |
| CN103188345B (en) | Distributed dynamic load management system and method | |
| US10715479B2 (en) | Connection redistribution in load-balanced systems | |
| CN102571772B (en) | Hot spot balancing method for metadata server | |
| JP5915792B2 (en) | Distributed processing system and distributed processing method | |
| CN102143046A (en) | Load balancing method, equipment and system | |
| JPWO2018220708A1 (en) | Resource allocation system, management device, method and program | |
| WO2014024863A1 (en) | Load distribution method taking into account each node in multi-level hierarchy | |
| Zhang et al. | Tuning the aggressive TCP behavior for highly concurrent HTTP connections in intra-datacenter | |
| CN105872061B (en) | A kind of server set group managing means, apparatus and system | |
| US9760370B2 (en) | Load balancing using predictable state partitioning | |
| JP6272190B2 (en) | Computer system, computer, load balancing method and program thereof | |
| CN106209563A (en) | A kind of cloud computing platform network virtualization implementation method and accordingly plug-in unit and agency | |
| CN106131227A (en) | Balancing method of loads, meta data server system and load balance system | |
| JP5154313B2 (en) | SIP message distribution method and SIP message distribution apparatus | |
| JP2016527780A (en) | Distribution of creator systems among lease agent systems | |
| US8854977B2 (en) | Relay node | |
| CN103401799A (en) | Method and device for realizing load balance | |
| WO2025029345A1 (en) | System and method for dynamic routing and scalable management of endpoint device communications | |
| CN104219325A (en) | A SOA load balancing device and routing algorithm using the device | |
| JP2017146848A (en) | Rebalancing device, rebalancing method, and program | |
| JP6433926B2 (en) | Rebalancing device, rebalancing method, and program | |
| CN106506647A (en) | A kind of client has the intelligence community cloud storage system of data backup device | |
| JP6325995B2 (en) | Distributed system, load balancing method and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20171218 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180820 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180828 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20181029 |
|
| 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: 20181106 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20181107 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6433926 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |