JP2015201029A - Load distribution device, load distribution method and load distribution system - Google Patents
Load distribution device, load distribution method and load distribution system Download PDFInfo
- Publication number
- JP2015201029A JP2015201029A JP2014079287A JP2014079287A JP2015201029A JP 2015201029 A JP2015201029 A JP 2015201029A JP 2014079287 A JP2014079287 A JP 2014079287A JP 2014079287 A JP2014079287 A JP 2014079287A JP 2015201029 A JP2015201029 A JP 2015201029A
- Authority
- JP
- Japan
- Prior art keywords
- request
- partial area
- client terminal
- load distribution
- server
- 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
- Computer And Data Communications (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
本発明は、負荷分散装置、負荷分散方法、および、負荷分散システムに関する。 The present invention relates to a load distribution apparatus, a load distribution method, and a load distribution system.
クライアント端末からの要求を処理するサーバシステムにおいて、クライアント端末からの要求量が多く、単一のサーバでは処理できない場合、クライアント端末とサーバシステムの間に負荷分散装置を設置し、負荷分散装置が複数のサーバに要求を振り分けることが広く行われている。 In a server system that processes requests from client terminals, if there is a large amount of requests from client terminals that cannot be processed by a single server, a load balancer is installed between the client terminal and the server system, and multiple load balancers It is widely used to distribute requests to other servers.
負荷分散装置における負荷分散手法として、例えば、非特許文献1に記載されているコンシステント・ハッシュ法等のように、要求中に含まれる属性情報をキーとして振り分け先のサーバを決定することで、同じ属性情報を含む要求を同一のサーバに振り分ける手法が知られている。
As a load distribution method in the load distribution apparatus, for example, by determining the distribution destination server using the attribute information included in the request as a consistent hash method described in
また、クライアント端末からの要求に位置情報が含まれる場合に、その位置情報から、クライアント端末とネットワーク上の距離が近いサーバを特定し、当該サーバに要求を振り分ける技術も知られている。 A technique is also known in which, when location information is included in a request from a client terminal, a server that is close to the client terminal on the network is identified from the location information, and the request is distributed to the server.
また、特許文献1には、キーの要求頻度に応じて、要求頻度の高いキーは複数のサーバに、要求頻度の低いキーは単一のサーバに振り分けを行う負荷分散手法に関する技術が記載されており、本技術によれば、例えば、各クライアント端末が送信する要求の量が均一でない場合でも、振り分け先のサーバの負荷をおおむね均一にすることができる。
ここで、例えば、クライアント端末が送信するセンサ情報を処理するサーバシステム等においては、要求量の観点から複数のサーバでの処理が必要となる一方で、地理的に近いクライアント端末群からのセンサ情報はなるべく単一のサーバで処理したいという要件がある。 Here, for example, in a server system or the like that processes sensor information transmitted by a client terminal, processing from a plurality of servers is necessary from the viewpoint of request amount, while sensor information from a geographically close client terminal group is required. There is a requirement to process with a single server as much as possible.
こうした要件に対して、例えば、非特許文献1に記載されている負荷分散方式を適用し、要求に含まれる位置情報をキーとした負荷分散を行うことで、地理的に近いクライアント端末群を同一のサーバに収容することが可能である。しかし、クライアント端末は必ずしも一様に分布せず、また各クライアント端末が送信する要求量も均一ではない場合、等しい面積の領域を各サーバに割り当てたとしても、サーバの負荷が著しく偏ってしまう場合がある。
To meet these requirements, for example, the load distribution method described in Non-Patent
このようにサーバ負荷が著しく偏ると、サーバのコンピューティングリソースを有効に活用できず、結果として、本来必要な数以上のサーバ数が必要になってしまうという問題がある。 Thus, if the server load is significantly biased, the computing resources of the server cannot be used effectively, and as a result, there is a problem that the number of servers more than originally necessary is required.
また一方で、特許文献1で開示されている負荷分散方式では、サーバの負荷をおおむね均一にすることはできるが、この場合、地理的に近いクライアント端末群の要求が複数のサーバに振り分けられてしまい、上記の要件を満たすことができないという問題がある。
On the other hand, in the load balancing method disclosed in
そこで本発明は、前記した問題を解決し、各サーバの負荷をおおむね均等にしつつ、地理的に近いクライアント端末群をなるべく同一サーバに振り分けることを目的とする。 SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to solve the above-described problems and distribute client terminals that are geographically close to the same server as much as possible while making the load of each server substantially equal.
上述した課題を解決し、目的を達成するために、本発明は、複数のサーバにより負荷分散を行う分散処理システムにおいて、クライアント端末からの要求をいずれかのサーバへ振り分ける負荷分散装置であって、前記クライアント端末からの要求を受け付ける要求受け付け部と、所定平面を区分した領域ごとに、所定期間における当該領域内に位置するクライアント端末からの要求量をカウントする要求量カウント部と、前記平面上の領域の集合である部分領域を、各部分領域における前記要求量ができるだけ均等になるように決定し、前記決定した部分領域と、前記部分領域の識別情報とを対応付けた部分領域情報保持テーブルを生成する部分領域決定部と、前記クライアント端末からの要求を受け付けたとき、前記部分領域情報保持テーブルを参照して、前記クライアント端末の属する部分領域の識別情報に対応するサーバへ前記要求を振り分ける要求振り分け部と、を備えることを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention provides a load distribution apparatus that distributes requests from client terminals to any server in a distributed processing system that performs load distribution by a plurality of servers. A request receiving unit that receives a request from the client terminal, a request amount counting unit that counts a request amount from a client terminal located in the region for a predetermined period, for each region that divides the predetermined plane, A partial area that is a set of areas is determined so that the required amount in each partial area is as uniform as possible, and a partial area information holding table that associates the determined partial area with identification information of the partial area When a partial area determination unit to be generated and a request from the client terminal are received, the partial area information holding table is received. Referring to Le, characterized in that it and a request distribution part for distributing the request to the corresponding server to the identification information of the partial areas belonging of said client terminal.
本発明によれば、各サーバの負荷をおおむね均等にしつつ、地理的に近いクライアント群をなるべく同一サーバに振り分けることができる。 According to the present invention, it is possible to distribute geographically close client groups to the same server as much as possible while making the load on each server substantially equal.
以下、図面を参照しながら、本発明を実施するための形態(実施形態)について説明する。 Hereinafter, embodiments (embodiments) for carrying out the present invention will be described with reference to the drawings.
(システム構成)
まず、図1を用いて本実施形態の負荷分散システムの構成を説明する。負荷分散システムは、クライアント端末10(10A〜10D)と、負荷分散装置20と、サーバ30(30A〜30D)とを備える。負荷分散システムにおいて、クライアント端末10と負荷分散装置20とは、例えば、ネットワーク41により接続され、負荷分散装置20とサーバ30とはネットワーク42により接続される。ネットワーク41,42は、例えば、IP(Internet Protocol)ネットワークである。それぞれの台数は図1に示す台数に限定されない。
(System configuration)
First, the configuration of the load distribution system of this embodiment will be described with reference to FIG. The load distribution system includes client terminals 10 (10A to 10D), a
クライアント端末10は、負荷分散装置20経由でサーバ30に対しサービス要求(以下適宜、要求と略す)を送信する。このクライアント端末10は、例えば、当該クライアント端末10の備えるセンサ情報と、例えば、GPS(Global Positioning System)等で取得した自身の位置情報とを含む要求を負荷分散装置20へ送信する。
The
負荷分散装置20は、クライアント端末10からの要求を受信すると、このクライアント端末10の位置情報をもとに当該要求をいずれかのサーバ30に振り分ける。
When receiving a request from the
サーバ30は、負荷分散装置20経由でクライアント端末10からの要求を受信すると、当該要求に基づく処理を実行する。例えば、サーバ30は、受信した要求に含まれるセンサ情報に対し、当該要求に含まれるクライアント端末10の部分領域情報に基づき統計処理等のアプリケーションロジックを実施する。具体例を挙げると、サーバ30は同じ部分領域情報を持つ要求(例えば、地理的に近いクライアント端末10からの要求)に含まれるセンサ情報をまとめ、これらのセンサ情報に対し統計処理等を行う。なお、このサーバ30の設置台数は、例えば、負荷分散装置20に到達する全要求量に応じて、各サーバ30の平均負荷が80%程度となるような台数とする。
When the
(処理の概要)
図2を用いて負荷分散システムの処理の概要を説明する。負荷分散システムの負荷分散装置20はクライアント端末10からの要求を受信すると、この要求をいずれかのサーバ30に振り分ける。そして、サーバ30では受信した要求に基づく処理を実行する。このクライアント端末10からの要求には、例えば、クライアント端末10の識別情報(例えば、IP(Internet Protocol)アドレス等)、クライアント端末10の位置情報等が含まれる。負荷分散装置20は、クライアント端末10からの要求に含まれる識別情報や位置情報に基づき、要求の振り分け先のサーバ30を決定するが、ここでの振り分け先のサーバ30の決定は以下のようにして行う。
(Outline of processing)
The outline of the processing of the load distribution system will be described with reference to FIG. When receiving a request from the
すなわち、まず、負荷分散装置20は、クライアント端末10の位置情報をもとにクライアント端末10の分布を示す情報を作成する。例えば、符号101に示すように所定平面上におけるクライアント端末10の分布を示した情報を作成する。その後、負荷分散装置20は、図2に示すように当該平面を所定数の格子に区分し、それぞれの格子単位で所定期間における要求量をカウントする(符号102参照)。これにより格子内のクライアント端末10それぞれからの所定期間における要求量が得られる。この格子単位での要求量のカウント結果を示した情報を要求量情報保持テーブルと称す(図5参照)。
That is, first, the
その後、負荷分散装置20は、要求量情報保持テーブルにおける要求量がおおむね均等となる部分領域を格子の集合として設計する。例えば、負荷分散装置20は要求量がおおむね均等となる格子の集合として、符号103に示す9つの部分領域を設計する。なお、部分領域に添えられた、A1、A2、A3、B1、B2、B3、C1、C2、C3は部分領域の識別情報(部分領域情報)である。
Thereafter, the
負荷分散装置20はこのようにして得られた情報(部分領域情報保持テーブル)を参照して振り分け先のサーバ30を決定する。
The
例えば、負荷分散装置20は、クライアント端末10から要求を受信すると、部分領域情報保持テーブルを参照して、受信した要求について所属する部分領域を判定する。例えば、負荷分散装置20は、受信した要求の所属する部分領域が「A2」であると判定する。そして、負荷分散装置20は部分領域の判定結果(例えば、「A2」)をもとに、コンシステント・ハッシュ法で当該部分領域に対応するサーバ30を選択し、この選択したサーバ30を振り分け先のサーバ30として決定する。これにより、同じ部分領域に属する要求は同じサーバに振り分けられることになる。この後、負荷分散装置20は振り分け先のサーバ30へ要求を転送する。なお、負荷分散装置20は、クライアント端末10からの要求に、当該クライアント端末10に対応する部分領域の情報(部分領域情報)を付加して転送してもよい。その後、サーバ30は、転送された要求について、例えば、部分領域単位でアプリケーションロジックを実施する。
For example, when receiving a request from the
(処理の詳細)
図3を用いて、負荷分散装置20における処理を詳細に説明する。ここでは、クライアント端末10Aとクライアント端末10Bとが地理的に近く、クライアント端末10Cとクライアント端末10Dとが地理的に近いものとする。
(Details of processing)
The process in the
負荷分散装置20は所定期間における各格子内の領域のクライアント端末10の要求量をカウントし、そのカウント結果を要求量情報保持テーブルに記録する。そして、負荷分散装置20は、この要求量情報保持テーブルにおける要求量がおおむね均等となる部分領域を決定し、例えば、図3に示す部分領域情報保持テーブルを得る。
The
その後、負荷分散装置20は、クライアント端末10からの要求を受け付けると、このクライアント端末10の属する格子の位置に対応する部分領域情報を読み出し、要求を振り分ける。例えば、負荷分散装置20がクライアント端末10A((X,Y)=(2,2))からの要求を受け付けたとき、この(X,Y)=(2,2)に対応する部分領域情報「A1」を読み出し、この「A1」に対応するサーバ30(例えば、サーバ30B)へ要求を振り分ける。また、負荷分散装置20がクライアント端末10B((X,Y)=(2,3))からの要求を受け付けたとき、この(X,Y)=(2,3)に対応する部分領域情報「A1」を読み出し、この「A1」に対応するサーバ30(例えば、サーバ30B)へ要求を振り分ける。その結果、地理的に近いクライアント端末10A,10Bからの要求は同じサーバ30Bへ振り分けられる。
Thereafter, when receiving a request from the
また同様に、例えば、負荷分散装置20がクライアント端末10C((X,Y)=(5,4))からの要求を受け付けたとき、この(X,Y)=(5,4)に対応する部分領域情報「B2」を読み出し、この「B2」に対応するサーバ30(例えば、サーバ30C)へ要求を振り分ける。また、負荷分散装置20がクライアント端末10D((X,Y)=(5,5))からの要求を受け付けたとき、(X,Y)=(5,5)に対応する部分領域情報「B2」を読み出し、この「B2」に対応するサーバ30(例えば、サーバ30C)へ要求を振り分ける。その結果、地理的に近いクライアント端末10C,10Dからの要求は同じサーバ30Cへ振り分けられる。
Similarly, for example, when the
(構成)
次に、図4を用いて、負荷分散装置20の構成を説明する。負荷分散装置20は、入出力部21と、制御部22と、記憶部23とを備える。
(Constitution)
Next, the configuration of the
入出力部21は、外部装置との間での各種情報の入出力を司る。例えば、入出力部21は、クライアント端末10からの要求を受信したり、当該要求をサーバ30へ転送したりする。この入出力部21は、例えば、ネットワーク41,42経由で通信を行うための通信インタフェースにより実現される。
The input /
制御部22は、負荷分散装置20全体の制御を司り、要求受け付け部221と、要求量カウント部222と、部分領域決定部223と、要求振り分け部224とを備える。破線で示した部分領域数更新部225は装備する場合と装備しない場合とがあり、装備する場合については後記する。
The
要求受け付け部221は、入出力部21経由でクライアント端末10からの要求を受け付ける。
The
要求量カウント部222は、要求の送信元のクライアント端末10の位置情報に基づき、所定期間における各クライアント端末10からの要求量を領域ごとにカウントする。つまり、要求量カウント部222は、要求の送信元の各クライアント端末10の位置情報をもとに、所定平面を区切った領域(例えば、格子状の領域)上で、各クライアント端末10がどの領域に属するかを判定する。そして、要求量カウント部222は、この領域ごとに、所定期間における当該領域に属するクライアント端末10からの要求量をカウントし、そのカウント結果を要求量情報保持テーブル(図5参照)に書き込む。
The request
なお、以下では、領域の形状は、格子である場合を例に説明するが、格子以外の形状であってもよい。また、平面をいくつの領域に分割するかは、負荷分散装置20の処理性能に応じて予め設定されているものとする。例えば、負荷分散装置20の処理能力が比較的高ければ、領域数を多く設定しておく。
In the following description, the shape of the region is described as an example of a lattice, but may be a shape other than the lattice. In addition, it is assumed that the number of areas into which the plane is divided is set in advance according to the processing performance of the
部分領域決定部223は、前記した所定平面上の領域(例えば、格子状の領域)の集合である部分領域を、各部分領域における要求量ができるだけ均等になるように決定する。そして、部分領域決定部223は、決定した部分領域と、当該部分領域の識別情報とを対応付けた部分領域情報保持テーブル(図6参照)を生成する。生成した要求量情報保持テーブルは、記憶部23に格納する。なお、部分領域決定部223が決定する部分領域数は、少なくとも負荷分散システムにおけるサーバ30の数以上とする。この部分領域決定部223の処理の詳細は具体例を交えながら後記する。
The partial
要求振り分け部224は、クライアント端末10からの要求をいずれかのサーバ30に振り分ける。例えば、要求振り分け部224は、クライアント端末10からの要求を受け付けたとき、部分領域情報保持テーブルからクライアント端末10の位置に対応する部分領域情報を読み出す。そして、要求振り分け部224は、この部分領域情報をキーとして、コンシステント・ハッシュ法等により、このキーに対応するサーバ30を決定する。そして、要求振り分け部224は、クライアント端末10からの要求を当該決定したサーバ30へ送信(転送)する。なお、要求振り分け部224がサーバ30へ要求を送信するとき、部分領域情報保持テーブルから読み出した部分領域情報を含めて送信してもよい。
The
記憶部23は、要求量情報保持テーブルと、部分領域情報保持テーブルとを所定領域に記憶する。破線で示す部分領域数保持テーブルについては、後記する。
The
要求量情報保持テーブルは、所定の平面を区分した領域ごとに、所定期間における当該領域内のクライアント端末10からの要求量のカウント結果を示す情報である。この要求量情報保持テーブルの一例を図5に示す。図5に示す要求量情報保持テーブルは、座標平面をX軸、Y軸それぞれ8つに分割し、計64個の領域(格子)からなる。各格子内の数値は、所定期間における、当該格子(領域)内の各クライアント端末10からの要求数の合計値である。この要求量情報保持テーブルは要求量カウント部222によるカウント結果に基づき更新される。この要求量情報保持テーブルは、記憶部23上において、二次元配列として記憶される。
The request amount information holding table is information indicating the count result of the request amount from the
部分領域情報保持テーブルは、部分領域決定部223により決定された部分領域と、当該部分領域の識別情報とを対応付けた情報である。この部分領域情報保持テーブルの一例を図6に示す。図6に示す部分領域情報保持テーブルは、図5に示す要求量情報保持テーブルの格子全体を、X軸、Y軸それぞれ3つに分割することで得られた9つの部分領域を示す。部分領域に添えられた、A1、A2、A3、B1、B2、B3、C1、C2、C3は部分領域の識別情報(部分領域情報)である。この部分領域情報保持テーブルは、要求振り分け部224が要求の振り分け先のサーバ30を決定する際に参照される。
The partial area information holding table is information in which the partial area determined by the partial
このような負荷分散装置20によれば、負荷分散システムの各サーバ30の負荷をおおむね均等にしながら、地理的に近いクライアント端末10群をなるべく同一サーバに振り分けることができる。
According to such a
(処理手順)
次に、負荷分散システムの処理手順を説明する。なお、以下に説明する、要求量のカウントから部分領域の決定までの処理と、要求の振り分け処理とは、それぞれ並列に実行されるものとする。まず、図7を用いて、要求量のカウントから部分領域の決定までの処理手順を説明する。
(Processing procedure)
Next, the processing procedure of the load distribution system will be described. It is assumed that the processing from counting the request amount to determining the partial area and the request distribution processing described below are executed in parallel. First, a processing procedure from counting the requested amount to determining a partial area will be described with reference to FIG.
負荷分散装置20の要求受け付け部221が、クライアント端末10からの要求を受信すると(S1)、要求量カウント部222は、要求量のカウント処理を行う(S2)。このS1、S2の処理を繰り返す。つまり、要求量カウント部222は、クライアント端末10から送信される要求数のカウントを継続的に実施する。そして、要求量カウント部222は、要求量情報保持テーブルにクライアント端末10からの要求量を書きこむ。要求量カウント部222は、予めクライアント端末10が位置する座標平面を、例えば、格子状に区分けしておき、要求に含まれるクライアント端末10の位置情報(例えば、GPSで取得した緯度・経度の情報等)から、クライアント端末10の位置がどの格子に対応しているか判定し、格子ごとの要求量をカウントする。S2の後、負荷分散装置20の部分領域決定部223は、要求量情報保持テーブルの情報をもとに部分領域決定処理を行う(S3)。
When the
次に、図7のS3の部分領域決定処理を詳細について、図8を用いて説明する。ここでは要求量情報保持テーブルに示される格子全体を、X軸、Y軸それぞれについて3つに分割し(つまり、X軸、Y軸それぞれに2箇所の境界を入れ)、合計9つの部分領域を作成する場合を例に説明する。 Next, the details of the partial region determination processing in S3 of FIG. 7 will be described with reference to FIG. Here, the entire lattice shown in the request amount information holding table is divided into three parts for each of the X axis and the Y axis (that is, two boundaries are placed on each of the X axis and the Y axis), and a total of nine partial areas are formed. A case of creating will be described as an example.
まず、部分領域決定部223は、要求量情報保持テーブル(図5参照)に示される平面のX軸について、動的計画法により、部分領域の境界を決定する(S301)。具体的には、部分領域決定部223は、Y軸を分割しない前提で、各部分領域の要求量の分散を最小化する境界を、動的計画法により決定する。
First, the partial
次に、部分領域決定部223は、S301で決定したX軸の境界を固定して、Y軸について動的計画法により、部分領域の境界を決定する(S302)。具体的には、部分領域決定部223は、Y軸について、各部分領域の要求量の分散を最小化する境界を、動的計画法により決定する。
Next, the partial
次に、部分領域決定部223は、S302で決定したY軸の境界を固定して、改めてX軸について、各部分領域の要求量の分散を最小化する境界を、動的計画法により決定する(S303)。
Next, the partial
次に、部分領域決定部223は、S303の処理により、各部分領域の要求量の分散値が改良されたか否かを判定する(S304)。つまり、部分領域決定部223は、S303の処理により計算された各部分領域の要求量の分散値が、前回計算された値よりも下がったか否かを判定する。
Next, the partial
ここで、各部分領域の要求量の分散値の改良がされていなければ(S304でNo)、
部分領域決定部223は、S302、S303で決定したX軸、Y軸の境界に基づいて、部分領域情報保持テーブルを更新する(S305)。一方、S304で分散値が改良されていた場合(S304でYes)、S302へ戻る。つまり、部分領域決定部223は、部分領域の境界を変更させながら、各部分領域の要求量ができるだけ均等になるような部分領域を探索する。そして、部分領域決定部223は、各部分領域の要求量ができるだけ均等になるような部分領域を発見すると、S302、S303で決定したX軸、Y軸の境界に基づいて、部分領域情報保持テーブルに各格子の部分領域情報を格納する(図6参照)。
Here, if the variance value of the requested amount of each partial area has not been improved (No in S304),
The partial
部分領域決定部223は、上記の処理を、例えば、所定期間ごとに実行する。また、要求量情報保持テーブルに示される要求量の値は、部分領域が決定されるとリセットされるものとする。
The partial
部分領域決定部223が上記の処理を行うことで、各部分領域の要求量をできるだけ均等にするような部分領域を決定することができる。また、部分領域決定部223は、上記の処理を所定期間ごとに実施するので、クライアント端末10の増減や移動等による要求量の分布の変化があった場合、このような変化を反映させた部分領域を決定することができる。
The partial
次に、図9を用いて、負荷分散装置20がクライアント端末10からの要求の振り分けを行う手順を説明する。
Next, a procedure in which the
負荷分散装置20の要求受け付け部221は、クライアント端末10からの要求を受信すると(S501)、負荷分散装置20の要求振り分け部224は、部分領域情報保持テーブルを参照して、当該要求を処理するサーバ30を決定する(S502:要求処理サーバ決定処理)。そして、要求振り分け部224は決定したサーバ30へ要求を送信する(S503)。この要求を受信したサーバ30は、受信した要求に基づく処理を実行する(S504:サービス要求処理)。例えば、サーバ30は、受信した要求に含まれるセンサ情報を、当該要求に含まれる部分領域情報ごとにまとめ、統計処理等を行う。
When the
以下、図10を用いて、図9のS502の要求処理サーバ決定処理の詳細を説明する。 Hereinafter, the details of the request processing server determination process in S502 of FIG. 9 will be described with reference to FIG.
まず、要求振り分け部224は、クライアント端末10から送信された要求に含まれる位置情報から、当該要求の送信元のクライアント端末10の位置に対応する格子(領域)を特定する(S601)。つまり、要求振り分け部224は、要求の送信元のクライアント端末10の位置に対応する部分領域情報保持テーブル上の格子(領域)を特定する。
First, the
その後、部分領域決定部223はクライアント端末10の属する格子(領域)の部分領域情報を部分領域情報保持テーブルから取得する(S602)。
Thereafter, the partial
例えば、クライアント端末10の位置に対応する部分領域情報保持テーブル(図6参照)上の位置が(X,Y)=(5,4)であった場合、要求振り分け部224は部分領域情報保持テーブルから部分領域情報として「B2」を取得する。
For example, when the position on the partial area information holding table (see FIG. 6) corresponding to the position of the
次に、部分領域決定部223は取得した部分領域情報をキー(例えば、「B2」)として、コンシステント・ハッシュ法により、要求の送信先のサーバ30を決定する(S603)。
Next, the partial
このようにすることで、要求振り分け部224は部分領域情報保持テーブルを参照して要求振り分け先のサーバ30を決定することができる。
In this way, the
(その他の実施形態)
なお、負荷分散装置20は負荷分散システムのいずれかのサーバ30から負荷が所定の閾値(例えば、当該サーバ30の処理性能の95%)を超えた旨の通知を受信したとき、部分領域情報保持テーブルにおける部分領域数を増加させてもよい。
(Other embodiments)
When the
この場合、負荷分散装置20は、図4に示す部分領域数更新部225をさらに備える。また、負荷分散装置20の記憶部23は、さらに部分領域数保持テーブルを記憶する。
In this case, the
部分領域数更新部225は、サーバ30から負荷が所定の閾値を超えた旨の通知(サーバ負荷閾値超過通知)を受信したとき、部分領域数保持テーブルにおける部分領域数を増加させる。
The partial area
部分領域数保持テーブルは、部分領域数を示す情報である。この部分領域数は、例えば、部分領域情報保持テーブルの部分領域の区切り目となるX軸、Y軸の境界の数の組み合わせで示される(図11参照)。図11に例示する部分領域数保持テーブルは、部分領域情報保持テーブルの部分領域の区切り目となるX軸、Y軸の境界の数がそれぞれ「8」であることを示す。部分領域数保持テーブルは、部分領域決定部223が部分領域を決定する際に参照される。つまり、部分領域数保持テーブルが更新されると、部分領域決定部223は、現在の部分領域情報保持テーブルをリセットし、部分領域数保持テーブルに示される部分領域数となるように再度部分領域を決定する。
The partial area number holding table is information indicating the number of partial areas. The number of partial areas is indicated by, for example, a combination of the number of boundaries between the X axis and the Y axis that serve as a break between partial areas in the partial area information holding table (see FIG. 11). The partial area number holding table illustrated in FIG. 11 indicates that the number of X-axis and Y-axis boundaries serving as the breaks between the partial areas of the partial area information holding table is “8”. The partial area number holding table is referred to when the partial
図12を用いて、負荷分散装置20における部分領域数の増加手順を説明する。負荷分散装置20の部分領域数更新部225は、サーバ30からサーバ負荷閾値超過通知を受信すると(S401)、部分領域数加算処理を行う(S402)。つまり、部分領域数更新部225は部分領域数保持テーブルの値を増加させる。
The procedure for increasing the number of partial areas in the
例えば、図11の部分領域数保持テーブルに示すように、部分領域の境界数が、X軸、Y軸それぞれについて「8」であった場合、部分領域数更新部225は、X軸の境界数を「8」から「9」に更新する。そして、部分領域決定部223は、現在の部分領域情報保持テーブルをリセットし、更新された部分領域数保持テーブルに示される部分領域数(X軸の境界数が「9」)となるように再度部分領域を決定する。
For example, as shown in the partial area count holding table of FIG. 11, when the number of partial area boundaries is “8” for each of the X axis and the Y axis, the partial area
なお、部分領域数更新部225が、さらに継続してサーバ負荷閾値超過通知を受信した場合は、さらに部分領域数加算処理を行う。例えば、部分領域数更新部225は、Y軸の境界数を「8」から「9」に更新する。そして、部分領域決定部223は、現在の部分領域情報保持テーブルをリセットし、更新された部分領域数保持テーブルに示される部分領域数(X軸、Y軸の境界数が「9」)となるように再度部分領域を決定する。以降、サーバ負荷閾値超過通知を受信するたびに、X軸、Y軸の境界数を交互に加算していく。
When the partial area
このように負荷分散装置20がサーバ負荷閾値超過通知を受信するたびに部分領域数を増加させることで、サーバ30間の負荷の偏りを減少できる可能性を高めることができる。
In this way, by increasing the number of partial areas each time the
なお、負荷分散システムのサーバ30の増設または減設が行われたときは、負荷分散装置20は部分領域数を最小値(負荷分散システムのサーバ30の台数)にリセットするものとする。
When the
また、前記した実施形態において、クライアント端末10から送信される要求には、当該クライアント端末10の位置情報が含まれるものとして説明したが、これに限定されない。例えば、クライアント端末10が固定的に設置され、移動しない場合には、各要求に位置情報を含める必要はない。この場合、負荷分散装置20は予めクライアント端末10の識別情報(例えば、IPアドレス)と、位置情報との対応関係を示す情報を保持しておき、この情報をもとにクライアント端末10の位置を特定すればよい。
In the above-described embodiment, the request transmitted from the
さらに、負荷分散装置20は、サーバ負荷閾値超過通知の受信によりサーバ30の負荷が高いことを検出することとしたが、負荷分散装置20が各サーバ30への要求の振り分け数を記録しておき、その振り分け数に基づき各サーバ30の負荷の高さを推定してもよい。
Further, although the
また、負荷分散装置20は、部分領域を決定する際、矩形の部分領域を決定するものとして説明したが、部分領域の形状はこれ以外の形状であってももちろんよい。
Further, although the
なお、負荷分散装置20は、要求量の分散値を最小化するような部分領域を決定する際、動的計画法を用いるものとして説明したが、動的計画法以外のアルゴリズムを用いてももちろんよい。
Although the
(プログラム)
また、上記実施形態に係る負荷分散装置20が実行する処理をコンピュータが実行可能な言語で記述したプログラムを作成することもできる。この場合、コンピュータがプログラムを実行することにより、上記実施形態と同様の効果を得ることができる。さらに、かかるプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータに読み込ませて実行することにより上記実施形態と同様の処理を実現してもよい。以下に、負荷分散装置20と同様の機能を実現する負荷分散プログラムを実行するコンピュータの一例を説明する。
(program)
It is also possible to create a program in which the processing executed by the
図13は、負荷分散プログラムを実行するコンピュータを示す図である。図13に示すように、コンピュータ1000は、例えば、メモリ1010と、CPU1020と、ハードディスクドライブインタフェース1030と、ディスクドライブインタフェース1040と、シリアルポートインタフェース1050と、ビデオアダプタ1060と、ネットワークインタフェース1070とを有する。これらの各部は、バス1080によって接続される。
FIG. 13 is a diagram illustrating a computer that executes a load distribution program. As illustrated in FIG. 13, the
メモリ1010は、ROM(Read Only Memory)1011およびRAM(Random Access Memory)1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030には、ハードディスクドライブ1090が接続される。ディスクドライブインタフェース1040には、ディスクドライブ1100が接続される。ディスクドライブ1100には、例えば、磁気ディスクや光ディスク等の着脱可能な記憶媒体が挿入される。シリアルポートインタフェース1050には、例えば、マウス1110およびキーボード1120が接続される。ビデオアダプタ1060には、例えば、ディスプレイ1130が接続される。
The
ここで、図13に示すように、ハードディスクドライブ1090は、例えば、OS1091、アプリケーションプログラム1092、プログラムモジュール1093およびプログラムデータ1094を記憶する。上記実施形態で説明した各テーブルは、例えばハードディスクドライブ1090やメモリ1010に記憶される。
Here, as shown in FIG. 13, the hard disk drive 1090 stores, for example, an
また、負荷分散プログラムは、例えば、コンピュータ1000によって実行される指令が記述されたプログラムモジュールとして、ハードディスクドライブ1090に記憶される。具体的には、上記実施形態で説明した負荷分散装置20が実行する各処理が記述されたプログラムモジュールが、ハードディスクドライブ1090に記憶される。
Further, the load distribution program is stored in the hard disk drive 1090 as a program module in which a command executed by the
また、負荷分散プログラムによる情報処理に用いられるデータは、プログラムデータとして、例えば、ハードディスクドライブ1090に記憶される。そして、CPU1020が、ハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して、上述した各手順を実行する。
Further, data used for information processing by the load balancing program is stored as program data in, for example, the hard disk drive 1090. Then, the
なお、負荷分散プログラムに係るプログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限られず、例えば、着脱可能な記憶媒体に記憶されて、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。あるいは、負荷分散プログラムに係るプログラムモジュール1093やプログラムデータ1094は、LAN(Local Area Network)やWAN(Wide Area Network)等のネットワークを介して接続された他のコンピュータに記憶され、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。
Note that the
10,10A〜10D クライアント端末
20 負荷分散装置
21 入出力部
22 制御部
23 記憶部
30,30A〜30D サーバ
221 要求受け付け部
222 要求量カウント部
223 部分領域決定部
224 要求振り分け部
225 部分領域数更新部
10, 10A to
Claims (8)
前記クライアント端末からの要求を受け付ける要求受け付け部と、
所定平面を区分した領域ごとに、所定期間における当該領域内に位置するクライアント端末からの要求量をカウントする要求量カウント部と、
前記平面上の領域の集合である部分領域を、各部分領域における前記要求量ができるだけ均等になるように決定し、前記決定した部分領域と、前記部分領域の識別情報とを対応付けた部分領域情報保持テーブルを生成する部分領域決定部と、
前記クライアント端末からの要求を受け付けたとき、前記部分領域情報保持テーブルを参照して、前記クライアント端末の属する部分領域の識別情報に対応するサーバへ前記要求を振り分ける要求振り分け部と、
を備えることを特徴とする負荷分散装置。 In a distributed processing system that performs load distribution by a plurality of servers, a load distribution apparatus that distributes requests from client terminals to any of the servers,
A request receiving unit that receives a request from the client terminal;
A request amount counting unit that counts a request amount from a client terminal located in the region for a predetermined period for each region that divides the predetermined plane;
A partial area that is a set of areas on the plane is determined so that the required amount in each partial area is as uniform as possible, and the determined partial area is associated with the identification information of the partial area A partial area determination unit for generating an information holding table;
When receiving a request from the client terminal, a request distribution unit that distributes the request to a server corresponding to identification information of the partial area to which the client terminal belongs, with reference to the partial area information holding table;
A load balancer comprising:
前記サーバの負荷が増加したとき、前記部分領域数を増加させることを特徴とする請求項1に記載の負荷分散装置。 The partial region determination unit
The load distribution apparatus according to claim 1, wherein when the load on the server increases, the number of partial areas is increased.
前記サーバへ要求を振り分けるとき、前記要求に、読み出した部分領域の識別情報を含めることを特徴とする請求項1または2に記載の負荷分散装置。 The request distribution unit
3. The load distribution apparatus according to claim 1, wherein when the request is distributed to the server, the request includes identification information of the read partial area.
前記要求の振り分け先のサーバを決定するとき、前記部分領域の識別情報をキーとしたコンシステント・ハッシュ法により決定することを特徴とする請求項1〜3のいずれか1項に記載の負荷分散装置。 The request distribution unit
The load distribution according to any one of claims 1 to 3, wherein when determining a server to which the request is distributed, the determination is performed by a consistent hash method using identification information of the partial area as a key. apparatus.
前記所定期間経過後、前記領域ごとの前記クライアント端末からの要求量を再度カウントすることを特徴とする請求項1〜5のいずれか1項に記載の負荷分散装置。 The request amount counting unit
6. The load distribution apparatus according to claim 1, wherein after the predetermined period has elapsed, the request amount from the client terminal for each region is counted again.
前記クライアント端末からの要求を受け付けるステップと、
所定平面を区分した領域ごとに、所定期間における当該領域内に位置するクライアント端末からの要求量をカウントするステップと、
前記平面上の領域の集合である部分領域を、各部分領域における前記要求量ができるだけ均等になるように決定し、前記決定した部分領域と、前記部分領域の識別情報とを対応付けた部分領域情報保持テーブルを生成するステップと、
前記クライアント端末からの要求を受け付けたとき、前記部分領域情報保持テーブルを参照して、前記クライアント端末の属する部分領域の識別情報に対応するサーバへ前記要求を振り分けるステップと、
を実行することを特徴とする負荷分散方法。 In a distributed processing system that distributes load by a plurality of servers, a load distribution device that distributes requests from client terminals to any of the servers,
Receiving a request from the client terminal;
For each area that divides a predetermined plane, counting a request amount from a client terminal located in the area for a predetermined period;
A partial area that is a set of areas on the plane is determined so that the required amount in each partial area is as uniform as possible, and the determined partial area is associated with the identification information of the partial area Generating an information holding table;
When receiving a request from the client terminal, referring to the partial area information holding table, and distributing the request to a server corresponding to identification information of the partial area to which the client terminal belongs;
The load distribution method characterized by performing.
前記負荷分散装置は、
前記クライアント端末からの要求を受け付ける要求受け付け部と、
所定平面を区分した領域ごとに、所定期間における当該領域内に位置するクライアント端末からの要求量をカウントする要求量カウント部と、
前記平面上の領域の集合である部分領域を、各部分領域における前記要求量ができるだけ均等になるように決定し、前記決定した部分領域と、前記部分領域の識別情報とを対応付けた部分領域情報保持テーブルを生成する部分領域決定部と、
前記クライアント端末からの要求を受け付けたとき、前記部分領域情報保持テーブルを参照して、前記クライアント端末の属する部分領域の識別情報に対応するサーバへ前記要求を振り分ける要求振り分け部と、
を備えることを特徴とする負荷分散システム。 A load distribution system comprising: a load distribution device that distributes requests from client terminals to any server; and a server that is a distribution destination of the requests,
The load balancer is:
A request receiving unit that receives a request from the client terminal;
A request amount counting unit that counts a request amount from a client terminal located in the region for a predetermined period for each region that divides the predetermined plane;
A partial area that is a set of areas on the plane is determined so that the required amount in each partial area is as uniform as possible, and the determined partial area is associated with the identification information of the partial area A partial area determination unit for generating an information holding table;
When receiving a request from the client terminal, a request distribution unit that distributes the request to a server corresponding to identification information of the partial area to which the client terminal belongs, with reference to the partial area information holding table;
A load distribution system comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014079287A JP6219771B2 (en) | 2014-04-08 | 2014-04-08 | Load distribution apparatus, load distribution method, and load distribution system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014079287A JP6219771B2 (en) | 2014-04-08 | 2014-04-08 | Load distribution apparatus, load distribution method, and load distribution system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015201029A true JP2015201029A (en) | 2015-11-12 |
JP6219771B2 JP6219771B2 (en) | 2017-10-25 |
Family
ID=54552240
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014079287A Active JP6219771B2 (en) | 2014-04-08 | 2014-04-08 | Load distribution apparatus, load distribution method, and load distribution system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6219771B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020170998A1 (en) | 2019-02-18 | 2020-08-27 | 川本産業株式会社 | Earplug and earplug production method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000132471A (en) * | 1998-10-29 | 2000-05-12 | Fujitsu Ltd | Data processing system |
JP2006178757A (en) * | 2004-12-22 | 2006-07-06 | Inst For Information Industry | Distributed virtual environment management system and method |
WO2012098853A1 (en) * | 2011-01-20 | 2012-07-26 | 日本電気株式会社 | Flow line detection process data distribution system, flow line detection process data distribution method, and program |
-
2014
- 2014-04-08 JP JP2014079287A patent/JP6219771B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000132471A (en) * | 1998-10-29 | 2000-05-12 | Fujitsu Ltd | Data processing system |
JP2006178757A (en) * | 2004-12-22 | 2006-07-06 | Inst For Information Industry | Distributed virtual environment management system and method |
WO2012098853A1 (en) * | 2011-01-20 | 2012-07-26 | 日本電気株式会社 | Flow line detection process data distribution system, flow line detection process data distribution method, and program |
Also Published As
Publication number | Publication date |
---|---|
JP6219771B2 (en) | 2017-10-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109218355B (en) | Load balancing engine, client, distributed computing system and load balancing method | |
US9246840B2 (en) | Dynamically move heterogeneous cloud resources based on workload analysis | |
US9760429B2 (en) | Fractional reserve high availability using cloud command interception | |
US20150172204A1 (en) | Dynamically Change Cloud Environment Configurations Based on Moving Workloads | |
US20180018197A1 (en) | Virtual Machine Resource Allocation Method and Apparatus | |
JP5664098B2 (en) | Composite event distribution apparatus, composite event distribution method, and composite event distribution program | |
US10235047B2 (en) | Memory management method, apparatus, and system | |
JP6886964B2 (en) | Load balancing method and equipment | |
US9110696B2 (en) | Thin client system, connection management server, connection management method and connection management program | |
JPWO2018220708A1 (en) | Resource allocation system, management device, method and program | |
US20150169339A1 (en) | Determining Horizontal Scaling Pattern for a Workload | |
CN111338806A (en) | Service control method and device | |
US20230185918A1 (en) | Achieving minimum trustworthiness in distributed workloads | |
JP6116102B2 (en) | Cluster system and load balancing method | |
US20180227776A1 (en) | Management server, communication system, management server control method, and program | |
US20150365474A1 (en) | Computer-readable recording medium, task assignment method, and task assignment apparatus | |
CN113268329A (en) | Request scheduling method, device and storage medium | |
JP6219771B2 (en) | Load distribution apparatus, load distribution method, and load distribution system | |
JP6383336B2 (en) | Server management apparatus and server management method | |
JP2024514467A (en) | Geographically distributed hybrid cloud cluster | |
JP5745445B2 (en) | Management device and program | |
WO2021072574A1 (en) | Load balancing | |
JP6597324B2 (en) | Autoscale method, autoscale program, information processing apparatus, and information processing system | |
US20240176762A1 (en) | Geographically dispersed hybrid cloud cluster | |
JP6387333B2 (en) | Node and slot optimization methods |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160715 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170721 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170801 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170913 |
|
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: 20170926 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170928 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6219771 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |