JP5690287B2 - Load balancing program and load balancing apparatus - Google Patents
Load balancing program and load balancing apparatus Download PDFInfo
- Publication number
- JP5690287B2 JP5690287B2 JP2012006932A JP2012006932A JP5690287B2 JP 5690287 B2 JP5690287 B2 JP 5690287B2 JP 2012006932 A JP2012006932 A JP 2012006932A JP 2012006932 A JP2012006932 A JP 2012006932A JP 5690287 B2 JP5690287 B2 JP 5690287B2
- Authority
- JP
- Japan
- Prior art keywords
- existing
- processing device
- processing
- assigned
- identifier
- 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
- 238000012545 processing Methods 0.000 claims description 414
- 238000000034 method Methods 0.000 claims description 76
- 230000008569 process Effects 0.000 claims description 44
- 230000006870 function Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 10
- 238000001514 detection method Methods 0.000 description 5
- 238000013459 approach Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 230000001174 ascending effect Effects 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 230000010365 information processing Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 239000000126 substance Substances 0.000 description 2
- 230000004083 survival effect Effects 0.000 description 2
- 241001522296 Erithacus rubecula Species 0.000 description 1
- 235000014510 cooky Nutrition 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Computer And Data Communications (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Description
本発明は、分散処理を行う分散システムにおける負荷分散の技術に関する。 The present invention relates to a load distribution technique in a distributed system that performs distributed processing.
分散システムは、複数の物理的な処理装置(サーバ)を含み、必要であればこれらの処理装置を仮想化することで、所定のセッション制御を実現する。また、分散システムは、一般的には、1または複数の負荷分散装置を含む。負荷分散装置は、端末(クライアント)からセッション接続要求などのメッセージを受信すると、所定の方法に従ってメッセージを処理装置に振り分ける。つまり、分散システムの各処理装置は、負荷を分担する。各処理装置は、振り分けられたメッセージを呼処理し、端末に対して所定のサービスを提供する。 The distributed system includes a plurality of physical processing devices (servers), and implements predetermined session control by virtualizing these processing devices if necessary. The distributed system generally includes one or a plurality of load distribution apparatuses. When receiving a message such as a session connection request from a terminal (client), the load balancer distributes the message to the processing device according to a predetermined method. That is, each processing device of the distributed system shares the load. Each processing device performs call processing on the distributed message and provides a predetermined service to the terminal.
前記所定の方法としては、例えば、コンシステント・ハッシュ法がある。なお、非特許文献1は、コンシステント・ハッシュ法について開示している。コンシステント・ハッシュ法は、処理装置を識別する処理装置識別子と、処理装置に振り分けるメッセージに含まれ、呼処理の対象となるデータの実体を識別するデータ識別子と、に基づいて、どの処理装置にどのメッセージを振り分けるかを決定する方法である。コンシステント・ハッシュ法は、例えば、分散データベースシステムにおいて利用されている。
An example of the predetermined method is a consistent hash method. Non-Patent
具体的に、どのようにしてメッセージの振り分けが決定されるかを、図6を参照して説明する。図6は、コンシステント・ハッシュ法を説明するためのID(Identifier)空間の概念図である。処理装置識別子は、例えば、処理装置のIP(Internet Protocol)アドレス、処理装置名などに、ハッシュ関数を作用させて得られた値である。負荷分散装置は、分散システムを構成する処理装置の処理装置識別子をID空間に配置する。図6において、処理装置識別子は、「●」で示されている。 Specifically, how message distribution is determined will be described with reference to FIG. FIG. 6 is a conceptual diagram of an ID (Identifier) space for explaining the consistent hash method. The processing device identifier is, for example, a value obtained by applying a hash function to an IP (Internet Protocol) address, a processing device name, or the like of the processing device. The load balancer places the processing device identifiers of the processing devices constituting the distributed system in the ID space. In FIG. 6, the processing device identifier is indicated by “●”.
ID空間は、図6に示すようにリング状で描写されるハッシュ空間である。処理装置識別子は、例えば、その値に基づいてID空間において時計回りに昇順に配置される。メッセージがある処理装置に振り分けられるとき、データ識別子は、その値に基づいてハッシュ空間に写像して配置される。データ識別子も、その値に基づいてID空間において時計回りに昇順に配置される。図6において、データ識別子は、「○」で示されている。 The ID space is a hash space depicted in a ring shape as shown in FIG. For example, the processing device identifiers are arranged in ascending order in the clockwise direction in the ID space based on the value. When the message is distributed to a certain processing device, the data identifier is mapped and arranged in the hash space based on the value. Data identifiers are also arranged in ascending order in the clockwise direction in the ID space based on their values. In FIG. 6, the data identifier is indicated by “◯”.
このとき、処理装置は、自身の処理装置識別子の直近の処理装置識別子の配置場所から自身の処理装置識別子の配置場所まで時計回りに辿る円弧上に配置されるデータ識別子を含むメッセージを呼処理する。ここで、「直近の処理装置識別子」とは、ID空間において、対象の処理装置識別子の値よりも小さな値を持つ処理装置識別子のうち最も大きな値を持つ処理装置識別子を意味する。しかし、対象の処理装置識別子の値がID空間において、最も小さな値を持つ場合には、直近の処理装置識別子は、ID空間において、最も大きな値を持つこととする。すると、直近の処理装置識別子の配置場所から対象の処理装置識別子の配置場所まで時計回りに辿る円弧が、対象の処理装置識別子で識別される処理装置がメッセージの呼処理を担当する範囲、すなわち「担当範囲」である。また、図6において、ID空間に配置される対象のデータ識別子と、そのデータ識別子を含むメッセージの呼処理を行う処理装置である「担当処理装置」との関係である担当関係は、矢印で示されている。 At this time, the processing device performs call processing on the message including the data identifier arranged on the arc that traces clockwise from the location of the processing device identifier nearest to its own processing device identifier to the location of its own processing device identifier. . Here, the “most recent processing device identifier” means the processing device identifier having the largest value among the processing device identifiers having a value smaller than the value of the target processing device identifier in the ID space. However, when the value of the target processing device identifier has the smallest value in the ID space, the latest processing device identifier has the largest value in the ID space. Then, the arc that traces clockwise from the location of the latest processing device identifier to the location of the target processing device identifier is the range in which the processing device identified by the target processing device identifier is in charge of call processing of the message, that is, “ “Responsibility”. Further, in FIG. 6, a responsible relationship that is a relationship between a target data identifier arranged in the ID space and a “responsible processing device” that is a processing device that performs call processing of a message including the data identifier is indicated by an arrow. Has been.
図6によれば、処理装置識別子A、B、Cの値にAの値<Bの値<Cの値という関係があるとすると、時計回りにA→B→Cの順番に処理装置識別子が配置される。また、データ識別子Xの値は、Aの値<Xの値<Bの値という関係を満たすとすると、処理装置識別子Aおよび処理装置識別子Bの間に配置される。よって、データ識別子Xを含むメッセージについては、処理装置識別子Bで識別される処理装置が呼処理を担当する。つまり、処理装置識別子Bで識別される処理装置は、データ識別子Xを含むメッセージの呼処理にとっての担当処理装置である。また、図6において、処理装置識別子Aから処理装置識別子Bまでに辿る円弧が、処理装置識別子Bで識別される処理装置の担当範囲となる。 According to FIG. 6, assuming that the values of the processing device identifiers A, B, and C have a relationship of A value <B value <C value, the processing device identifiers are clockwise in order of A → B → C. Be placed. The value of the data identifier X is arranged between the processing device identifier A and the processing device identifier B, assuming that the relationship of A value <X value <B value is satisfied. Therefore, for a message including the data identifier X, the processing device identified by the processing device identifier B is in charge of call processing. That is, the processing device identified by the processing device identifier B is a processing device in charge of call processing of a message including the data identifier X. Further, in FIG. 6, an arc that traces from the processing device identifier A to the processing device identifier B is the assigned range of the processing device identified by the processing device identifier B.
ところで、コンシステント・ハッシュ法によれば、処理装置識別子の値およびデータ識別子の値は、例えば、ハッシュ関数を用いて無作為な値として設定される。すると、各処理装置の担当範囲、つまり各処理装置が呼処理するメッセージの処理量は、確率的に均一に近づく。よって、確率的に均一に近づく負荷分散が行われる。 By the way, according to the consistent hash method, the value of the processing device identifier and the value of the data identifier are set as random values using, for example, a hash function. Then, the assigned range of each processing device, that is, the processing amount of the message processed by each processing device approaches the probability uniformly. Therefore, load distribution that approaches a uniform probability is performed.
ただ、負荷分散が均一になるか否かは、確率的に決まるため、均一にならない場合がある。コンシステント・ハッシュ法では、1つの処理装置に(1または)複数の処理装置識別子を割り当て、1つの処理装置を複数の仮想的な処理装置の集合として実現する手段がある。この手段は、負荷分散装置が実行する。ある処理装置が分担する負荷の量は、その処理装置の担当範囲の長さ(サイズ)に比例する。前記手段により、ある処理装置の担当範囲の長さは、仮想的な処理装置の担当範囲の合計値となる。(仮想的ではない)各処理装置に対するこの合計値の分布は、大数の法則により、仮想的な処理装置の数が多いほど平均値に近づく。よって、負荷分散を均一に近づけることができ、負荷分散性を向上することができる。 However, since whether or not load distribution is uniform is determined stochastically, it may not be uniform. In the consistent hash method, there is means for allocating one or more processing device identifiers to one processing device and realizing one processing device as a set of a plurality of virtual processing devices. This means is executed by the load balancer. The amount of load shared by a certain processing apparatus is proportional to the length (size) of the assigned range of that processing apparatus. By the above means, the length of the assigned range of a certain processing device becomes the total value of the assigned range of the virtual processing device. The distribution of the total value for each processing device (not virtual) approaches the average value as the number of virtual processing devices increases according to the law of large numbers. Therefore, the load distribution can be made uniform and the load distribution can be improved.
しかし、一般的に、分散システムを構成する処理装置の処理性能は、各処理装置間で異なる。よって、負荷分散を確率的に決める手法を用いると、処理性能の高い処理装置が僅かな負荷しか分担せず、遊休資源が発生したり、処理性能の低い処理装置が、処理しきれない程の膨大な負荷を分担したりする場合が生じる。このような場合、分散システム全体の負荷分散性の低下を招く。また、このような事態を解消するために、各処理装置間の処理性能の違いを考慮して各処理装置が分担する負荷の量を変化させたいという要求がある。 However, generally, the processing performance of the processing devices constituting the distributed system differs among the processing devices. Therefore, using a method that determines load distribution stochastically, processing devices with high processing performance share only a small load, and idle resources are generated, or processing devices with low processing performance cannot be processed. In some cases, an enormous load is shared. In such a case, the load distribution of the entire distributed system is reduced. Further, in order to solve such a situation, there is a demand for changing the amount of load shared by each processing device in consideration of the difference in processing performance between the processing devices.
このような事情に鑑みて、本発明は、処理装置に複数の処理装置識別子を割り当てることができる負荷分散装置において、処理装置の処理性能の違いに応じて、分散システムにおける負荷分散を最適化することを目的とする。 In view of such circumstances, the present invention optimizes load distribution in a distributed system according to a difference in processing performance of processing devices in a load distribution device capable of assigning a plurality of processing device identifiers to the processing devices. For the purpose.
前記課題を解決するため、請求項1に記載の発明は、クライアントにサービスを提供する処理装置と、コンシステント・ハッシュ法により前記クライアントから得られるメッセージを前記処理装置に振り分ける負荷分散装置と、が通信可能に接続されている分散システムにおいて、前記処理装置に対して、1または複数の識別子を割り当てることで、メッセージの呼処理を担当するための1または複数の担当範囲を、コンシステント・ハッシュ法のID空間に設定することができるように前記負荷分散装置を機能させる負荷分散プログラムであって、前記負荷分散装置の記憶部が、前記分散システムを構成する既存の処理装置に割り当てられた1または複数の識別子である既存識別子の値と、前記既存識別子に対して設定されている担当範囲である1または複数の既存担当範囲のサイズと、前記既存の処理装置が有する1または複数の前記既存担当範囲を合わせた合計既存担当範囲のサイズと、前記既存の処理装置の処理性能を示す既存性能指標値と、を記憶しており、前記負荷分散装置の制御部に、前記分散システムに追加された新たな処理装置を検出する処理と、前記新たな処理装置の処理性能を示す新規性能指標値を特定する処理と、前記新たな処理装置に割り当てられる識別子である1または複数の新規識別子を、特定の既存の処理装置が有する既存担当範囲に配置するとき、すべての前記既存の処理装置の合計既存担当範囲のサイズの合計値に対する、前記特定の既存の処理装置の合計既存担当範囲のサイズの比と、前記新規性能指標値およびすべての既存性能指標値の合計値に対する、前記特定の既存の処理装置の既存性能指標値の比と、を等しく、または略等しくする処理と、を実行させることを特徴とする。
In order to solve the above-described problem, the invention according to
請求項2に記載の発明は、請求項1に記載の発明において、前記負荷分散装置の制御部に、前記既存性能指標値に対する前記合計既存担当範囲のサイズの割合を、前記既存の処理装置ごとに算出する処理と、前記割合が相対的に大きな既存の処理装置の既存担当範囲に配置する新規識別子の個数を、前記割合が相対的に小さな既存の処理装置が有する既存担当範囲に配置する新規識別子の個数と同等またはそれよりも多くする処理と、を実行させることを特徴とする。
Invention according to
請求項3に記載の発明は、請求項1または請求項2に記載の発明において、前記負荷分散装置の制御部に、前記新規識別子が配置される既存担当範囲を有する前記既存の処理装置において、少なくとも前記既存の処理装置が有する1または複数の既存担当範囲のうち、そのサイズが最大となる既存担当範囲に前記新規識別子を配置する処理を実行させることを特徴とする。
The invention according to
請求項4に記載の発明は、クライアントにサービスを提供する処理装置と、コンシステント・ハッシュ法により前記クライアントから得られるメッセージを前記処理装置に振り分ける負荷分散装置と、が通信可能に接続されている分散システムにおいて、前記処理装置に対して、1または複数の識別子を割り当てることで、メッセージの呼処理を担当するための1または複数の担当範囲を、コンシステント・ハッシュ法のID空間に設定することができる負荷分散装置であって、前記負荷分散装置の記憶部が、前記分散システムを構成する既存の処理装置に割り当てられた1または複数の識別子である既存識別子の値と、前記既存識別子に対して設定されている担当範囲である1または複数の既存担当範囲のサイズと、前記既存の処理装置が有する1または複数の前記既存担当範囲を合わせた合計既存担当範囲のサイズと、前記既存の処理装置の処理性能を示す既存性能指標値と、を記憶しており、前記負荷分散装置の制御部に、前記分散システムに追加された新たな処理装置を検出する制御と、前記新たな処理装置の処理性能を示す新規性能指標値を特定する制御と、前記新たな処理装置に割り当てられる識別子である1または複数の新規識別子を、特定の既存の処理装置が有する既存担当範囲に配置するとき、すべての前記既存の処理装置の合計既存担当範囲のサイズの合計値に対する、前記特定の既存の処理装置の合計既存担当範囲のサイズの比と、前記新規性能指標値およびすべての既存性能指標値の合計値に対する、前記特定の既存の処理装置の既存性能指標値の比と、を等しく、または略等しくする制御と、を実行することを特徴とする。
According to a fourth aspect of the present invention, a processing device that provides a service to a client and a load distribution device that distributes a message obtained from the client to the processing device by a consistent hash method are communicably connected. In a distributed system, by assigning one or more identifiers to the processing device, setting one or a plurality of responsible ranges for handling message call processing in the ID space of the consistent hash method A load distribution device that can store a value of an existing identifier that is one or more identifiers assigned to an existing processing device that constitutes the distributed system, and a storage unit of the load distribution device The size of one or a plurality of existing charge ranges that are the charge ranges set in advance, and the existing processing device Storing the total size of the existing assigned range including the one or more existing assigned ranges and the existing performance index value indicating the processing performance of the existing processing device, and storing it in the control unit of the load balancer Control for detecting a new processing device added to the distributed system, control for specifying a new performance index value indicating processing performance of the new processing device, and an identifier assigned to the
請求項1、4に記載の発明によれば、分散システムを構成する既存の処理装置の処理性能が均一でない、つまり性能指標値が同一でない場合であっても、新たな処理装置を追加するときは、新たな処理装置を含む各処理装置のそれぞれの性能指標値の比に合致するといった調整を実現できるように、新たな処理装置の仮想識別子の値を決定する。これにより、既存の処理装置に対して負荷を均等に分散させたいという要求を満たしつつも、処理装置の処理性能の不均一性と負荷分散性とを両立する。その結果、処理装置の処理性能の違いに応じて、分散システムにおける負荷分散を最適化することができる。 According to the first and fourth aspects of the present invention, when a new processing device is added even if the processing performance of the existing processing devices constituting the distributed system is not uniform, that is, the performance index values are not the same. Determines the value of the virtual identifier of the new processing device so that the adjustment of matching the ratio of the performance index values of the respective processing devices including the new processing device can be realized. As a result, while satisfying the demand for evenly distributing the load to the existing processing apparatus, both the non-uniformity of the processing performance of the processing apparatus and the load distribution are compatible. As a result, load distribution in the distributed system can be optimized according to the difference in processing performance of the processing devices.
請求項2に記載の発明によれば、相対的に大きな負荷を分担する既存の処理装置の担当範囲内に、新たな処理装置の仮想識別子をより多く配置し、そのような既存の処理装置が分担する負荷を優先的に小さくすることができる。よって、新たな処理装置を追加するときは、前記した、新たな処理装置を含む各処理装置のそれぞれの性能指標値の比に合致するような調整を、より高い精度で行うことができる。 According to the second aspect of the present invention, a larger number of virtual identifiers of new processing devices are arranged in a range of responsibility of existing processing devices that share a relatively large load, and such existing processing devices are The shared load can be reduced preferentially. Therefore, when a new processing device is added, the adjustment that matches the ratio of the performance index values of the respective processing devices including the new processing device can be performed with higher accuracy.
請求項3に記載の発明によれば、既存の処理装置が有する1または複数の担当範囲のうち、新たな処理装置に譲るに相応しい担当範囲を特定することができる。よって、新たな処理装置を追加するときは、前記した、新たな処理装置を含む各処理装置のそれぞれの性能指標値の比に合致するような調整を、より高い精度で行うことができる。 According to the third aspect of the present invention, it is possible to specify a responsible range suitable for handing over to a new processing device among one or a plurality of responsible ranges possessed by an existing processing device. Therefore, when a new processing device is added, the adjustment that matches the ratio of the performance index values of the respective processing devices including the new processing device can be performed with higher accuracy.
本発明によれば、処理装置に複数の処理装置識別子を割り当てることができる負荷分散装置において、処理装置の処理性能の違いに応じて、分散システムにおける負荷分散を最適化することができる。 According to the present invention, in a load distribution apparatus that can assign a plurality of processing apparatus identifiers to a processing apparatus, load distribution in the distributed system can be optimized according to the difference in processing performance of the processing apparatus.
≪構成≫
まず、本実施形態の構成について説明する。
図1は、分散システムの構成図である。この分散システムは、負荷分散装置1と、処理装置2と、クライアント3とを含む。この分散システムは、複数の処理装置2が協調してセッション制御を行い、クライアント3に所定のサービスを提供する。前記セッション制御は、例えば、呼制御であり、SIP(Session Initiation Protocol)を使用して、インターネット電話などのサービスが提供される。
≪Configuration≫
First, the configuration of the present embodiment will be described.
FIG. 1 is a configuration diagram of a distributed system. The distribution system includes a
負荷分散装置1は、クライアント3から受信したメッセージを、例えばコンシステント・ハッシュ法によって、処理装置2に振り分ける。前記メッセージは、例えばSIP信号であり、セッション接続要求などを含む。
処理装置2は、負荷分散装置1から振り分けられたメッセージを呼処理し、クライアント3にサービスを提供する。処理装置2は、計算機やコンピュータなどの物理的な装置であってもよいし、仮想マシンなどの論理的な装置であってもよい。分散システムは、複数の処理装置2などのコンピュータ資源を仮想化して動作するクラスタシステムとすることができる。コンピュータ資源の仮想化には、例えば、VMware(登録商標)を用いることができる。
クライアント3は、メッセージを負荷分散装置1に送信し、処理装置2が提供するサービスを利用する。
The
The
The
負荷分散装置1と、処理装置2と、クライアント3とはいずれも、入力部、出力部、制御部および記憶部といったハードウェアを含むコンピュータである。入力部は、例えば、入力インタフェースから構成される。出力部は、例えば、出力インタフェースから構成される。制御部は、例えば、CPU(Central Processing Unit)や専用回路から構成される。記憶部は、例えば、RAM(Random Access Memory)、ROM(Read Only Memory)、HDD(Hard Disk Drive)、フラッシュメモリの記憶媒体から構成される。前記制御部がCPUから構成される場合、その制御部を含むコンピュータによる情報処理は、CPUによるプログラム実行処理で実現する。また、そのコンピュータが含む記憶部は、CPUが指令し、そのコンピュータの機能を実現するためのプログラム(負荷分散プログラムを含む)を記憶する。これによりソフトウェアとハードウェアの協働が実現される。
Each of the
本実施形態は、前記情報処理を実行させるプログラムによって実現することができ、そのプログラムをコンピュータによる読み取り可能な記録媒体(例:CD−ROM)に記憶して提供することが可能である。また、そのプログラムを、インターネットのネットワークを通して提供することも可能である。 The present embodiment can be realized by a program for executing the information processing, and the program can be provided by being stored in a computer-readable recording medium (eg, CD-ROM). It is also possible to provide the program through an Internet network.
本実施形態の分散システムで使用されるソフトウェアについて説明する。
図2は、負荷分散装置で使用されるソフトウェアの構成図である。負荷分散装置1は、処理装置検出部11と、性能指標値特定部12と、識別子割当個数決定部13と、識別子割当担当範囲選択部14と、識別子割当部15と、識別子管理テーブルT1と、負荷管理テーブルT2といった構成要素を備える。なお、負荷分散装置1が備える構成要素は他にも存在するが、その説明を省略する。
Software used in the distributed system of this embodiment will be described.
FIG. 2 is a configuration diagram of software used in the load balancer. The
処理装置検出部11は、分散システムに追加された、つまり増設された処理装置2を検出する。また、処理装置検出部11は、分散システムから処理装置2が削除された、つまり減設されたことを検出する。例えば、分散システムを構成する処理装置2は、生存信号を負荷分散装置1に定期的に送信しており、負荷分散装置1は、その生存信号を所定期間以上受信しなかったときに、その処理装置2が削除されたとみなす。
The processing
なお、前記したとおり、コンシステント・ハッシュ法では、分散システムを構成する処理装置2には、複数の仮想的な処理装置の集合として実現するための、1または複数の処理装置識別子を割り当てることができる。そのような1または複数の処理装置識別子は、ID空間(図6参照)に配置することができる。本実施形態では、1つの処理装置2に割り当てる1または複数の処理装置識別子を「仮想識別子」と呼ぶことにする。仮想識別子は、複数の仮想的な処理装置のそれぞれを識別するための識別子である。仮想識別子の値は、例えば、処理装置2のIPアドレスや処理装置名などに、ハッシュ関数を作用させたハッシュ値である。分散システムを構成する既存の処理装置2および分散システムに追加された処理装置2に対して、1または複数の仮想識別子が割り当てられる。なお、本実施形態では、特に断らない限り、単に処理装置識別子と述べるときは、仮想識別子(特許請求の範囲の「識別子」に相当)を意味することとする。
As described above, in the consistent hash method, one or a plurality of processing device identifiers to be realized as a set of a plurality of virtual processing devices can be assigned to the
一方、処理装置2は、他の処理装置2と区別して識別するための固有の(1つの)識別子を有している。本実施形態では、そのような固有の識別子を「親識別子」と呼ぶ。親識別子の値は、任意の値とすることができ、特に、ハッシュ値である必要は無い。説明の便宜上、本実施形態では、親識別子は、ID空間に配置されないとする。しかし、親識別子の値をハッシュ値とし、親識別子をID空間に配置するように設計することは可能である。処理装置2に割り当てられた仮想識別子は、その処理装置2が有している親識別子に属している。例えば、処理装置2を分散システムに追加するとき、その処理装置2に対して、1つの親識別子が割り当てられる。また、処理装置2に割り当てられた複数の仮想識別子の一つを親識別子と設計することも可能であるが、本実施形態では、このような設計は行わない。
On the other hand, the
性能指標値特定部12は、分散システムを構成する処理装置2の性能指標値を特定する。よって、性能指標値特定部12は、分散システムに追加された処理装置2の性能指標値を特定する。「性能指標値」とは、処理装置2の処理性能を示すパラメータである。処理装置2の処理性能の具体例としては、例えば、処理装置2のCPU周波数、処理装置2の記憶部の記憶容量、処理装置2がデータストアを使用してデータを記憶するリソース(例:ディスク)の記憶容量がある。処理装置2の処理性能をそのまま性能指標値としてもよい。また、総合的な処理性能を判断するために、ベンチマークプログラムを用いて、それらの処理性能の一部または全部から算出されるスコアを性能指標値としてもよい。
The performance index
性能指標値が大きいほど、処理装置2の処理性能が大きいとする。性能指標値の大きな処理装置2は、分担する負荷量を多くしても、つまりID空間の担当範囲を長くしても、所望する処理速度を実現することができる。また、処理装置2が物理的な装置であっても、論理的な装置であっても、前記の性能指標値を適用することができる。
It is assumed that the processing performance of the
識別子割当個数決定部13は、処理装置2に割り当てる仮想識別子の個数を決定する。よって、識別子割当個数決定部13は、分散システムに追加された処理装置2に割り当てる仮想識別子の個数を決定する。その個数を決定する方法については、後記する。
The identifier allocation
識別子割当担当範囲選択部14は、処理装置2に割り当てる仮想識別子を、既存の処理装置2の担当範囲のいずれに配置するかを選択する。つまり、処理装置2に割り当てる仮想識別子をID空間のどこに配置するか決定する。よって、識別子割当担当範囲選択部14は、分散システムに追加された処理装置2に割り当てる仮想識別子を、既存の処理装置2の担当範囲のいずれに配置するかを選択すると、既存の処理装置2の担当範囲が、追加された処理装置2の担当範囲に切り替わる。その担当範囲を選択する方法については、後記する。
The identifier assignment assigned range selection unit 14 selects which of the existing assigned ranges of the
識別子割当部15は、所定のハッシュ値が設定された1または複数の仮想識別子を、処理装置2に割り当てる。よって、識別子割当部15は、所定のハッシュ値が設定された1または複数の仮想識別子を、分散システムに追加された処理装置2に割り当てる。これにより、追加された処理装置2の担当範囲、つまり負荷量が定まる。なお、追加された処理装置2の仮想識別子にどのようなハッシュ値を設定するか、つまり、その仮想識別子に対応する仮想的な処理装置の担当範囲の長さをどの程度にするか、ということについては、後記する。
The
識別子管理テーブルT1は、処理装置2に割り当てられた仮想識別子が、ID空間でどのように配置されているかを管理する。識別子管理テーブルT1は、「仮想識別子」と、「担当範囲サイズ」と、「親識別子」といったフィールドを含み、仮想識別子ごとにレコードが作成されている。
The identifier management table T1 manages how the virtual identifier assigned to the
「仮想識別子」のフィールドには、1つの処理装置2に対して割り当てられた1または複数の仮想識別子(既存識別子)の値(ハッシュ値)が格納されている。
「担当範囲サイズ」のフィールドには、対応する仮想識別子で識別される仮想的な処理装置に設定された担当範囲(既存担当範囲)のサイズ、つまりID空間の円弧の長さが格納されている。なお、1または複数の仮想識別子で識別される仮想的な処理装置に設定された担当範囲を合わせた担当範囲を「合計既存担当範囲」と呼ぶ。
「親識別子」のフィールドには、対応する仮想識別子が属している親識別子の値が格納されている。
In the “virtual identifier” field, values (hash values) of one or more virtual identifiers (existing identifiers) assigned to one
The field of “responsible area size” stores the size of the responsible area (existing responsible area) set in the virtual processing device identified by the corresponding virtual identifier, that is, the length of the arc in the ID space. . Note that the assigned range, which is a combination of the assigned ranges set for the virtual processing devices identified by one or more virtual identifiers, is referred to as a “total existing assigned range”.
The “parent identifier” field stores the value of the parent identifier to which the corresponding virtual identifier belongs.
負荷管理テーブルT2は、処理装置2が分担する負荷を管理する。負荷管理テーブルT2は、「親識別子」と、「振り分け先アドレス」と、「性能指標値」と、「合計担当範囲サイズ」といったフィールドを含み、親識別子ごとにレコードが作成されている。
The load management table T2 manages the load shared by the
「親識別子」のフィールドには、分散システムを処理装置2に割り当てられた親識別子の値が格納されている。負荷管理テーブルT2の「親識別子」のフィールドは、識別子管理テーブルT1の「親識別子」のフィールドと同等である。
「振り分け先アドレス」のフィールドには、処理装置2のIPアドレスが格納されている。
「性能指標値」のフィールドには、処理装置2の性能指標値(既存性能指標値)が格納されている。
「合計担当範囲サイズ」のフィールドには、処理装置2に設定された担当範囲のサイズの合計値(合計既存担当範囲のサイズ)が格納されている。この合計値は、処理装置2に割り当てられた1または複数の仮想識別子に設定された担当範囲のサイズの合計値である。つまり、この合計値は、処理装置2に割り当てられた親識別子に属する仮想識別子で識別される仮想的な処理装置に設定された担当範囲のサイズ(識別子管理テーブルT1の「担当範囲サイズ」のフィールドの該当部分)の合計値である。
The “parent identifier” field stores the value of the parent identifier assigned to the
In the “distribution destination address” field, the IP address of the
In the “performance index value” field, the performance index value (existing performance index value) of the
In the “total charge range size” field, the total size of the charge ranges set in the processing device 2 (the size of the total existing charge range) is stored. This total value is the total value of the size of the assigned range set in one or more virtual identifiers assigned to the
なお、処理装置2のソフトウェアの構成についての説明は省略するが、処理装置2は、以下に述べる処理を行うことができる。つまり、処理装置2の担当範囲が変更し、メッセージの呼処理を担当しないことになった場合、処理装置2は、そのメッセージの呼処理を新たに担当することになった別の処理装置2に対し、その呼処理に必要となるデータの実体を送信することができる。
Although the description of the software configuration of the
≪処理≫
次に、本実施形態の処理について説明する。
図3(図3Aおよび図3Bの総称)は、処理装置を増設したときの負荷分散装置における処理を示すフローチャートである。この処理の主体は、負荷分散装置1の制御部である。この処理は、ステップS01から開始する。なお、負荷分散装置1は、分散システムを構成する処理装置(既存の処理装置)2の個数Nの値を、負荷分散装置1の記憶部に記憶している。
<< Process >>
Next, the processing of this embodiment will be described.
FIG. 3 (generic name of FIG. 3A and FIG. 3B) is a flowchart showing processing in the load balancer when additional processing devices are added. The subject of this processing is the control unit of the
ステップS01において、負荷分散装置1の制御部は、分散システムに追加された新たな処理装置2を検出する。ステップS01の処理は、主に、処理装置検出部11の機能に従う。ステップS01の後、ステップS02に進む。
In step S01, the control unit of the
ステップS02において、負荷分散装置1の制御部は、性能指標値特定部12により、新たな処理装置2の性能指標値P(新規性能指標値)を特定する。ステップS02の処理は、主に、性能指標値特定部12の機能に従う。ステップS02の後、ステップS03に進む。
In step S02, the control unit of the
ステップS03において、負荷分散装置1の制御部は、新たな処理装置2に割り当てる仮想識別子(新規識別子)の個数Xを決定する。ステップS03の処理は、主に、識別子割当個数決定部13の機能に従う。ステップS03の後、ステップS04に進む。仮想識別子の個数Xは、下記の計算式から決定する。
X = P ÷ PB × XB
ただし、
PB:基準性能指標値
XB:仮想識別子の基準個数
In step S03, the control unit of the
X = P ÷ PB × XB
However,
PB: reference performance index value XB: reference number of virtual identifiers
基準性能指標値PBとは、処理装置2の性能指標値のおよその目安値である。基準性能指標値PBは、例えば、分散システムの管理者の裁量で決定し、負荷分散装置1の入力部から入力される。例えば、分散システムの管理者は、分散システムを構成する既存の処理装置2の性能指標値を取得し、その性能指標値の平均値を基準性能指標値とすることができる。なお、基準性能指標値の決定方法は、これに限定されない。
The reference performance index value PB is an approximate standard value of the performance index value of the
仮想識別子の基準個数XBとは、処理装置2に割り当てる仮想識別子の個数のおよその目安値である。仮想識別子の基準個数XBは、例えば、分散システムの管理者の裁量で決定し、負荷分散装置1の入力部から入力される。また、例えば、処理装置の性能指標値Pを基準性能指標値PBとしたときに割り当てられる仮想識別子の個数Xを、仮想識別子の基準個数XBとすることができる。
The reference number XB of virtual identifiers is an approximate guide value for the number of virtual identifiers assigned to the
ところで、負荷分散装置1の記憶部の記憶領域を考慮すると、1つの処理装置2に複数の仮想識別子を割り当てるという手段による負荷分散の均一化、つまり負荷分散性の向上には、限界がある。つまり、処理装置2に複数の処理装置識別子を割り当てることで、負荷分散装置1が識別子管理テーブルT1を用いて管理する仮想識別子の量が増え、負荷分散装置1の記憶部の記憶領域を圧迫してしまう。よって、仮想識別子の基準個数XBを大きくすると、負荷分散性は向上するが、負荷分散装置1の記憶部の記憶領域を圧迫してしまう。分散システムの管理者は、負荷分散性と、負荷分散装置1の記憶部の記憶領域とのトレードオフを考慮して仮想識別子の基準個数XBを定めることが好ましい。
By the way, considering the storage area of the storage unit of the
なお、ステップS03の計算式により、小数点以下の端数は任意に取り扱って(例:四捨五入)、最終的には、仮想識別子の個数Xを1以上の整数として出力する。 Note that the fractional part after the decimal point is arbitrarily handled (for example, rounded off) according to the calculation formula of step S03, and finally, the number X of virtual identifiers is output as an integer of 1 or more.
ステップS03の計算式により、単に、基準個数XB分の仮想識別子を割り当てられる場合と比較して、処理装置2の性能を考慮した最適な個数Xを求めることができる。よって、無駄に多くの仮想識別子を作ってしまい、負荷分散装置1の記憶部の記憶領域を圧迫してしまう、という事態を解消することができる。
Compared with the case where the virtual identifiers for the reference number XB are simply assigned, the optimum number X in consideration of the performance of the
ステップS04において、負荷分散装置1の制御部は、負荷管理テーブルT2を参照して、分散システムを構成する既存の処理装置2についてそれぞれ、
合計担当範囲サイズ(合計既存担当範囲のサイズ) ÷ 性能指標値(既存性能指標値)
となる値(割合)を算出し、その算出結果の降順に負荷管理テーブルT2をソートする。ステップS04の後、ステップS05に進む。
ステップS04により、性能指標値の割には大きすぎる担当範囲サイズを持っている既存の処理装置2を特定することができる。
In step S04, the control unit of the
Total assigned area size (total existing assigned area size) ÷ Performance index value (existing performance index value)
Are calculated, and the load management table T2 is sorted in descending order of the calculation results. After step S04, the process proceeds to step S05.
By step S04, the existing
ステップS05において、負荷分散装置1の制御部は、新たな処理装置2について、
X mod N = 0
という関係式を満たすか否か判定する。ここで、「mod」は、モジュロ関数、つまり整数の除算における剰余を求める関数である。前記関係式を満たす場合(ステップS05でYes)、ステップS06に進み、そうでなければ(ステップS05でNo)、ステップS07に進む。
In step S05, the control unit of the
X mod N = 0
It is determined whether or not the relational expression is satisfied. Here, “mod” is a modulo function, that is, a function for obtaining a remainder in integer division. If the relational expression is satisfied (Yes in step S05), the process proceeds to step S06. Otherwise (No in step S05), the process proceeds to step S07.
ステップS06において、負荷分散装置1の制御部は、新たな処理装置2に割り当てることになるX個の仮想識別子に関して、既存の処理装置2それぞれの担当範囲内にY=X÷N個の仮想識別子を配置することを決定する。ステップS06の後、ステップS08に進む。
In step S06, the control unit of the
ステップS07において、負荷分散装置1の制御部は、新たな処理装置2に割り当てることになるX個の仮想識別子に関して、ステップS04でソートした負荷管理テーブルT2の先頭からX mod N番目までのレコードに対応する既存の処理装置2それぞれの担当範囲内にY=[X÷N]+1個の仮想識別子を配置するとともに、(X mod N)+1番目のレコードから最後尾のレコードに対応する残りの既存の処理装置2それぞれの担当範囲内にY=[X÷N]個の仮想識別子を配置することを決定する。ここで、[X]とは、Xの床関数、つまりXを超えない最大の整数を意味する。ステップS07の後、ステップS08に進む。
In step S07, the control unit of the
例えば、6つの処理装置2(N=6)で構成される分散システムに、新たな処理装置2を追加し、新たな処理装置2の仮想識別子を10個(X=10)割り当てる場合を考える。この場合、ステップS04の処理によって、6つの既存の処理装置2のそれぞれについて、(合計担当範囲サイズ ÷ 性能指標値)となる値を計算し、その値の大きいものから順に並べる。1番目から4(=10mod6)番目の処理装置2に対しては、新たな処理装置2の仮想識別子を2個(=[10÷6]+1)ずつ割り当てる。そして、残る2つ(=6−10mod6)の処理装置2に対しては、新たな処理装置2の仮想識別子を1個(=[10÷6])ずつ割り当てる。このような割り当ては、性能指標値に対して余分に大きな担当範囲を抱えている処理装置2から優先的に、多くの仮想識別子を割り当てて、新たな処理装置2に担当範囲を移譲することを意味する。
For example, consider a case where a
ステップS06の処理と、ステップS07の処理とにより、既存の処理装置2の担当範囲のいずれに、新たな処理装置2の仮想識別子を何個配置するかを決定することができる。特に、ステップS07の処理により、合計担当範囲サイズ÷性能指標値の値が大きな処理装置2、つまり、相対的に大きな負荷を分担する既存の処理装置2の担当範囲内に、新たな処理装置2の仮想識別子を1つ多く配置することになる。よって、そのような既存の処理装置2が分担する負荷を優先的に小さくすることができる。なお、相対的に大きな負荷を分担する既存の処理装置2の担当範囲内に、2つ以上多い新たな処理装置2の仮想識別子を配置することも可能である。
By the process of step S06 and the process of step S07, it is possible to determine how many virtual identifiers of the
ステップS08において、負荷分散装置1の制御部は、既存の処理装置2に対して用いられる自然数の変数iに1を代入する。ステップS08の後、ステップS09に進む。なお、説明の便宜上、i番目の既存の処理装置2の担当範囲内に配置されることになる新たな処理装置2の仮想識別子の個数Yを、「Yi」と表記する。
In step S08, the control unit of the
ステップS09において、負荷分散装置1の制御部は、識別子管理テーブルT1を参照して、i番目の既存の処理装置2に割り当てられた仮想識別子に対応する担当範囲のうち、最も長い担当範囲からYi番目に長い担当範囲までのYi個の担当範囲を選択する。具体的には、識別子管理テーブルT1において、i番目の既存の処理装置2の親識別子が同じである仮想識別子を特定する。次に、識別子管理テーブルT1において、特定した仮想識別子に対応する担当範囲の担当範囲サイズを取得し、担当範囲サイズの最も大きな仮想識別子、担当範囲サイズの2番目に大きな仮想識別子、・・・、担当範囲サイズのYi番目に大きな仮想識別子、を抽出する。そして、抽出したYi個の仮想識別子に対応する担当範囲を選択する。ステップS09の処理(および、後記するステップS10〜ステップS15の処理)は、主に、識別子割当担当範囲選択部14の機能に従う。ステップS09の後、ステップS10に進む。
In step S09, the control unit of the
ステップS09により、i番目の既存の処理装置2の担当範囲のうち、新たな処理装置2に譲るに相応しい担当範囲を特定することができる。また、ステップS09によれば、少なくとも最も長い担当範囲に新たな処理装置2の仮想識別子が配置される、つまり、最も長い担当範囲の一部を新たな処理装置2に譲ることになる。
By step S09, it is possible to identify a responsible range suitable for handing over to the
例えば、20個の仮想識別子が割り当てられている既存の処理装置2が有する20個の担当範囲に、追加された新たな処理装置2の2つの仮想識別子を配置することになった場合を考える。この場合、この既存の処理装置2は、20個の担当範囲のうち、担当範囲サイズの最も大きな担当範囲と、担当範囲サイズの2番目に大きな担当範囲という2つの担当範囲を選択し、新たな処理装置2の2つの仮想識別子を選択した担当範囲のそれぞれに配置する。
For example, let us consider a case where two virtual identifiers of the
ステップS10において、負荷分散装置1の制御部は、負荷管理テーブルT2を参照して、i番目の既存の処理装置2(特定の既存の処理装置)の合計担当範囲サイズCiの目標値CAiを決定する。ステップS10の後、ステップS11に進む。目標値CAiは、下記の計算式から決定する。
CAi = CT × Pi ÷ PT
ただし、
CT:すべての既存の処理装置2の合計担当範囲サイズの合計値(負荷管理テーブルT2の「合計担当範囲サイズ」のフィールドに格納された値の和。図6のID空間を表現したリング1周分の長さに相当)
Pi:i番目の既存の処理装置2の性能指標値
PT:新たな処理装置2の性能指標値と、すべての既存の処理装置2の性能指標値の合計値(負荷管理テーブルT2の「性能指標値」のフィールドに格納された値の和)との合計値
ステップS10により、i番目の既存の処理装置2の性能指標値に相応しい合計担当範囲サイズを決定することができる。
In step S10, the control unit of the
CAi = CT x Pi / PT
However,
CT: Total value of the total assigned range size of all existing processing devices 2 (sum of values stored in the “total assigned range size” field of the load management table T2; one round of the ring representing the ID space in FIG. 6 Equivalent to minute length)
Pi: Performance index value of i-th existing
By step S10, the total charge range size suitable for the performance index value of the i-th existing
例えば、仮に、それぞれの性能指標値が、7,8,9,10,11となる5つの処理装置2で構成される分散システムに対し、性能指標値が12となる新たな処理装置2を追加し、性能指標値9の処理装置2の担当範囲に、新たな処理装置2の仮想識別子を配置する場合を採り上げる。この場合、性能指標値9の処理装置2の担当範囲が、全体の担当範囲の9/(7+8+9+10+11+12) = 3/19となるような目標値CAiを決定する。
For example, a
ステップS11において、負荷分散装置1の制御部は、負荷管理テーブルT2を参照して、i番目の既存の処理装置2の余分担当範囲サイズCEiを決定する。余分担当範囲サイズCEiとは、i番目の既存の処理装置2の担当範囲サイズの余分値である。例えば、この余分値は、i番目の既存の処理装置2にとっては多すぎる負荷の量と解釈することができる。ステップS11の後、ステップS12に進む。余分担当範囲サイズCEiは、下記の計算式から決定する。
CEi = Ci − CAi
ステップS11により、i番目の既存の処理装置2の合計担当範囲サイズCiと、その目標値CAiとのズレを定量的に評価することができる。
In step S <b> 11, the control unit of the
CEi = Ci-CAi
By step S11, the deviation between the total assigned range size Ci of the i-th existing
ステップS12において、負荷分散装置1の制御部は、i番目の既存の処理装置2について、
CEi ≦ 0
という関係式を満たすか否か判定する。前記関係式を満たす場合(ステップS12でYes)、ステップS13に進み、そうでなければ(ステップS12でNo)、ステップS14に進む。
In step S <b> 12, the control unit of the
CEi ≦ 0
It is determined whether or not the relational expression is satisfied. If the relational expression is satisfied (Yes in Step S12), the process proceeds to Step S13, and if not (No in Step S12), the process proceeds to Step S14.
ステップS13において、負荷分散装置1の制御部は、i番目の既存の処理装置2の担当範囲については、新たな処理装置2のYi個の仮想識別子の配置を中断する。i番目の既存の処理装置2の担当範囲については、余分な担当範囲サイズは存在せず、十分な負荷分散性が得られているからである。ステップS13の後、ステップS17に進む。なお、配置を中断した、新たな処理装置2のYi個の仮想識別子は、削除してもよいし、他の既存の処理装置2の担当範囲に配置してもよい。図3のフローにおいては、削除することとする。
In step S <b> 13, the control unit of the
ステップS14において、負荷分散装置1の制御部は、i番目の既存の処理装置2に関する比率PRiを決定する。ステップS14の後、ステップS15に進む。比率PRiは、下記の計算式から決定する。
PRi = CEi ÷ CUi
ただし、
CUi:i番目の既存の処理装置2の担当範囲のうち、ステップS09で選択したYi個の担当範囲の担当範囲サイズの合計値
In step S <b> 14, the control unit of the
PRi = CEi ÷ CUi
However,
CUi: The total value of the assigned range sizes of the Yi assigned ranges selected in step S09 among the assigned ranges of the i-th existing
ステップS15において、負荷分散装置1の制御部は、i番目の既存の処理装置2の担当範囲のうち、ステップS09で選択したYi個の担当範囲のそれぞれに1つずつ配置することになる新たな処理装置2のYi個の仮想識別子の値Vk(k=1、2、・・・、Yi)を決定する。ステップS15の後、ステップS16に進む。新たな処理装置2のYi個の仮想識別子の値Vkは、下記の計算式から決定する。
Vk = Wk − (1−PRi) × Dik
ただし、
Wk:i番目の既存の処理装置2の担当範囲のうち、ステップS09で選択したYi個の担当範囲に対応する仮想識別子の値(k=1、2、・・・、Yi)
Dik:ステップS09で選択したYi個の担当範囲のうち、Yi番目の担当範囲の担当範囲サイズ
In step S15, the control unit of the
Vk = Wk− (1-PRi) × Dik
However,
Wk: Value of virtual identifier corresponding to Yi assigned range selected in step S09 among assigned ranges of i-th existing processing device 2 (k = 1, 2,..., Yi)
Dik: The assigned range size of the Yi-th assigned range among the Yi assigned ranges selected in step S09
ステップS14、ステップS15によれば、新たな処理装置2のYi番目の仮想識別子を、i番目の既存の処理装置2のYi番目の担当範囲内に配置すると、i番目の既存の処理装置2のYi番目の担当範囲を2分することになる。このとき、その2分された2つの担当範囲(一方の担当範囲は、新たな処理装置2の担当範囲となる)の担当範囲サイズの比は、PRiに等しい。
According to step S14 and step S15, when the Yi-th virtual identifier of the
ステップS16において、負荷分散装置1の制御部は、新たな処理装置2の追加に対して、識別子管理テーブルT1と、負荷管理テーブルT2とを更新する。ステップS16の処理は、主に、識別子割当部15の機能に従う。ステップS16の後、ステップS17に進む。
In step S <b> 16, the control unit of the
具体的には、識別子管理テーブルT1と、負荷管理テーブルT2において、新たな処理装置2のためのレコードを作成する。そして、負荷分散装置1は、周知の方法で決定され、新たな処理装置2に割り当てた親識別子を、識別子管理テーブルT1の「親識別子」のフィールド、負荷管理テーブルT2の「親識別子」のフィールドに追加する。また、周知の方法で決定され、新たな処理装置2に割り当てた振り分け先アドレスを、負荷管理テーブルT2の「振り分け先アドレス」のフィールドに追加する。また、ステップS02で特定した新たな処理装置2の性能指標値Pを、負荷管理テーブルT2の「性能指標値」のフィールドに追加する。また、ステップ15で決定した新たな処理装置2のYi個の仮想識別子の値Vkを、識別子管理テーブルT1の「仮想識別子」のフィールドに追加する。新たな処理装置2のYi個の仮想識別子をID空間に配置することに伴い、新たな処理装置2および既存の処理装置2に関して、識別子管理テーブルT1の「担当範囲サイズ」のフィールドの値、負荷管理テーブルT2の「合計担当範囲サイズ」のフィールドの値は、適宜追加および変更される。
Specifically, a record for a
ステップS17において、負荷分散装置1の制御部は、
i ≧ N
という関係式を満たすか否か判定する。前記関係式を満たす場合(ステップS17でYes)、図3の処理全体を終了する。新たな処理装置2に割り当てるX個すべての仮想識別子についてID空間の所定の位置に配置した(またはステップS13により配置を中断した)からである。一方、前記関係式を満たさない場合(ステップS17でNo)、ステップS18に進む。
In step S17, the control unit of the
i ≧ N
It is determined whether or not the relational expression is satisfied. When the relational expression is satisfied (Yes in step S17), the entire process of FIG. This is because all X virtual identifiers assigned to the
ステップS18において、負荷分散装置1の制御部は、既存の処理装置2に対して用いられる変数iをインクリメントする。ステップS18の後、ステップS9に戻る。これにより、既存の他の処理装置2の担当範囲に配置することになる、新たな処理装置2の1または複数の仮想識別子の割り当てを実行する。
以上で、図3の処理の説明を終了する。
In step S18, the control unit of the
Above, description of the process of FIG. 3 is complete | finished.
(分散システムの他の形態)
図1に示す分散システムの負荷分散装置1は、単一の負荷分散プログラムにより動作する単一の装置として説明した。しかし、コンシステント・ハッシュ法を実行する負荷分散装置1は、複数であってもよい。
(Other forms of distributed system)
The
図4は、分散システムの他の形態の構成図である。図1に示す分散システムとの相違点は、負荷分散装置1が複数存在し、各負荷分散装置1が同一の負荷分散プログラムを備えている点と、ロードバランサ4が存在する点である。各負荷分散装置1が備える負荷分散プログラムは、協調して動作することができる。
FIG. 4 is a configuration diagram of another form of the distributed system. The difference from the distributed system shown in FIG. 1 is that a plurality of
ロードバランサ4は、クライアント3から受信したメッセージを、例えばラウンドロビンによって、負荷分散装置1のそれぞれに振り分ける。負荷分散装置1は、ロードバランサ4から振り分けられたメッセージを、処理装置2に対して再度振り分ける。
The load balancer 4 distributes the message received from the
各負荷分散装置1はそれぞれ、同一の識別子管理テーブルT1と、同一の負荷管理テーブルT2とを有している。1つの識別子管理テーブルT1または1つの同一の負荷管理テーブルT2が更新されれば、残りの識別子管理テーブルT1または残りの同一の負荷管理テーブルT2も同様に更新することができる。よって、ロードバランサ4からいずれの負荷分散装置1に振り分けられても、まったく同じ論理によってメッセージの振り分け先となる処理装置2を一意に決定することができる。識別子管理テーブルT1または同一の負荷管理テーブルT2の更新契機は、基本的には、処理装置2の追加(増設)と削除(減設)だけである。よって、すべての識別子管理テーブルT1およびすべての負荷管理テーブルT2の内容を同一にする必要があったとしても、処理装置2の追加と削除との頻度が十分に小さければ、識別子管理テーブルT1および負荷管理テーブルT2の更新処理に必要な処理量は、負荷分散処理(呼処理など)に比べて無視できるほど小さい。
Each
図5は、分散システムのさらに他の形態の構成図である。図4に示す分散システムとの相違点は、負荷分散装置1と処理装置2と組み合わせて一体化した装置として構成されている点である。この場合、負荷分散装置1として機能させるプログラムと、処理装置2として機能させるプログラムとを統合し、前記した負荷分散プログラムとすることができる。前記一体化した装置に含まれる負荷分散装置1は、ロードバランサ4から振り分けられたメッセージを、その負荷分散装置1と一体化した処理装置2または、その他の処理装置2に振り分ける。各処理装置2は、振り分けられたメッセージを呼処理する。例えば、コンシステント・ハッシュ法を用いた一般的なデータストアは、この図5に示す構成をとる場合が多い。
FIG. 5 is a configuration diagram of still another form of the distributed system. The difference from the distributed system shown in FIG. 4 is that the
図4または図5に示す分散システムの構成であっても、図1に示す分散システムと同等の効果を奏することができる。 Even the configuration of the distributed system shown in FIG. 4 or FIG. 5 can achieve the same effects as the distributed system shown in FIG.
≪まとめ≫
本実施形態によれば、処理装置に複数の処理装置識別子(つまり、仮想識別子)を割り当てることができる負荷分散装置において、処理装置の処理性能の違いに応じて、分散システムにおける負荷分散を最適化することができる。分散システムを構成する既存の処理装置2の処理性能が均一でない、つまり性能指標値が同一でない場合であっても、新たな処理装置2を追加するときは、新たな処理装置2を含む各処理装置2のそれぞれの性能指標値の比に合致するといった調整を実現できるように、新たな処理装置2の仮想識別子の値を決定するからである(主に、図3BのステップS10の処理を参照)。これにより、既存の処理装置2に対して負荷を均等に分散させたいという要求を満たしつつも、処理装置2の処理性能の不均一性と負荷分散性とを両立する。
≪Summary≫
According to this embodiment, in a load balancer capable of assigning a plurality of processing device identifiers (that is, virtual identifiers) to a processing device, load distribution in the distributed system is optimized according to the difference in processing performance of the processing device. can do. Even when the processing performance of the existing
また、本実施形態によれば、相対的に大きな負荷を分担する既存の処理装置2の担当範囲内に、新たな処理装置2の仮想識別子をより多く配置し、そのような既存の処理装置2が分担する負荷を優先的に小さくすることができる(主に、図3AのステップS07の処理を参照)。よって、新たな処理装置2を追加するときは、前記した調整を、より高い精度で行うことができる。
Further, according to the present embodiment, a larger number of virtual identifiers of
また、本実施形態によれば、既存の処理装置2が有する1または複数の担当範囲のうち、新たな処理装置2に譲るに相応しい担当範囲を特定することができる(主に、図3BのステップS09の処理を参照)。よって、新たな処理装置2を追加するときは、前記した調整を、より高い精度で行うことができる。
In addition, according to the present embodiment, it is possible to specify a responsible range suitable for handing over to a
≪その他≫
前記実施形態は、本発明を実施するために好適のものであるが、その実施形式はこれらに限定されるものでなく、本発明の要旨を変更しない範囲内において種々変形することが可能である。
≪Others≫
The above-described embodiment is suitable for carrying out the present invention, but the form of implementation is not limited thereto, and various modifications can be made without departing from the scope of the present invention. .
例えば、本実施形態は、処理装置2がHTTP(HyperText Transfer Protocol)サーバである場合、メッセージに含まれており、ID空間に配置されることになるデータ識別子は、メッセージが要求するURL(Uniform Resource Locator)、クライアント3のIPアドレス、Cookieなど、といったさまざまな情報を用いることができる。
For example, in the present embodiment, when the
また、例えば、本実施形態では、ID空間に配置する仮想識別子を求めるために、処理装置2のIPアドレスを用いた。しかし、前記したIPアドレスの代わりに、例えばMAC(Media Access Control address)アドレスを用いてもよい。また、IPアドレスやMACアドレスのように、分散システムのネットワーク上で処理装置2を特定できる機能を持つのであればどのような種類のアドレスを用いてもよい。
Further, for example, in the present embodiment, the IP address of the
また、例えば、本実施形態では、分散システムに処理装置2を増設する場合について説明した。しかし、分散システムの処理装置2を減設する場合にも、本発明の考え方を応用することができる。つまり、分散システムの負荷分散性が、減設後の残りの処理装置2の性能指標値の不均一性を考慮して、減設すべき処理装置2を特定することができる。
For example, in this embodiment, the case where the
また、例えば、本実施形態では、分散システムに処理装置2を1つ増設する場合について説明した。しかし、分散システムに処理装置2を2つ以上同時増設する場合についても、本発明の考え方を応用することができる。つまり、2つ以上同時増設する処理装置2のそれぞれに対して割り当てる1または複数の仮想識別子を、ID空間に一度にまとめて配置した場合に相当すると考えることができる。
For example, in this embodiment, the case where one
また、本実施形態で説明した種々の技術を適宜組み合わせた技術を実現することもできる。
また、本実施形態で説明したソフトウェアをハードウェアとして実現することもでき、ハードウェアをソフトウェアとして実現することもできる。
In addition, it is possible to realize a technique in which various techniques described in this embodiment are appropriately combined.
Further, the software described in the present embodiment can be realized as hardware, and the hardware can also be realized as software.
その他、ハードウェア、ソフトウェア、テーブル、フローチャートなどの具体的な構成について、本発明の趣旨を逸脱しない範囲で適宜変更が可能である。 In addition, specific configurations such as hardware, software, tables, and flowcharts can be appropriately changed without departing from the spirit of the present invention.
1 負荷分散装置
2 処理装置
3 クライアント
4 ロードバランサ
11 処理装置検出部
12 性能指標値特定部
13 識別子割当個数決定部
14 識別子割当担当範囲選択部
15 識別子割当部
T1 識別子管理テーブル
T2 負荷管理テーブル
DESCRIPTION OF
Claims (4)
前記負荷分散装置の記憶部が、
前記分散システムを構成する既存の処理装置に割り当てられた1または複数の識別子である既存識別子の値と、
前記既存識別子に対して設定されている担当範囲である1または複数の既存担当範囲のサイズと、
前記既存の処理装置が有する1または複数の前記既存担当範囲を合わせた合計既存担当範囲のサイズと、
前記既存の処理装置の処理性能を示す既存性能指標値と、を記憶しており、
前記負荷分散装置の制御部に、
前記分散システムに追加された新たな処理装置を検出する処理と、
前記新たな処理装置の処理性能を示す新規性能指標値を特定する処理と、
前記新たな処理装置に割り当てられる識別子である1または複数の新規識別子を、特定の既存の処理装置が有する既存担当範囲に配置するとき、すべての前記既存の処理装置の合計既存担当範囲のサイズの合計値に対する、前記特定の既存の処理装置の合計既存担当範囲のサイズの比と、前記新規性能指標値およびすべての既存性能指標値の合計値に対する、前記特定の既存の処理装置の既存性能指標値の比と、を等しく、または略等しくする処理と、を実行させる
ことを特徴とする負荷分散プログラム。 In a distributed system in which a processing device that provides a service to a client and a load distribution device that distributes a message obtained from the client to the processing device by a consistent hash method are communicably connected to the processing device. By assigning one or a plurality of identifiers, the load balancer can be set so that one or a plurality of responsible ranges for handling message call processing can be set in the consistent hash method ID space. A load balancing program to function,
The storage unit of the load balancer is
A value of an existing identifier that is one or a plurality of identifiers assigned to an existing processing device constituting the distributed system;
The size of one or more existing assigned ranges that are assigned ranges set for the existing identifier;
A size of a total existing charge range including one or a plurality of the existing charge ranges of the existing processing device;
Storing an existing performance index value indicating the processing performance of the existing processing device;
In the control unit of the load balancer,
Detecting a new processing device added to the distributed system;
Processing for specifying a new performance index value indicating the processing performance of the new processing device;
When one or a plurality of new identifiers, which are identifiers assigned to the new processing device, are arranged in the existing assigned range of a specific existing processing device, the size of the total existing assigned range of all the existing processing devices The ratio of the size of the total existing assigned range of the specific existing processing device to the total value, and the existing performance index of the specific existing processing device to the total value of the new performance index value and all the existing performance index values A load balancing program that executes processing for making a ratio of values equal or substantially equal.
前記既存性能指標値に対する前記合計既存担当範囲のサイズの割合を、前記既存の処理装置ごとに算出する処理と、
前記割合が相対的に大きな既存の処理装置の既存担当範囲に配置する新規識別子の個数を、前記割合が相対的に小さな既存の処理装置が有する既存担当範囲に配置する新規識別子の個数と同等またはそれよりも多くする処理と、を実行させる
ことを特徴とする請求項1に記載の負荷分散プログラム。 In the control unit of the load balancer,
The proportion of the size of the total existing responsibility for the existing performance index value, and processing for calculating for each of the existing processing unit,
The number of new identifiers to be placed in an existing charge range of an existing processing apparatus having a relatively large ratio is equal to the number of new identifiers to be placed in an existing charge range of an existing processing apparatus having a relatively small ratio or The load distribution program according to claim 1, wherein a process for increasing the number of processes is executed.
前記新規識別子が配置される既存担当範囲を有する前記既存の処理装置において、少なくとも前記既存の処理装置が有する1または複数の既存担当範囲のうち、そのサイズが最大となる既存担当範囲に前記新規識別子を配置する処理を実行させる
ことを特徴とする請求項1または請求項2に記載の負荷分散プログラム。 In the control unit of the load balancer,
In the existing processing apparatus having the existing assigned range in which the new identifier is arranged, the new identifier is assigned to the existing assigned range having the largest size among at least one existing assigned range of the existing processing apparatus. The load distribution program according to claim 1, wherein a process of arranging the program is executed.
前記負荷分散装置の記憶部が、
前記分散システムを構成する既存の処理装置に割り当てられた1または複数の識別子である既存識別子の値と、
前記既存識別子に対して設定されている担当範囲である1または複数の既存担当範囲のサイズと、
前記既存の処理装置が有する1または複数の前記既存担当範囲を合わせた合計既存担当範囲のサイズと、
前記既存の処理装置の処理性能を示す既存性能指標値と、を記憶しており、
前記負荷分散装置の制御部に、
前記分散システムに追加された新たな処理装置を検出する制御と、
前記新たな処理装置の処理性能を示す新規性能指標値を特定する制御と、
前記新たな処理装置に割り当てられる識別子である1または複数の新規識別子を、特定の既存の処理装置が有する既存担当範囲に配置するとき、すべての前記既存の処理装置の合計既存担当範囲のサイズの合計値に対する、前記特定の既存の処理装置の合計既存担当範囲のサイズの比と、前記新規性能指標値およびすべての既存性能指標値の合計値に対する、前記特定の既存の処理装置の既存性能指標値の比と、を等しく、または略等しくする制御と、を実行する
ことを特徴とする負荷分散装置。 In a distributed system in which a processing device that provides a service to a client and a load distribution device that distributes a message obtained from the client to the processing device by a consistent hash method are communicably connected to the processing device. A load balancer that can set one or a plurality of assigned ranges for handling call processing of a message in an ID space of a consistent hash method by assigning one or more identifiers,
The storage unit of the load balancer is
A value of an existing identifier that is one or a plurality of identifiers assigned to an existing processing device constituting the distributed system;
The size of one or more existing assigned ranges that are assigned ranges set for the existing identifier;
A size of a total existing charge range including one or a plurality of the existing charge ranges of the existing processing device;
Storing an existing performance index value indicating the processing performance of the existing processing device;
In the control unit of the load balancer,
Control to detect new processing devices added to the distributed system;
Control for specifying a new performance index value indicating the processing performance of the new processing device;
When one or a plurality of new identifiers, which are identifiers assigned to the new processing device, are arranged in the existing assigned range of a specific existing processing device, the size of the total existing assigned range of all the existing processing devices The ratio of the size of the total existing assigned range of the specific existing processing device to the total value, and the existing performance index of the specific existing processing device to the total value of the new performance index value and all the existing performance index values And a control for making the ratio of the values equal or substantially equal to each other.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012006932A JP5690287B2 (en) | 2012-01-17 | 2012-01-17 | Load balancing program and load balancing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012006932A JP5690287B2 (en) | 2012-01-17 | 2012-01-17 | Load balancing program and load balancing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013148950A JP2013148950A (en) | 2013-08-01 |
JP5690287B2 true JP5690287B2 (en) | 2015-03-25 |
Family
ID=49046418
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012006932A Active JP5690287B2 (en) | 2012-01-17 | 2012-01-17 | Load balancing program and load balancing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5690287B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7401776B2 (en) | 2020-05-14 | 2023-12-20 | 富士通株式会社 | Control method, control program and information processing device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4068473B2 (en) * | 2003-02-19 | 2008-03-26 | 株式会社東芝 | Storage device, assignment range determination method and program |
US8244846B2 (en) * | 2007-12-26 | 2012-08-14 | Symantec Corporation | Balanced consistent hashing for distributed resource management |
-
2012
- 2012-01-17 JP JP2012006932A patent/JP5690287B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013148950A (en) | 2013-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10079879B2 (en) | Weighted rendezvous hashing | |
CN107547596B (en) | Cloud platform control method and device based on Docker | |
CN106790324B (en) | Content distribution method, virtual server management method, cloud platform and system | |
US8087025B1 (en) | Workload placement among resource-on-demand systems | |
US10394782B2 (en) | Chord distributed hash table-based map-reduce system and method | |
JP5719323B2 (en) | Distributed processing system, dispatcher and distributed processing management device | |
US20160378824A1 (en) | Systems and Methods for Parallelizing Hash-based Operators in SMP Databases | |
US20100138540A1 (en) | Method of managing organization of a computer system, computer system, and program for managing organization | |
KR20170029263A (en) | Apparatus and method for load balancing | |
Shalita et al. | Social hash: an assignment framework for optimizing distributed systems operations on social networks | |
JP6519111B2 (en) | Data processing control method, data processing control program and data processing control device | |
JP2012048424A (en) | Method and program for allocating identifier | |
CN111614748A (en) | Scalable peer-to-peer matching | |
US20220329651A1 (en) | Apparatus for container orchestration in geographically distributed multi-cloud environment and method using the same | |
CN108200211B (en) | Method, node and query server for downloading mirror image files in cluster | |
JP5969315B2 (en) | Data migration processing system and data migration processing method | |
US20150365474A1 (en) | Computer-readable recording medium, task assignment method, and task assignment apparatus | |
WO2018037930A1 (en) | Data store device and data management method | |
JP6059558B2 (en) | Load balancing judgment system | |
JP5540269B2 (en) | Data load distribution arrangement system and data load distribution arrangement method | |
JP5690287B2 (en) | Load balancing program and load balancing apparatus | |
CN113037791B (en) | Operation and maintenance method and system, and computer readable storage medium | |
JP5690296B2 (en) | Load balancing program and load balancing apparatus | |
JP6586058B2 (en) | Load distribution apparatus and load distribution method | |
JP5839495B2 (en) | Load balancer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140307 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20140502 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20140528 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20141110 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20141118 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20141226 |
|
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: 20150127 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150130 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5690287 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |