JP2012123544A - Load distribution device and program - Google Patents
Load distribution device and program Download PDFInfo
- Publication number
- JP2012123544A JP2012123544A JP2010272830A JP2010272830A JP2012123544A JP 2012123544 A JP2012123544 A JP 2012123544A JP 2010272830 A JP2010272830 A JP 2010272830A JP 2010272830 A JP2010272830 A JP 2010272830A JP 2012123544 A JP2012123544 A JP 2012123544A
- Authority
- JP
- Japan
- Prior art keywords
- node
- key
- management range
- range length
- management
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、分散型データベースシステムや分散ファイルシステムにおける負荷分散に関し、特にDHT(分散ハッシュテーブル、Distributed Hash Table)によるKey-Value型データ管理システムの負荷分散装置及びプログラムに関する。 The present invention relates to load distribution in a distributed database system and a distributed file system, and more particularly to a load distribution apparatus and program for a key-value data management system based on DHT (Distributed Hash Table).
ネットワークで接続された複数のノードを見かけ上1台の蓄積装置とみなしてデータやファイルを管理するシステムとして、分散型データベースシステムや分散ファイルシステムなどがある。このような分散型データベースシステムや分散ファイルシステムでは、「キー」と「値」を組みとしたデータ(以下、「キー」と「値」の組みを(キー、値)と記載する。)を管理するKey-Value型のデータ管理システムが使われている。大規模なKey-Value型のデータ管理システムを実現する方法としては、DHTが提案されている。DHTではシステムを構成する複数のノードにおいて、(キー、値)を分散して保管管理する。 There are a distributed database system, a distributed file system, and the like as a system for managing data and files by regarding a plurality of nodes connected via a network as if they are apparently regarded as one storage device. In such a distributed database system or distributed file system, data including a combination of “key” and “value” (hereinafter, a combination of “key” and “value” is described as (key, value)) is managed. A key-value type data management system is used. As a method for realizing a large-scale key-value type data management system, DHT has been proposed. In DHT, (key, value) is distributed and managed in a plurality of nodes constituting the system.
DHTの代表的な方式としてChordがある(例えば、非特許文献1参照。)。Chordでは、システムに参加するノードは、ハッシュ関数を使ってノードアドレスなどからシステム内で一意なノードIDを生成し、ノードIDを値の順序で円状に配置したオーバーレイネットワークを構成する。システムに(キー、値)を保管する場合、ノードは、キーからハッシュ関数を使ってキーIDを生成し、オーバーレイネットワーク上でそのキーIDに時計周りに近いノードIDのノードにその(キー、値)を保管する。そして、ノードがキーを検索する場合、キーからハッシュ関数を使ってキーIDを生成し、そのキーIDに近いノードIDのノードを発見し、発見したノードからキーに対応する値を取得する。 Chord is a typical DHT system (see, for example, Non-Patent Document 1). In Chord, a node participating in the system generates a unique node ID in the system from a node address or the like using a hash function, and forms an overlay network in which the node IDs are arranged in a circle in the order of values. When storing (key, value) in the system, the node generates a key ID from the key using a hash function, and the node (key, value) has a node ID close to the key ID in the clockwise direction on the overlay network. ). When a node searches for a key, a key ID is generated from the key using a hash function, a node having a node ID close to the key ID is found, and a value corresponding to the key is acquired from the found node.
例えば、「キー」をシステムで分散管理する対象のデータのデータ名とし、「値」をそのデータを記憶しているノードのアドレスとする。データを記憶しているノードは、データ名からハッシュ関数によりキーIDを生成し、オーバーレイネットワーク上でこのキーIDに時計周りに近いノードIDのノードに、データ名等を示す「キー」と自ノードのノードアドレスを示す「値」との対応付けを登録する。データを利用する利用ノードは、利用したいデータのデータ名からキーIDを生成し、このキーIDに時計周りに近いノードIDのノードに問合せを行なって、「キー」に対応した「値」を取得する。利用ノードは、この取得した「値」により、データを記憶しているノードのアドレスを知ることができる。 For example, “key” is a data name of data to be distributed and managed by the system, and “value” is an address of a node storing the data. The node storing the data generates a key ID from the data name by a hash function, and a node having a node ID close to the key ID in the clockwise direction on the overlay network, a “key” indicating the data name and the own node The association with the “value” indicating the node address is registered. The usage node that uses the data generates a key ID from the data name of the data that it wants to use, and queries the node with a node ID close to the clockwise direction to this key ID to obtain a “value” corresponding to the “key”. To do. The using node can know the address of the node storing the data from the acquired “value”.
DHTでは、キーIDに近いノードIDのノードを発見することが必要である。ノードを発見する方式として、システムに参加している各ノードにおいて、システムに参加しているノードの一部を管理するノードテーブルを保有することにより、システム全体でノードテーブルを分散して保管する方式と、システムに参加している全ノードが登録されている完全なノードテーブルを全ノードにおいて共通に持つ方式とがある。 In DHT, it is necessary to find a node having a node ID close to the key ID. As a node discovery method, each node participating in the system has a node table that manages a part of the nodes participating in the system, and the node table is distributed and stored throughout the system. And a method having a complete node table in which all nodes participating in the system are registered in all nodes.
ノードテーブルを分散して保管する方式では、多数のノードから構成される大規模なシステムを構成することが可能であり、完全なノードテーブルを保管する方式は、分散してノードテーブルを保管する方式に比べて大規模なシステムを構成が難しい。一方、ノードテーブルを分散して保管する方式では、キーを検索する場合、複数のノードをルーティングしながら探すため検索時間がかかるが、完全なノードテーブルを持つ方式では、ルーティングの必要がなくO(1)の検索ができる。言い換えれば、定数オーダーの検索ができる。Chordはノードテーブルを各ノードで分散して保管する方式であり、システムに参加しているノードの数をNとすると、キーを管理しているノードを発見するまでのホップ数はO(log2N)(Nの対数のオーダー)となる。 In the method of storing node tables in a distributed manner, it is possible to configure a large-scale system consisting of a large number of nodes. The method of storing complete node tables is a method of storing node tables in a distributed manner. Compared to, it is difficult to configure a large-scale system. On the other hand, in the method of storing the node table in a distributed manner, when searching for a key, it takes time to search while routing a plurality of nodes. However, in the method having a complete node table, there is no need for routing and O ( 1) Search is possible. In other words, a constant order can be searched. Chord is a method of storing the node table in a distributed manner at each node. If the number of nodes participating in the system is N, the number of hops until the node managing the key is found is O (log 2 N) (logarithm order of N).
完全なノードテーブルを保管する方式として非特許文献2、非特許文献3が提案されている。全ノードが完全なノードテーブルを共通に保管する方式では、システムへのノードの参加や離脱があった場合、全ノードがそれにあわせてノードテーブルを修正する。そのため、非特許文献2では、ハッシュ空間を分割した中に、Slice Leaderおよび、Unit Leaderのノードをそれぞれ割り当て、それらのノードを経由して階層的に全ノードに参加や離脱の通知を行っている。また、各ノードはノードテーブルを正しく保つために、ノードテーブルのノードおよび隣接ノードへの生存確認を定期的に行っている。非特許文献3では、各ノードはノードテーブの中からランダムにノードを選択し、定期的にノードテーブルを交換し合っている。
Non-Patent
DHTにおけるハッシュ空間内で、各ノードが管理する範囲は、時計回りと逆方向の隣接ノード(predecessor)のIDから自ノードIDまでとなる。SHA−1などのハッシュ関数を使うことによって生成されるノードIDはランダムな値であるが、一般的に、生成されるノードIDには偏りが生じる。このハッシュ空間上でのノードIDの偏りは、各ノードが管理するキーIDの管理範囲長の偏りとなり、結果として、システムに参加しているノードが管理する(キー、値)のデータ量に差が生じてしまう。 The range managed by each node in the hash space in DHT is from the ID of an adjacent node (predecessor) in the reverse direction to the clockwise direction to the own node ID. The node ID generated by using a hash function such as SHA-1 is a random value, but in general, the generated node ID is biased. The bias of the node ID on the hash space is a bias of the management range length of the key ID managed by each node, and as a result, the difference in the amount of data (key, value) managed by the nodes participating in the system. Will occur.
これに対処する方式として仮想ノード方式がある。仮想ノード方式では、1つのノードが複数の異なるノードIDを生成し、オーバーレイネットワークに参加させることで、各ノードのキー管理範囲長を均等化させる。生成する仮想ノード数は、非特許文献1では1ノード当たりlog(N)個であり、非特許文献3では1ノード当たり60という経験的な値である。仮想ノードのノードIDの生成方法としては、予め決められた方法、例えば、ノードアドレスに1,2,3・・・を順番に追加した値からハッシュ関数により生成する方法や、非特許文献2で提案しているように、元のノードIDからハッシュ空間上で等間隔な位置に配置する方法などがある。
There is a virtual node method as a method for dealing with this. In the virtual node method, one node generates a plurality of different node IDs and participates in the overlay network, thereby equalizing the key management range length of each node. The number of virtual nodes to be generated is an empirical value of log (N) per node in Non-Patent
仮想ノード方式は、各ノードのキー管理範囲長を均等化するだけではなく、ノードの性能が異なる場合に、その性能に応じてノードのキー管理範囲長を調整することにも利用することができる。すなわち、性能が高いノードの仮想ノード数を増やすことで、そのノードのキー管理範囲長を広くさせることができる。しかし、ノードの性能差に応じて仮想ノード数を制御する場合、システム内のノードの性能差が大きいと仮想ノード数を多くする必要がある。そのため、ノードテーブルサイズの増大や、管理オーバーヘッドの増加などの問題が生じる。これを解決するために、特許文献1では、ハッシュ空間上でノードが管理する境界を、隣接ノード間の性能差に応じて各ノード間で調整している。
The virtual node method can be used not only to equalize the key management range length of each node but also to adjust the key management range length of the node according to the performance when the node performance differs. . That is, by increasing the number of virtual nodes of a node with high performance, the key management range length of that node can be increased. However, when the number of virtual nodes is controlled according to the difference in node performance, it is necessary to increase the number of virtual nodes if the performance difference between the nodes in the system is large. Therefore, problems such as an increase in node table size and an increase in management overhead occur. In order to solve this, in
上述のように、DHTでは、ハッシュ関数を使って生成したノードIDを用いた場合、ハッシュ空間上でのノードの配置に偏りが生じ、その結果として各ノードが管理するキー管理範囲長に差が生じる。そこで、これを解決するために、各ノードに仮想ノードを割り当てる方法が用いられている。しかし、各ノードに固定数の仮想ノードを割り当てると、ノードテーブルサイズの増加や、管理オーバーヘッドの増加などによって必要な記憶容量が増大し、リソースの負荷が生じる。そのため、むやみに多数の仮想ノードを割り当てることには問題がある。
また、特許文献1のように、隣接ノード間の割り当て範囲を調整する方式であっても、ノードの配置がもともと偏っている場合には、割り当て範囲の調整範囲が狭くあるいは広くなりすぎてしまう。そのため、固定的数を割り当てる仮想ノード手法を併用することが必要となり、根本的な解決にはならない。
As described above, in the DHT, when the node ID generated using the hash function is used, there is a bias in the arrangement of the nodes on the hash space, and as a result, there is a difference in the key management range length managed by each node. Arise. In order to solve this problem, a method of assigning a virtual node to each node is used. However, if a fixed number of virtual nodes are allocated to each node, the required storage capacity increases due to an increase in the node table size, an increase in management overhead, and the like, resulting in a resource load. Therefore, there is a problem in unnecessarily allocating a large number of virtual nodes.
Further, even if the allocation range between adjacent nodes is adjusted as in
本発明は、このような事情を考慮してなされたもので、複数のノード装置によりデータを分散して管理するシステムにおいて、システムに参加しているノード装置を管理するために使用する記憶容量の増加を抑えながら、各ノード装置におけるデータの管理範囲長に偏りをなくすことができる負荷分散装置及びプログラムを提供する。 The present invention has been made in consideration of such circumstances, and in a system in which data is distributed and managed by a plurality of node devices, the storage capacity used for managing the node devices participating in the system is reduced. Provided are a load distribution device and a program capable of eliminating a bias in a data management range length in each node device while suppressing an increase.
[1] 本発明の一態様は、データ管理システムを構成するノード装置を特定するノード特定情報を含んだノードテーブルを記憶するとともに、前記ノード特定情報と、前記ノード特定情報により特定される前記ノード装置に対して生成されたノードIDとの対応付けを示すキー検索用ノードテーブルを記憶する記憶部と、前記データ管理システムに参加したノード装置のノード特定情報を前記ノードテーブルに書き込み、前記データ管理システムから離脱したノード装置のノード特定情報を前記ノードテーブルから削除するノードテーブル管理部と、前記キー検索用ノードテーブルに設定されているノードIDと、前記ノードIDに対応付けられた前記ノード特定情報とに基づいて、各ノード装置が管理対象とするキーの管理範囲長を算出する管理範囲長演算部と、前記ノードテーブル内のノード特定情報と、前記ノード特定情報により特定されるノード装置に対して生成されたノードIDとの対応付けを設定したキー検索用ノードテーブルを前記記憶部に書き込み、生成した前記キー検索用ノードテーブルに基づいて前記管理範囲長演算部により算出された各ノード装置の管理範囲長の差異が所定の条件に合致すると判断するまで、前記管理範囲長に基づいて選択した前記ノード装置に対して新たにノードIDを生成するとともに、前記ノード装置のノード特定情報と新たに生成した前記ノードIDとの対応付けを前記キー検索用ノードテーブルに追加して更新する処理を繰り返す仮想ノード登録部と、前記キー検索用ノードテーブル内のノードIDと、指定されたキーに基づいて、前記キーに対応した値を管理している前記ノード装置のノード特定情報を取得するキーテーブル処理部と、を備えることを特徴とする負荷分散装置である。
この態様によれば、キーに対応した値を保持するノード装置を検索するためにノード装置の特定情報とノードIDとを対応づけたキー検索用ノードテーブルを用いるKey-Value型データ管理システムにおいて、ノード装置の参加や離脱が発生した際、負荷分散装置は、ノード装置間での管理範囲長の差異が所定条件を満たすまで(一例として、各ノード装置のキーの管理範囲長の差異が所定の範囲内になるまで、あるいは、ノード性能値によって重み付けした各ノード装置のキーの管理範囲長の差異が所定の範囲内になるまで、言い換えれば、各ノード装置のノード性能値に対するキーの管理範囲長の比の差異が所定の範囲内になるまで)、適宜選択されたノード装置(一例として、管理範囲長が最も狭いノード装置)に対して仮想ノードのノードIDを割り当ててキーの管理範囲長を増加させる処理を繰り返し、ノード装置の特定情報と当該ノード装置に対して生成されたノードIDとからなるキー検索用ノードテーブルを生成する。
なお、ノード装置のキーの管理範囲は、そのノード装置のノード特定情報に対応してキー検索用ノードテーブルに登録されているノードIDに基づいて決まる。ノード装置に割り当てるノードIDは、そのノード装置のノード特定情報と、当該ノード装置に割り当て済みのノードID毎に固有の情報とを元に算出されたハッシュ値を用いることができる。
一例として、ノードIDに対応した管理範囲は、隣接するノードIDから自ノードIDまでである。但し、範囲の境界がどちらに属するかは適宜予め定める。
管理範囲長は、上記の管理範囲の長さであり、各ノード装置のキーの管理範囲長は、そのノード装置に割り当てられた各ノードIDに対応した管理範囲の長さの総計である。
各ノードのキーの管理範囲長の差異を所定の範囲内とすることは、各ノード装置の負荷を同等に近くするということである。
これにより、各ノード装置のキーの管理範囲長の不均衡を効率的に是正し、システム全体に割り当てる仮想ノードの数を抑えることができる。キーの管理範囲長の不均衡を是正することによって各ノード装置の負荷の偏りも是正され、従って、キー検索用ノードテーブルの増加を抑えながら、各ノード装置の負荷分散を行なうことが可能となる。
[1] One aspect of the present invention stores a node table including node specifying information for specifying a node device constituting a data management system, and the node specified by the node specifying information and the node specifying information. A storage unit for storing a key search node table indicating a correspondence with a node ID generated for the device; and node identification information of a node device participating in the data management system is written to the node table, and the data management is performed. A node table management unit that deletes node specifying information of a node device that has left the system from the node table, a node ID set in the key search node table, and the node specifying information associated with the node ID Based on the above, the management range length of the key to be managed by each node device is calculated. A key search node table in which a correspondence between a management range length calculation unit, node identification information in the node table, and a node ID generated for the node device identified by the node identification information is set. The management range length until it is determined that the difference in management range length of each node device calculated by the management range length calculation unit based on the generated key search node table is written in the storage unit and meets a predetermined condition A new node ID is generated for the node device selected based on the node, and a correspondence between the node specifying information of the node device and the newly generated node ID is added to the key search node table. Based on the virtual node registration unit that repeats the updating process, the node ID in the key search node table, and the specified key A load balancer, characterized in that it comprises a key table processing unit for acquiring node identification information of the node device which manages a value corresponding to the key.
According to this aspect, in the key-value type data management system using the key search node table in which the node device specific information and the node ID are associated with each other in order to search for the node device that holds the value corresponding to the key. When a node device joins or leaves, the load balancer determines that the difference in management range length between node devices satisfies a predetermined condition (for example, the difference in key management range length of each node device is a predetermined value). Until the difference in key management range length of each node device weighted by the node performance value falls within a predetermined range, in other words, the key management range length for the node performance value of each node device Until the difference in the ratios falls within a predetermined range), the node of the virtual node is selected with respect to the appropriately selected node device (for example, the node device having the narrowest management range length). Repeating a process of increasing the control range key length by assigning ID, and generate a key search node table comprising a node ID generated for a particular information and the node device of the node device.
The key device management range is determined based on the node ID registered in the key search node table corresponding to the node specifying information of the node device. As the node ID assigned to the node device, a hash value calculated based on the node identification information of the node device and information unique to each node ID already assigned to the node device can be used.
As an example, the management range corresponding to the node ID is from the adjacent node ID to the own node ID. However, which range boundary belongs to is determined in advance as appropriate.
The management range length is the length of the management range described above, and the management range length of the key of each node device is the total of the lengths of the management ranges corresponding to the respective node IDs assigned to the node device.
Making the difference in the key management range length of each node within a predetermined range means that the load of each node device is made nearly equal.
Thereby, the imbalance of the key management range length of each node apparatus can be corrected efficiently, and the number of virtual nodes allocated to the entire system can be suppressed. Correcting the imbalance in the key management range length also corrects the load imbalance of each node device. Therefore, it is possible to distribute the load of each node device while suppressing an increase in the key search node table. .
[2] 本発明の一態様は、上述する負荷分散装置であって、前記管理範囲長演算部は、前記ノード装置の管理範囲長を、前記ノード装置の性能を示す値に応じて重み付けし、前記仮想ノード登録部は、前記ノード装置の性能を示す値に応じて重み付けされた前記管理範囲長の差異が所定の条件に合致するかを判断する、ことを特徴とする。
この態様によれば、負荷分散装置は、ノード性能の指標値によって各ノード装置におけるキーの管理範囲長を重み付けし、重み付けした管理範囲長が同等に近くなるまで、重み付けした管理範囲長が最も狭いノード装置に対して仮想ノードのノードIDを割り当てる。一例として、キーの管理範囲長の重み付けは、キーの管理範囲長に、CPUの性能を示す値の逆数を乗算したり、総ディスク容量の逆数を乗算したりすることにより行なう。言い換えれば、ノードの性能値に対するキーの管理範囲長の比の値を用いる。
従って、ノード装置の処理能力やメモリ容量などに応じた管理範囲長を各ノード装置に割り当てることができる。
[2] One aspect of the present invention is the load distribution device described above, wherein the management range length calculation unit weights the management range length of the node device according to a value indicating the performance of the node device, The virtual node registration unit determines whether a difference in the management range length weighted according to a value indicating the performance of the node device matches a predetermined condition.
According to this aspect, the load distribution device weights the key management range length in each node device by the node performance index value, and the weighted management range length is the narrowest until the weighted management range length becomes nearly equal. A node ID of the virtual node is assigned to the node device. As an example, the key management range length is weighted by multiplying the key management range length by the reciprocal of a value indicating the performance of the CPU or the reciprocal of the total disk capacity. In other words, the value of the ratio of the key management range length to the node performance value is used.
Therefore, it is possible to assign a management range length corresponding to the processing capability and memory capacity of the node device to each node device.
[3] 本発明の一態様は、上述する負荷分散装置であって、前記管理範囲長演算部は、前記仮想ノード登録部により前記ノード装置のノード特定情報と新たに生成した前記ノードIDとの対応付けが前記キー検索用ノードテーブルに追加された場合、前記キー検索用ノードテーブルに追加されたノードIDと隣接するノードIDを特定してキーの管理範囲長を算出し、新たにノードIDが生成された前記ノード装置の管理範囲長を、算出した前記管理範囲長を加算した値に更新するとともに、前記キー検索用ノードテーブルから前記仮想ノードのノードIDに隣接するノードIDに対応したノード特定情報を読み出し、読み出したノード特定情報により特定される前記ノード装置のキー管理範囲長を、算出した前記管理範囲長を減算した値に更新する、ことを特徴とする。
この態様によれば、負荷分散装置は、一旦算出した各ノード装置のキーの管理範囲長を記憶しておき、ノード装置に仮想ノードのノードIDが追加されてキー検索用ノードテーブルが更新されたときは、追加されたノードIDの仮想ノードについてキーの管理範囲長を算出する。そして、記憶していた管理範囲長のうち、仮想ノードが追加されたノード装置と、仮想ノードに隣接するノードに対応したノード装置とについて記憶していたキー管理範囲長のみを変更する。
これにより、各ノード装置のキーの管理範囲長を高速に算出することが可能となる。
[3] One aspect of the present invention is the load distribution apparatus described above, wherein the management range length calculation unit is configured to perform node identification information of the node device and the node ID newly generated by the virtual node registration unit. When the association is added to the key search node table, the node ID adjacent to the node ID added to the key search node table is specified to calculate the key management range length. Update the generated management range length of the node device to a value obtained by adding the calculated management range length, and specify a node corresponding to a node ID adjacent to the node ID of the virtual node from the key search node table Information is read, and the key management range length of the node device identified by the read node identification information is subtracted from the calculated management range length. It is characterized by updating.
According to this aspect, the load distribution device stores the key management range length of each node device once calculated, and the node ID of the virtual node is added to the node device and the key search node table is updated. If so, the key management range length is calculated for the virtual node with the added node ID. Then, of the stored management range length, only the key management range length stored for the node device to which the virtual node is added and the node device corresponding to the node adjacent to the virtual node is changed.
This makes it possible to calculate the key management range length of each node device at high speed.
[4] 本発明の一態様は、上述する負荷分散装置であって、前記ノード特定情報は、前記ノード装置のアドレスであることを特徴とする。
この態様によれば、キー検索用ノードテーブルに、ノード特定情報としてノードアドレスが設定される。
これにより、キーテーブル処理部は、キー検索用ノードテーブルからキーを管理するノード装置のアドレスを取得することができるため、読み出したアドレスを宛先に用いてキーに対応する値の問合せを行なうことが可能となる。
[4] One aspect of the present invention is the load distribution apparatus described above, wherein the node specifying information is an address of the node apparatus.
According to this aspect, the node address is set as the node specifying information in the key search node table.
As a result, the key table processing unit can acquire the address of the node device that manages the key from the key search node table, so that the value corresponding to the key can be inquired using the read address as the destination. It becomes possible.
[5] 本発明の一態様は、負荷分散装置として用いられるコンピュータを、データ管理システムを構成するノード装置を特定するノード特定情報を含んだノードテーブルを記憶するとともに、前記ノード特定情報と、前記ノード特定情報により特定される前記ノード装置に対して生成されたノードIDとの対応付けを示すキー検索用ノードテーブルを記憶する記憶部、前記データ管理システムに参加したノード装置のノード特定情報を前記ノードテーブルに書き込み、前記データ管理システムから離脱したノード装置のノード特定情報を前記ノードテーブルから削除するノードテーブル管理部、前記キー検索用ノードテーブルに設定されているノードIDと、前記ノードIDに対応付けられた前記ノード特定情報とに基づいて、各ノード装置が管理対象とするキーの管理範囲長を算出する管理範囲長演算部、前記ノードテーブル内のノード特定情報と、前記ノード特定情報により特定されるノード装置に対して生成されたノードIDとの対応付けを設定したキー検索用ノードテーブルを前記記憶部に書き込み、生成した前記キー検索用ノードテーブルに基づいて前記管理範囲長演算部により算出された各ノード装置の管理範囲長の差異が所定の条件に合致すると判断するまで、前記管理範囲長に基づいて選択した前記ノード装置に対して新たにノードIDを生成するとともに、前記ノード装置のノード特定情報と新たに生成した前記ノードIDとの対応付けを前記キー検索用ノードテーブルに追加して更新する処理を繰り返す仮想ノード登録部、前記キー検索用ノードテーブル内のノードIDと、指定されたキーに基づいて、前記キーに対応した値を管理している前記ノード装置のノード特定情報を取得するキーテーブル処理部、として機能させることを特徴とするプログラムである。 [5] According to one aspect of the present invention, a computer used as a load distribution apparatus stores a node table including node specification information for specifying a node device constituting a data management system, and the node specification information; A storage unit for storing a key search node table indicating a correspondence with a node ID generated for the node device specified by the node specifying information, and node specifying information of the node device participating in the data management system Corresponds to the node ID that is written in the node table, deletes node identification information of the node device that has left the data management system from the node table, the node ID set in the key search node table, and the node ID Each node device based on the node identification information attached. A management range length calculation unit for calculating a management range length of a key to be managed, a correspondence between node identification information in the node table and a node ID generated for a node device identified by the node identification information A key search node table in which an attachment is set is written in the storage unit, and a difference in management range length of each node device calculated by the management range length calculation unit based on the generated key search node table is a predetermined condition A node ID is newly generated for the node device selected based on the management range length, and the node identification information of the node device is associated with the newly generated node ID Is added to the key search node table, and the virtual node registration unit that repeats the process of updating the key search node table, A program that functions as a key table processing unit that acquires node identification information of the node device that manages a value corresponding to the key based on a node ID and a specified key.
本発明によれば、複数のノード装置によりデータを分散して管理するKey-Value型データ管理システムにおいて、システムに参加しているノード装置を管理するために使用する記憶容量の増加を抑えながら、各ノード装置におけるデータの管理範囲長に偏りをなくすことができる。 According to the present invention, in a key-value type data management system that distributes and manages data by a plurality of node devices, while suppressing an increase in storage capacity used to manage node devices participating in the system, It is possible to eliminate the bias in the data management range length in each node device.
以下、図面を参照しながら本発明の実施形態を詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[1.第1の実施形態]
[1.1 全体構成]
図1は、本発明の第1の実施形態によるデータ管理システムの構成図である。本実施形態のデータ管理システムは、DHTを用いたKey-Value(キー(鍵)−値)型データ管理システムであり、例えば、分散型データベースシステムや、分散ファイルシステムなどである。同図に示すように、データ管理システムは、通信ネットワーク5を介して複数のノード装置1を接続することにより構成される。通信ネットワーク5は、例えば、ルータなどの通信装置やケーブルなどの通信線等の各種ネットワーク装置から構成されるIP(Internet Protocol、インターネットプロトコル)通信網である。ノード装置1は、負荷分散装置10とデータ記憶部30とを備える。データ記憶部30は、データ管理システムにおいて管理対象となるファイル等のデータを記憶する。
[1. First Embodiment]
[1.1 Overall configuration]
FIG. 1 is a configuration diagram of a data management system according to the first embodiment of the present invention. The data management system of this embodiment is a key-value (key (value) -value) type data management system using DHT, for example, a distributed database system or a distributed file system. As shown in the figure, the data management system is configured by connecting a plurality of
[1.2 負荷分散装置とデータ管理システムとの関係]
負荷分散装置10は、各ノード装置1内で動作する。ノード装置1は、例えば、ノードを実行するコンピュータ装置であり、負荷分散装置10は、ノード装置1がアプリケーションプログラムを実行することにより実行されるプロセスに相当する。各負荷分散装置10は、Key-Value型データ管理システムに参加しているノード装置1を管理するノードテーブルと、キー管理を行っているノード装置1の発見に用いるキー検索用ノードテーブルを保持している。Key-Value型データ管理システムへの新たなノード装置1の参加や、Key-Value型データ管理システムに参加していたノード装置1の離脱が発生した場合に、負荷分散装置10が動作してノードテーブル及びキー検索用ノードテーブルを修正する。全ての負荷分散装置10は同じ動作をするため、Key-Value型データ管理システム内の全ての負荷分散装置10のノードテーブルとキー検索用ノードテーブルは同一に保たれる。
[1.2 Relationship between load balancer and data management system]
The
本実施形態において、ノードテーブルには、Key-Value型データ管理システムに参加しているノード装置1のみがノードとして登録される。一方、キーの登録や検索に使用されるキー検索用ノードテーブルには、DHTにおける円状のオーバーレイネットワークを構成するノードが登録される。オーバーレイネットワークを構成するノードには、ノード装置1のように実体があるノードと、ノード装置1に対して仮想的に生成された仮想ノードとが含まれる。本実施形態では、キー検索用ノードテーブルに仮想ノードを登録することにより負荷分散を実現する。
In the present embodiment, only the
なお、DHTを用いたKey-Value型データ管理システムの構成方法や、ノードの参加・離脱の通知方法は、既存のKey-Value型データ管理システムの技術を適用する。 The existing key-value type data management system technology is applied to the configuration method of the key-value type data management system using DHT and the node joining / leaving notification method.
[1.3 負荷分散装置の構成]
図2は、本実施形態による負荷分散装置10の構成を示すブロック図であり、本実施形態と関係する機能ブロックのみ抽出して示している。同図に示すように、負荷分散装置10は、ノードテーブル管理部11、仮想ノード登録部12、ノードID生成部13、管理範囲長演算部14、記憶部15、及び、キーテーブル処理部16を備えて構成される。
[1.3 Configuration of load balancer]
FIG. 2 is a block diagram showing a configuration of the
記憶部15は、ハードディスク装置や半導体メモリなどで実現され、ノードテーブル21、キー検索用ノードテーブル22、及び、キーテーブル23を記録する。ノードテーブル21は、データ管理システムを構成するノード装置1のノードIDとアドレスを対応付けたデータである。キー検索用ノードテーブル22は、オーバーレイネットワークに参加しているノードのノードIDとアドレスを対応付けたデータである。キーテーブル23は、「キー」と「値」の組みを示すデータである。
The
ノードテーブル管理部11は、データ管理システムに新たなノード装置1が参加した場合や、データ管理システムに参加していたノード装置1が離脱した場合に、記憶部15に記憶されているノードテーブル21を更新する。ノードID生成部13は、ノード装置1のアドレスと仮想ノードの数に基づいてノードIDを生成する。管理範囲長演算部14は、キー検索用ノードテーブル22に設定されているノードIDに基づいて各ノード装置1が管理するキーの範囲の広さである管理範囲長を算出する。
The node
仮想ノード登録部12は、管理範囲長演算部14が算出した管理範囲長が最も狭いノード装置1に対して仮想ノードを生成し、記憶部15に記憶されているキー検索用ノードテーブル22を更新する処理を、各ノード装置1の管理範囲長の差異が所定以下になるか、仮想ノード数が上限に達するまで繰り返す。仮想ノード登録部12が備えるメモリ121は、各ノード装置1の管理範囲長の差異が所定以下であると判断するための条件である管理範囲しきい値Thと、仮想ノード数の上限を示す最大仮想ノード数Vmaxを記憶する。管理範囲しきい値Thは、最も狭い管理範囲長と最も広い管理範囲長の比についてのしきい値である。キーテーブル処理部16は、記憶部15に保存されているキーテーブル23を参照して、キーに対応した値を読み出す。
The virtual
[1.4 データ構成]
図3は、本実施形態によるノードテーブル21のデータ構成例を示す図である。
同図に示すように、ノードテーブル21は、データ管理システムを構成するノード装置1のノードIDとノードアドレスと対応付けたデータのリストである。ノードテーブル21は、ノードIDの数値順にソートされている。ノードテーブル21のノードIDには、仮想ノードのノードIDは含まれない。本実施形態では、ノード装置1のIP(Internet Protocol)アドレスとポート番号の組み合わせをノードアドレスとして用いる。
[1.4 Data structure]
FIG. 3 is a diagram illustrating a data configuration example of the node table 21 according to the present embodiment.
As shown in the figure, the node table 21 is a list of data associated with the node ID and node address of the
図4は、本実施形態によるキー検索用ノードテーブル22のデータ構成例を示す図である。
同図に示すように、キー検索用ノードテーブル22は、オーバーレイネットワークを構成するノードのノードID、ノードアドレス、及び、仮想ノード数を対応付けたデータのリストである。キー検索用ノードテーブル22は、ノードIDの数値順にソートされている。キー検索用ノードテーブル22のノードIDには、ノード装置1のノードIDに加え、仮想ノードのノードIDも含まれる。DHTを用いたKey-Value型データ管理システムである本実施形態のデータ管理システムは、キー管理を行うノードの発見にこのキー検索用ノードテーブル22を用いる。すなわち、キー検索用ノードテーブル22がDHTにおける円状のオーバーレイネットワークを示している。ノードアドレスは、ノード装置1を特定するノード特定情報として用いることができる。
FIG. 4 is a diagram illustrating a data configuration example of the key search node table 22 according to the present embodiment.
As shown in the figure, the key search node table 22 is a list of data in which node IDs, node addresses, and virtual node numbers of nodes constituting the overlay network are associated with each other. The key search node table 22 is sorted in numerical order of node IDs. In addition to the node ID of the
図5は、本実施形態によるキーテーブル23のデータ構成例を示す図である。
同図に示すように、キーテーブル23は、データ管理システムで管理するキーと値との組み合わせを対応付けたデータのリストである。本実施形態では、キーがデータを特定するデータIDであり、値がデータを記憶しているノード装置1のノードアドレスである場合を例に説明する。
FIG. 5 is a diagram illustrating a data configuration example of the key table 23 according to the present embodiment.
As shown in the figure, the key table 23 is a list of data in which combinations of keys and values managed by the data management system are associated. In the present embodiment, a case where the key is a data ID for specifying data and the value is the node address of the
[1.5 負荷分散装置の動作]
次に、負荷分散装置10の動作について説明する。
まず、DHTを用いたKey-Value型データ管理システムにおける参加及び離脱の通知手順の一例について説明する。ノード装置1がオーバーレイネットワークに参加する場合、当該ノード装置1内の負荷分散装置10は、既にオーバーレイネットワークに参加しているいずれかのノード装置1内の負荷分散装置10に対して参加を要求する。参加の要求を受信した負荷分散装置10は、ノードの参加をスライス・リーダー(Slice Leader)へ通知し、スライス・リーダーは他のスライス・リーダーへ通知を行い、さらに、スライス・リーダーから自領域内のユニット・リーダー(Unit Leader)への通知を行なう。このように、ノードの参加情報をオーバーレイネットワーク内の全ノードに通知する。なお、負荷分散装置10は、ノードテーブル21に登録されているノードIDに基づいてスライス・リーダー、ユニット・リーダーなどの通知先を決定する。
[1.5 Operation of load balancer]
Next, the operation of the
First, an example of a joining / leaving notification procedure in a key-value data management system using DHT will be described. When the
また、負荷分散装置10がノード装置1の離脱を検出した場合、参加の通知の場合と同様に、ノードの離脱をスライス・リーダーへ通知し、スライス・リーダーは他のスライス・リーダーへ通知を行い、さらに、スライス・リーダーから自領域内のユニット・リーダーへの通知を行なう。負荷分散装置10は、オーバーレイネットワークから離脱した他のノード装置1内の負荷分散装置10から離脱の通知を受けるか、定期的に他のノード装置1に送信する生存確認信号に対する応答を受信しないことによって離脱を検出する。なお、生存確認信号は、ノードテーブル21に登録されているノードアドレスを宛先として送信される。
When the
なお、上述した参加・離脱の通知手順は、DHTを用いたオーバーレイネットワークの構成方法の一つであるOne Hoopの例であり、DHTを用いたKey-Value型データ管理システムの他の既存の技術により、全ノード装置1に参加や離脱を通知することができる。
The above-described participation / leaving notification procedure is an example of One Hoop, which is one of the overlay network configuration methods using DHT, and other existing technologies of the key-value type data management system using DHT. Thus, it is possible to notify participation and withdrawal to all the
[1.5.1 ノードテーブル管理部の動作]
図6は、本実施形態によるノードテーブル管理部11のノードテーブル更新処理フローを示す図である。
ノードテーブル管理部11は、他の負荷分散装置10からノードの参加の通知あるいは離脱の通知を受信する。参加の通知には、「参加」を示す通知種別、及び、参加したノード装置1のノードアドレスが含まれる。また、離脱の通知には、「離脱」を示す通知種別、及び、離脱したノード装置1のノードアドレスが含まれる。ノードテーブル管理部11は、参加の通知または離脱の通知に含まれるノードアドレスと、仮想ノード数「0」とをノードID生成部13に出力し、ノードIDの生成を指示する。ノードID生成部13はノードアドレスと仮想ノード数の組み合わせからノードIDを生成し、ノードテーブル管理部11に通知する(ステップS11)。
[1.5.1 Operation of node table manager]
FIG. 6 is a diagram showing a node table update processing flow of the node
The node
続いて、ノードテーブル管理部11は、通知種別が「参加」であると判断した場合(ステップS12:YES)、記憶部15に記憶されているノードテーブル21に、ステップS11において管理範囲長演算部14から受信したノードIDと、参加の通知に設定されているノードアドレスとを対応付けたデータを追加する(ステップS13)。
Subsequently, when the node
一方、ノードテーブル管理部11は、通知種別が「離脱」であると判断した場合(ステップS12:NO)、記憶部15に記憶されているノードテーブル21から、ステップS11において管理範囲長演算部14から受信したノードIDと、当該ノードIDに対応付けられたノードアドレスの組のデータを削除する(ステップS14)。
On the other hand, when the node
ステップS13またはステップS14の処理の後、ノードテーブル管理部11は、仮想ノード登録部12に実行指示を出力し、更新後のノードテーブル21に基づくキー検索用ノードテーブルの生成を指示する(ステップS15)。
After the process of step S13 or step S14, the node
なお、ノードテーブル管理部11は、ノードテーブル21に登録されているノードアドレスを宛先として定期的に他の負荷分散装置10に生存確認信号を送信し、応答がなかった場合、その宛先のノードアドレスが設定されたノードの離脱の通知を受信したものとして、上記処理を行なう。
また、ノードテーブル管理部11は、離脱の通知を受信した場合、ステップS11の処理を行なわず、ステップS13において、離脱の通知に設定されているノードアドレスと、当該ノードアドレスに対応付けられたノードIDの組のデータを削除してもよい。
The node
Further, when the node
以上の動作により、DHTを用いたKey-Value型データ管理システムに参加しているノードを記録したノードテーブル21が維持される。 With the above operation, the node table 21 in which the nodes participating in the key-value type data management system using DHT are recorded is maintained.
[1.5.2 仮想ノード登録部の動作]
図7は、本実施形態による仮想ノード登録部12のキー検索用ノードテーブル更新処理フローを示す図である。このキー検索用ノードテーブル更新処理により、仮想ノード登録部12は、ノードテーブル21からキー検索用ノードテーブル22を生成する。仮想ノード登録部12のメモリ121には、図示しない入力手段などにより設定された管理範囲しきい値Thと、最大仮想ノード数Vmaxが予め記憶される。
[1.5.2 Operation of virtual node registration unit]
FIG. 7 is a diagram showing a key search node table update processing flow of the virtual
仮想ノード登録部12は、図6のステップS15においてノードテーブル管理部11が出力したキー検索用ノードテーブル生成の実行指示を受信する。仮想ノード登録部12は、記憶部15に現在記憶されているキー検索用ノードテーブル22の内容を削除し、ノードテーブル21の現在の設定内容をキー検索用ノードテーブル22へコピーする(ステップS21)。このとき、仮想ノード登録部12は、キー検索用ノードテーブル22にコピーした各データのノードID及びノードアドレスの組に対応させて、仮想ノード数のフィールドに「0」を設定する。
The virtual
続いて、仮想ノード登録部12は、生成済みの仮想ノード数のカウンタとして利用するパラメータNに「0」をセットする(ステップS22)。仮想ノード登録部12は、パラメータNがメモリ121に記憶されている最大仮想ノード数Vmaxより小さいか否かを判断する(ステップS23)。仮想ノード登録部12は、パラメータNが最大仮想ノード数Vmaxより小さいと判断した場合(ステップS23:NO)、DHTを用いたKey-Value型データ管理システムに参加しているノード装置1の管理範囲長のうち、最も大きい管理範囲長である最大管理範囲長Lmaxと、最も小さい管理範囲長である最小管理範囲長Lminを出力するよう管理範囲長演算部14に指示する(ステップS24)。管理範囲長演算部14は、キー検索用ノードテーブル22を参照し、最大管理範囲長Lmax、及び、最小管理範囲長Lminと、最小管理範囲長Lminのノード装置1(以下、「最小管理範囲長ノード装置」と記載する。)のノードアドレスと、最小管理範囲長ノード装置の仮想ノード数を返送する。
Subsequently, the virtual
仮想ノード登録部12は、最大管理範囲長Lmax/最小管理範囲長Lminが管理範囲しきい値Thより大きいか否かを判断する(ステップS25)。仮想ノード登録部12は、最大管理範囲長Lmax/最小管理範囲長Lminが管理範囲しきい値Thより大きいと判断した場合(ステップS25:YES)、現時点で管理範囲長が最小である最小管理範囲長ノード装置に仮想ノードを1つ追加する(ステップS26)。具体的には、以下のように動作する。
The virtual
仮想ノード登録部12は、ステップS24において受信した仮想ノード数に1を加算して、追加対象の仮想ノード数を算出する。仮想ノード登録部12は、最小管理範囲長ノード装置のノードアドレスと、追加対象の仮想ノード数とを管理範囲長演算部14に出力し、ノードIDの生成を指示する。管理範囲長演算部14はノードアドレスと仮想ノード数の組み合わせからノードIDを生成し、仮想ノード登録部12に通知する。仮想ノード登録部12は、管理範囲長演算部14から受信した仮想ノードのノードID、最小管理範囲長ノード装置のノードアドレス、及び、追加対象の仮想ノード数を対応付けたデータを、キー検索用ノードテーブル22に追加する。
The virtual
仮想ノードの追加後、仮想ノード登録部12は、現在のパラメータNの値に1を加算し(ステップS27)、ステップS23からの処理を繰り返す。
そして、最終的に、ステップS23において、仮想ノード数の合計が最大仮想ノード数Vmaxに達し、パラメータNが最大仮想ノード数Vmax以上であると判断した場合(ステップS23:YES)、あるいは、ステップS25において、最大管理範囲長Lmax/最小管理範囲長Lminが管理範囲しきい値Th以下であると判断した場合(ステップS25:NO)、仮想ノード登録部12は、処理を終了する。
After adding the virtual node, the virtual
Finally, when it is determined in step S23 that the total number of virtual nodes has reached the maximum number of virtual nodes Vmax and the parameter N is equal to or greater than the maximum number of virtual nodes Vmax (step S23: YES), or step S25 When it is determined that the maximum management range length Lmax / minimum management range length Lmin is equal to or less than the management range threshold Th (step S25: NO), the virtual
以上のように、本実施形態では、キーの管理範囲長が最小のノード装置1に対して仮想ノードを追加する処理を繰り返す。これにより、効率的に管理範囲長の不均衡を是正し、各ノード装置1のキーの管理範囲長が同程度になるように仮想ノード数を決定することができる。
なお、管理しきい値Thが1に近いほど、各ノード装置1において管理されるキーの数が均等に近くなるが、その反面、仮想ノード数が増え、結果としてキー検索用ノードテーブル22のサイズが増加してしまう。そのため、実験等の結果に基づいて、キー検索用ノードテーブル22のサイズが大きくなりすぎない範囲で管理しきい値Thを決定する。また、最大仮想ノード数Vmaxが大きいほど、キー検索用ノードテーブル22のサイズが大きくなる可能性がある。そのため、最大仮想ノード数Vmaxは、記憶部15として使用されるメモリの容量に基づいて決定される。
As described above, in the present embodiment, the process of adding a virtual node to the
Note that the closer the management threshold Th is to 1, the more the number of keys managed in each
本実施形態では、ステップS25において、最大管理範囲長Lmax/最小管理範囲長Lminと管理範囲のしきい値Thとを比較し、処理が終了したかを判定しているが、これに限定されるものではない。例えば、最大管理範囲長Lmaxと所定のしきい値を比較してもよく、最小管理範囲長Lminと所定のしきい値を比較してもよい。あるいは、キー検索用ノードテーブル22に登録されている全てのノード装置1及び仮想ノードの管理範囲長の標準偏差や分散と所定のしきい値を比較してもよい。
In the present embodiment, in step S25, the maximum management range length Lmax / minimum management range length Lmin is compared with the threshold value Th of the management range, and it is determined whether the processing has been completed. It is not a thing. For example, the maximum management range length Lmax may be compared with a predetermined threshold value, or the minimum management range length Lmin may be compared with a predetermined threshold value. Alternatively, the standard deviation or variance of the management range lengths of all the
[1.5.3 ノードID生成部の動作]
次に、本実施形態によるノードID生成部13のノードID生成処理を説明する。
ノードテーブル管理部11または仮想ノード登録部12からノードアドレス及び仮想ノード数を受信すると、ノードID生成部13は、ノードアドレスと仮想ノード数とを結合したデータにハッシュ関数を用いてノードIDを生成する。仮想ノード数は0からはじまる整数である。本実施形態では、ハッシュ関数としてSHA−1(Secure Hash Algorithm 1)を用いる。従って、ノードID生成部13は、ノードIDとして160ビットの値を生成する。例えば、ノードアドレスが「192.168.100.10:3939」であり、仮想ノード数が「3」である場合、ノードID生成部13は、ノードアドレスと仮想ノード数を結合したデータ「192.168.100.10:3939_3」を生成する。SHA-1のハッシュ関数をHash()とすると、ノードID生成部13は、Hash(“192.168.100.10:3939_3”)によりノードIDを算出する。ノードID生成部13は、ノードアドレス及び仮想ノード数の出力元であるノードテーブル管理部11または仮想ノード登録部12に、算出したノードIDを返送する。
[1.5.3 Operation of node ID generator]
Next, node ID generation processing of the node
Upon receipt of the node address and the number of virtual nodes from the node
[1.5.4 管理範囲長演算部の動作]
次に、本実施形態による管理範囲長演算部14の管理範囲長算出処理を説明する。管理範囲長演算部14は、管理範囲長算出処理において、オーバーレイネットワークに参加している各ノードのハッシュ空間上での管理範囲長を計算する。
[1.5.4 Operation of control range length calculation unit]
Next, the management range length calculation process of the management range
図8は、管理範囲長演算部14の管理範囲長算出処理を説明するための図である。上述したように、本実施形態では160ビット長のノードIDを利用しているが、説明を簡単にするため、同図においては、ノードIDを8ビット長として説明する。ノードIDが8ビット長であるため、ノードIDは0以上かつ255以下の範囲の整数値となる。
FIG. 8 is a diagram for explaining the management range length calculation processing of the management range
図8(a)は、オーバーレイネットワークを示す図であり、図8(b)は、図8(a)に示すオーバーレイネットワークが形成されているときのキー検索用ノードテーブル22を示す。図8(a)及び図8(b)に示す例においては、3つのノード装置1がオーバーレイネットワークに参加している状態を示しており、これらの3つのノード装置1を大文字のA,B,Cを用いてそれぞれノードA、ノードB、ノードEとする。また、ノードA、ノードB、ノードEそれぞれの仮想ノードを、小文字のa、b、cを用いてノードa、ノードb、ノードeとする。
以下、ノードID=iのノードxをノードx[i]と記載する。
FIG. 8A shows the overlay network, and FIG. 8B shows the key search node table 22 when the overlay network shown in FIG. 8A is formed. 8A and 8B show a state in which three
Hereinafter, node x with node ID = i is referred to as node x [i].
図8(c)は、各ノード装置1の管理範囲長を示す図である。各ノードのキーの管理範囲は、時計回りに反対方向の隣接ノードであるpredecessorとの距離である。例えば、ノードE[90]のpredecessorは、ノードb[70]である。従って、ノードE単独のキー管理範囲は「71〜90」であり、管理範囲長は「20」となる。また、ノードEには、ノードe[60]、ノードe[190]の2つの仮想ノードがある。ノードe[190]のpredecessorは、ノードa[160]であるため、キー管理範囲は「161〜190」であり、管理範囲長は「30」となる。また、ノードe[60]のpredecessorは、ノードa[10]であるため、キー管理範囲は「11〜60」であり、管理範囲長は「50」となる。よって、ノードE全体の管理範囲長は、20+30+50=100である。
FIG. 8C is a diagram showing the management range length of each
同様にして、ノードA全体の管理範囲長は、ノードA[10]単独のキー管理範囲「241〜255、0〜10」の管理範囲長「26」と、ノードa[160]単独のキー管理範囲「141〜160」の管理範囲長「20」を合計した「46」となる。
また、ノードB全体の管理範囲長は、ノードB[140]単独のキー管理範囲「91〜140」の管理範囲長「50」と、ノードb[240]単独のキー管理範囲「191〜240」の管理範囲長「50」と、ノードb[70]単独のキー管理範囲「61〜70」の管理範囲長「10」を合計した「110」である。
Similarly, the management range length of the entire node A is the management range length “26” of the key management range “241 to 255, 0 to 10” of the node A [10] alone and the key management range of the node a [160] alone. The total of the management range length “20” in the range “141 to 160” is “46”.
Further, the management range length of the entire node B is the management range length “50” of the key management range “91 to 140” of the node B [140] alone and the key management range “191 to 240” of the node b [240] alone. And the management range length “10” of the key management range “61 to 70” of the node b [70] alone is “110”.
このように、各ノード装置1の合計の管理範囲長は、当該ノード装置1のノード単独の管理範囲長と、当該ノード装置1について生成された各仮想ノード単独の管理範囲長の合計となる。結果として、管理範囲長演算部14は、最大管理範囲長LmaxとしてノードBの管理範囲長「110」を、最小管理範囲長LminとしてノードAの管理範囲長「46」を出力する。
Thus, the total management range length of each
上記の動作を行うため、管理範囲長演算部14は、キー検索用ノードテーブル22を参照し、全ノード装置1の管理範囲長を計算する。具体的には、以下のように動作する。
管理範囲長演算部14は、キー検索用ノードテーブル22に設定されているノードIDに順に注目していき、注目しているノードIDと、注目しているノードIDよりも小さい隣接するノードIDとの差から、注目しているノードID単独の管理範囲長を求める。
In order to perform the above operation, the management range
The management range
キー検索用ノードテーブル22に注目しているノードIDよりも小さい隣接するノードIDが設定されていない場合、その注目しているノードIDは、オーバーレイネットワークに参加している中で最も小さいノードIDである。従って、predecessorのノードIDは、キー検索用ノードテーブル22に登録されている中でも最も大きいノードIDである。管理範囲長演算部14は、注目しているノードID(例えば、図8(b)に示すノードID=10)に、ノードIDが取りうる最大の値(ノードIDが8ビット長である場合「255」)を加算した後、predecessorのノードID(図8(b)に示すノードID=240)を減算することによって管理範囲長を算出する。
If an adjacent node ID smaller than the node ID of interest is not set in the key search node table 22, the node ID of interest is the smallest node ID participating in the overlay network. is there. Therefore, the node ID of predecessor is the largest node ID among those registered in the key search node table 22. The management range
管理範囲長演算部14は、キー検索用ノードテーブル22に登録されている各ノードIDについて管理範囲長を算出した後、キー検索用ノードテーブル22に同じノードアドレスが対応付けられているノードIDについて算出した管理範囲長を合計する。これによって、各ノード装置1の管理範囲長が算出される。管理範囲長演算部14は、算出した管理範囲長のうち最大である最大管理範囲長Lmax、最小である最小管理範囲長Lminを選択する。管理範囲長演算部14は、最小管理範囲長Lminに対応したノードアドレスと対応付けてキー検索用ノードテーブル22に設定されている仮想ノード数の中から、最も大きい仮想ノード数を読み出す。管理範囲長演算部14は、最大管理範囲長Lmax、最小管理範囲長Lmin、最小管理範囲長ノード装置のノードアドレス、読み出した仮想ノード数を仮想ノード登録部12に返送する。
The management range
[1.5.5 キーテーブル処理部の動作]
続いて、キーテーブル処理部の動作例について説明する。
いずれかのノード装置1がデータ記憶部30に新たなデータを記憶すると、キーテーブル処理部16は、この新たなデータのデータ名からSHA−1ハッシュ関数によりデータIDを生成する。キーテーブル処理部16は、データ記憶部30に保存されているキー検索用ノードテーブル22から、生成したデータIDに時計回りに近いノードIDを検索し、そのノードIDに対応したノードアドレスを取得する。キーテーブル処理部16は、取得したノードアドレスを宛先として、データIDと自ノード装置1のノードアドレスを設定したキー登録要求を送信する。キー登録要求を受信したノード装置1において、負荷分散装置10のキーテーブル処理部16は、キー登録要求内のデータIDとノードアドレスの組をデータ記憶部30に記憶しているキーテーブル23に追加する。
[1.5.5 Operation of key table processing unit]
Subsequently, an operation example of the key table processing unit will be described.
When any one of the
いずれかのノード装置1がデータにアクセスする場合、負荷分散装置10のキーテーブル処理部16は、そのデータのデータ名からIDを生成する。キーテーブル処理部16は、データ記憶部30に保存されているキー検索用ノードテーブル22から、生成したデータIDに時計回りに近いノードIDを検索し、そのノードIDに対応したノードアドレスを取得する。キーテーブル処理部16は、取得したノードアドレスを宛先として、データIDをキーとして設定した問合せを送信する。問合せを受信したノード装置1において、負荷分散装置10のキーテーブル処理部16は、データ記憶部30に記憶されているキーテーブル23から、問合せに設定されているキーに対応した値を読み出して返送する。この値は、データを記憶しているノード装置1のノードアドレスを示す。問合せ送信元のノード装置1は、受信した「値」により示されるノードアドレス宛先として、データを記憶しているノード装置1にアクセスし、アクセス先のノード装置1が備えるデータ記憶部30に記憶されている操作対象のデータの読み出し、書替え、削除などを行なう。
When any one of the
上記においては、キーがデータを特定するデータIDであり、値がデータを記憶しているノード装置1のノードアドレスである場合の例を説明したが、DHTを用いたKey-Value型データ管理システムの既存の技術を用い、他のキーとデータの組を分散して管理することもできる。
In the above description, an example in which the key is a data ID for identifying data and the value is the node address of the
[1.6 性能]
図9は、本実施形態による負荷分散装置10を使った実験結果を示す。図9(a)は、データ管理システムに参加しているノード装置1の数と、全ノード装置1の管理範囲長の標準偏差との関連を示し、図9(b)は、データ管理システムに参加しているノード装置1の数と、キー検索用ノードテーブルのサイズとの関係を示す。
実験では、管理範囲しきい値Th=1.5、最大仮想ノード数Vmax=10000とし、ノード装置1の数を3〜1000の範囲とした。なお、比較として、全ノード装置それぞれに0、10、100個の固定数の仮想ノードを割り当てる方式を用いた場合における全ノード装置の管理範囲長の標準偏差と、キー検索用ノードテーブルのサイズを示している。
[1.6 Performance]
FIG. 9 shows experimental results using the
In the experiment, the management range threshold value Th = 1.5, the maximum number of virtual nodes Vmax = 10000, and the number of
図9(a)に示す管理範囲長の標準偏差の結果から、本実施形態では、データ管理システムに参加している各ノード装置1の負荷分散を行なう場合に、100個の固定数の仮想ノードを割り当てる方式と同等の性能が得られることがわかる。一方、図9(b)に示すの結果から、本実施形態の負荷分散装置10を用いたときのキー検索用ノードテーブル22のサイズは、各ノード装置に10個の固定数の仮想ノードを割り当てる方式において用いられるキー検索用ノードテーブルのサイズと同程度であることがわかる。
これらの実験結果から、本実施形態によれば、各ノード装置に固定数100の仮想ノードを割り当てるの場合と同程度の性能を、10分の1のサイズのキー検索用ノードテーブルによりで実現できることがわかる。
From the result of the standard deviation of the management range length shown in FIG. 9A, in the present embodiment, when performing load distribution of each
From these experimental results, according to the present embodiment, it is possible to realize a performance equivalent to the case of allocating a fixed number of 100 virtual nodes to each node device by using a key search node table of 1/10 size. I understand.
[2. 第2の実施形態]
上述した第1の実施形態において、管理範囲長演算部14は、キー検索用ノードテーブル22に登録されている全てのノードの管理範囲長を求めた後、各ノード装置1が管理しているキーの管理範囲長を算出しているが、算出方法はこれに限定されるものではない。本実施形態では、各ノードが管理しているキーの管理範囲長を高速に算出する。
以下では、第1の実施形態との差分を説明する。
[2. Second Embodiment]
In the first embodiment described above, the management range
Hereinafter, differences from the first embodiment will be described.
図10は、本実施形態による管理範囲長演算部14の処理を説明するための図である。
図10(a)は、図7のステップS26の処理によって、図8(a)に示すオーバーレイネットワークにノードAの仮想ノードであるノードa[230]が追加された場合の例を示している。また、図10(b)は、ノードa[230]の追加後の各ノード装置1の管理範囲長を示している。
FIG. 10 is a diagram for explaining the processing of the management range
FIG. 10A illustrates an example in which the node a [230], which is the virtual node of the node A, is added to the overlay network illustrated in FIG. 8A by the process of step S26 of FIG. FIG. 10B shows the management range length of each
図10(a)に示すノードa[230]の追加により、ノードAの管理範囲長には、追加されたノードa[230]とそのpredecessorのノードe[190]との距離である「40」が追加される。一方、追加されたノードa[230]のsuccessor(時計回り方向の隣接ノード)のノードb[240]の管理範囲長は「40」だけ短くなる。この例では、追加されたノードa[230]のsuccessorであるノードb[240]は、ノードBの仮想ノードであるので、ノードBの管理範囲長を「40」だけ短くする。
結果として、図10(b)に示すように、管理範囲長の演算は、ノードAの管理範囲長に「40」を加算し、ノードBの管理範囲長から「40」を減算するだけで求めることが可能である。
As a result of the addition of the node a [230] shown in FIG. 10A, the management range length of the node A is “40” which is the distance between the added node a [230] and the node e [190] of the predecessor. Is added. On the other hand, the management range length of the node b [240] of the successor (the adjacent node in the clockwise direction) of the added node a [230] is shortened by “40”. In this example, since the node b [240], which is the successor of the added node a [230], is a virtual node of the node B, the management range length of the node B is shortened by “40”.
As a result, as shown in FIG. 10B, the calculation of the management range length is obtained simply by adding “40” to the management range length of node A and subtracting “40” from the management range length of node B. It is possible.
以上の動作を行うため、管理範囲長演算部14は、図7のステップS24において各ノードアドレスについて算出した管理範囲長を記憶部15に書き込む。そして、ステップS26において仮想ノードが追加され、次のループでステップS24を実行する際、仮想ノード登録部12からステップS26において追加された仮想ノードのノードIDを受信する。追加されたノードIDを追加ノードIDと記載する。
In order to perform the above operation, the management range
管理範囲長演算部14は、キー検索用ノードテーブル22から追加ノードIDよりも小さい隣接するノードIDとの差から、追加された仮想ノードの管理範囲長を求めるとともに、追加ノードIDに対応したノードアドレスを読み出す。管理範囲長演算部14は、読み出したノードアドレスに対応して記憶部15に記憶されている管理範囲長を、追加された仮想ノードの管理範囲長を加算した値に更新する。
The management range
さらに、管理範囲長演算部14は、キー検索用ノードテーブル22から追加ノードIDよりも大きい隣接するノードIDを特定し、特定したノードIDに対応したノードアドレスを読み出す。管理範囲長演算部14は、読み出したノードアドレスに対応して記憶部15に記憶されている管理範囲長を、追加された仮想ノードの管理範囲長を減算した値に更新する。
Further, the management range
上記処理の後、管理範囲長演算部14は、仮想ノード追加後の各ノード装置1のアドレスに対応した管理範囲長を記憶部15から読み出す。
After the above processing, the management range
[3. 第3の実施形態]
第3の実施形態には、各ノード装置1のノード性能が異なる場合に適用する。つまり、DHTに参加する各ノード装置1の性能が同一ではない場合、それらのノード性能に応じて各負荷分散装置10が管理及び保管する(キー、値)のデータ量を制御する。以下、第1の実施形態及び第2の実施形態との差分を説明する。
[3. Third Embodiment]
The third embodiment is applied when the node performance of each
[3.1 データ構成]
図11は、本実施形態のノードテーブル21のデータ構成例を示す図である。同図に示すノードテーブル21が、図3に示すノードテーブル21と異なる点は、ノードID及びノードアドレスに対応付けて、ノード性能値が設定される点である。ノード性能値は、ノードの性能を示す指標についての定量的な値であり、例えば、CPU(central processing unit)の性能を示す値や、ノードが保管できる総ディスク容量などがある。
[3.1 Data structure]
FIG. 11 is a diagram illustrating a data configuration example of the node table 21 according to the present embodiment. The node table 21 shown in the figure is different from the node table 21 shown in FIG. 3 in that node performance values are set in association with node IDs and node addresses. The node performance value is a quantitative value for an index indicating the performance of the node, and includes, for example, a value indicating the performance of a CPU (central processing unit) and the total disk capacity that can be stored in the node.
図12は、本実施形態のキー検索用ノードテーブル22のデータ構成例を示す図である。同図に示すキー検索用ノードテーブル22が、図4に示すキー検索用ノードテーブル22と異なる点は、ノードID、ノードアドレス、及び、仮想ノード数に対応付けて、ノード性能値が設定される点である。 FIG. 12 is a diagram illustrating a data configuration example of the key search node table 22 according to the present embodiment. The key search node table 22 shown in the figure is different from the key search node table 22 shown in FIG. 4 in that a node performance value is set in association with the node ID, the node address, and the number of virtual nodes. Is a point.
[3.2 負荷分散装置の動作]
次に、負荷分散装置10の動作について説明する。
[3.2 Operation of load balancer]
Next, the operation of the
[3.2.1 ノードテーブル管理部の動作]
図6のステップS11において、ノードテーブル管理部11が受信するノードの参加の通知には、通知種別「参加」、参加したノード装置1のノードアドレス、及び、参加したノード装置1の性能値が含まれる。ステップS13において、ノードテーブル管理部11は、記憶部15に記憶されているノードテーブル21に、ステップS11において管理範囲長演算部14から受信したノードIDと、参加の通知に含まれるノードアドレス及びノード性能値とを対応付けたデータを新たに追加する。また、ステップS14において、ノードテーブル管理部11は、記憶部15に記憶されているノードテーブル21から、ステップS11においてノードID生成部13から受信したノードIDと、当該ノードIDに対応付けられたノードアドレス及び性能値の組のデータを削除する。
[3.2.1 Operation of node table management unit]
In step S11 of FIG. 6, the node participation notification received by the node
[3.2.2 仮想ノード登録部の動作]
図7のステップS21において、仮想ノード登録部12が、ノードテーブル21の設定内容をキー検索用ノードテーブル22にコピーする際、ノードID、ノードアドレス及び性能値の組がそのままコピーされる。また、ステップS26において、仮想ノード登録部12は、仮想ノードのノードID、最小管理範囲長ノード装置のノードアドレス及び性能値に、追加対象の仮想ノード数を対応付けたデータを、キー検索用ノードテーブル22に追加する。
[3.2.2 Operation of virtual node registration unit]
In step S21 of FIG. 7, when the virtual
[3.2.3 管理範囲長演算部の動作]
本実施形態による管理範囲長演算部14は、上述した第1の実施形態、または、第2の実施形態のように算出した各ノード装置1の管理範囲長に、当該ノード装置1の性能値に応じて重み付けを行う。
[3.2.3 Operation of control range length calculation unit]
The management range
管理範囲長演算部14は、第1の実施形態または第2の実施形態と同様に、各ノード装置1のノードアドレス毎に管理範囲長を算出する。管理範囲長演算部14は、各ノードアドレスに対応付けてノードテーブル21またはキー検索用ノードテーブル22に設定されている性能値を読み出すと、ノードアドレス毎に算出した管理範囲長を、そのノードアドレスについて読み出した性能値によって除算する。管理範囲長演算部14は、除算した結果の管理範囲長の中で最大の管理範囲長を最大管理範囲長Lmax、最小の管理範囲長を最小管理範囲長Lminとして選択する。管理範囲長演算部14は、最小管理範囲長Lminに対応したノードアドレスと対応付けてキー検索用ノードテーブル22に設定されている仮想ノード数の中から、最も大きい仮想ノード数を読み出す。管理範囲長演算部14は、最大管理範囲長Lmax、最小管理範囲長Lmin、最小管理範囲長ノード装置のノードアドレス、読み出した仮想ノード数をノードテーブル管理部11に返送する。
The management range
図13は、ノード性能を考慮した場合の管理範囲長演算を説明するための図である。オーバーレイネットワークは、図8(a)と同様に構成されており、ノードA、ノードB、ノードCについて第1の実施形態と同様の処理により算出された管理範囲長はそれぞれ「46」、「110」、「100」である。また、ノードA、ノードB、ノードCのノード性能値はそれぞれ「1」、「2」、「3」である。この場合、ノードAの管理範囲長は、ノードAの管理範囲長「46」を、ノードAのノード性能値「1」によって除算した値「46」となる。また、ノードBの管理範囲長は、ノードBの管理範囲長「110」をノードBのノード性能値「2」によって除算した値「55」となる。また、ノードEの管理範囲長は、ノードEの管理範囲長「100」をノードEのノード性能値「3」によって除算した値「33」となる。従って、最大管理範囲長Lmaxは、ノードBの管理範囲長「55」となり、最小管理範囲長Lminは、ノードEの最小管理範囲長ノード装置の管理範囲長となる。
この結果、性能が高いノードEの仮想ノードを増加させることになる。
FIG. 13 is a diagram for explaining the management range length calculation in consideration of node performance. The overlay network is configured in the same manner as in FIG. 8A, and the management range lengths calculated by the same processing as in the first embodiment for the nodes A, B, and C are “46” and “110”, respectively. ”,“ 100 ”. The node performance values of the node A, the node B, and the node C are “1”, “2”, and “3”, respectively. In this case, the management range length of the node A is a value “46” obtained by dividing the management range length “46” of the node A by the node performance value “1” of the node A. The management range length of the node B is a value “55” obtained by dividing the management range length “110” of the node B by the node performance value “2” of the node B. The management range length of the node E is a value “33” obtained by dividing the management range length “100” of the node E by the node performance value “3” of the node E. Therefore, the maximum management range length Lmax is the management range length “55” of the node B, and the minimum management range length Lmin is the management range length of the minimum management range length node device of the node E.
As a result, the number of virtual nodes of node E with high performance is increased.
[4. 本発明の実施形態の効果]
以上説明したように、本発明の実施形態によれば、DHTを用いたKey-Value型データ管理システムを構成するノード装置に実装される負荷分散装置は、システムを構成しているノード装置の参加や離脱が発生した際、各ノード装置の管理範囲長が同等に近くなるまで、管理範囲長が最も狭いノード装置へ仮想ノードの割り当てを行う処理を繰り返し、ノード装置のアドレスと当該ノード装置に対して生成された仮想ノードのノードIDとからなるキー検索用ノードテーブルを生成する。よって、従来技術と比較して各ノード装置のキーの管理範囲長の不均衡を効率的に是正し、仮想ノードの数を抑えることが可能となるため、キー検索用ノードテーブルの増加が少ない。
また、各ノード装置を均等に負荷分散したり、各ノード装置のノード性能に応じて負荷分散したりすることが可能となる。
[4. Effects of the embodiment of the present invention]
As described above, according to the embodiment of the present invention, the load balancer installed in the node device constituting the key-value type data management system using DHT is the participation of the node device constituting the system. Or when a node is disconnected, the process of assigning a virtual node to the node device with the narrowest management range length is repeated until the management range length of each node device is nearly equal. A key search node table including the node ID of the generated virtual node is generated. Therefore, compared with the prior art, it is possible to efficiently correct the imbalance of the key management range length of each node device and to reduce the number of virtual nodes, and therefore the increase in the key search node table is small.
In addition, it becomes possible to distribute the load evenly among the node devices, or to distribute the load according to the node performance of each node device.
[5. その他]
なお、上述した実施形態では、各負荷分散装置10においてノードテーブル21及びキー検索用ノードテーブル22を生成しているが、一部の負荷分散装置10においてノードテーブル21及びキー検索用ノードテーブル22を生成し、他の負荷分散装置10に配信してもよい。
[5. Others]
In the above-described embodiment, the node table 21 and the key search node table 22 are generated in each
上述した負荷分散装置10を実装するノード装置1は、内部にコンピュータシステムを有している。そして、負荷分散装置10の動作の過程は、プログラムの形式でコンピュータ読み取り可能な記録媒体に記憶されており、このプログラムをコンピュータシステムが読み出して実行することによって、上記処理が行われる。ここでいうコンピュータシステムとは、CPU及び各種メモリやOS、周辺機器等のハードウェアを含むものである。
The
また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶部のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバーやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含むものとする。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.
The “computer-readable recording medium” refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, and a CD-ROM, and a storage unit such as a hard disk built in the computer system. Furthermore, the “computer-readable recording medium” dynamically holds a program for a short time like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory in a computer system serving as a server or a client in that case is also used to hold a program for a certain period of time. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes designs and the like that do not depart from the gist of the present invention.
1…ノード装置
10…負荷分散装置
11…ノードテーブル管理部
12…仮想ノード登録部
121…メモリ
13…ノードID生成部
14…管理範囲長演算部
15…記憶部
16…キーテーブル処理部
21…ノードテーブル
22…キー検索用ノードテーブル
23…キーテーブル
30…記憶部
5…通信ネットワーク
DESCRIPTION OF
Claims (5)
前記データ管理システムに参加したノード装置のノード特定情報を前記ノードテーブルに書き込み、前記データ管理システムから離脱したノード装置のノード特定情報を前記ノードテーブルから削除するノードテーブル管理部と、
前記キー検索用ノードテーブルに設定されているノードIDと、前記ノードIDに対応付けられた前記ノード特定情報とに基づいて、各ノード装置が管理対象とするキーの管理範囲長を算出する管理範囲長演算部と、
前記ノードテーブル内のノード特定情報と、前記ノード特定情報により特定されるノード装置に対して生成されたノードIDとの対応付けを設定したキー検索用ノードテーブルを前記記憶部に書き込み、生成した前記キー検索用ノードテーブルに基づいて前記管理範囲長演算部により算出された各ノード装置の管理範囲長の差異が所定の条件に合致すると判断するまで、前記管理範囲長に基づいて選択した前記ノード装置に対して新たにノードIDを生成するとともに、前記ノード装置のノード特定情報と新たに生成した前記ノードIDとの対応付けを前記キー検索用ノードテーブルに追加して更新する処理を繰り返す仮想ノード登録部と、
前記キー検索用ノードテーブル内のノードIDと、指定されたキーに基づいて、前記キーに対応した値を管理している前記ノード装置のノード特定情報を取得するキーテーブル処理部と、
を備えることを特徴とする負荷分散装置。 Storing a node table including node specifying information for specifying a node device constituting the data management system; and the node specifying information and a node ID generated for the node device specified by the node specifying information; A storage unit for storing a key search node table indicating the association of
A node table management unit for writing node specifying information of a node device participating in the data management system to the node table, and deleting node specifying information of a node device leaving the data management system from the node table;
A management range for calculating a management range length of a key to be managed by each node device based on the node ID set in the node table for key search and the node specifying information associated with the node ID A length calculator,
The node table for key search that sets the correspondence between the node specifying information in the node table and the node ID generated for the node device specified by the node specifying information is written in the storage unit and generated. The node device selected based on the management range length until it is determined that the difference in management range length of each node device calculated by the management range length calculation unit based on the key search node table matches a predetermined condition Virtual node registration that repeats the process of adding a new node ID to the key search node and updating the key identification node table by associating the node identification information of the node device with the newly generated node ID And
A key table processing unit that acquires node identification information of the node device that manages a value corresponding to the key based on a node ID in the key search node table and a specified key;
A load balancer comprising:
前記仮想ノード登録部は、前記ノード装置の性能を示す値に応じて重み付けされた前記管理範囲長の差異が所定の条件に合致するかを判断する、
ことを特徴とする請求項1に記載の負荷分散装置。 The management range length calculation unit weights the management range length of the node device according to a value indicating the performance of the node device,
The virtual node registration unit determines whether a difference in the management range length weighted according to a value indicating the performance of the node device meets a predetermined condition;
The load distribution apparatus according to claim 1.
ことを特徴とする請求項1または請求項2に記載の負荷分散装置。 The management range length calculation unit, when an association between node identification information of the node device and the newly generated node ID is added to the key search node table by the virtual node registration unit, The node ID adjacent to the node ID added to the node table is specified to calculate the management range length of the key, and the management range length of the node device for which the node ID has been newly generated is calculated. The node management information is updated to the added value, and node identification information corresponding to the node ID adjacent to the node ID of the virtual node is read from the key search node table, and the key management of the node device identified by the read node identification information Update the range length to a value obtained by subtracting the calculated management range length.
The load distribution apparatus according to claim 1 or 2, wherein
データ管理システムを構成するノード装置を特定するノード特定情報を含んだノードテーブルを記憶するとともに、前記ノード特定情報と、前記ノード特定情報により特定される前記ノード装置に対して生成されたノードIDとの対応付けを示すキー検索用ノードテーブルを記憶する記憶部、
前記データ管理システムに参加したノード装置のノード特定情報を前記ノードテーブルに書き込み、前記データ管理システムから離脱したノード装置のノード特定情報を前記ノードテーブルから削除するノードテーブル管理部、
前記キー検索用ノードテーブルに設定されているノードIDと、前記ノードIDに対応付けられた前記ノード特定情報とに基づいて、各ノード装置が管理対象とするキーの管理範囲長を算出する管理範囲長演算部、
前記ノードテーブル内のノード特定情報と、前記ノード特定情報により特定されるノード装置に対して生成されたノードIDとの対応付けを設定したキー検索用ノードテーブルを前記記憶部に書き込み、生成した前記キー検索用ノードテーブルに基づいて前記管理範囲長演算部により算出された各ノード装置の管理範囲長の差異が所定の条件に合致すると判断するまで、前記管理範囲長に基づいて選択した前記ノード装置に対して新たにノードIDを生成するとともに、前記ノード装置のノード特定情報と新たに生成した前記ノードIDとの対応付けを前記キー検索用ノードテーブルに追加して更新する処理を繰り返す仮想ノード登録部、
前記キー検索用ノードテーブル内のノードIDと、指定されたキーに基づいて、前記キーに対応した値を管理している前記ノード装置のノード特定情報を取得するキーテーブル処理部、
として機能させることを特徴とするプログラム。 A computer used as a load balancer
Storing a node table including node specifying information for specifying a node device constituting the data management system; and the node specifying information and a node ID generated for the node device specified by the node specifying information; A storage unit for storing a key search node table indicating the association of
A node table management unit for writing node specifying information of a node device participating in the data management system to the node table, and deleting node specifying information of a node device leaving the data management system from the node table;
A management range for calculating a management range length of a key to be managed by each node device based on the node ID set in the node table for key search and the node specifying information associated with the node ID Long operation part,
The node table for key search that sets the correspondence between the node specifying information in the node table and the node ID generated for the node device specified by the node specifying information is written in the storage unit and generated. The node device selected based on the management range length until it is determined that the difference in management range length of each node device calculated by the management range length calculation unit based on the key search node table matches a predetermined condition Virtual node registration that repeats the process of adding a new node ID to the key search node and updating the key identification node table by associating the node identification information of the node device with the newly generated node ID Part,
A key table processing unit that acquires node identification information of the node device that manages a value corresponding to the key based on a node ID in the key search node table and a specified key;
A program characterized by functioning as
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010272830A JP5600573B2 (en) | 2010-12-07 | 2010-12-07 | Load balancing apparatus and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010272830A JP5600573B2 (en) | 2010-12-07 | 2010-12-07 | Load balancing apparatus and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012123544A true JP2012123544A (en) | 2012-06-28 |
JP5600573B2 JP5600573B2 (en) | 2014-10-01 |
Family
ID=46504933
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010272830A Active JP5600573B2 (en) | 2010-12-07 | 2010-12-07 | Load balancing apparatus and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5600573B2 (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101269428B1 (en) | 2012-07-30 | 2013-05-30 | 한국과학기술정보연구원 | System and method for data distribution |
JP5238915B1 (en) * | 2012-08-23 | 2013-07-17 | ディジタル・ワークス株式会社 | Distributed database system |
JP2014164554A (en) * | 2013-02-26 | 2014-09-08 | Nippon Telegr & Teleph Corp <Ntt> | Load distribution determination system |
JP2016128978A (en) * | 2015-01-09 | 2016-07-14 | 日本電気株式会社 | Distribution device, data processing system, distribution method, and program |
JP2016153929A (en) * | 2015-02-20 | 2016-08-25 | 日本電信電話株式会社 | Decentralized system, load decentralizing method, and program |
JP2016218787A (en) * | 2015-05-21 | 2016-12-22 | 横河電機株式会社 | Data management system and data management method |
JP2017514217A (en) * | 2014-11-05 | 2017-06-01 | 華為技術有限公司Huawei Technologies Co.,Ltd. | Data processing method and apparatus |
KR102266324B1 (en) * | 2020-02-28 | 2021-06-17 | 숭실대학교산학협력단 | Worker node management method of managing execution platform and platform system for the same |
JP2021144514A (en) * | 2020-03-12 | 2021-09-24 | SingulaNet株式会社 | Personal information management system and personal information management method |
KR20220039530A (en) * | 2020-09-21 | 2022-03-29 | 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. | Method, device, electronic equipment for adjusting the number of instances and readble storage medium |
CN114840498A (en) * | 2022-07-05 | 2022-08-02 | 北京优合融宜科技有限公司 | Method and device for realizing memory key value data management based on Java technology |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004252663A (en) * | 2003-02-19 | 2004-09-09 | Toshiba Corp | Storage system, sharing range deciding method and program |
JP2009230686A (en) * | 2008-03-25 | 2009-10-08 | Nippon Hoso Kyokai <Nhk> | Content management server and content management program |
-
2010
- 2010-12-07 JP JP2010272830A patent/JP5600573B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004252663A (en) * | 2003-02-19 | 2004-09-09 | Toshiba Corp | Storage system, sharing range deciding method and program |
JP2009230686A (en) * | 2008-03-25 | 2009-10-08 | Nippon Hoso Kyokai <Nhk> | Content management server and content management program |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101269428B1 (en) | 2012-07-30 | 2013-05-30 | 한국과학기술정보연구원 | System and method for data distribution |
JP5238915B1 (en) * | 2012-08-23 | 2013-07-17 | ディジタル・ワークス株式会社 | Distributed database system |
WO2014030235A1 (en) * | 2012-08-23 | 2014-02-27 | ディジタル・ワークス株式会社 | Distributed database system |
CN103765391A (en) * | 2012-08-23 | 2014-04-30 | 数创株式会社 | Distributed database system |
JP2014164554A (en) * | 2013-02-26 | 2014-09-08 | Nippon Telegr & Teleph Corp <Ntt> | Load distribution determination system |
JP2017514217A (en) * | 2014-11-05 | 2017-06-01 | 華為技術有限公司Huawei Technologies Co.,Ltd. | Data processing method and apparatus |
US10628050B2 (en) | 2014-11-05 | 2020-04-21 | Huawei Technologies Co., Ltd. | Data processing method and apparatus |
CN109918021A (en) * | 2014-11-05 | 2019-06-21 | 华为技术有限公司 | Data processing method and device |
US9952778B2 (en) | 2014-11-05 | 2018-04-24 | Huawei Technologies Co., Ltd. | Data processing method and apparatus |
JP2016128978A (en) * | 2015-01-09 | 2016-07-14 | 日本電気株式会社 | Distribution device, data processing system, distribution method, and program |
JP2016153929A (en) * | 2015-02-20 | 2016-08-25 | 日本電信電話株式会社 | Decentralized system, load decentralizing method, and program |
US10157216B2 (en) | 2015-05-21 | 2018-12-18 | Yokogawa Electric Corporation | Data management system and data management method |
JP2016218787A (en) * | 2015-05-21 | 2016-12-22 | 横河電機株式会社 | Data management system and data management method |
KR102266324B1 (en) * | 2020-02-28 | 2021-06-17 | 숭실대학교산학협력단 | Worker node management method of managing execution platform and platform system for the same |
JP2021144514A (en) * | 2020-03-12 | 2021-09-24 | SingulaNet株式会社 | Personal information management system and personal information management method |
KR20220039530A (en) * | 2020-09-21 | 2022-03-29 | 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. | Method, device, electronic equipment for adjusting the number of instances and readble storage medium |
KR102565409B1 (en) | 2020-09-21 | 2023-08-09 | 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. | Method, device, electronic equipment for adjusting the number of instances and readble storage medium |
CN114840498A (en) * | 2022-07-05 | 2022-08-02 | 北京优合融宜科技有限公司 | Method and device for realizing memory key value data management based on Java technology |
CN114840498B (en) * | 2022-07-05 | 2022-09-13 | 北京优合融宜科技有限公司 | Method and device for realizing memory key value data management based on Java technology |
Also Published As
Publication number | Publication date |
---|---|
JP5600573B2 (en) | 2014-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5600573B2 (en) | Load balancing apparatus and program | |
JP5551270B2 (en) | Method and apparatus for decomposing a peer-to-peer network and using the decomposed peer-to-peer network | |
US20210176307A1 (en) | Content Delivery Method, Virtual Server Management Method, Cloud Platform, and System | |
Loukopoulos et al. | Static and adaptive distributed data replication using genetic algorithms | |
JP4806203B2 (en) | Routing in peer-to-peer networks | |
US7596618B2 (en) | Splitting a workload of a node | |
Tavakoli-Someh et al. | Multi-objective virtual network function placement using NSGA-II meta-heuristic approach | |
JP2009295127A (en) | Access method, access device and distributed data management system | |
US20230028120A1 (en) | State management and object storage in a distributed cloud computing network | |
JP5544523B2 (en) | Distributed processing system, distributed processing method, load distribution apparatus, load distribution method, and load distribution program | |
US7773609B2 (en) | Overlay network system which constructs and maintains an overlay network | |
Hauswirth et al. | An overlay network for resource discovery in grids | |
Trifa et al. | A novel replication technique to attenuate churn effects | |
US11108854B2 (en) | Peer-to-peer network for internet of things resource allocation operation | |
Hassanzadeh-Nazarabadi et al. | Laras: Locality aware replication algorithm for the skip graph | |
JP2012531765A (en) | Server, method and system for providing node information of P2P network | |
US11507313B2 (en) | Datafall: a policy-driven algorithm for decentralized placement and reorganization of replicated data | |
JP4923115B2 (en) | Method, computer program and node for distributing references to objects in a self-organizing distributed overlay network, and self-organizing distributed overlay network | |
US20240176762A1 (en) | Geographically dispersed hybrid cloud cluster | |
JP2007156700A (en) | Information retrieval method, information registration method and network service information retrieval system | |
CN108965387B (en) | Balancing method and system for improving survivability of P2P data storage | |
Vijayakumar et al. | FIR3: A fuzzy inference based reliable replica replacement strategy for cloud Data Centre | |
JP2009230686A (en) | Content management server and content management program | |
WO2013027784A1 (en) | Data processing device, data distribution processing system, data processing method, and program storage medium | |
Elsharnouby | Search techniques in peer to peer networks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130611 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140225 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140402 |
|
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: 20140722 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140818 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5600573 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |