JP5690287B2 - Load balancing program and load balancing apparatus - Google Patents

Load balancing program and load balancing apparatus Download PDF

Info

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
Application number
JP2012006932A
Other languages
Japanese (ja)
Other versions
JP2013148950A (en
Inventor
道生 入江
道生 入江
絵里子 岩佐
絵里子 岩佐
雅志 金子
雅志 金子
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2012006932A priority Critical patent/JP5690287B2/en
Publication of JP2013148950A publication Critical patent/JP2013148950A/en
Application granted granted Critical
Publication of JP5690287B2 publication Critical patent/JP5690287B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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 Document 1 discloses a consistent hash method. The consistent hash method is based on a processing device identifier that identifies a processing device and a data identifier that is included in a message distributed to the processing device and identifies the substance of the data that is the target of call processing. This is a method for determining which message is to be distributed. The consistent hash method is used, for example, in a distributed database system.

具体的に、どのようにしてメッセージの振り分けが決定されるかを、図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.

David Karger、外5名、“Consistent Hashing and Random Trees:Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web”、[online]、[平成24年1月12日検索]、インターネット〈URL:http://www.akamai.com/dl/technical_publications/ConsistenHashingandRandomTreesDistributedCachingprotocolsforrelievingHotSpotsontheworldwideweb.pdf〉David Karger, 5 others, “Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web”, [online], [searched on January 12, 2012], Internet <URL: http: / /www.akamai.com/dl/technical_publications/ConsistenHashingandRandomTreesDistributedCachingprotocolsforrelievingHotSpotsontheworldwideweb.pdf〉

ところで、コンシステント・ハッシュ法によれば、処理装置識別子の値およびデータ識別子の値は、例えば、ハッシュ関数を用いて無作為な値として設定される。すると、各処理装置の担当範囲、つまり各処理装置が呼処理するメッセージの処理量は、確率的に均一に近づく。よって、確率的に均一に近づく負荷分散が行われる。   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 claim 1 includes 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. In a distributed system communicably connected, by assigning one or more identifiers to the processing device, one or a plurality of responsible ranges for handling the call processing of a message is represented by a consistent hash method. A load distribution program for causing the load balancer to function so that it can be set in an ID space, wherein a storage unit of the load balancer is assigned to an existing processing device constituting the distributed system or 1 The value of the existing identifier which is a plurality of identifiers and the assigned range set for the existing identifier The size of one or a plurality of existing assigned ranges, the size of the total existing assigned range including the one or more existing assigned ranges possessed by the existing processing device, and the existing performance indicating the processing performance of the existing processing device And a new performance index value indicating the processing performance of the new processing device and processing for detecting a new processing device added to the distributed system in the control unit of the load distribution device. And 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 the specific existing processing device, the total of all the existing processing devices The ratio of the total existing area size of the specific existing processing device to the total size of the existing area, and the new performance index value and all existing performance index values. For a total value, wherein the ratio of the existing performance index value of a specific existing processing apparatus, equally, or substantially a process of equal, characterized in that to the execution.

請求項2に記載の発明は、請求項1に記載の発明において、前記負荷分散装置の制御部に、前記既存性能指標値に対する前記合計既存担当範囲のサイズの割合を、前記既存の処理装置ごとに算出する処理と、前記割合が相対的に大きな既存の処理装置の既存担当範囲に配置する新規識別子の個数を、前記割合が相対的に小さな既存の処理装置が有する既存担当範囲に配置する新規識別子の個数と同等またはそれよりも多くする処理と、を実行させることを特徴とする。 Invention according to claim 2, in the invention described in claim 1, the control unit of the load balancer, the proportion of the size of the total existing responsibility for the existing performance index value, the existing processing device And the number of new identifiers to be placed in the existing charge range of the existing processing device having a relatively large ratio are placed in the existing charge range of the existing processing device having the relatively small ratio. And a process of making the number of new identifiers equal to or greater than the number of new identifiers.

請求項3に記載の発明は、請求項1または請求項2に記載の発明において、前記負荷分散装置の制御部に、前記新規識別子が配置される既存担当範囲を有する前記既存の処理装置において、少なくとも前記既存の処理装置が有する1または複数の既存担当範囲のうち、そのサイズが最大となる既存担当範囲に前記新規識別子を配置する処理を実行させることを特徴とする。   The invention according to claim 3 is the invention according to claim 1 or 2, wherein the control unit of the load balancer has an existing charge range in which the new identifier is arranged. It is characterized in that at least one of a plurality of existing assigned ranges possessed by the existing processing apparatus executes processing for arranging the new identifier in an existing assigned range having the largest size.

請求項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 new processing device 1 Alternatively, when a plurality of new identifiers are arranged in the existing assigned range of the specific existing processing device, the specific existing processing device's total value of the total existing assigned range size of all the existing processing devices A ratio of the size of the total existing assigned range and a ratio of the existing performance index value of the specific existing processing device to the total value of the new performance index value and all the existing performance index values; Equal, or substantially a control to equalize, characterized in that the run.

請求項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.

分散システムの構成図である。It is a block diagram of a distributed system. 負荷分散装置で使用されるソフトウェアの構成図である。It is a block diagram of the software used with a load distribution apparatus. 処理装置を増設したときの負荷分散装置における処理を示すフローチャートである。It is a flowchart which shows the process in the load distribution apparatus when a processing apparatus is expanded. 処理装置を増設したときの負荷分散装置における処理を示すフローチャートである。It is a flowchart which shows the process in the load distribution apparatus when a processing apparatus is expanded. 分散システムの他の形態の構成図である。It is a block diagram of the other form of a distributed system. 分散システムのさらに他の形態の構成図である。It is a block diagram of the further another form of a distributed system. コンシステント・ハッシュ法を説明するためのID空間の概念図である。It is a conceptual diagram of ID space for demonstrating the consistent hash method.

≪構成≫
まず、本実施形態の構成について説明する。
図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 load distribution device 1, a processing device 2, and a client 3. In this distributed system, a plurality of processing devices 2 perform session control in cooperation, and provide a predetermined service to the client 3. The session control is, for example, call control, and a service such as an Internet telephone is provided using SIP (Session Initiation Protocol).

負荷分散装置1は、クライアント3から受信したメッセージを、例えばコンシステント・ハッシュ法によって、処理装置2に振り分ける。前記メッセージは、例えばSIP信号であり、セッション接続要求などを含む。
処理装置2は、負荷分散装置1から振り分けられたメッセージを呼処理し、クライアント3にサービスを提供する。処理装置2は、計算機やコンピュータなどの物理的な装置であってもよいし、仮想マシンなどの論理的な装置であってもよい。分散システムは、複数の処理装置2などのコンピュータ資源を仮想化して動作するクラスタシステムとすることができる。コンピュータ資源の仮想化には、例えば、VMware(登録商標)を用いることができる。
クライアント3は、メッセージを負荷分散装置1に送信し、処理装置2が提供するサービスを利用する。
The load distribution device 1 distributes the message received from the client 3 to the processing device 2 by, for example, a consistent hash method. The message is, for example, a SIP signal and includes a session connection request and the like.
The processing device 2 performs call processing on the message distributed from the load distribution device 1 and provides a service to the client 3. The processing device 2 may be a physical device such as a computer or a computer, or may be a logical device such as a virtual machine. The distributed system can be a cluster system that operates by virtualizing computer resources such as a plurality of processing devices 2. For example, VMware (registered trademark) can be used for virtualization of computer resources.
The client 3 transmits a message to the load balancer 1 and uses a service provided by the processing device 2.

負荷分散装置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 load distribution device 1, the processing device 2, and the client 3 is a computer including hardware such as an input unit, an output unit, a control unit, and a storage unit. The input unit is composed of, for example, an input interface. The output unit is configured from an output interface, for example. The control unit includes, for example, a CPU (Central Processing Unit) and a dedicated circuit. The storage unit includes, for example, a storage medium such as a random access memory (RAM), a read only memory (ROM), a hard disk drive (HDD), and a flash memory. When the control unit is composed of a CPU, information processing by a computer including the control unit is realized by a program execution process by the CPU. In addition, the storage unit included in the computer stores a program (including a load distribution program) for instructing the function of the computer by the CPU. This realizes cooperation between software and hardware.

本実施形態は、前記情報処理を実行させるプログラムによって実現することができ、そのプログラムをコンピュータによる読み取り可能な記録媒体(例: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 load distribution device 1 includes a processing device detection unit 11, a performance index value identification unit 12, an identifier allocation number determination unit 13, an identifier allocation range selection unit 14, an identifier allocation unit 15, an identifier management table T1, It has components such as a load management table T2. Although there are other components included in the load distribution apparatus 1, the description thereof is omitted.

処理装置検出部11は、分散システムに追加された、つまり増設された処理装置2を検出する。また、処理装置検出部11は、分散システムから処理装置2が削除された、つまり減設されたことを検出する。例えば、分散システムを構成する処理装置2は、生存信号を負荷分散装置1に定期的に送信しており、負荷分散装置1は、その生存信号を所定期間以上受信しなかったときに、その処理装置2が削除されたとみなす。   The processing device detection unit 11 detects the processing device 2 added to the distributed system, that is, added. The processing device detection unit 11 detects that the processing device 2 has been deleted from the distributed system, that is, has been removed. For example, the processing device 2 constituting the distributed system periodically transmits a survival signal to the load distribution device 1, and the load distribution device 1 performs processing when the survival signal has not been received for a predetermined period or longer. It is assumed that the device 2 has been deleted.

なお、前記したとおり、コンシステント・ハッシュ法では、分散システムを構成する処理装置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 processing devices 2 constituting the distributed system. it can. Such one or more processing device identifiers can be placed in the ID space (see FIG. 6). In the present embodiment, one or a plurality of processing device identifiers assigned to one processing device 2 are referred to as “virtual identifiers”. The virtual identifier is an identifier for identifying each of a plurality of virtual processing devices. The value of the virtual identifier is, for example, a hash value obtained by applying a hash function to the IP address or processing device name of the processing device 2. One or a plurality of virtual identifiers are assigned to the existing processing device 2 constituting the distributed system and the processing device 2 added to the distributed system. In the present embodiment, unless otherwise specified, when simply describing a processing device identifier, it means a virtual identifier (corresponding to “identifier” in the claims).

一方、処理装置2は、他の処理装置2と区別して識別するための固有の(1つの)識別子を有している。本実施形態では、そのような固有の識別子を「親識別子」と呼ぶ。親識別子の値は、任意の値とすることができ、特に、ハッシュ値である必要は無い。説明の便宜上、本実施形態では、親識別子は、ID空間に配置されないとする。しかし、親識別子の値をハッシュ値とし、親識別子をID空間に配置するように設計することは可能である。処理装置2に割り当てられた仮想識別子は、その処理装置2が有している親識別子に属している。例えば、処理装置2を分散システムに追加するとき、その処理装置2に対して、1つの親識別子が割り当てられる。また、処理装置2に割り当てられた複数の仮想識別子の一つを親識別子と設計することも可能であるが、本実施形態では、このような設計は行わない。   On the other hand, the processing device 2 has a unique (one) identifier for distinguishing it from other processing devices 2. In the present embodiment, such a unique identifier is referred to as a “parent identifier”. The value of the parent identifier can be an arbitrary value, and does not have to be a hash value. For convenience of explanation, in this embodiment, it is assumed that the parent identifier is not arranged in the ID space. However, it is possible to design so that the value of the parent identifier is a hash value and the parent identifier is arranged in the ID space. The virtual identifier assigned to the processing device 2 belongs to the parent identifier that the processing device 2 has. For example, when the processing device 2 is added to the distributed system, one parent identifier is assigned to the processing device 2. In addition, although it is possible to design one of a plurality of virtual identifiers assigned to the processing device 2 as a parent identifier, in this embodiment, such a design is not performed.

性能指標値特定部12は、分散システムを構成する処理装置2の性能指標値を特定する。よって、性能指標値特定部12は、分散システムに追加された処理装置2の性能指標値を特定する。「性能指標値」とは、処理装置2の処理性能を示すパラメータである。処理装置2の処理性能の具体例としては、例えば、処理装置2のCPU周波数、処理装置2の記憶部の記憶容量、処理装置2がデータストアを使用してデータを記憶するリソース(例:ディスク)の記憶容量がある。処理装置2の処理性能をそのまま性能指標値としてもよい。また、総合的な処理性能を判断するために、ベンチマークプログラムを用いて、それらの処理性能の一部または全部から算出されるスコアを性能指標値としてもよい。   The performance index value specifying unit 12 specifies the performance index value of the processing device 2 constituting the distributed system. Therefore, the performance index value specifying unit 12 specifies the performance index value of the processing device 2 added to the distributed system. The “performance index value” is a parameter indicating the processing performance of the processing device 2. Specific examples of the processing performance of the processing device 2 include, for example, the CPU frequency of the processing device 2, the storage capacity of the storage unit of the processing device 2, and the resources that the processing device 2 stores data using a data store (eg, disk) ) Storage capacity. The processing performance of the processing device 2 may be used as the performance index value as it is. Further, in order to determine the overall processing performance, a score calculated from a part or all of the processing performance may be used as a performance index value by using a benchmark program.

性能指標値が大きいほど、処理装置2の処理性能が大きいとする。性能指標値の大きな処理装置2は、分担する負荷量を多くしても、つまりID空間の担当範囲を長くしても、所望する処理速度を実現することができる。また、処理装置2が物理的な装置であっても、論理的な装置であっても、前記の性能指標値を適用することができる。   It is assumed that the processing performance of the processing device 2 increases as the performance index value increases. The processing device 2 having a large performance index value can realize a desired processing speed even if the load amount to be shared is increased, that is, the range in charge of the ID space is increased. Further, the performance index value can be applied regardless of whether the processing device 2 is a physical device or a logical device.

識別子割当個数決定部13は、処理装置2に割り当てる仮想識別子の個数を決定する。よって、識別子割当個数決定部13は、分散システムに追加された処理装置2に割り当てる仮想識別子の個数を決定する。その個数を決定する方法については、後記する。   The identifier allocation number determination unit 13 determines the number of virtual identifiers to be allocated to the processing device 2. Therefore, the identifier allocation number determination unit 13 determines the number of virtual identifiers to be allocated to the processing devices 2 added to the distributed system. A method for determining the number will be described later.

識別子割当担当範囲選択部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 processing apparatus 2 the virtual identifier assigned to the processing apparatus 2 is arranged. That is, it is determined where in the ID space the virtual identifier assigned to the processing device 2 is arranged. Therefore, when the identifier assignment assigned range selection unit 14 selects which of the assigned ranges of the existing processing device 2 the virtual identifier to be assigned to the processing device 2 added to the distributed system, the identifier assignment assigned range selection unit 14 The assigned range is switched to the assigned range of the added processing device 2. The method for selecting the assigned range will be described later.

識別子割当部15は、所定のハッシュ値が設定された1または複数の仮想識別子を、処理装置2に割り当てる。よって、識別子割当部15は、所定のハッシュ値が設定された1または複数の仮想識別子を、分散システムに追加された処理装置2に割り当てる。これにより、追加された処理装置2の担当範囲、つまり負荷量が定まる。なお、追加された処理装置2の仮想識別子にどのようなハッシュ値を設定するか、つまり、その仮想識別子に対応する仮想的な処理装置の担当範囲の長さをどの程度にするか、ということについては、後記する。   The identifier assigning unit 15 assigns one or more virtual identifiers set with a predetermined hash value to the processing device 2. Therefore, the identifier assigning unit 15 assigns one or more virtual identifiers set with a predetermined hash value to the processing device 2 added to the distributed system. Thereby, the assigned range of the added processing apparatus 2, that is, the load amount is determined. In addition, what hash value is set for the virtual identifier of the added processing device 2, that is, how long the assigned range of the virtual processing device corresponding to the virtual identifier is to be set Will be described later.

識別子管理テーブルT1は、処理装置2に割り当てられた仮想識別子が、ID空間でどのように配置されているかを管理する。識別子管理テーブルT1は、「仮想識別子」と、「担当範囲サイズ」と、「親識別子」といったフィールドを含み、仮想識別子ごとにレコードが作成されている。   The identifier management table T1 manages how the virtual identifier assigned to the processing device 2 is arranged in the ID space. The identifier management table T1 includes fields such as “virtual identifier”, “responsible range size”, and “parent identifier”, and a record is created for each virtual identifier.

「仮想識別子」のフィールドには、1つの処理装置2に対して割り当てられた1または複数の仮想識別子(既存識別子)の値(ハッシュ値)が格納されている。
「担当範囲サイズ」のフィールドには、対応する仮想識別子で識別される仮想的な処理装置に設定された担当範囲(既存担当範囲)のサイズ、つまりID空間の円弧の長さが格納されている。なお、1または複数の仮想識別子で識別される仮想的な処理装置に設定された担当範囲を合わせた担当範囲を「合計既存担当範囲」と呼ぶ。
「親識別子」のフィールドには、対応する仮想識別子が属している親識別子の値が格納されている。
In the “virtual identifier” field, values (hash values) of one or more virtual identifiers (existing identifiers) assigned to one processing device 2 are stored.
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 processing device 2. The load management table T2 includes fields such as “parent identifier”, “distribution destination address”, “performance index value”, and “total assigned range size”, and a record is created for each parent identifier.

「親識別子」のフィールドには、分散システムを処理装置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 processing device 2 in the distributed system. The “parent identifier” field of the load management table T2 is equivalent to the “parent identifier” field of the identifier management table T1.
In the “distribution destination address” field, the IP address of the processing device 2 is stored.
In the “performance index value” field, the performance index value (existing performance index value) of the processing device 2 is stored.
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 processing device 2. In other words, this total value is the size of the assigned range set in the virtual processing device identified by the virtual identifier belonging to the parent identifier assigned to the processing device 2 (the “assigned range size” field of the identifier management table T1). (Corresponding part of).

なお、処理装置2のソフトウェアの構成についての説明は省略するが、処理装置2は、以下に述べる処理を行うことができる。つまり、処理装置2の担当範囲が変更し、メッセージの呼処理を担当しないことになった場合、処理装置2は、そのメッセージの呼処理を新たに担当することになった別の処理装置2に対し、その呼処理に必要となるデータの実体を送信することができる。   Although the description of the software configuration of the processing device 2 is omitted, the processing device 2 can perform the processing described below. That is, when the assigned range of the processing device 2 is changed and the message processing is not performed, the processing device 2 changes to another processing device 2 that is newly responsible for the call processing of the message. On the other hand, the substance of data necessary for the call processing can be transmitted.

≪処理≫
次に、本実施形態の処理について説明する。
図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 load balancer 1. This process starts from step S01. Note that the load balancer 1 stores the value of the number N of processing devices (existing processing devices) 2 constituting the distributed system in the storage unit of the load balancer 1.

ステップS01において、負荷分散装置1の制御部は、分散システムに追加された新たな処理装置2を検出する。ステップS01の処理は、主に、処理装置検出部11の機能に従う。ステップS01の後、ステップS02に進む。   In step S01, the control unit of the load distribution apparatus 1 detects a new processing apparatus 2 added to the distribution system. The processing in step S01 mainly follows the function of the processing device detection unit 11. After step S01, the process proceeds to step S02.

ステップS02において、負荷分散装置1の制御部は、性能指標値特定部12により、新たな処理装置2の性能指標値P(新規性能指標値)を特定する。ステップS02の処理は、主に、性能指標値特定部12の機能に従う。ステップS02の後、ステップS03に進む。   In step S02, the control unit of the load distribution apparatus 1 uses the performance index value specifying unit 12 to specify the performance index value P (new performance index value) of the new processing device 2. The process of step S02 mainly follows the function of the performance index value specifying unit 12. After step S02, the process proceeds to step S03.

ステップS03において、負荷分散装置1の制御部は、新たな処理装置2に割り当てる仮想識別子(新規識別子)の個数Xを決定する。ステップS03の処理は、主に、識別子割当個数決定部13の機能に従う。ステップS03の後、ステップS04に進む。仮想識別子の個数Xは、下記の計算式から決定する。

X = P ÷ PB × XB

ただし、
PB:基準性能指標値
XB:仮想識別子の基準個数
In step S03, the control unit of the load distribution apparatus 1 determines the number X of virtual identifiers (new identifiers) to be assigned to the new processing apparatus 2. The process of step S03 mainly follows the function of the identifier allocation number determination unit 13. After step S03, the process proceeds to step S04. The number X of virtual identifiers is determined from the following calculation formula.

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 processing device 2. The reference performance index value PB is determined at the discretion of the administrator of the distributed system, for example, and is input from the input unit of the load distribution apparatus 1. For example, the administrator of the distributed system can acquire the performance index value of the existing processing apparatus 2 constituting the distributed system, and can use the average value of the performance index values as the reference performance index value. The method for determining the reference performance index value is not limited to this.

仮想識別子の基準個数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 processing device 2. The reference number XB of virtual identifiers is determined at the discretion of the administrator of the distributed system, for example, and is input from the input unit of the load distribution apparatus 1. Further, for example, the number X of virtual identifiers assigned when the performance index value P of the processing device is set as the reference performance index value PB can be set as the reference number XB of virtual identifiers.

ところで、負荷分散装置1の記憶部の記憶領域を考慮すると、1つの処理装置2に複数の仮想識別子を割り当てるという手段による負荷分散の均一化、つまり負荷分散性の向上には、限界がある。つまり、処理装置2に複数の処理装置識別子を割り当てることで、負荷分散装置1が識別子管理テーブルT1を用いて管理する仮想識別子の量が増え、負荷分散装置1の記憶部の記憶領域を圧迫してしまう。よって、仮想識別子の基準個数XBを大きくすると、負荷分散性は向上するが、負荷分散装置1の記憶部の記憶領域を圧迫してしまう。分散システムの管理者は、負荷分散性と、負荷分散装置1の記憶部の記憶領域とのトレードオフを考慮して仮想識別子の基準個数XBを定めることが好ましい。   By the way, considering the storage area of the storage unit of the load balancer 1, there is a limit to uniform load distribution by means of assigning a plurality of virtual identifiers to one processing device 2, that is, improvement of load dispersibility. In other words, by assigning a plurality of processing device identifiers to the processing device 2, the amount of virtual identifiers managed by the load distribution device 1 using the identifier management table T1 increases, and the storage area of the storage unit of the load distribution device 1 is compressed. End up. Therefore, when the reference number XB of the virtual identifier is increased, the load distribution is improved, but the storage area of the storage unit of the load distribution apparatus 1 is compressed. The administrator of the distributed system preferably determines the reference number XB of the virtual identifier in consideration of the trade-off between load distribution and the storage area of the storage unit of the load distribution apparatus 1.

なお、ステップ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 processing device 2 can be obtained by the calculation formula in step S03. Therefore, it is possible to eliminate a situation where a large number of virtual identifiers are unnecessarily created and the storage area of the storage unit of the load distribution apparatus 1 is compressed.

ステップS04において、負荷分散装置1の制御部は、負荷管理テーブルT2を参照して、分散システムを構成する既存の処理装置2についてそれぞれ、

合計担当範囲サイズ(合計既存担当範囲のサイズ) ÷ 性能指標値(既存性能指標値)

となる値(割合)を算出し、その算出結果の降順に負荷管理テーブルT2をソートする。ステップS04の後、ステップS05に進む。
ステップS04により、性能指標値の割には大きすぎる担当範囲サイズを持っている既存の処理装置2を特定することができる。
In step S04, the control unit of the load distribution apparatus 1 refers to the load management table T2 and each of the existing processing apparatuses 2 constituting the distribution system, respectively.

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 processing apparatus 2 having the assigned range size that is too large for the performance index value can be specified.

ステップS05において、負荷分散装置1の制御部は、新たな処理装置2について、

X mod N = 0

という関係式を満たすか否か判定する。ここで、「mod」は、モジュロ関数、つまり整数の除算における剰余を求める関数である。前記関係式を満たす場合(ステップS05でYes)、ステップS06に進み、そうでなければ(ステップS05でNo)、ステップS07に進む。
In step S05, the control unit of the load distribution apparatus 1

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 load distribution device 1 relates to X virtual identifiers to be assigned to the new processing device 2, and Y = X ÷ N virtual identifiers within the assigned range of the existing processing device 2. Decide to place. After step S06, the process proceeds to step S08.

ステップ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 load distribution apparatus 1 relates to the X virtual identifiers to be allocated to the new processing apparatus 2 in the records from the top of the load management table T2 sorted in step S04 to the X mod Nth record. Y = [X ÷ N] +1 virtual identifiers are arranged within the assigned range of each corresponding existing processing apparatus 2 and the remaining existing corresponding to the last record from the (X mod N) + 1st record It is determined that Y = [X ÷ N] virtual identifiers are arranged in the assigned range of each processing apparatus 2. Here, [X] means a floor function of X, that is, a maximum integer not exceeding X. After step S07, the process proceeds to step S08.

例えば、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 new processing device 2 is added to a distributed system composed of six processing devices 2 (N = 6) and 10 virtual identifiers (X = 10) of the new processing device 2 are allocated. In this case, by the process of step S04, for each of the six existing processing devices 2, a value that is (total charge range size / performance index value) is calculated, and the values are arranged in descending order. Two virtual identifiers (= [10 ÷ 6] +1) of new processing devices 2 are assigned to the first to fourth (= 10 mod 6) th processing devices 2. Then, for the remaining two (= 6-10 mod 6) processing devices 2, one (= [10 ÷ 6]) virtual identifier of the new processing device 2 is allocated. Such allocation is performed by preferentially allocating a large number of virtual identifiers from the processing device 2 having an excessively large assigned range to the performance index value and transferring the assigned range to the new processing device 2. means.

ステップ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 new processing device 2 are arranged in the assigned range of the existing processing device 2. In particular, as a result of the processing in step S07, the new processing device 2 is within the processing range of the processing device 2 having a large value of total charge range size / performance index value, that is, the existing processing device 2 sharing a relatively large load. One virtual identifier is arranged. Therefore, the load shared by such an existing processing apparatus 2 can be preferentially reduced. In addition, it is also possible to arrange two or more new virtual identifiers of the processing apparatus 2 within the assigned range of the existing processing apparatuses 2 that share a relatively large load.

ステップS08において、負荷分散装置1の制御部は、既存の処理装置2に対して用いられる自然数の変数iに1を代入する。ステップS08の後、ステップS09に進む。なお、説明の便宜上、i番目の既存の処理装置2の担当範囲内に配置されることになる新たな処理装置2の仮想識別子の個数Yを、「Yi」と表記する。   In step S08, the control unit of the load distribution apparatus 1 substitutes 1 for a natural number variable i used for the existing processing apparatus 2. After step S08, the process proceeds to step S09. For convenience of explanation, the number Y of virtual identifiers of a new processing device 2 to be arranged within the assigned range of the i-th existing processing device 2 is denoted as “Yi”.

ステップ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 load distribution apparatus 1 refers to the identifier management table T1 and starts from the longest assigned range among the assigned ranges corresponding to the virtual identifiers assigned to the i-th existing processing device 2. Select Yi charge ranges up to the second long charge range. Specifically, a virtual identifier having the same parent identifier of the i-th existing processing device 2 is specified in the identifier management table T1. Next, in the identifier management table T1, the assigned range size of the assigned range corresponding to the identified virtual identifier is acquired, the virtual identifier having the largest assigned range size, the second largest virtual identifier of the assigned range size,. The Yi largest virtual identifier of the assigned range size is extracted. Then, the assigned range corresponding to the extracted Yi virtual identifiers is selected. The process of step S09 (and the processes of step S10 to step S15 described later) mainly follows the function of the identifier assignment charge range selection unit 14. After step S09, the process proceeds to step S10.

ステップS09により、i番目の既存の処理装置2の担当範囲のうち、新たな処理装置2に譲るに相応しい担当範囲を特定することができる。また、ステップS09によれば、少なくとも最も長い担当範囲に新たな処理装置2の仮想識別子が配置される、つまり、最も長い担当範囲の一部を新たな処理装置2に譲ることになる。   By step S09, it is possible to identify a responsible range suitable for handing over to the new processing device 2 among the responsible ranges of the i-th existing processing device 2. Further, according to step S09, the virtual identifier of the new processing device 2 is arranged at least in the longest assigned range, that is, a part of the longest assigned range is handed over to the new processing device 2.

例えば、20個の仮想識別子が割り当てられている既存の処理装置2が有する20個の担当範囲に、追加された新たな処理装置2の2つの仮想識別子を配置することになった場合を考える。この場合、この既存の処理装置2は、20個の担当範囲のうち、担当範囲サイズの最も大きな担当範囲と、担当範囲サイズの2番目に大きな担当範囲という2つの担当範囲を選択し、新たな処理装置2の2つの仮想識別子を選択した担当範囲のそれぞれに配置する。   For example, let us consider a case where two virtual identifiers of the new processing device 2 added are arranged in the 20 assigned ranges of the existing processing device 2 to which 20 virtual identifiers are assigned. In this case, the existing processing apparatus 2 selects two assigned ranges, that is, the assigned range with the largest assigned range size and the assigned range with the second largest assigned range size among the 20 assigned ranges, Two virtual identifiers of the processing device 2 are arranged in each of the selected assigned ranges.

ステップ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 load distribution apparatus 1 refers to the load management table T2 and determines the target value CAi of the total assigned range size Ci of the i-th existing processing apparatus 2 (specific existing processing apparatus). To do. After step S10, the process proceeds to step S11. Target value CAi is determined from the following calculation formula.

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 processing device 2 PT: Total value of performance index value of new processing device 2 and performance index value of all existing processing devices 2 (“performance index of load management table T2”) Sum of the values stored in the "value" field)

By step S10, the total charge range size suitable for the performance index value of the i-th existing processing device 2 can be determined.

例えば、仮に、それぞれの性能指標値が、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 new processing device 2 with a performance index value of 12 is added to a distributed system composed of five processing devices 2 with performance index values of 7, 8, 9, 10, and 11, respectively. Then, the case where the virtual identifier of the new processing device 2 is arranged in the assigned range of the processing device 2 with the performance index value 9 is taken up. In this case, the target value CAi is determined such that the assigned range of the processing device 2 with the performance index value 9 is 9 / (7 + 8 + 9 + 10 + 11 + 12) = 3/19 of the entire assigned range.

ステップ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 load distribution apparatus 1 refers to the load management table T <b> 2 to determine the extra assigned range size CEi of the i-th existing processing apparatus 2. The extra charge range size CEi is an extra value of the charge range size of the i-th existing processing device 2. For example, this extra value can be interpreted as an amount of load that is too much for the i-th existing processing device 2. After step S11, the process proceeds to step S12. The extra charge range size CEi is determined from the following calculation formula.

CEi = Ci-CAi

By step S11, the deviation between the total assigned range size Ci of the i-th existing processing device 2 and the target value CAi can be quantitatively evaluated.

ステップS12において、負荷分散装置1の制御部は、i番目の既存の処理装置2について、

CEi ≦ 0

という関係式を満たすか否か判定する。前記関係式を満たす場合(ステップS12でYes)、ステップS13に進み、そうでなければ(ステップS12でNo)、ステップS14に進む。
In step S <b> 12, the control unit of the load distribution apparatus 1 determines the i-th existing processing apparatus 2.

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 load distribution apparatus 1 interrupts the arrangement of Yi virtual identifiers of the new processing device 2 for the assigned range of the i-th existing processing device 2. This is because there is no extra assigned range size for the assigned range of the i-th existing processing apparatus 2, and sufficient load distribution is obtained. After step S13, the process proceeds to step S17. It should be noted that the Yi virtual identifiers of the new processing device 2 whose arrangement has been interrupted may be deleted, or may be arranged in the assigned range of another existing processing device 2. In the flow of FIG. 3, it is deleted.

ステップ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 load distribution apparatus 1 determines the ratio PRi regarding the i-th existing processing apparatus 2. After step S14, the process proceeds to step S15. The ratio PRi is determined from the following calculation formula.

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 processing device 2

ステップ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 load distribution apparatus 1 newly arranges one in each of the Yi assigned ranges selected in step S09 among the assigned ranges of the i-th existing processing device 2. Yi virtual identifier values Vk (k = 1, 2,..., Yi) of the processing device 2 are determined. After step S15, the process proceeds to step S16. The value Vk of Yi virtual identifiers of the new processing device 2 is determined from the following calculation formula.

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 new processing device 2 is arranged within the Yi-th assigned range of the i-th existing processing device 2, the i-th existing processing device 2 The Yi-th assigned range will be divided into two. At this time, the ratio of the assigned range size between the two assigned ranges (one assigned range becomes the assigned range of the new processing device 2) is equal to PRi.

ステップS16において、負荷分散装置1の制御部は、新たな処理装置2の追加に対して、識別子管理テーブルT1と、負荷管理テーブルT2とを更新する。ステップS16の処理は、主に、識別子割当部15の機能に従う。ステップS16の後、ステップS17に進む。   In step S <b> 16, the control unit of the load distribution device 1 updates the identifier management table T <b> 1 and the load management table T <b> 2 with respect to the addition of a new processing device 2. The process of step S16 mainly follows the function of the identifier assigning unit 15. After step S16, the process proceeds to step S17.

具体的には、識別子管理テーブル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 new processing device 2 is created in the identifier management table T1 and the load management table T2. Then, the load balancer 1 determines the parent identifier determined by a known method and assigned to the new processing device 2 as the “parent identifier” field of the identifier management table T1 and the “parent identifier” field of the load management table T2. Add to. Further, the distribution destination address determined by a known method and assigned to the new processing device 2 is added to the “distribution destination address” field of the load management table T2. In addition, the performance index value P of the new processing device 2 identified in step S02 is added to the “performance index value” field of the load management table T2. Further, the Yi virtual identifier values Vk of the new processing device 2 determined in step 15 are added to the “virtual identifier” field of the identifier management table T1. Along with the arrangement of Yi virtual identifiers of the new processing device 2 in the ID space, the value of the “responsible range size” field of the identifier management table T1 and the load for the new processing device 2 and the existing processing device 2 The value of the field of “total assigned range size” in the management table T2 is added and changed as appropriate.

ステップS17において、負荷分散装置1の制御部は、

i ≧ N

という関係式を満たすか否か判定する。前記関係式を満たす場合(ステップS17でYes)、図3の処理全体を終了する。新たな処理装置2に割り当てるX個すべての仮想識別子についてID空間の所定の位置に配置した(またはステップS13により配置を中断した)からである。一方、前記関係式を満たさない場合(ステップS17でNo)、ステップS18に進む。
In step S17, the control unit of the load distribution apparatus 1

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 new processing device 2 are arranged at predetermined positions in the ID space (or the arrangement is interrupted in step S13). On the other hand, when the relational expression is not satisfied (No in step S17), the process proceeds to step S18.

ステップS18において、負荷分散装置1の制御部は、既存の処理装置2に対して用いられる変数iをインクリメントする。ステップS18の後、ステップS9に戻る。これにより、既存の他の処理装置2の担当範囲に配置することになる、新たな処理装置2の1または複数の仮想識別子の割り当てを実行する。
以上で、図3の処理の説明を終了する。
In step S18, the control unit of the load distribution apparatus 1 increments the variable i used for the existing processing apparatus 2. After step S18, the process returns to step S9. Thereby, the allocation of one or a plurality of virtual identifiers of the new processing device 2 to be arranged in the assigned range of the other existing processing device 2 is executed.
Above, description of the process of FIG. 3 is complete | finished.

(分散システムの他の形態)
図1に示す分散システムの負荷分散装置1は、単一の負荷分散プログラムにより動作する単一の装置として説明した。しかし、コンシステント・ハッシュ法を実行する負荷分散装置1は、複数であってもよい。
(Other forms of distributed system)
The load distribution apparatus 1 of the distributed system illustrated in FIG. 1 has been described as a single apparatus that operates according to a single load distribution program. However, there may be a plurality of load distribution apparatuses 1 that execute the consistent hash method.

図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 load distribution apparatuses 1 exist, each load distribution apparatus 1 has the same load distribution program, and a load balancer 4 exists. The load distribution program included in each load distribution apparatus 1 can operate in cooperation.

ロードバランサ4は、クライアント3から受信したメッセージを、例えばラウンドロビンによって、負荷分散装置1のそれぞれに振り分ける。負荷分散装置1は、ロードバランサ4から振り分けられたメッセージを、処理装置2に対して再度振り分ける。   The load balancer 4 distributes the message received from the client 3 to each of the load balancers 1 by, for example, round robin. The load distribution apparatus 1 distributes the message distributed from the load balancer 4 to the processing apparatus 2 again.

各負荷分散装置1はそれぞれ、同一の識別子管理テーブルT1と、同一の負荷管理テーブルT2とを有している。1つの識別子管理テーブルT1または1つの同一の負荷管理テーブルT2が更新されれば、残りの識別子管理テーブルT1または残りの同一の負荷管理テーブルT2も同様に更新することができる。よって、ロードバランサ4からいずれの負荷分散装置1に振り分けられても、まったく同じ論理によってメッセージの振り分け先となる処理装置2を一意に決定することができる。識別子管理テーブルT1または同一の負荷管理テーブルT2の更新契機は、基本的には、処理装置2の追加(増設)と削除(減設)だけである。よって、すべての識別子管理テーブルT1およびすべての負荷管理テーブルT2の内容を同一にする必要があったとしても、処理装置2の追加と削除との頻度が十分に小さければ、識別子管理テーブルT1および負荷管理テーブルT2の更新処理に必要な処理量は、負荷分散処理(呼処理など)に比べて無視できるほど小さい。   Each load distribution apparatus 1 has the same identifier management table T1 and the same load management table T2. If one identifier management table T1 or one identical load management table T2 is updated, the remaining identifier management table T1 or the remaining identical load management table T2 can be similarly updated. Therefore, regardless of which load distribution device 1 is distributed from the load balancer 4, the processing device 2 that is the message distribution destination can be uniquely determined by exactly the same logic. The update trigger of the identifier management table T1 or the same load management table T2 is basically only the addition (expansion) and deletion (reduction) of the processing device 2. Therefore, even if the contents of all identifier management tables T1 and all load management tables T2 need to be the same, if the frequency of addition and deletion of the processing device 2 is sufficiently low, the identifier management table T1 and the load The processing amount required for the update process of the management table T2 is so small that it can be ignored as compared with the load distribution process (call process or the like).

図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 load distribution apparatus 1 and the processing apparatus 2 are combined and integrated as an apparatus. In this case, the program that functions as the load distribution device 1 and the program that functions as the processing device 2 can be integrated into the load distribution program described above. The load distribution device 1 included in the integrated device distributes the message distributed from the load balancer 4 to the processing device 2 integrated with the load distribution device 1 or another processing device 2. Each processing device 2 performs call processing on the distributed message. For example, a general data store using the consistent hash method often has the configuration shown in FIG.

図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 processing devices 2 constituting the distributed system is not uniform, that is, when the performance index values are not the same, when adding a new processing device 2, each process including the new processing device 2 is performed. This is because the value of the virtual identifier of the new processing device 2 is determined so that adjustment such as matching the ratio of the performance index values of the device 2 can be realized (mainly refer to the processing in step S10 in FIG. 3B). ). Thereby, while satisfying the request to distribute the load evenly with respect to the existing processing apparatus 2, the non-uniformity of the processing performance of the processing apparatus 2 and the load distribution are compatible.

また、本実施形態によれば、相対的に大きな負荷を分担する既存の処理装置2の担当範囲内に、新たな処理装置2の仮想識別子をより多く配置し、そのような既存の処理装置2が分担する負荷を優先的に小さくすることができる(主に、図3AのステップS07の処理を参照)。よって、新たな処理装置2を追加するときは、前記した調整を、より高い精度で行うことができる。   Further, according to the present embodiment, a larger number of virtual identifiers of new processing devices 2 are arranged within the assigned range of the existing processing devices 2 that share a relatively large load, and such existing processing devices 2 are arranged. Can be preferentially reduced (mainly refer to step S07 in FIG. 3A). Therefore, when a new processing device 2 is added, the adjustment described above can be performed with higher accuracy.

また、本実施形態によれば、既存の処理装置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 new processing device 2 among one or a plurality of responsible ranges possessed by the existing processing device 2 (mainly, the steps in FIG. 3B). (Refer to the processing of S09). Therefore, when a new processing device 2 is added, the adjustment described above can be performed with higher accuracy.

≪その他≫
前記実施形態は、本発明を実施するために好適のものであるが、その実施形式はこれらに限定されるものでなく、本発明の要旨を変更しない範囲内において種々変形することが可能である。
≪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 processing device 2 is an HTTP (HyperText Transfer Protocol) server, the data identifier included in the message and placed in the ID space is a URL (Uniform Resource) requested by the message. Locator), the IP address of the client 3, a cookie, and the like can be used.

また、例えば、本実施形態では、ID空間に配置する仮想識別子を求めるために、処理装置2のIPアドレスを用いた。しかし、前記したIPアドレスの代わりに、例えばMAC(Media Access Control address)アドレスを用いてもよい。また、IPアドレスやMACアドレスのように、分散システムのネットワーク上で処理装置2を特定できる機能を持つのであればどのような種類のアドレスを用いてもよい。   Further, for example, in the present embodiment, the IP address of the processing device 2 is used to obtain a virtual identifier arranged in the ID space. However, instead of the IP address described above, for example, a MAC (Media Access Control address) address may be used. Further, any type of address may be used as long as it has a function capable of specifying the processing device 2 on the network of the distributed system, such as an IP address or a MAC address.

また、例えば、本実施形態では、分散システムに処理装置2を増設する場合について説明した。しかし、分散システムの処理装置2を減設する場合にも、本発明の考え方を応用することができる。つまり、分散システムの負荷分散性が、減設後の残りの処理装置2の性能指標値の不均一性を考慮して、減設すべき処理装置2を特定することができる。   For example, in this embodiment, the case where the processing apparatus 2 is added to the distributed system has been described. However, the concept of the present invention can also be applied when the processing device 2 of the distributed system is reduced. That is, the load distribution of the distributed system can identify the processing device 2 to be reduced in consideration of the non-uniformity of the performance index values of the remaining processing devices 2 after the reduction.

また、例えば、本実施形態では、分散システムに処理装置2を1つ増設する場合について説明した。しかし、分散システムに処理装置2を2つ以上同時増設する場合についても、本発明の考え方を応用することができる。つまり、2つ以上同時増設する処理装置2のそれぞれに対して割り当てる1または複数の仮想識別子を、ID空間に一度にまとめて配置した場合に相当すると考えることができる。   For example, in this embodiment, the case where one processing apparatus 2 is added to the distributed system has been described. However, the idea of the present invention can also be applied to the case where two or more processing devices 2 are added to the distributed system at the same time. That is, it can be considered that this corresponds to a case where one or a plurality of virtual identifiers assigned to each of the processing devices 2 to be added at the same time are arranged together in the ID space.

また、本実施形態で説明した種々の技術を適宜組み合わせた技術を実現することもできる。
また、本実施形態で説明したソフトウェアをハードウェアとして実現することもでき、ハードウェアをソフトウェアとして実現することもできる。
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 SYMBOLS 1 Load distribution apparatus 2 Processing apparatus 3 Client 4 Load balancer 11 Processing apparatus detection part 12 Performance index value specific | specification part 13 Identifier allocation number determination part 14 Identifier allocation charge range selection part 15 Identifier allocation part T1 Identifier management table T2 Load management table

Claims (4)

クライアントにサービスを提供する処理装置と、コンシステント・ハッシュ法により前記クライアントから得られるメッセージを前記処理装置に振り分ける負荷分散装置と、が通信可能に接続されている分散システムにおいて、前記処理装置に対して、1または複数の識別子を割り当てることで、メッセージの呼処理を担当するための1または複数の担当範囲を、コンシステント・ハッシュ法のID空間に設定することができるように前記負荷分散装置を機能させる負荷分散プログラムであって、
前記負荷分散装置の記憶部が、
前記分散システムを構成する既存の処理装置に割り当てられた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または複数の担当範囲を、コンシステント・ハッシュ法のID空間に設定することができる負荷分散装置であって、
前記負荷分散装置の記憶部が、
前記分散システムを構成する既存の処理装置に割り当てられた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.
JP2012006932A 2012-01-17 2012-01-17 Load balancing program and load balancing apparatus Active JP5690287B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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