JP2014096113A - Load balancer - Google Patents
Load balancer Download PDFInfo
- Publication number
- JP2014096113A JP2014096113A JP2012248710A JP2012248710A JP2014096113A JP 2014096113 A JP2014096113 A JP 2014096113A JP 2012248710 A JP2012248710 A JP 2012248710A JP 2012248710 A JP2012248710 A JP 2012248710A JP 2014096113 A JP2014096113 A JP 2014096113A
- Authority
- JP
- Japan
- Prior art keywords
- request
- domain
- request processing
- processing server
- allocation
- 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
Abstract
Description
この発明は、負荷分散装置に関する。 The present invention relates to a load distribution apparatus.
従来、クライアントからの要求を処理するサーバシステムにおいて、要求量が多く、単一のサーバでは処理できない場合、クライアントとサーバシステムの間に負荷分散装置を設置し、負荷分散装置が要求を複数のサーバに振り分けることが広く行われている。ここで、負荷分散装置における負荷分散の方式として、いくつかの方式が知られている。例えば、DNSサーバの負荷分散などで広く利用されているラウンドロビン方式は、最も単純な負荷分散の方式であり、クライアントからの要求を各サーバに順番に振り分ける。ここで、ラウンドロビン方式では各サーバに均等な数の要求を割り振ることができるため、1要求あたりの処理負荷がおおよそ同じであれば、各サーバの処理負荷もおおむね均等になることが期待できる。 Conventionally, in a server system that processes requests from clients, when a large amount of requests cannot be processed by a single server, a load balancer is installed between the client and the server system, and the load balancer sends requests to multiple servers. It is widely done to distribute. Here, several methods are known as load distribution methods in the load distribution apparatus. For example, the round robin method widely used for load distribution of a DNS server is the simplest load distribution method and distributes requests from clients to servers in order. Here, since an equal number of requests can be allocated to each server in the round robin method, if the processing load per request is approximately the same, the processing load of each server can be expected to be approximately equal.
また、例えば、データ管理システムの一種であるキーバリューストア(Key-Value Store)では、コンシステントハッシュ法(Consistent Hashing)と呼ばれる負荷分散方式が使われることがある(例えば、非特許文献1)。コンシステントハッシュ法による負荷分散方式では、負荷分散装置が、要求に含まれるキー情報のハッシュ値を計算して、あらかじめ保持している、サーバとハッシュ値の範囲の対応関係に基づいて、要求をそのハッシュ値に対応するサーバに振り分ける。 In addition, for example, in a key-value store that is a kind of data management system, a load distribution method called a consistent hashing method (Consistent Hashing) may be used (for example, Non-Patent Document 1). In the load distribution method using the consistent hash method, the load distribution device calculates the hash value of the key information included in the request, and sends the request based on the correspondence relationship between the server and the range of the hash value stored in advance. Sort to the server corresponding to the hash value.
コンシステントハッシュ法は、ハッシュ関数のランダム性から、各サーバにおおよそ均等な数のキー情報が割り当てられる方式であり、ラウンドロビン方式と異なり、要求に含まれるキー情報と要求の振り分け先のサーバの対応が固定される。そのため、各サーバが要求を処理するにあたって、要求に含まれるキー情報に対応するデータ(例えば、キーバリューストアにおけるバリュー)が必要な状況において、各サーバは全てのキー情報のデータを保持しておく必要が無く、自サーバに振り分けられるキー情報のデータだけを保持していればよい。 The consistent hash method is a method in which an approximately equal number of key information is assigned to each server due to the randomness of the hash function. Unlike the round robin method, the consistent hash method is different from the key information included in the request and the server to which the request is distributed. Correspondence is fixed. Therefore, when each server processes the request, in a situation where data corresponding to the key information included in the request (for example, value in the key value store) is required, each server holds all the key information data. There is no need to store only key information data distributed to the own server.
この特性は、全キー情報分のデータサイズが大きい場合に有用であり、例えば、サーバが高速に要求を処理するために、キー情報に対応するデータをメモリ上に保持しておく必要がある場合、各サーバが全てのキー情報のデータをメモリに保持する必要があるラウンドロビン方式はメモリ容量の制約から適用できない可能性があるが、そのような場合であってもコンシステントハッシュ法は適用可能である。 This characteristic is useful when the data size for all key information is large. For example, when the server needs to store data corresponding to key information in memory in order to process requests at high speed. The round robin method, in which each server needs to store all key information data in memory, may not be applicable due to memory capacity limitations. Even in such cases, the consistent hash method can be applied. It is.
一方、コンシステントハッシュ法は、キー情報毎の要求頻度に大きな偏りがある場合に、サーバの処理負荷が均等にならないという課題がある。例えば、要求頻度が平均的なキー情報の要求頻度に比べて非常に高いキー情報があり、そのキー情報の要求頻度が単一のサーバの処理性能を越える場合は、コンシステントハッシュ法をそもそも適用できない。また、単一のサーバの処理性能は越えていない場合であっても、要求頻度の非常に高いキー情報を割り当てられたサーバとそうでないサーバの処理負荷に大きな偏りが生じ、システム全体としてサーバの処理性能を有効に活用できない。 On the other hand, the consistent hash method has a problem that the processing load of the server is not uniform when the request frequency for each key information is largely biased. For example, if there is key information whose request frequency is very high compared to the average key information request frequency, and the key information request frequency exceeds the processing performance of a single server, the consistent hash method is applied in the first place. Can not. Even if the processing performance of a single server is not exceeded, there is a large bias in the processing load between servers that are assigned key information with a very high request frequency and servers that are not so requested. Processing performance cannot be used effectively.
このようなコンシステントハッシュ法におけるサーバの処理負荷の偏りを解決するために、仮想ノードと呼ばれる技術を拡張し、各サーバに割り当てるキー情報の数を調整することで、サーバの処理負荷の偏りを軽減する方式が提案されている(例えば、特許文献1)。 In order to solve such a server processing load bias in the consistent hash method, a technology called a virtual node is expanded and the number of key information allocated to each server is adjusted, thereby reducing the server processing load bias. A mitigation method has been proposed (for example, Patent Document 1).
しかしながら、上述した従来技術では、サーバの処理量及びメモリ使用量を考慮した負荷分散を行うことが困難であった。例えば、上述した従来技術では、各サーバに割り当てるキー情報の数がサーバ毎に異なってしまうと、処理負荷の偏りは軽減されたとしても、サーバが保持するデータサイズに偏りが生じてしまう。従って、上述した従来技術では、各サーバのメモリ使用量に偏りが生じてしまうこととなり、サーバの処理量及びメモリ使用量を考慮した負荷分散を行うことが困難であった。その結果、上述した従来技術では、システム全体としてメモリ使用量を有効に活用できない。 However, with the above-described conventional technology, it is difficult to perform load distribution in consideration of server processing volume and memory usage. For example, in the above-described prior art, if the number of key information allocated to each server differs for each server, even if the processing load bias is reduced, the data size held by the server is biased. Therefore, in the above-described prior art, the memory usage amount of each server is biased, and it is difficult to perform load distribution in consideration of the server processing amount and the memory usage amount. As a result, with the above-described conventional technology, the memory usage cannot be effectively utilized as the entire system.
そこで、本願に係る技術は、上述した従来技術の問題に鑑みてなされたものであって、サーバの処理量及びメモリ使用量を考慮した負荷分散を行うことを可能とする負荷分散装置を提供することを目的とする。 Accordingly, the technology according to the present application has been made in view of the above-described problems of the prior art, and provides a load distribution device that can perform load distribution in consideration of server processing amount and memory usage. For the purpose.
上述した課題を解決し、目的を達成するため、本願の装置は、クライアント装置から受信した処理の実行要求を複数の要求処理サーバのうちのいずれかに転送する負荷分散装置であって、分類部と、割当部と、決定部とを備える。分類部は、前記クライアント装置から受信するであろう処理の実行要求の処理内容を示すキー情報のハッシュ値を算出し、算出したハッシュ値に基づいて、前記処理の実行要求を所定の数の管理単位に分類する。割当部は、前記管理単位のそれぞれを、前記実行要求の要求頻度が所定の閾値以下となる部分管理単位に分割し、各管理単位における部分管理単位を、前記複数の要求処理サーバのそれぞれに対する割当数が所定数以下となるように、割り当てる。決定部は、前記クライアント装置から処理の実行要求を受信した場合に、当該実行要求の処理内容を示すハッシュ値を算出して、算出したハッシュ値に基づいて、受信した実行要求が分類された管理単位を特定し、特定した管理単位の部分管理単位が割り当てられた要求処理サーバを前記実行要求の転送先として決定する。 In order to solve the above-described problems and achieve the object, the apparatus of the present application is a load distribution apparatus that transfers a process execution request received from a client apparatus to one of a plurality of request processing servers, and includes a classification unit And an assigning unit and a determining unit. The classifying unit calculates a hash value of key information indicating processing contents of a processing execution request that will be received from the client device, and manages a predetermined number of management requests based on the calculated hash value. Classify into units. The allocation unit divides each of the management units into partial management units in which the request frequency of the execution request is equal to or less than a predetermined threshold, and allocates the partial management unit in each management unit to each of the plurality of request processing servers. The number is assigned so that it is less than or equal to the predetermined number. When the determination unit receives a process execution request from the client device, the determination unit calculates a hash value indicating the processing content of the execution request, and manages the received execution request classified based on the calculated hash value A unit is specified, and a request processing server to which a partial management unit of the specified management unit is assigned is determined as a transfer destination of the execution request.
本願の装置は、サーバの処理量及びメモリ使用量を考慮した負荷分散を行うことを可能にする。 The apparatus of the present application makes it possible to perform load distribution in consideration of the server processing amount and memory usage.
以下に添付図面を参照して、本願に係る負荷分散装置の実施形態を詳細に説明する。なお、本願に係る負荷分散装置は、以下の実施形態により限定されるものではない。 Hereinafter, an embodiment of a load distribution apparatus according to the present application will be described in detail with reference to the accompanying drawings. In addition, the load distribution apparatus which concerns on this application is not limited by the following embodiment.
[第1の実施形態]
[第1の実施形態に係る情報処理システムの構成]
以下では、まず、第1の実施形態に係る負荷分散装置を含む情報処理システムの全体の構成について説明した後、負荷分散装置の詳細な構成について説明する。図1は、第1の実施形態に係る情報処理システム1の構成の一例を示す図である。
[First Embodiment]
[Configuration of Information Processing System According to First Embodiment]
In the following, first, the overall configuration of the information processing system including the load distribution apparatus according to the first embodiment will be described, and then the detailed configuration of the load distribution apparatus will be described. FIG. 1 is a diagram illustrating an example of a configuration of an
図1に示すように、第1の実施形態に係る情報処理システム1は、クライアント11〜13と、負荷分散装置30と、要求処理サーバ41〜45と、ストレージ装置51とを有する。そして、クライアント11〜13と負荷分散装置30とは、IPネットワーク21で接続され、負荷分散装置30と要求処理サーバ41〜45とは、IPネットワーク22で接続され、要求処理サーバ41〜45とストレージ装置51とは、IPネットワーク23で接続される。IPネットワーク21〜23は、インターネットサービスを提供するプロバイダによってそれぞれ構成されたIP(Internet Protocol)網である。
As illustrated in FIG. 1, the
ここで、クライアント11〜13は、3台のみ図示されているが、実際にはさらに多数のクライアントがIPネットワーク21に接続されている。また、要求処理サーバ41〜45は、5台のみ図示されているが、実際にはさらに多数の要求処理サーバがIPネットワーク22及びIPネットワーク23に接続されている。そして、複数のクライアント及び複数の要求処理サーバは、それぞれ同一の機能を有することから、以下の説明では、複数のクライアントをまとめてクライアント10とし、複数の要求処理サーバをまとめて要求処理サーバ40として説明する。
Here, only three
クライアント10は、いずれかの要求処理サーバ40に実行させる処理の実行に必要なキー情報(サービス指定値)を含むサービス要求を生成する。そして、クライアント10は、生成したサービス要求を負荷分散装置30に発行する。その後、クライアント10は、負荷分散装置30を介して、いずれかの要求処理サーバ40による処理の実行結果を取得する。
The client 10 generates a service request including key information (service specification value) necessary for execution of processing to be executed by any of the request processing servers 40. Then, the client 10 issues the generated service request to the
要求処理サーバ40は、高速にアクセス可能なメモリを有し、ストレージ装置51に保持される全ての制御データのうち、負荷分散装置30から送信される割当ドメイン情報通知に基づいて、自身に割り当てられたドメインのサービス要求の処理を実行するために必要な制御データ(属性値情報)をストレージ装置51から取得して、メモリに記憶する。そして、要求処理サーバ40は、負荷分散装置30からサービス要求を受信した場合には、受信したサービス要求に含まれるキー情報と対応付けられた制御データをメモリ上で検索し、検索した制御データを応答として負荷分散装置30に送信する。 なお、割当ドメイン情報通知については、後に詳述する。
The request processing server 40 has a memory that can be accessed at high speed, and is allocated to itself based on the allocation domain information notification transmitted from the
ストレージ装置51は、すべてのキー情報(サービス指定値)に対応する制御データ(属性値情報)をディスク上に保持しており、要求処理サーバ40から送信された属性値情報要求に含まれるドメインに属する全てのキー情報とその属性値情報のペアをディスクから取得し、属性値情報応答として要求処理サーバ40に送信する。また、ストレージ装置51は、属性値情報要求に含まれるドメインから当該ドメインに属するキー情報を算出するため、負荷分散装置30からドメイン開始ハッシュ値テーブルの内容が通知され、当該テーブルと同じ内容を保持する。なお、ドメイン開始ハッシュ値テーブルについては、後に詳述する。
The
負荷分散装置30は、クライアントから送信されたサービス要求に含まれるキー情報(サービス指定値)に基づいて、当該サービス要求を処理させる要求処理サーバ40を決定し、その要求処理サーバ40にサービス要求を送信する。そして、負荷分散装置30は、サービス要求に対応するサービス応答を要求処理サーバ40から受信すると、当該サービス応答をクライアントに送信する。そして、負荷分散装置30は、サービス要求量の増加に備えて、未使用の要求処理サーバ40の情報をサーバプール情報として保持しており、サービス要求量が増加した場合には、サーバプール情報から未使用の要求処理サーバ40の情報を取得し、当該要求処理サーバ40に割当ドメイン情報通知を送信することで、サービス要求の処理を開始させることができる。逆に、サービス要求量が減少し、割当ドメインが無くなった要求処理サーバ40はサーバプール情報に記録される。なお、図1においては、負荷分散装置30は1台であるが、冗長化のために負荷分散装置30を並列に複数設置することも可能であり、その場合に負荷分散装置30の構成は変わらない。以下、図2を用いて、負荷分散装置30の詳細について説明する。
The
図2は、第1の実施形態に係る負荷分散装置30の構成の一例を示す図である。例えば、負荷分散装置30は、図2に示すように、通信制御I/F部31と、入力部32と、表示部33と、記憶部34と、制御部35とを有する。
FIG. 2 is a diagram illustrating an example of the configuration of the
通信制御I/F部31は、クライアント10と制御部35との間でやり取りする各種情報に関する通信を制御する。また、通信制御I/F部31は、要求処理サーバ40と制御部35との間でやり取りする各種情報に関する通信を制御する。例えば、通信制御I/F部31は、サービス要求及びサービス応答の送受信を制御する。また、通信制御I/F部31は、入力部32及び表示部33と、制御部35との間での各種情報のやり取りを制御する。
The communication control I /
入力部32は、例えば、キーボードやマウスなどであり、ユーザによる種々の情報の入力処理を受付ける。一例を挙げると、入力部32は、ドメインの分類に用いられる閾値の入力処理などを受付ける。なお、ドメインの分類に用いられる閾値については後述する。表示部33は、例えば、ディスプレイなどであり、ユーザに対して処理結果を表示出力する。
The
記憶部34は、図2に示すように、ドメイン開始ハッシュ値テーブル34aと、ドメイン要求頻度テーブル34bと、要求処理サーバ割当テーブル34cと、要求処理サーバ割当状態管理テーブル34dとを備える。記憶部34は、例えば、ハードディスク、光ディスクなどの記憶装置、または、RAM(Random Access Memory)、フラッシュメモリ(Flash Memory)などの半導体メモリ素子であり、負荷分散装置30によって実行される各種プログラムなどを記憶する。
As shown in FIG. 2, the
ドメイン開始ハッシュ値テーブル34aは、クライアント10から受信するサービス要求をキー情報に基づいて分類するための管理単位(ドメイン)の範囲を示す開始ハッシュ値を記憶する。具体的には、ドメイン開始ハッシュ値テーブル34aは、後述する制御部35によってサービス要求のキー情報から算出されたハッシュ値に応じて分類されたドメインを識別するための情報を記憶する。図3は、第1の実施形態に係るドメイン開始ハッシュ値テーブル34aによって記憶される情報の一例を示す図である。
The domain start hash value table 34a stores a start hash value indicating a management unit (domain) range for classifying service requests received from the client 10 based on key information. Specifically, the domain start hash value table 34a stores information for identifying domains classified according to the hash value calculated from the key information of the service request by the
例えば、ドメイン開始ハッシュ値テーブル34aは、図3に示すように、開始ハッシュ値とドメインとを対応づけた情報を記憶する。ここで、図3における「開始ハッシュ値」とは、各ドメインの範囲の開始となるハッシュ値を意味する。また、図3に示す「ドメイン」とは、クライアントから受信するサービス要求をキー情報のハッシュ値で分類して管理するための管理単位を意味する。 For example, the domain start hash value table 34a stores information associating the start hash value with the domain, as shown in FIG. Here, the “start hash value” in FIG. 3 means a hash value that is the start of the range of each domain. The “domain” shown in FIG. 3 means a management unit for classifying and managing service requests received from clients by hash values of key information.
一例を挙げると、ドメイン開始ハッシュ値テーブル34aは、図3に示すように、「開始ハッシュ値:0013、ドメイン:ドメインD」、「開始ハッシュ値:1156、ドメイン:ドメインA」、「開始ハッシュ値:2632、ドメイン:ドメインH」などを記憶する。これらの情報は、例えば、ハッシュ値が「0013」〜「1155」までのキー情報に対応するサービス要求が、「ドメインD」に属することを意味する。同様に、例えば、ハッシュ値が「1156」〜「2631」までのキー情報に対応するサービス要求が、「ドメインA」に属することを意味する。すなわち、ドメイン開始ハッシュ値テーブル34aは、ドメインごとのハッシュ値の範囲を記憶する。 For example, as shown in FIG. 3, the domain start hash value table 34a includes “start hash value: 0013, domain: domain D”, “start hash value: 1156, domain: domain A”, “start hash value”. : 2632, domain: domain H "and the like. These pieces of information mean, for example, that a service request corresponding to key information having hash values “0013” to “1155” belongs to “domain D”. Similarly, for example, it means that a service request corresponding to key information having hash values “1156” to “2631” belongs to “domain A”. That is, the domain start hash value table 34a stores a range of hash values for each domain.
図2に戻って、ドメイン要求頻度テーブル34bは、ドメインごとのサービス要求の要求頻度と、要求頻度に応じたドメインの分割数を記憶する。図4は、第1の実施形態に係るドメイン要求頻度テーブル34bによって記憶される情報の一例を示す図である。例えば、ドメイン要求頻度テーブル34bは、図4に示すように、ドメインごとに、要求頻度(/秒)とドメイン分割数とを対応付けた情報を記憶する。 Returning to FIG. 2, the domain request frequency table 34 b stores the request frequency of service requests for each domain and the number of domain divisions according to the request frequency. FIG. 4 is a diagram illustrating an example of information stored in the domain request frequency table 34b according to the first embodiment. For example, as shown in FIG. 4, the domain request frequency table 34b stores information in which the request frequency (/ second) is associated with the number of domain divisions for each domain.
一例を挙げると、ドメイン要求頻度テーブル34bは、図4に示すように、「ドメインA」に「要求頻度(/秒):280」と「ドメイン分割数:1」とを対応付けた情報を記憶する。この情報は、「ドメインA」に属するサービス要求を1秒間に280回受信しており、ドメインの分割数が「1」であることを意味する。なお、ドメイン分割数の詳細については、後述する。同様に、ドメイン要求頻度テーブル34bは、ドメインB〜ドメインHまでの要求頻度及びドメイン分割数を記憶する。 For example, as shown in FIG. 4, the domain request frequency table 34b stores information in which “domain A” is associated with “request frequency (/ second): 280” and “domain division number: 1”. To do. This information means that service requests belonging to “domain A” are received 280 times per second, and the number of domain divisions is “1”. Details of the number of domain divisions will be described later. Similarly, the domain request frequency table 34b stores request frequencies from domain B to domain H and the number of domain divisions.
図2に戻って、要求処理サーバ割当テーブル34cは、各ドメインに属するサービス要求の転送先の要求処理サーバ40の情報を記憶する。具体的には、要求処理サーバ割当テーブル34cは、後述する制御部35によってドメインごとに決定されたサービス要求を実行する要求処理サーバの数と転送先の情報を記憶する。図5は、第1の実施形態に係る要求処理サーバ割当テーブル34cによって記憶された情報の一例を示す図である。
Returning to FIG. 2, the request processing server allocation table 34c stores information on the request processing server 40 that is a transfer destination of service requests belonging to each domain. Specifically, the request processing server allocation table 34c stores information on the number of request processing servers that execute service requests determined for each domain by the
例えば、要求処理サーバ割当テーブル34cは、図5に示すように、ドメインに要求処理サーバを対応付けた情報を記憶する。一例を挙げると、「ドメインA:サーバ41」、「ドメインB:サーバ42、サーバ43、サーバ44、サーバ45」、「ドメインC:サーバ46、サーバ41」などの情報を記憶する。これらの情報は、例えば、「ドメインA」に属するサービス要求の転送先が「要求処理サーバ41」であり、「ドメインB」に属するサービス要求の転送先が「要求処理サーバ42」、「要求処理サーバ43」、「要求処理サーバ44」、「要求処理サーバ45」のいずれかであり、「ドメインC」に属するサービス要求の転送先が「要求処理サーバ46」又は「要求処理サーバ41」であることを意味する。同様に、要求処理サーバ割当テーブル34cは、すべてのドメインについて、サービス要求を転送する転送先の要求処理サーバ40の情報を記憶する。
For example, the request processing server allocation table 34c stores information in which a request processing server is associated with a domain, as shown in FIG. As an example, information such as “Domain A:
図2に戻って、要求処理サーバ割当状態管理テーブル34dは、要求処理サーバ40ごとに、転送先として割り当てられたドメインの情報を記憶する。図6は、第1の実施形態に係る要求処理サーバ割当状態管理テーブル34dによって記憶される情報の一例を示す図である。例えば、要求処理サーバ割当状態管理テーブル34dは、図6に示すように、要求処理サーバに割当ドメインを対応付けた情報を記憶する。 Returning to FIG. 2, the request processing server allocation state management table 34 d stores information on the domain allocated as the transfer destination for each request processing server 40. FIG. 6 is a diagram illustrating an example of information stored in the request processing server allocation state management table 34d according to the first embodiment. For example, as shown in FIG. 6, the request processing server allocation state management table 34d stores information in which an allocation domain is associated with a request processing server.
一例を挙げると、要求処理サーバ割当状態管理テーブル34dは、図6に示すように、「サーバ41:ドメインA、ドメインC、ドメインF」や、「サーバ42:ドメインB、ドメインD、ドメインG」などの情報を記憶する。すなわち、これらの情報は、「要求処理サーバ41」が「ドメインA」、「ドメインC」及び「ドメインF」に属するサービス要求の転送先であり、「要求処理サーバ42」が「ドメインB」、「ドメインD」及び「ドメインG」に属するサービス要求の転送先であることを意味する。同様に、要求処理サーバ割当状態管理テーブル34dは、その他の要求処理サーバについて転送先として割り当てられたドメインの情報を記憶する。
For example, as shown in FIG. 6, the request processing server allocation state management table 34d includes “server 41: domain A, domain C, domain F” and “server 42: domain B, domain D, domain G”. Such information is memorized. That is, these pieces of information include that “
図2に戻って、制御部35は、ドメイン分類部35aと、要求処理サーバ割当部35bと、割当ドメイン情報通知部35cと、要求処理サーバ決定部35dと、要求頻度更新部35eとを備える。制御部35は、例えば、CPU(Central Processing Unit)やMPU(Micro Processing Unit)などの電子回路やASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)などの集積回路であり、負荷分散装置30の全体制御を実行する。
Returning to FIG. 2, the
ドメイン分類部35aは、実行要求の処理内容を示すキー情報(サービス指定値)のハッシュ値に応じて、クライアント10から受信する処理の実行要求を所定の数の管理単位(ドメイン)に分類する。具体的には、ドメイン分類部35aは、サービス要求に含まれるキー情報のハッシュ値が取り得る値の範囲をあらかじめ定める数のドメインに分割して、ドメイン開始ハッシュ値テーブル34aに情報を格納する。
The
例えば、ドメイン分類部35aは、ドメイン数を「8」、ハッシュ値の範囲を「0000」〜「9999」として、ランダムなハッシュ値を各ドメインの開始ハッシュ値として算出する。そして、ドメイン分類部35aは、例えば、図3に示すような情報を、ドメイン開始ハッシュ値テーブル34aに格納する。
For example, the
要求処理サーバ割当部35bは、ドメインごとに、実行要求の要求頻度が所定の閾値以下となる分割ドメインに分割し、各ドメインにおける分割ドメインを、複数の要求処理サーバ40に所定の割当数以下でそれぞれ割り当てる。具体的には、要求処理サーバ割当部35bは、要求処理サーバの処理性能を所定の割当数で除算した値を所定の閾値として用いドメインを分割ドメインに分割する。図7は、第1の実施形態に係る要求処理サーバ割当部35bによるドメインの分割処理の一例を説明するための図である。
The request processing
ここで、図7においては、図3に示すように、ドメイン分類部35aによってサービス要求が8つのドメインに分類された場合の処理について示す。例えば、要求処理サーバ割当部35bは、図7に示すように、各ドメインの要求頻度を取得し、取得した要求頻度に応じて、各ドメインを分割ドメインに分割する。ここで、要求処理サーバ割当部35bは、キー情報(サービス指定値)ごとの要求頻度が判明している場合には、ドメイン開始ハッシュ値テーブル34aによって記憶される情報を参照して、各ドメインの要求頻度を算出する。
Here, FIG. 7 shows processing when the service request is classified into eight domains by the
一方、キー情報(サービス指定値)ごとの要求頻度が判明していない場合には、要求処理サーバ割当部35bは、クライアント10から受信する全体のサービス要求量をドメイン数で除算した値を各ドメインの要求頻度の暫定値として設定する。かかる場合には、要求処理サーバ割当部35bは、その後の処理に伴って判明する実際のドメインごとの要求頻度に応じて、暫定値を実測値に更新する。
On the other hand, when the request frequency for each key information (service specification value) is not known, the request processing
要求処理サーバ割当部35bは、上述したように、各ドメインの要求頻度を取得して、要求頻度に応じた分割ドメインに分割する。例えば、要求処理サーバ割当部35bは、図7に示すように、要求処理サーバ40の処理性能「900(/秒)」を所定の割当数「3」で除算した値「300」を所定の閾値とする。そして、要求処理サーバ割当部35bは、各ドメインの要求頻度を所定の閾値「300」で除算し、小数点以下の値を切り上げて整数としたものをドメイン分割数として決定する。
As described above, the request processing
要求処理サーバ割当部35bは、取得した各ドメインの要求頻度と、決定したドメイン分割数をドメイン要求頻度テーブル34bに格納するとともに、図7の右側の図に示すように、各ドメインを対応するドメイン分割数で分割する。一例を挙げると、要求処理サーバ割当部35bは、「ドメインB」の「要求頻度:1050」を所定の閾値「300」で除算した値「3.5」の小数点以下を切り上げた「4」で「ドメインB」を「分割ドメインB1」、「分割ドメインB2」、「分割ドメインB3」、「分割ドメインB4」に分割する。同様に、要求処理サーバ割当部35bは、各ドメインをドメイン分割数でドメインを分割ドメインに分割する。
The request processing
さらに、要求処理サーバ割当部35bは、分割ドメインの総数を所定の割当数で除算することで、分割ドメインを割り当てる要求処理サーバ40の台数を決定し、決定した台数の要求処理サーバ40に分割ドメインを割り当てる。ここで、要求処理サーバ割当部35bは、複数の要求処理サーバ40のうち、分割ドメインの割当数が最少であり、かつ、分割元のドメインが割当予定の分割ドメインと同一となる分割ドメインの割当数が最少である要求処理サーバ40を割当予定の分割ドメインの割当先と決定する。
Further, the request processing
図8は、第1の実施形態に係る要求処理サーバ割当部35bによる割当処理の一例を説明するための図である。ここで、図8においては、図7に示す分割処理の後の処理について示す。例えば、要求処理サーバ割当部35bは、図8の左側の図に示すように、分割ドメイン「A1」〜「H3」の個数「18」を所定の割当数「3」で除算した値「6」を要求処理サーバ40の台数とする。そして、要求処理サーバ割当部35bは、要求処理サーバ41〜46の6台のサーバを割当対象のサーバとして決定して、各要求処理サーバに分割ドメインを割当てる。
FIG. 8 is a diagram for explaining an example of allocation processing by the request processing
このとき、要求処理サーバ割当部35bは、上述した手法により分割ドメインを割り当てる。例えば、要求処理サーバ割当部35bは、分割ドメインA1を要求処理サーバ41に割り当てた後、分割ドメインB1〜B4を割り当てる場合、まず、分割ドメインの割当数が最少の要求処理サーバ42〜46を抽出する(要求処理サーバ41は、分割ドメインA1が割り当てられているため、最少ではない)。そして、要求処理サーバ割当部35bは、分割ドメインB1から順に要求処理サーバに割り当てる。ここで、要求処理サーバ割当部35bは、分割ドメインの割当数が最少であり、かつ、分割元のドメインが割当予定の分割ドメインと同一となる分割ドメインの割当数が最少である要求処理サーバ40を割当予定の分割ドメインの割当先と決定する。
At this time, the request processing
すなわち、要求処理サーバ割当部35bは、仮に図8の右側の図で要求処理サーバが4台(サーバ41〜44まで)であった場合には、分割ドメインB4を、分割元が同一である分割ドメインB1〜B3が割り当てられたサーバ42〜44ではなく、サーバ41に割り当てるように制御する。同様に要求処理サーバ割当部35bは、図8の右側の図に示すように、ドメインC〜Hにおける各分割ドメインを要求処理サーバ41〜46に順に割り当てる。そして、要求処理サーバ割当部35bは、割当後の情報を、要求処理サーバ割当テーブル34c及び要求処理サーバ割当状態管理テーブル34dにそれぞれ格納する。
That is, if the request processing
第1の実施形態に係る負荷分散装置30では、上述したように、キー情報(サービス指定値)のハッシュ値に基づいて、サービス要求を複数のドメインに分類することで、ハッシュ関数のランダム性から各ドメインのキー情報の数をおよそ均等にして、メモリ使用量をおよそ均等にすることができる。さらに、負荷分散装置30は、各ドメインの要求頻度を、要求処理サーバ40の処理性能の1/Nを閾値として分割し、各サーバにNずつ割り当てることで、各要求処理サーバの処理量もおよそ均等にすることができる。
In the
要求処理サーバ割当部35bは、さらに、後述する要求頻度更新部35eによって各ドメインの要求頻度が更新された場合に、ドメインを更新後の要求頻度が所定の閾値以下となる分割ドメインに再分割し、再分割後の分割ドメインの増減に応じて、複数の要求処理サーバへの割り当てを変更する。なお、この処理については、後に詳述する。
Further, when the request frequency of each domain is updated by a request
図2に戻って、割当ドメイン情報通知部35cは、要求処理サーバ割当部35bによって要求処理サーバ割当状態管理テーブル34dが更新された場合に、分割ドメインの割当てが変更された要求処理サーバ40に対して割当ドメイン情報通知を行う。例えば、割当ドメイン情報通知部35cは、図6に示す要求処理サーバ割当状態管理テーブル34dの情報を参照して、要求処理サーバ41に、ドメインA、ドメインC及びドメインFの分割ドメインが割り当てられたことを通知する。すなわち、割当ドメイン情報通知部35cは、要求処理サーバ41に対してドメインA、ドメインC及びドメインFのサービス要求に対する応答を実行するように通知する。
Returning to FIG. 2, when the request processing server allocation state management table 34d is updated by the request processing
要求処理サーバ決定部35dは、クライアント10から処理の実行要求を受信した場合に、当該実行要求の処理内容を示すハッシュ値を算出して、算出したハッシュ値に対応するドメインの分割ドメインが割り当てられた要求処理サーバ40を実行要求の転送先として決定する。具体的には、要求処理サーバ決定部35dは、同一のドメインから分割された分割ドメインがそれぞれ異なる要求処理サーバ40に割り当てられていた場合に、要求処理サーバ40それぞれに対してドメインに属する実行要求の転送回数が略均等になるようにサービス要求を転送する。
When the request processing
例えば、要求処理サーバ決定部35dは、ドメインBに属するサービス要求を複数受信した場合に、要求処理サーバ42〜45へのドメインBに属するサービス要求の転送回数が均等になるように転送先を決定して、サービス要求を転送する。
For example, when the request processing
要求頻度更新部35eは、ドメインごとの実行要求の要求頻度を監視して、要求頻度を更新する。具体的には、要求頻度更新部35eは、サービス要求がクライアント10から送出される頻度をドメイン分類部35aが分類したドメインごとにカウントし、ドメイン要求頻度テーブルを定期的に更新する。また、要求頻度更新部35eは、あらかじめ定める閾値を越える要求頻度の増減があった場合に、要求処理サーバ割当部35bに対して要求処理サーバ40の割当を変更するよう通知する。
The request
例えば、要求頻度更新部35eは、ドメイン要求頻度テーブル34bに記憶されたドメインごとのドメイン分割数が増減した場合に、増減した分の分割ドメインの割当てを変更する。
For example, when the number of domain divisions for each domain stored in the domain request frequency table 34b increases or decreases, the request
すなわち、要求処理サーバ割当部35bは、分割ドメインが増加した場合に、分割元のドメインが同一となる分割ドメインの割当数が最少である要求処理サーバ40に増加分の分割ドメインを割り当てる。一方、要求処理サーバ割当部35bは、分割ドメインが減少した場合に、分割元のドメインが同一となる分割ドメインの割当数が最多である要求処理サーバ40から減少分の分割ドメインの割り当てを解除する。
That is, when the number of divided domains increases, the request processing
[第1の実施形態に係る負荷分散装置による処理の手順]
次に、第1の実施形態に係る負荷分散装置30による処理の手順について、図9〜18を用いて説明する。なお、以下では、分割ドメインの割当処理、サービス要求の応答処理及び割当変更処理の各手順について、情報処理システム1におけるシーケンス図と、負荷分散装置30におけるフローチャートとを用いて順に説明する。
[Procedure of processing by the load balancer according to the first embodiment]
Next, a processing procedure by the
まず、図9〜11を用いて、分割ドメインの割当処理について説明する。図9は、第1の実施形態に係る情報処理システム1における分割ドメインの割当処理の手順を説明するためのシーケンス図である。図9に示すように、負荷分散装置30においては、ドメイン分類部35aが、ドメイン初期化処理を実行して(ステップS101)、ドメイン開始ハッシュ値テーブル34aに各ドメインの開始ハッシュ値を格納する。
First, split domain assignment processing will be described with reference to FIGS. FIG. 9 is a sequence diagram for explaining the procedure of split domain assignment processing in the
そして、ドメイン開始ハッシュ値テーブル34aを格納すると、負荷分散装置30は、ストレージ装置51に対してドメイン開始ハッシュ値を通知する(ステップS102)。ストレージ装置51は、ドメイン開始ハッシュ値の通知を受信すると、内容を自身のメモリ上に記憶して、ドメイン開始ハッシュ値応答を負荷分散装置30に送信する(ステップS103)。
When the domain start hash value table 34a is stored, the
続いて、負荷分散装置30においては、要求処理サーバ割当部35bが、要求頻度初期化処理を実行して(ステップS104)、各ドメインの要求頻度とドメイン分割数をドメイン要求頻度テーブル34bに格納する。そして、要求処理サーバ割当部35bは、要求処理サーバ割当初期化処理を実行して(ステップS105)、要求処理サーバ40の台数を決定して、各要求処理サーバ40に分割ドメインを割り当てる。
Subsequently, in the
割当ドメイン情報通知部35cは、要求処理サーバ割当部35bによって各要求処理サーバ40に分割ドメインが割り当てられると、要求処理サーバ割当状態管理テーブル34dによって記憶された情報を参照して、各要求処理サーバ40に割当ドメイン情報を通知する(ステップS106)。割当ドメイン情報が通知されると、要求処理サーバ40は、ストレージ装置51に対して割り当てられたドメインの属性値情報を取得するための属性値情報要求を送信する(ステップS107)。ストレージ装置51は、各要求処理サーバ40に対して、受信した属性値情報要求に対応する属性値情報応答を送信する(ステップ
S108)。
When the request processing
ストレージ装置51から属性値情報応答を受信すると、要求処理サーバ40は、負荷分散装置30に対して、割当ドメイン情報の通知に対する応答である割当ドメイン情報応答を送信する(ステップS109)。
When receiving the attribute value information response from the
次に、図9のステップS105で示す要求処理サーバ割当初期化処理の詳細について説明する。図10及び図11は、第1の実施形態に係る負荷分散装置30による要求処理サーバ割当処理の手順を説明するためのフローチャートである。ここで、図11に示す処理は、図10のステップS202の処理の詳細を示す。
Next, details of the request processing server allocation initialization process shown in step S105 of FIG. 9 will be described. FIG. 10 and FIG. 11 are flowcharts for explaining the procedure of the request processing server allocation process by the
図10に示すように、負荷分散装置30においては、ドメイン要求頻度テーブル34bにドメインの要求頻度及びドメイン分割数を格納すると、要求処理サーバ割当部35bは、全ドメインの分割ドメイン数の合計と、サーバ分割数(所定の割当数)とから必要な要求処理サーバ数を決定し、決定した数の要求処理サーバ40をサーバプール情報から取得して、要求処理サーバ割当状態管理テーブル34dに各要求処理サーバ40のレコードを追加する(ステップS201)。
As shown in FIG. 10, in the
続いて、要求処理サーバ割当部35bは、分割ドメインごとの要求処理サーバ割当初期化処理を実行する(ステップS202)。この処理は、全分割ドメインについて繰り返し実行される。かかる処理においては、図11に示すように、要求処理サーバ割当部35bが、要求処理サーバ割当状態管理テーブル34dにおいて、割当ドメイン数が最少であり、かつ、当該ドメインの割当数が最少である要求処理サーバのうちの一つを割当予定の分割ドメインの要求処理サーバとして決定する(ステップS301)。
Subsequently, the request processing
そして、要求処理サーバ割当部35bは、要求処理サーバ割当テーブル34cにおける当該分割ドメインの分割元のドメインのレコードに決定した要求処理サーバの情報を追加する(ステップS302)。さらに、要求処理サーバ割当部35bは、要求処理サーバ割当状態管理テーブル34dにおける決定した要求処理サーバのレコードに割当予定の分割ドメイン(分割元のドメイン)の情報を追加する(ステップS303)。要求処理サーバ割当部35bは、全分割ドメインについて上述した処理を繰り返し実行する。
Then, the request processing
次に、図12〜14を用いて、サービス要求の応答処理について説明する。図12は、第1の実施形態に係る情報処理システム1におけるサービス要求の応答処理の手順を説明するためのシーケンス図である。図12に示すように、負荷分散装置30においては、クライアント10からサービス要求を受信すると(ステップS401)、要求処理サーバ決定部35dが受信したサービス要求を転送する要求処理サーバを決定する(ステップS402)。なお、クライアント10から受信するサービス要求には単一のサービス指定値(キー情報)が含まれる。
Next, service request response processing will be described with reference to FIGS. FIG. 12 is a sequence diagram for explaining the procedure of the service request response process in the
そして、要求処理サーバ決定部35dが、サービス要求の転送先の要求処理サーバ40を決定すると、負荷分散装置30は、決定した要求処理サーバ41にサービス要求を転送する(ステップS403)。サービス要求を受信した要求処理サーバ41は、サービス応答作成処理を実行して(ステップS404)、サービス応答を送信する(ステップS405)。サービス応答を受信した負荷分散装置30は、サービス要求を送信したクライアントに受信したサービス応答を転送する(ステップS406)。
Then, when the request processing
続いて、図12のステップS402で示す要求処理サーバ決定処理の詳細について説明する。図13は、第1の実施形態に係る負荷分散装置30による要求処理サーバ決定処理の手順を説明するためのフローチャートである。図13に示すように、負荷分散装置30は、クライアント10からサービス要求を受信すると、要求処理サーバ決定部35dは、サービス要求に含まれるサービス指定値のハッシュ値を算出して、算出したハッシュ値をキーとして、ドメイン開始ハッシュ値テーブル34aを検索して、サービス指定値のドメインを判定する(ステップS501)。
Next, details of the request processing server determination process shown in step S402 in FIG. 12 will be described. FIG. 13 is a flowchart for explaining the procedure of the request processing server determination process by the
そして、要求処理サーバ決定部35dは、決定したドメインをキーとして要求処理サーバ割当テーブル34cを検索して、該当するドメイン(分割ドメイン)に属するサービス要求の転送先となっている要求処理サーバ40の一覧を取得する(ステップS502)。さらに、要求処理サーバ決定部35dは、要求処理サーバ一覧に含まれる要求処理サーバの中から、ランダムで1つを選択して、サービス要求を処理させる要求処理サーバとして決定する(ステップS503)。なお、上述した処理の例では、ランダムに要求処理サーバを選択する場合について説明したが、これはあくまでも一例であり、実施形態はこれに限定されるものではない。例えば、分割ドメインの割当状況を考慮し要求処理サーバを選択する場合であってもよい。
Then, the request processing
続いて、図12のステップS404で示すサービス応答作成処理の詳細について説明する。図14は、第1の実施形態に係る要求処理サーバ41によるサービス応答作成処理の手順を説明するためのフローチャートである。図14に示すように、要求処理サーバ41は、負荷分散装置30からサービス要求を受信すると、サービス要求に含まれるサービス指定値をキーとして、当該サービス指定値に対応する属性値をメモリ上で検索する(ステップS601)。
Next, details of the service response creation process shown in step S404 in FIG. 12 will be described. FIG. 14 is a flowchart for explaining a procedure of service response creation processing by the
ここで、該当するレコードがある場合には(ステップS602肯定)、要求処理サーバ41は、対応する属性値を含めたサービス応答を作成して(ステップS603)、作成したサービス応答を負荷分散装置30に送信する。一方、該当するレコードがない場合には(ステップS602否定)、要求処理サーバ41は、対応する属性値を含めずにサービス応答を作成して(ステップS604)、作成したサービス応答を負荷分散装置30に送信する。なお、上述した例では、サービス応答作成処理を要求処理サーバ41が実行する場合について説明したが、その他の要求処理サーバ40も同様の処理を実行することができる。
If there is a corresponding record (Yes at Step S602), the
次に、図15〜18を用いて、割当変更処理について説明する。図15は、第1の実施形態に係る情報処理システム1において、ドメイン分割数が増加した場合の割当変更処理の手順を説明するためのシーケンス図である。図15に示すように、負荷分散装置30においては、要求頻度更新部35eが、クライアント10から送信されるサービス要求について、ドメインごとの要求をカウントして、定期的にドメイン要求頻度テーブル34bを更新する処理である要求頻度監視・更新処理を実行する(ステップS701)。
Next, the allocation change process will be described with reference to FIGS. FIG. 15 is a sequence diagram for explaining the procedure of the allocation change process when the number of domain divisions increases in the
要求頻度更新部35eによってドメイン要求頻度テーブル34bが更新されると、要求処理サーバ割当部35bは、要求処理サーバ割当変更処理を実行して(ステップS702)、要求処理サーバとして新たに割り当てた要求処理サーバ46に対して割当ドメイン情報追加通知を送信する(ステップS703)。割当ドメイン情報追加通知を受信した要求処理サーバ46は、ストレージ装置51に対して属性値情報要求を送信して(ステップS704)、属性値情報応答を受信する(ステップS705)。属性値情報応答を受信すると、要求処理サーバ46は、割当ドメイン情報追加応答を負荷分散装置30に送信する(ステップS706)。
When the domain request frequency table 34b is updated by the request
続いて、図15のステップS702で示す要求処理サーバ割当変更処理の詳細について説明する。図16は、第1の実施形態に係る負荷分散装置30によるドメイン分割数が増加した場合の要求処理サーバ割当変更処理の手順を説明するためのフローチャートである。図16に示すように、ドメイン分割数が増加した場合、要求処理サーバ割当部35bは、要求処理サーバ割当状態管理テーブル34dにおいて、割当ドメイン数がサーバ分割数未満の要求処理サーバがあるか否かを判定する(ステップS801)。
Next, details of the request processing server assignment change process shown in step S702 of FIG. 15 will be described. FIG. 16 is a flowchart for explaining a procedure of request processing server allocation change processing when the number of domain divisions by the
ここで、割当ドメイン数がサーバ分割数未満の要求処理サーバがあると判定した場合には(ステップS801肯定)、要求処理サーバ割当部35bは、さらに、割当ドメイン数がサーバ分割数未満の要求処理サーバの中で、割当ドメイン数が最少で、かつ割当予定の分割ドメインと分割元が同一であるドメインの割当数も最少の要求処理サーバがあるか否かを判定する(ステップS802)。
Here, when it is determined that there is a request processing server having an allocation domain number less than the server division number (Yes in step S801), the request processing
ここで、割当ドメイン数が最少で、かつ割当予定の分割ドメインと分割元が同一であるドメインの割当数も最少の要求処理サーバがあると判定した場合には(ステップS802肯定)、要求処理サーバ割当部35bは、該当する要求処理サーバのうちのひとつを当該分割ドメインの要求処理サーバのひとつに決定する(ステップS803)。一方、割当ドメイン数が最少で、かつ割当予定の分割ドメインと分割元が同一であるドメインの割当数も最少の要求処理サーバがないと判定した場合には(ステップS802否定)、要求処理サーバ割当部35bは、割当ドメインがサーバ分割数未満の要求処理サーバの中で、割当予定の分割ドメインと分割元が同一である分割ドメインの割当数が最少の要求処理サーバのうちのひとつを割当予定の分割ドメインの要求処理サーバの一つに決定する(ステップS804)。
Here, when it is determined that there is a request processing server having the smallest number of assigned domains and the smallest number of assigned domains in the same domain as the divided domain to be assigned (Yes in step S802), the request processing server. The allocating
一方、ステップS801において、割当ドメイン数がサーバ分割数未満の要求処理サーバがないと判定した場合には(ステップS801否定)、要求処理サーバ割当部35bは、サーバプール情報から未使用の要求処理サーバ40を一つ取得し、その要求処理サーバ40を要求処理サーバ割当状態管理テーブル34dに追加するとともに、割当予定の分割ドメインの要求処理サーバのひとつに決定する(ステップS805)。
On the other hand, if it is determined in step S801 that there is no request processing server having an allocation domain number less than the server division number (No in step S801), the request processing
そして、要求処理サーバ割当部35bは、要求処理サーバ割当テーブル34cにおける
当該ドメインのレコードに決定した要求処理サーバの情報を追加し(ステップS806)、さらに、要求処理サーバ割当状態管理テーブル34dにおける決定した要求処理サーバのレコードに当該ドメインの情報を追加する(ステップS807)。要求処理サーバ割当部35bは、ドメイン分割数の増加分だけ上記した処理を繰り返し実行する。
Then, the request processing
その後、割当ドメイン情報通知部35cは、新たに割り当てた要求処理サーバに対して、割当ドメイン情報追加通知を送信し(ステップS808)、負荷分散装置30は、要求処理サーバから割当ドメイン情報追加応答を受信して(ステップS809)、処理を終了する。
Thereafter, the allocation domain
図17は、第1の実施形態に係る情報処理システム1において、ドメイン分割数が減少した場合の割当変更処理の手順を説明するためのシーケンス図である。図17に示すように、負荷分散装置30においては、要求頻度更新部35eが、クライアント10から送信されるサービス要求について、ドメインごとの要求をカウントして、定期的にドメイン要求頻度テーブル34bを更新する処理である要求頻度監視・更新処理を実行する(ステップS901)。
FIG. 17 is a sequence diagram for explaining the procedure of the allocation change process when the number of domain divisions decreases in the
要求頻度更新部35eによってドメイン要求頻度テーブル34bが更新されると、要求処理サーバ割当部35bは、要求処理サーバ割当変更処理を実行して(ステップS902)、要求処理サーバから削除する要求処理サーバ46に対して割当ドメイン情報削除通知を送信する(ステップS903)。割当ドメイン情報削除通知を受信した要求処理サーバ46は、割当ドメイン情報削除応答を負荷分散装置30に送信する(ステップS904)。
When the request
続いて、図17のステップS902で示す要求処理サーバ割当変更処理の詳細について説明する。図18は、第1の実施形態に係る負荷分散装置によるドメイン分割数が減少した場合の要求処理サーバ割当変更処理の手順を説明するためのフローチャートである。図18に示すように、ドメイン分割数が減少した場合、要求処理サーバ割当部35bは、要求処理サーバ割当状態管理テーブル34dにおいて、割当ドメイン数が最多で、かつ削除予定の分割ドメインと分割元が同一である分割ドメインの割当数も最多の要求処理サーバがあるか否かを判定する(ステップS1001)。
Next, details of the request processing server allocation change process shown in step S902 of FIG. 17 will be described. FIG. 18 is a flowchart for explaining the procedure of a request processing server allocation change process when the number of domain divisions by the load distribution apparatus according to the first embodiment decreases. As shown in FIG. 18, when the number of domain divisions decreases, the request processing
ここで、割当ドメイン数が最多で、かつ削除予定の分割ドメインと分割元が同一である分割ドメインの割当数も最多の要求処理サーバがあると判定した場合には(ステップS1001肯定)、要求処理サーバ割当部35bは、該当する要求処理サーバのうちの一つを当該分割ドメインの割当を解除する要求処理サーバに決定する(ステップS1002)。
If it is determined that there is a request processing server with the largest number of assigned domains and the assigned number of the divided domains having the same division source as the divided domain to be deleted (Yes in step S1001), the request processing is performed. The
一方、割当ドメイン数が最多で、かつ削除予定の分割ドメインと分割元が同一である分割ドメインの割当数も最多の要求処理サーバがないと判定した場合には(ステップS1001否定)、要求処理サーバ割当部35bは、削除予定の分割ドメインと分割元が同一である分割ドメインの割当数が最多の要求処理サーバのうちの一つを当該分割ドメインの割当を解除する要求処理サーバに決定する(ステップS1003)。
On the other hand, if it is determined that there is no request processing server having the largest number of assigned domains and the number of assigned divided domains having the same division source as the divided domain to be deleted (No in step S1001), the request processing server The allocating
そして、要求処理サーバ割当部35bは、要求処理サーバ割当テーブル34cにおける
当該ドメインのレコードから決定した要求処理サーバの情報を削除し(ステップS1004)、さらに、要求処理サーバ割当状態管理テーブル34dにおける決定した要求処理サーバのレコードから当該分割ドメインの情報を削除する(ステップS1005)。要求処理サーバ割当部35bは、ドメイン分割数の減少分だけ上記した処理を繰り返し実行する。
Then, the request processing
その後、割当ドメイン情報通知部35cは、分割ドメインの割当を解除した要求処理サーバに対して、割当ドメイン情報変更通知を送信し(ステップS1006)、負荷分散装置30は、要求処理サーバから割当ドメイン情報変更通知応答を受信して(ステップS1007)、処理を終了する。
Thereafter, the allocation domain
[第1の実施形態の効果]
上述したように、第1の実施形態によれば、クライアント装置から受信した処理の実行要求を複数の要求処理サーバのうちのいずれかに転送する負荷分散装置30において、ドメイン分類部35aは、クライアント10から受信するであろう処理の実行要求の処理内容を示すキー情報のハッシュ値を算出し、算出したハッシュ値に基づいて、処理の実行要求を所定の数のドメインに分類する。要求処理サーバ割当部35bは、ドメインのそれぞれを、実行要求の要求頻度が所定の閾値以下となる分割ドメインに分割し、各ドメインにおける分割ドメインを、複数の要求処理サーバ40のそれぞれに対する割当数が所定数以下となるように、割り当てる。要求処理サーバ決定部35dは、クライアント10から処理の実行要求を受信した場合に、当該実行要求の処理内容を示すハッシュ値を算出して、算出したハッシュ値に基づいて、受信した実行要求が分類されたドメインを特定し、特定したドメインの分割ドメインが割り当てられた要求処理サーバ40を実行要求の転送先として決定する。従って、第1の実施形態に係る負荷分散装置30は、キー情報のハッシュ値に基づいて、サービス要求を複数のドメインに分類することで、各ドメインのキー情報の数をおよそ均等にしてメモリ使用量を略均等にするとともに、各ドメインの要求頻度に応じて分割ドメインに分割し、各サーバに略均等に割り当てることで、各要求処理サーバ40の処理量もおよそ均等にすることができる。その結果、負荷分散装置30は、サーバの処理量及びメモリ使用量を考慮した負荷分散を行うことを可能にする。
[Effect of the first embodiment]
As described above, according to the first embodiment, in the
また、第1の実施形態によれば、要求処理サーバ割当部35bは、要求処理サーバ40の処理性能を所定数で除算した値を所定の閾値として用いる。従って、第1の実施形態に係る負荷分散装置30は、要求処理サーバ40への分割ドメインの最大割当数で処理性能を除算した値を分割の閾値とすることで、分割ドメインを最大数割り当てたとしても、割当後の処理量が要求処理サーバ40の処理性能を超えることはなく、安定した負荷分散を実行させることを可能にする。
Further, according to the first embodiment, the request processing
また、第1の実施形態によれば、要求処理サーバ割当部35bは、分割ドメインの総数を所定数で除算することで、分割ドメインを割り当てる要求処理サーバ40の台数を決定し、決定した台数の要求処理サーバ40に分割ドメインを割り当てる。従って、第1の実施形態に係る負荷分散装置30は、過不足のない最適な台数の要求処理サーバ40を割当サーバとして決定することができ、サーバシステムを有効に利用することを可能にする。
In addition, according to the first embodiment, the request processing
また、第1の実施形態によれば、要求処理サーバ割当部35bは、複数の要求処理サーバ40のうち、分割ドメインの割当数が最少であり、かつ、分割元のドメインが割当予定の分割ドメインと同一となる分割ドメインの割当数が最少である要求処理サーバ40を割当予定の分割ドメインの割当先と決定する。従って、第1の実施形態に係る負荷分散装置30は、分割元が同一となる分割ドメインを同一の要求処理サーバ40に割り当てることを抑止することができ、要求処理サーバ40の処理量及びメモリ使用量をより均等にすることを可能にする。また、特定のドメインの処理が特定の要求処理サーバ40のみで実行されることが少ないため、第1の実施形態に係る負荷分散装置30は、要求処理サーバ40のいずれかに故障が発生したなどの場合に、故障による影響が特定のドメインの偏ることを抑止することを可能にする。
In addition, according to the first embodiment, the request processing
例えば、各ドメインの処理量をN台のサーバに均等に分散していた場合(一つのドメインの各分割ドメインをN台のサーバに割り当てている場合)には、仮にそのうちの1台のサーバに故障が発生したとしても、そのドメインに与える影響は、1/Nで済むことになる。これは、処理の要求頻度が高く、複数の分割ドメインに分割されるドメインにより効果的である。 For example, when the processing amount of each domain is evenly distributed to N servers (when each divided domain of one domain is assigned to N servers), it is temporarily assigned to one of the servers. Even if a failure occurs, the influence on the domain is only 1 / N. This is more effective for a domain that is frequently processed and is divided into a plurality of divided domains.
また、第1の実施形態によれば、要求処理サーバ決定部35dは、同一のドメインから分割された分割ドメインがそれぞれ異なる要求処理サーバ40に割り当てられていた場合に、要求処理サーバ40それぞれに対してドメインに属する実行要求の転送回数が略均等になるように実行要求を転送する。従って、第1の実施形態に係る負荷分散装置30は、特定の処理が特定の要求処理サーバ40に集中することを抑止することを可能にする。
Further, according to the first embodiment, the request processing
また、第1の実施形態によれば、要求頻度更新部35eは、ドメインごとの実行要求の要求頻度を監視して、要求頻度を更新する。要求処理サーバ決定部35dは、要求頻度更新部35eによって要求頻度が更新された場合に、ドメインを更新後の要求頻度が所定の閾値以下となる分割ドメインに再分割し、再分割後の分割ドメインの増減に応じて、複数の要求処理サーバ40への割り当てを変更する。従って、第1の実施形態に係る負荷分散装置30は、経時的に変化するサービス要求の要求頻度に応じて、柔軟に負荷分散を実行することを可能にする。
Further, according to the first embodiment, the request
また、第1の実施形態によれば、要求処理サーバ決定部35dは、分割ドメインが増加した場合に、分割元のドメインが同一となる分割ドメインの割当数が最少である要求処理サーバに増加分の分割ドメインを割り当てる。従って、第1の実施形態に係る負荷分散装置30は、分割ドメインの増加時においても、分割ドメインをバランスよく割り当てることを可能にする。
Further, according to the first embodiment, when the number of divided domains increases, the request processing
また、第1の実施形態によれば、要求処理サーバ決定部35dは、分割ドメインが減少した場合に、分割元のドメインが同一となる分割ドメインの割当数が最多である要求処理サーバ40から減少分の分割ドメインの割り当てを解除する。従って、第1の実施形態に係る負荷分散装置30は、分割ドメインの減少時においても、分割ドメインの割当てをバランスよく解除することを可能にする。
Further, according to the first embodiment, when the number of divided domains decreases, the request processing
[第2の実施形態]
これまで第1の実施形態を説明したが、本願に係る実施形態は、これら第1の実施形態に限定されるものではない。すなわち、これらの実施形態は、その他の様々な形態で実施されることが可能であり、種々の省略、置き換え、変更を行うことができる。
[Second Embodiment]
Although the first embodiment has been described so far, the embodiment according to the present application is not limited to the first embodiment. That is, these embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made.
上述した第1の実施形態においては、分割元の同じ分割ドメインについて、既に割り当てた割当数が最少となる要求処理サーバ40に割り当てるように制御する場合について説明した。しかしながら、実施形態はこれに限定されるものではなく、例えば、分割元の同じ分割ドメインが同一の要求処理サーバ40に割り当てられないように制御する場合であってもよい。 In the first embodiment described above, a case has been described in which control is performed so that the same divided domain as the division source is assigned to the request processing server 40 having the smallest number of assignments already assigned. However, the embodiment is not limited to this, and for example, it may be a case where control is performed so that the same divided domain as the division source is not assigned to the same request processing server 40.
かかる場合には、分割元のドメインが割当予定の分割ドメインと同一となる分割ドメインの既に割り当てた割当数が「0」のサーバが無ければ、サーバプール情報を参照して未使用の要求処理サーバ40を割当対象のサーバとする。これにより、耐障害性を改善(≒1台以上のサーバが故障した場合のシステム全体としての安全性を向上)させることができる。なお、上述した分割ドメインの割当方法は、必要となる要求処理サーバ40の数が増えることから、未使用の要求処理サーバ40が多数ある場合に用いられることが望ましい。 In such a case, if there is no server with the allocation number “0” already assigned to the split domain in which the split source domain is the same as the scheduled split domain, an unused request processing server is referred to the server pool information. 40 is a server to be assigned. Thereby, it is possible to improve the fault tolerance (≈improve the safety of the entire system when one or more servers fail). Note that the above-described split domain allocation method increases the number of required request processing servers 40, and is therefore preferably used when there are a large number of unused request processing servers 40.
また、例えば、各装置の分散・統合の具体的形態(例えば、図2の形態)は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的又は物理的に分散・統合することができる。一例を挙げると、要求処理サーバ割当部35bと要求頻度更新部35eとを一つの処理部として統合してもよく、一方、要求処理サーバ割当部35bを、分割ドメインを生成する分割ドメイン生成部と、分割ドメインを割り当てる割当部とに分散してもよい。
In addition, for example, the specific form of distribution / integration of each device (for example, the form of FIG. 2) is not limited to that shown in the figure, and all or a part thereof can be arbitrarily set according to various loads or usage conditions. It can be distributed or integrated functionally or physically in units. For example, the request processing
また、制御部35を負荷分散装置30の外部装置としてネットワーク経由で接続するようにしてもよく、或いは、記憶部34に記憶される各テーブルを別の装置がそれぞれ有し、ネットワークに接続されて協働することで、上述した負荷分散装置30の機能を実現するようにしてもよい。
In addition, the
これらの実施例やその変形は、本願が開示する技術に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。 These embodiments and modifications thereof are included in the invention disclosed in the claims and equivalents thereof as well as included in the technology disclosed in the present application.
11、12、13 クライアント
21、22、23 IPネットワーク
30 負荷分散装置
34 記憶部
35 制御部
35a ドメイン分類部
35b 要求処理サーバ割当部
35c 割当ドメイン情報通知部
35d 要求処理サーバ決定部
35e 要求頻度更新部
41、42,43、44、45、46 要求処理サーバ
51 ストレージ装置
11, 12, 13
Claims (8)
前記クライアント装置から受信するであろう処理の実行要求の処理内容を示すキー情報のハッシュ値を算出し、算出したハッシュ値に基づいて、前記処理の実行要求を所定の数の管理単位に分類する分類部と、
前記管理単位のそれぞれを、前記実行要求の要求頻度が所定の閾値以下となる部分管理単位に分割し、各管理単位における部分管理単位を、前記複数の要求処理サーバのそれぞれに対する割当数が所定数以下となるように、割り当てる割当部と、
前記クライアント装置から処理の実行要求を受信した場合に、当該実行要求の処理内容を示すハッシュ値を算出して、算出したハッシュ値に基づいて、受信した実行要求が分類された管理単位を特定し、特定した管理単位の部分管理単位が割り当てられた要求処理サーバを前記実行要求の転送先として決定する決定部と、
を備えたことを特徴とする負荷分散装置。 A load balancer that transfers a process execution request received from a client device to one of a plurality of request processing servers,
A hash value of key information indicating processing contents of a processing execution request that will be received from the client device is calculated, and the processing execution request is classified into a predetermined number of management units based on the calculated hash value. A classification section;
Each of the management units is divided into partial management units in which the request frequency of the execution request is equal to or less than a predetermined threshold, and the partial management unit in each management unit is assigned a predetermined number of requests to each of the plurality of request processing servers. An assigning part to be assigned, so that
When a processing execution request is received from the client device, a hash value indicating the processing content of the execution request is calculated, and a management unit into which the received execution request is classified is specified based on the calculated hash value. Determining a request processing server to which a partial management unit of the specified management unit is assigned as a transfer destination of the execution request;
A load balancer comprising:
前記割当部は、前記更新部によって前記要求頻度が更新された場合に、前記管理単位を更新後の要求頻度が所定の閾値以下となる部分管理単位に再分割し、再分割後の部分管理単位の増減に応じて、前記複数の要求処理サーバへの割り当てを変更することを特徴とする請求項1〜5のいずれか一つに記載の負荷分散装置。 An update unit that monitors the request frequency of the execution request for each management unit and updates the request frequency,
The allocating unit subdivides the management unit into partial management units in which the updated request frequency is equal to or less than a predetermined threshold when the request frequency is updated by the updating unit, and the partial management unit after the subdivision The load distribution apparatus according to claim 1, wherein allocation to the plurality of request processing servers is changed in accordance with increase / decrease.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012248710A JP5839495B2 (en) | 2012-11-12 | 2012-11-12 | Load balancer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012248710A JP5839495B2 (en) | 2012-11-12 | 2012-11-12 | Load balancer |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014096113A true JP2014096113A (en) | 2014-05-22 |
JP5839495B2 JP5839495B2 (en) | 2016-01-06 |
Family
ID=50939113
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012248710A Expired - Fee Related JP5839495B2 (en) | 2012-11-12 | 2012-11-12 | Load balancer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5839495B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021261252A1 (en) * | 2020-06-24 | 2021-12-30 | 三菱電機株式会社 | Computation circuit, computation method, program, and computation circuit design method |
CN117454785A (en) * | 2023-10-07 | 2024-01-26 | 中国矿业大学 | Calculation method for coarse particle solid content distribution |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1196128A (en) * | 1997-09-22 | 1999-04-09 | Fujitsu Ltd | Device and method for adjusting network service server load and recording medium |
-
2012
- 2012-11-12 JP JP2012248710A patent/JP5839495B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1196128A (en) * | 1997-09-22 | 1999-04-09 | Fujitsu Ltd | Device and method for adjusting network service server load and recording medium |
Non-Patent Citations (2)
Title |
---|
JPN6015034535; 栗田 弘之 外4名: '"要求頻度の偏りを考慮したスケーラビリティと負荷の平準化を両立する負荷分散手法の検討"' 電子情報通信学会技術研究報告 第112巻 第4号, 20120405, pp.7-12, 一般社団法人電子情報通信学会 * |
JPN6015034536; 近藤 悟 外3名: '"多様な検索と負荷分散を両立するための仮想ノード割り当て方法"' 電子情報通信学会技術研究報告 第111巻 第468号, 20120301, pp.517-522, 社団法人電子情報通信学会 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021261252A1 (en) * | 2020-06-24 | 2021-12-30 | 三菱電機株式会社 | Computation circuit, computation method, program, and computation circuit design method |
CN117454785A (en) * | 2023-10-07 | 2024-01-26 | 中国矿业大学 | Calculation method for coarse particle solid content distribution |
CN117454785B (en) * | 2023-10-07 | 2024-03-22 | 中国矿业大学 | Calculation method for coarse particle solid content distribution |
Also Published As
Publication number | Publication date |
---|---|
JP5839495B2 (en) | 2016-01-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11863379B2 (en) | Container cluster management | |
US9485197B2 (en) | Task scheduling using virtual clusters | |
JP5514041B2 (en) | Identifier assignment method and program | |
EP2930619A2 (en) | System and method for shared utilisation of virtualised computing resources | |
US9100362B2 (en) | Peer-to-peer architecture for web traffic management | |
JP6881575B2 (en) | Resource allocation systems, management equipment, methods and programs | |
US9071612B2 (en) | Service providing system | |
US20160057108A1 (en) | Method for load-balancing ipsec traffic | |
CN108124020B (en) | Domain name resolution method, system and equipment | |
JP6243528B2 (en) | Distribution of creator systems among lease agent systems | |
CN113515364B (en) | Data migration method and device, computer equipment and storage medium | |
CN110244901B (en) | Task allocation method and device and distributed storage system | |
CN108737591B (en) | Service configuration method and device | |
CN110569302A (en) | method and device for physical isolation of distributed cluster based on lucene | |
Yang et al. | A predictive load balancing technique for software defined networked cloud services | |
CN102932271A (en) | Method and device for realizing load balancing | |
WO2017207049A1 (en) | A node of a network and a method of operating the same for resource distribution | |
CN112035244A (en) | Deployment of virtual node clusters in a multi-tenant environment | |
JP5839495B2 (en) | Load balancer | |
CN109005071B (en) | Decision deployment method and scheduling equipment | |
CN112422611A (en) | Virtual bucket storage processing method and system based on distributed object storage | |
KR100478346B1 (en) | Load balancing method based on graph-partitioning for cluster sever and the system | |
JP6325995B2 (en) | Distributed system, load balancing method and program | |
Berwal et al. | Load Balancing in cloud computing | |
WO2021072574A1 (en) | Load balancing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150204 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150826 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150901 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20151001 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20151005 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20151014 |
|
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: 20151104 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20151105 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5839495 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |