JP2015201029A - Load distribution device, load distribution method and load distribution system - Google Patents

Load distribution device, load distribution method and load distribution system Download PDF

Info

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
Application number
JP2014079287A
Other languages
Japanese (ja)
Other versions
JP6219771B2 (en
Inventor
弘之 栗田
Hiroyuki Kurita
弘之 栗田
亮一 中村
Ryoichi Nakamura
亮一 中村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2014079287A priority Critical patent/JP6219771B2/en
Publication of JP2015201029A publication Critical patent/JP2015201029A/en
Application granted granted Critical
Publication of JP6219771B2 publication Critical patent/JP6219771B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

PROBLEM TO BE SOLVED: To make loads applied to respective servers approximately equal, and distribute a client terminal group of terminals which are located geographically close to each other to a same server as possible.SOLUTION: A load distribution device 20 counts a request amount from a client terminal 10 in a lattice in a predetermined period, for every lattice formed by dividing a predetermined plane, and creates a request amount information holding table. Then the load distribution device 20 creates a partial area information holding table in which partial areas in which the request amount in every partial area is approximately equal are set as an aggregation of the lattice. When receiving the request from the client terminal 10, the load distribution device 20 refers to the partial area information holding table, and determines a server 30 of a distribution destination of the request, with the partial area information according to the position of the client terminal 10 as a key.

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 Non-Patent Document 1, There is known a method for distributing requests including the same attribute information to the same server.

また、クライアント端末からの要求に位置情報が含まれる場合に、その位置情報から、クライアント端末とネットワーク上の距離が近いサーバを特定し、当該サーバに要求を振り分ける技術も知られている。   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には、キーの要求頻度に応じて、要求頻度の高いキーは複数のサーバに、要求頻度の低いキーは単一のサーバに振り分けを行う負荷分散手法に関する技術が記載されており、本技術によれば、例えば、各クライアント端末が送信する要求の量が均一でない場合でも、振り分け先のサーバの負荷をおおむね均一にすることができる。   Patent Document 1 describes a technique related to a load distribution method in which a key with a high request frequency is distributed to a plurality of servers and a key with a low request frequency is distributed to a single server according to the key request frequency. Thus, according to the present technology, for example, even when the amount of requests transmitted by each client terminal is not uniform, the load on the server that is the distribution destination can be approximately uniform.

特開2013−152569号公報JP2013-15269A

D. Karger他、"Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web" in Proceedings of the 29th ACM Symposium on Theory of Computing (STOC'97)、pp.654-663、May 1997.D. Karger et al., "Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web" in Proceedings of the 29th ACM Symposium on Theory of Computing (STOC'97), pp.654-663, May 1997 .

ここで、例えば、クライアント端末が送信するセンサ情報を処理するサーバシステム等においては、要求量の観点から複数のサーバでの処理が必要となる一方で、地理的に近いクライアント端末群からのセンサ情報はなるべく単一のサーバで処理したいという要件がある。   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 Document 1 is applied, and load distribution is performed using the location information included in the request as a key, so that client terminals that are geographically close to each other can be identical. It can be accommodated in other servers. However, the client terminals are not necessarily distributed uniformly, and if the request amount transmitted by each client terminal is not uniform, even if an area of the same area is allocated to each server, the server load is significantly biased. There is.

このようにサーバ負荷が著しく偏ると、サーバのコンピューティングリソースを有効に活用できず、結果として、本来必要な数以上のサーバ数が必要になってしまうという問題がある。   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 Patent Document 1, the load on the server can be made almost uniform. In this case, requests for client terminals that are geographically close to each other are distributed to a plurality of servers. Therefore, there is a problem that the above requirements cannot be satisfied.

そこで本発明は、前記した問題を解決し、各サーバの負荷をおおむね均等にしつつ、地理的に近いクライアント端末群をなるべく同一サーバに振り分けることを目的とする。   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.

図1は、負荷分散システムの構成の一例を示す図である。FIG. 1 is a diagram illustrating an example of a configuration of a load distribution system. 図2は、負荷分散システムの処理の概要を説明する図である。FIG. 2 is a diagram for explaining the outline of the processing of the load distribution system. 図3は、負荷分散装置の処理の概要を説明する図である。FIG. 3 is a diagram for explaining the outline of processing of the load distribution apparatus. 図4は、負荷分散装置の機能ブロック図である。FIG. 4 is a functional block diagram of the load balancer. 図5は、要求量情報保持テーブルの一例を示す図である。FIG. 5 is a diagram illustrating an example of a request amount information holding table. 図6は、部分領域情報保持テーブルの一例を示す図である。FIG. 6 is a diagram illustrating an example of the partial area information holding table. 図7は、要求量のカウントから部分領域の決定までの処理手順を示すシーケンス図である。FIG. 7 is a sequence diagram showing a processing procedure from counting the requested amount to determining a partial area. 図8は、部分領域決定処理の詳細を示すフローチャートである。FIG. 8 is a flowchart showing details of the partial region determination processing. 図9は、要求の振り分けの処理手順を示すシーケンス図である。FIG. 9 is a sequence diagram illustrating a processing procedure for request distribution. 図10は、要求処理サーバ決定処理の詳細を示すフローチャートである。FIG. 10 is a flowchart showing details of the request processing server determination process. 図11は、部分領域数保持テーブルの一例を示す図である。FIG. 11 is a diagram illustrating an example of the partial area number holding table. 図12は、部分領域数の増加手順を示すシーケンス図である。FIG. 12 is a sequence diagram showing a procedure for increasing the number of partial areas. 図13は、負荷分散プログラムを実行するコンピュータを示す図である。FIG. 13 is a diagram illustrating a computer that executes a load distribution program.

以下、図面を参照しながら、本発明を実施するための形態(実施形態)について説明する。   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 load distribution device 20, and servers 30 (30A to 30D). In the load distribution system, the client terminal 10 and the load distribution apparatus 20 are connected by, for example, a network 41, and the load distribution apparatus 20 and the server 30 are connected by a network 42. The networks 41 and 42 are, for example, IP (Internet Protocol) networks. The number of each is not limited to the number shown in FIG.

クライアント端末10は、負荷分散装置20経由でサーバ30に対しサービス要求(以下適宜、要求と略す)を送信する。このクライアント端末10は、例えば、当該クライアント端末10の備えるセンサ情報と、例えば、GPS(Global Positioning System)等で取得した自身の位置情報とを含む要求を負荷分散装置20へ送信する。   The client terminal 10 transmits a service request (hereinafter abbreviated as a request as appropriate) to the server 30 via the load balancer 20. The client terminal 10 transmits a request including, for example, sensor information included in the client terminal 10 and its own position information acquired by, for example, GPS (Global Positioning System) to the load balancer 20.

負荷分散装置20は、クライアント端末10からの要求を受信すると、このクライアント端末10の位置情報をもとに当該要求をいずれかのサーバ30に振り分ける。   When receiving a request from the client terminal 10, the load distribution apparatus 20 distributes the request to one of the servers 30 based on the location information of the client terminal 10.

サーバ30は、負荷分散装置20経由でクライアント端末10からの要求を受信すると、当該要求に基づく処理を実行する。例えば、サーバ30は、受信した要求に含まれるセンサ情報に対し、当該要求に含まれるクライアント端末10の部分領域情報に基づき統計処理等のアプリケーションロジックを実施する。具体例を挙げると、サーバ30は同じ部分領域情報を持つ要求(例えば、地理的に近いクライアント端末10からの要求)に含まれるセンサ情報をまとめ、これらのセンサ情報に対し統計処理等を行う。なお、このサーバ30の設置台数は、例えば、負荷分散装置20に到達する全要求量に応じて、各サーバ30の平均負荷が80%程度となるような台数とする。   When the server 30 receives a request from the client terminal 10 via the load balancer 20, the server 30 executes processing based on the request. For example, the server 30 performs application logic such as statistical processing on the sensor information included in the received request based on the partial area information of the client terminal 10 included in the request. As a specific example, the server 30 collects sensor information included in a request having the same partial area information (for example, a request from the geographically close client terminal 10), and performs statistical processing or the like on the sensor information. Note that the number of servers 30 installed is, for example, such that the average load of each server 30 is about 80% in accordance with the total required amount reaching the load balancer 20.

(処理の概要)
図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 client terminal 10, the load distribution apparatus 20 of the load distribution system distributes the request to any one of the servers 30. Then, the server 30 executes processing based on the received request. The request from the client terminal 10 includes, for example, identification information of the client terminal 10 (for example, an IP (Internet Protocol) address), position information of the client terminal 10, and the like. The load balancer 20 determines the server 30 to which the request is distributed based on the identification information and the position information included in the request from the client terminal 10, and the determination of the server 30 as the distribution destination here is as follows. Do it.

すなわち、まず、負荷分散装置20は、クライアント端末10の位置情報をもとにクライアント端末10の分布を示す情報を作成する。例えば、符号101に示すように所定平面上におけるクライアント端末10の分布を示した情報を作成する。その後、負荷分散装置20は、図2に示すように当該平面を所定数の格子に区分し、それぞれの格子単位で所定期間における要求量をカウントする(符号102参照)。これにより格子内のクライアント端末10それぞれからの所定期間における要求量が得られる。この格子単位での要求量のカウント結果を示した情報を要求量情報保持テーブルと称す(図5参照)。   That is, first, the load distribution apparatus 20 creates information indicating the distribution of the client terminals 10 based on the position information of the client terminals 10. For example, as shown by reference numeral 101, information indicating the distribution of the client terminals 10 on a predetermined plane is created. After that, the load distribution apparatus 20 divides the plane into a predetermined number of grids as shown in FIG. 2, and counts the required amount in a predetermined period for each grid unit (see reference numeral 102). As a result, the required amount from each client terminal 10 in the grid in a predetermined period can be obtained. Information indicating the result of counting the request amount in units of grids is referred to as a request amount information holding table (see FIG. 5).

その後、負荷分散装置20は、要求量情報保持テーブルにおける要求量がおおむね均等となる部分領域を格子の集合として設計する。例えば、負荷分散装置20は要求量がおおむね均等となる格子の集合として、符号103に示す9つの部分領域を設計する。なお、部分領域に添えられた、A1、A2、A3、B1、B2、B3、C1、C2、C3は部分領域の識別情報(部分領域情報)である。   Thereafter, the load distribution apparatus 20 designs a partial area in which the request amounts in the request amount information holding table are substantially uniform as a set of lattices. For example, the load distribution apparatus 20 designs nine partial areas indicated by reference numeral 103 as a set of lattices whose request amounts are substantially uniform. A1, A2, A3, B1, B2, B3, C1, C2, and C3 attached to the partial area are identification information (partial area information) of the partial area.

負荷分散装置20はこのようにして得られた情報(部分領域情報保持テーブル)を参照して振り分け先のサーバ30を決定する。   The load balancer 20 refers to the information (partial area information holding table) obtained in this way to determine a server 30 as a distribution destination.

例えば、負荷分散装置20は、クライアント端末10から要求を受信すると、部分領域情報保持テーブルを参照して、受信した要求について所属する部分領域を判定する。例えば、負荷分散装置20は、受信した要求の所属する部分領域が「A2」であると判定する。そして、負荷分散装置20は部分領域の判定結果(例えば、「A2」)をもとに、コンシステント・ハッシュ法で当該部分領域に対応するサーバ30を選択し、この選択したサーバ30を振り分け先のサーバ30として決定する。これにより、同じ部分領域に属する要求は同じサーバに振り分けられることになる。この後、負荷分散装置20は振り分け先のサーバ30へ要求を転送する。なお、負荷分散装置20は、クライアント端末10からの要求に、当該クライアント端末10に対応する部分領域の情報(部分領域情報)を付加して転送してもよい。その後、サーバ30は、転送された要求について、例えば、部分領域単位でアプリケーションロジックを実施する。   For example, when receiving a request from the client terminal 10, the load distribution apparatus 20 refers to the partial area information holding table and determines a partial area to which the received request belongs. For example, the load distribution apparatus 20 determines that the partial area to which the received request belongs is “A2”. Then, the load balancer 20 selects the server 30 corresponding to the partial area by the consistent hash method based on the determination result of the partial area (for example, “A2”), and assigns the selected server 30 to the distribution destination. Server 30 is determined. As a result, requests belonging to the same partial area are distributed to the same server. Thereafter, the load balancer 20 forwards the request to the distribution destination server 30. Note that the load balancer 20 may add and transfer the partial area information (partial area information) corresponding to the client terminal 10 to the request from the client terminal 10. Thereafter, the server 30 performs application logic on the transferred request, for example, in units of partial areas.

(処理の詳細)
図3を用いて、負荷分散装置20における処理を詳細に説明する。ここでは、クライアント端末10Aとクライアント端末10Bとが地理的に近く、クライアント端末10Cとクライアント端末10Dとが地理的に近いものとする。
(Details of processing)
The process in the load distribution apparatus 20 will be described in detail with reference to FIG. Here, it is assumed that the client terminal 10A and the client terminal 10B are geographically close, and the client terminal 10C and the client terminal 10D are geographically close.

負荷分散装置20は所定期間における各格子内の領域のクライアント端末10の要求量をカウントし、そのカウント結果を要求量情報保持テーブルに記録する。そして、負荷分散装置20は、この要求量情報保持テーブルにおける要求量がおおむね均等となる部分領域を決定し、例えば、図3に示す部分領域情報保持テーブルを得る。   The load balancer 20 counts the request amount of the client terminal 10 in the area within each grid during a predetermined period, and records the count result in the request amount information holding table. Then, the load distribution apparatus 20 determines a partial area in which the request amounts in the request amount information holding table are approximately equal, and obtains, for example, the partial area information holding table shown in FIG.

その後、負荷分散装置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 client terminal 10, the load distribution apparatus 20 reads partial area information corresponding to the position of the grid to which the client terminal 10 belongs and distributes the request. For example, when the load balancer 20 receives a request from the client terminal 10A ((X, Y) = (2, 2)), the partial area information “(X, Y) = (2, 2) corresponding to“ X, Y) = (2, 2) ”. “A1” is read, and the request is distributed to the server 30 (for example, server 30B) corresponding to “A1”. When the load balancer 20 receives a request from the client terminal 10B ((X, Y) = (2, 3)), the partial area information “X” corresponding to (X, Y) = (2, 3) “ “A1” is read, and the request is distributed to the server 30 (for example, server 30B) corresponding to “A1”. As a result, requests from geographically close client terminals 10A and 10B are distributed to the same server 30B.

また同様に、例えば、負荷分散装置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 load balancer 20 receives a request from the client terminal 10C ((X, Y) = (5, 4)), this corresponds to (X, Y) = (5, 4). The partial area information “B2” is read out, and the request is distributed to the server 30 (for example, server 30C) corresponding to “B2”. When the load balancer 20 receives a request from the client terminal 10D ((X, Y) = (5, 5)), the partial area information “B2” corresponding to (X, Y) = (5, 5) ”And distributes the request to the server 30 (for example, server 30C) corresponding to“ B2 ”. As a result, requests from geographically close client terminals 10C and 10D are distributed to the same server 30C.

(構成)
次に、図4を用いて、負荷分散装置20の構成を説明する。負荷分散装置20は、入出力部21と、制御部22と、記憶部23とを備える。
(Constitution)
Next, the configuration of the load distribution apparatus 20 will be described with reference to FIG. The load distribution device 20 includes an input / output unit 21, a control unit 22, and a storage unit 23.

入出力部21は、外部装置との間での各種情報の入出力を司る。例えば、入出力部21は、クライアント端末10からの要求を受信したり、当該要求をサーバ30へ転送したりする。この入出力部21は、例えば、ネットワーク41,42経由で通信を行うための通信インタフェースにより実現される。   The input / output unit 21 inputs / outputs various information to / from an external device. For example, the input / output unit 21 receives a request from the client terminal 10 or transfers the request to the server 30. The input / output unit 21 is realized by a communication interface for performing communication via the networks 41 and 42, for example.

制御部22は、負荷分散装置20全体の制御を司り、要求受け付け部221と、要求量カウント部222と、部分領域決定部223と、要求振り分け部224とを備える。破線で示した部分領域数更新部225は装備する場合と装備しない場合とがあり、装備する場合については後記する。   The control unit 22 controls the entire load distribution apparatus 20, and includes a request reception unit 221, a request amount counting unit 222, a partial area determination unit 223, and a request distribution unit 224. The partial area number updating unit 225 indicated by the broken line may be equipped or not equipped, and the case of equipped will be described later.

要求受け付け部221は、入出力部21経由でクライアント端末10からの要求を受け付ける。   The request receiving unit 221 receives a request from the client terminal 10 via the input / output unit 21.

要求量カウント部222は、要求の送信元のクライアント端末10の位置情報に基づき、所定期間における各クライアント端末10からの要求量を領域ごとにカウントする。つまり、要求量カウント部222は、要求の送信元の各クライアント端末10の位置情報をもとに、所定平面を区切った領域(例えば、格子状の領域)上で、各クライアント端末10がどの領域に属するかを判定する。そして、要求量カウント部222は、この領域ごとに、所定期間における当該領域に属するクライアント端末10からの要求量をカウントし、そのカウント結果を要求量情報保持テーブル(図5参照)に書き込む。   The request amount counting unit 222 counts the request amount from each client terminal 10 in a predetermined period for each region based on the position information of the client terminal 10 that is the transmission source of the request. That is, the request amount counting unit 222 determines which region each client terminal 10 has on a region (for example, a lattice region) that divides a predetermined plane based on the position information of each client terminal 10 that is a transmission source of the request. It is judged whether it belongs to. Then, the request amount counting unit 222 counts the request amount from the client terminal 10 belonging to the region for a predetermined period for each region, and writes the count result in the request amount information holding table (see FIG. 5).

なお、以下では、領域の形状は、格子である場合を例に説明するが、格子以外の形状であってもよい。また、平面をいくつの領域に分割するかは、負荷分散装置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 load distribution apparatus 20. For example, if the processing capacity of the load balancer 20 is relatively high, a large number of areas are set.

部分領域決定部223は、前記した所定平面上の領域(例えば、格子状の領域)の集合である部分領域を、各部分領域における要求量ができるだけ均等になるように決定する。そして、部分領域決定部223は、決定した部分領域と、当該部分領域の識別情報とを対応付けた部分領域情報保持テーブル(図6参照)を生成する。生成した要求量情報保持テーブルは、記憶部23に格納する。なお、部分領域決定部223が決定する部分領域数は、少なくとも負荷分散システムにおけるサーバ30の数以上とする。この部分領域決定部223の処理の詳細は具体例を交えながら後記する。   The partial area determination unit 223 determines a partial area that is a set of areas (for example, grid-like areas) on the predetermined plane so that required amounts in the partial areas are as uniform as possible. Then, the partial region determination unit 223 generates a partial region information holding table (see FIG. 6) in which the determined partial region is associated with the identification information of the partial region. The generated request amount information holding table is stored in the storage unit 23. Note that the number of partial areas determined by the partial area determination unit 223 is at least the number of servers 30 in the load distribution system. Details of the processing of the partial area determination unit 223 will be described later with specific examples.

要求振り分け部224は、クライアント端末10からの要求をいずれかのサーバ30に振り分ける。例えば、要求振り分け部224は、クライアント端末10からの要求を受け付けたとき、部分領域情報保持テーブルからクライアント端末10の位置に対応する部分領域情報を読み出す。そして、要求振り分け部224は、この部分領域情報をキーとして、コンシステント・ハッシュ法等により、このキーに対応するサーバ30を決定する。そして、要求振り分け部224は、クライアント端末10からの要求を当該決定したサーバ30へ送信(転送)する。なお、要求振り分け部224がサーバ30へ要求を送信するとき、部分領域情報保持テーブルから読み出した部分領域情報を含めて送信してもよい。   The request distribution unit 224 distributes the request from the client terminal 10 to one of the servers 30. For example, when receiving a request from the client terminal 10, the request distribution unit 224 reads partial area information corresponding to the position of the client terminal 10 from the partial area information holding table. Then, the request distribution unit 224 determines the server 30 corresponding to the key by the consistent hash method or the like using the partial area information as a key. Then, the request distribution unit 224 transmits (transfers) the request from the client terminal 10 to the determined server 30. Note that when the request distribution unit 224 transmits a request to the server 30, the request distribution unit 224 may transmit the partial area information read from the partial area information holding table.

記憶部23は、要求量情報保持テーブルと、部分領域情報保持テーブルとを所定領域に記憶する。破線で示す部分領域数保持テーブルについては、後記する。   The storage unit 23 stores the request amount information holding table and the partial area information holding table in a predetermined area. The partial area number holding table indicated by the broken line will be described later.

要求量情報保持テーブルは、所定の平面を区分した領域ごとに、所定期間における当該領域内のクライアント端末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 client terminal 10 in the region for a predetermined period for each region obtained by dividing the predetermined plane. An example of the request amount information holding table is shown in FIG. The required amount information holding table shown in FIG. 5 is composed of a total of 64 regions (lattices) by dividing the coordinate plane into 8 for each of the X axis and the Y axis. The numerical value in each grid is the total number of requests from each client terminal 10 in the grid (area) in a predetermined period. The request amount information holding table is updated based on the count result by the request amount count unit 222. The required amount information holding table is stored as a two-dimensional array on the storage unit 23.

部分領域情報保持テーブルは、部分領域決定部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 area determination unit 223 is associated with the identification information of the partial area. An example of this partial area information holding table is shown in FIG. The partial area information holding table shown in FIG. 6 shows nine partial areas obtained by dividing the entire lattice of the requested amount information holding table shown in FIG. 5 into three for each of the X axis and the Y axis. A1, A2, A3, B1, B2, B3, C1, C2, and C3 attached to the partial area are identification information (partial area information) of the partial area. This partial area information holding table is referred to when the request distribution unit 224 determines a server 30 to which a request is distributed.

このような負荷分散装置20によれば、負荷分散システムの各サーバ30の負荷をおおむね均等にしながら、地理的に近いクライアント端末10群をなるべく同一サーバに振り分けることができる。   According to such a load balancer 20, it is possible to distribute the geographically close client terminals 10 to the same server as much as possible while roughly equalizing the load of each server 30 of the load balancing system.

(処理手順)
次に、負荷分散システムの処理手順を説明する。なお、以下に説明する、要求量のカウントから部分領域の決定までの処理と、要求の振り分け処理とは、それぞれ並列に実行されるものとする。まず、図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 request receiving unit 221 of the load distribution apparatus 20 receives a request from the client terminal 10 (S1), the request amount counting unit 222 performs a request amount counting process (S2). The processes of S1 and S2 are repeated. That is, the request amount counting unit 222 continuously counts the number of requests transmitted from the client terminal 10. Then, the request amount counting unit 222 writes the request amount from the client terminal 10 in the request amount information holding table. The request amount counting unit 222 divides the coordinate plane in which the client terminal 10 is located in advance, for example, in a lattice shape, and the position information of the client terminal 10 included in the request (for example, latitude / longitude information acquired by GPS) Etc.), it is determined which grid the position of the client terminal 10 corresponds to, and the required amount for each grid is counted. After S2, the partial area determination unit 223 of the load balancer 20 performs a partial area determination process based on the information in the request amount information holding table (S3).

次に、図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 area determination unit 223 determines the boundary of the partial area by dynamic programming for the X axis of the plane shown in the request amount information holding table (see FIG. 5) (S301). Specifically, the partial region determination unit 223 determines the boundary that minimizes the variance of the required amount of each partial region by dynamic programming on the premise that the Y axis is not divided.

次に、部分領域決定部223は、S301で決定したX軸の境界を固定して、Y軸について動的計画法により、部分領域の境界を決定する(S302)。具体的には、部分領域決定部223は、Y軸について、各部分領域の要求量の分散を最小化する境界を、動的計画法により決定する。   Next, the partial region determination unit 223 fixes the boundary of the X axis determined in S301, and determines the boundary of the partial region by dynamic programming for the Y axis (S302). Specifically, the partial region determination unit 223 determines a boundary for minimizing the variance of the required amount of each partial region with respect to the Y axis by dynamic programming.

次に、部分領域決定部223は、S302で決定したY軸の境界を固定して、改めてX軸について、各部分領域の要求量の分散を最小化する境界を、動的計画法により決定する(S303)。   Next, the partial region determination unit 223 fixes the boundary of the Y axis determined in S302, and again determines a boundary for minimizing the variance of the required amount of each partial region for the X axis by dynamic programming. (S303).

次に、部分領域決定部223は、S303の処理により、各部分領域の要求量の分散値が改良されたか否かを判定する(S304)。つまり、部分領域決定部223は、S303の処理により計算された各部分領域の要求量の分散値が、前回計算された値よりも下がったか否かを判定する。   Next, the partial area determination unit 223 determines whether or not the variance value of the requested amount of each partial area has been improved by the process of S303 (S304). That is, the partial area determination unit 223 determines whether or not the variance value of the request amount of each partial area calculated by the process of S303 is lower than the previously calculated value.

ここで、各部分領域の要求量の分散値の改良がされていなければ(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 area determination unit 223 updates the partial area information holding table based on the X-axis and Y-axis boundaries determined in S302 and S303 (S305). On the other hand, if the variance value has been improved in S304 (Yes in S304), the process returns to S302. That is, the partial region determination unit 223 searches for a partial region in which the required amount of each partial region becomes as uniform as possible while changing the boundary of the partial region. When the partial area determination unit 223 finds a partial area in which the required amount of each partial area is as uniform as possible, the partial area information holding table is based on the X-axis and Y-axis boundaries determined in S302 and S303. Is stored with the partial area information of each grid (see FIG. 6).

部分領域決定部223は、上記の処理を、例えば、所定期間ごとに実行する。また、要求量情報保持テーブルに示される要求量の値は、部分領域が決定されるとリセットされるものとする。   The partial region determination unit 223 performs the above processing, for example, every predetermined period. Further, the value of the request amount shown in the request amount information holding table is reset when the partial area is determined.

部分領域決定部223が上記の処理を行うことで、各部分領域の要求量をできるだけ均等にするような部分領域を決定することができる。また、部分領域決定部223は、上記の処理を所定期間ごとに実施するので、クライアント端末10の増減や移動等による要求量の分布の変化があった場合、このような変化を反映させた部分領域を決定することができる。   The partial area determination unit 223 performs the above processing, so that it is possible to determine a partial area that makes the required amount of each partial area as uniform as possible. In addition, since the partial area determination unit 223 performs the above processing every predetermined period, when there is a change in the distribution of the requested amount due to increase / decrease or movement of the client terminal 10, the part reflecting such a change An area can be determined.

次に、図9を用いて、負荷分散装置20がクライアント端末10からの要求の振り分けを行う手順を説明する。   Next, a procedure in which the load balancer 20 distributes requests from the client terminals 10 will be described with reference to FIG.

負荷分散装置20の要求受け付け部221は、クライアント端末10からの要求を受信すると(S501)、負荷分散装置20の要求振り分け部224は、部分領域情報保持テーブルを参照して、当該要求を処理するサーバ30を決定する(S502:要求処理サーバ決定処理)。そして、要求振り分け部224は決定したサーバ30へ要求を送信する(S503)。この要求を受信したサーバ30は、受信した要求に基づく処理を実行する(S504:サービス要求処理)。例えば、サーバ30は、受信した要求に含まれるセンサ情報を、当該要求に含まれる部分領域情報ごとにまとめ、統計処理等を行う。   When the request receiving unit 221 of the load distribution apparatus 20 receives a request from the client terminal 10 (S501), the request distribution unit 224 of the load distribution apparatus 20 refers to the partial area information holding table and processes the request. The server 30 is determined (S502: request processing server determination processing). Then, the request distribution unit 224 transmits a request to the determined server 30 (S503). Upon receiving this request, the server 30 executes processing based on the received request (S504: service request processing). For example, the server 30 collects sensor information included in the received request for each partial region information included in the request, and performs statistical processing or the like.

以下、図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 request distribution unit 224 specifies a lattice (area) corresponding to the position of the client terminal 10 that is the transmission source of the request from the position information included in the request transmitted from the client terminal 10 (S601). That is, the request distribution unit 224 identifies a lattice (region) on the partial region information holding table corresponding to the position of the client terminal 10 that is the transmission source of the request.

その後、部分領域決定部223はクライアント端末10の属する格子(領域)の部分領域情報を部分領域情報保持テーブルから取得する(S602)。   Thereafter, the partial area determination unit 223 acquires partial area information of the lattice (area) to which the client terminal 10 belongs from the partial area information holding table (S602).

例えば、クライアント端末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 client terminal 10 is (X, Y) = (5, 4), the request distribution unit 224 sets the partial area information holding table. "B2" is acquired as the partial area information.

次に、部分領域決定部223は取得した部分領域情報をキー(例えば、「B2」)として、コンシステント・ハッシュ法により、要求の送信先のサーバ30を決定する(S603)。   Next, the partial region determination unit 223 determines the server 30 that is the transmission destination of the request by the consistent hash method using the acquired partial region information as a key (for example, “B2”) (S603).

このようにすることで、要求振り分け部224は部分領域情報保持テーブルを参照して要求振り分け先のサーバ30を決定することができる。   In this way, the request distribution unit 224 can determine the request distribution destination server 30 with reference to the partial area information holding table.

(その他の実施形態)
なお、負荷分散装置20は負荷分散システムのいずれかのサーバ30から負荷が所定の閾値(例えば、当該サーバ30の処理性能の95%)を超えた旨の通知を受信したとき、部分領域情報保持テーブルにおける部分領域数を増加させてもよい。
(Other embodiments)
When the load balancer 20 receives a notification from one of the servers 30 in the load balance system that the load exceeds a predetermined threshold (for example, 95% of the processing performance of the server 30), the load balancer 20 holds the partial area information. The number of partial areas in the table may be increased.

この場合、負荷分散装置20は、図4に示す部分領域数更新部225をさらに備える。また、負荷分散装置20の記憶部23は、さらに部分領域数保持テーブルを記憶する。   In this case, the load distribution apparatus 20 further includes a partial area number updating unit 225 shown in FIG. The storage unit 23 of the load balancer 20 further stores a partial area number holding table.

部分領域数更新部225は、サーバ30から負荷が所定の閾値を超えた旨の通知(サーバ負荷閾値超過通知)を受信したとき、部分領域数保持テーブルにおける部分領域数を増加させる。   The partial area number updating unit 225 increases the number of partial areas in the partial area number holding table when receiving a notification that the load has exceeded a predetermined threshold (server load threshold excess notification) from the server 30.

部分領域数保持テーブルは、部分領域数を示す情報である。この部分領域数は、例えば、部分領域情報保持テーブルの部分領域の区切り目となる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 area determination unit 223 determines a partial area. That is, when the partial area number holding table is updated, the partial area determining unit 223 resets the current partial area information holding table, and sets the partial area again so that the partial area number shown in the partial area number holding table is reached. decide.

図12を用いて、負荷分散装置20における部分領域数の増加手順を説明する。負荷分散装置20の部分領域数更新部225は、サーバ30からサーバ負荷閾値超過通知を受信すると(S401)、部分領域数加算処理を行う(S402)。つまり、部分領域数更新部225は部分領域数保持テーブルの値を増加させる。   The procedure for increasing the number of partial areas in the load balancer 20 will be described with reference to FIG. When receiving the server load threshold excess notification from the server 30 (S401), the partial area number updating unit 225 of the load distribution apparatus 20 performs the partial area number addition process (S402). That is, the partial area number updating unit 225 increases the value of the partial area number holding table.

例えば、図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 number updating unit 225 displays the number of X axis boundaries. Is updated from “8” to “9”. Then, the partial region determination unit 223 resets the current partial region information holding table again so that the number of partial regions (the number of X-axis boundaries is “9”) shown in the updated partial region number holding table is reached. Determine the partial area.

なお、部分領域数更新部225が、さらに継続してサーバ負荷閾値超過通知を受信した場合は、さらに部分領域数加算処理を行う。例えば、部分領域数更新部225は、Y軸の境界数を「8」から「9」に更新する。そして、部分領域決定部223は、現在の部分領域情報保持テーブルをリセットし、更新された部分領域数保持テーブルに示される部分領域数(X軸、Y軸の境界数が「9」)となるように再度部分領域を決定する。以降、サーバ負荷閾値超過通知を受信するたびに、X軸、Y軸の境界数を交互に加算していく。   When the partial area number updating unit 225 continues to receive the server load threshold value excess notification, the partial area number addition process is further performed. For example, the partial region number updating unit 225 updates the number of Y-axis boundaries from “8” to “9”. Then, the partial area determination unit 223 resets the current partial area information holding table, and becomes the number of partial areas (the number of X-axis and Y-axis boundaries is “9”) shown in the updated partial area number holding table. Then, the partial area is determined again. Thereafter, every time a server load threshold excess notification is received, the number of boundaries between the X axis and the Y axis is added alternately.

このように負荷分散装置20がサーバ負荷閾値超過通知を受信するたびに部分領域数を増加させることで、サーバ30間の負荷の偏りを減少できる可能性を高めることができる。   In this way, by increasing the number of partial areas each time the load distribution apparatus 20 receives a server load threshold excess notification, the possibility of reducing the load bias among the servers 30 can be increased.

なお、負荷分散システムのサーバ30の増設または減設が行われたときは、負荷分散装置20は部分領域数を最小値(負荷分散システムのサーバ30の台数)にリセットするものとする。   When the server 30 of the load distribution system is added or removed, the load distribution apparatus 20 resets the number of partial areas to the minimum value (the number of servers 30 of the load distribution system).

また、前記した実施形態において、クライアント端末10から送信される要求には、当該クライアント端末10の位置情報が含まれるものとして説明したが、これに限定されない。例えば、クライアント端末10が固定的に設置され、移動しない場合には、各要求に位置情報を含める必要はない。この場合、負荷分散装置20は予めクライアント端末10の識別情報(例えば、IPアドレス)と、位置情報との対応関係を示す情報を保持しておき、この情報をもとにクライアント端末10の位置を特定すればよい。   In the above-described embodiment, the request transmitted from the client terminal 10 has been described as including the location information of the client terminal 10, but the present invention is not limited to this. For example, when the client terminal 10 is fixedly installed and does not move, it is not necessary to include position information in each request. In this case, the load balancer 20 holds information indicating the correspondence between the identification information (for example, IP address) of the client terminal 10 and the position information in advance, and the position of the client terminal 10 is determined based on this information. What is necessary is just to specify.

さらに、負荷分散装置20は、サーバ負荷閾値超過通知の受信によりサーバ30の負荷が高いことを検出することとしたが、負荷分散装置20が各サーバ30への要求の振り分け数を記録しておき、その振り分け数に基づき各サーバ30の負荷の高さを推定してもよい。   Further, although the load balancer 20 detects that the load on the server 30 is high by receiving the server load threshold excess notification, the load balancer 20 records the number of requests distributed to each server 30 in advance. The load height of each server 30 may be estimated based on the number of distributions.

また、負荷分散装置20は、部分領域を決定する際、矩形の部分領域を決定するものとして説明したが、部分領域の形状はこれ以外の形状であってももちろんよい。   Further, although the load distribution apparatus 20 has been described as determining a rectangular partial area when determining the partial area, the shape of the partial area may be other than that.

なお、負荷分散装置20は、要求量の分散値を最小化するような部分領域を決定する際、動的計画法を用いるものとして説明したが、動的計画法以外のアルゴリズムを用いてももちろんよい。   Although the load balancer 20 has been described as using dynamic programming when determining a partial region that minimizes the variance of the requested amount, it should be understood that algorithms other than dynamic programming may be used. Good.

(プログラム)
また、上記実施形態に係る負荷分散装置20が実行する処理をコンピュータが実行可能な言語で記述したプログラムを作成することもできる。この場合、コンピュータがプログラムを実行することにより、上記実施形態と同様の効果を得ることができる。さらに、かかるプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータに読み込ませて実行することにより上記実施形態と同様の処理を実現してもよい。以下に、負荷分散装置20と同様の機能を実現する負荷分散プログラムを実行するコンピュータの一例を説明する。
(program)
It is also possible to create a program in which the processing executed by the load distribution apparatus 20 according to the above embodiment is described in a language that can be executed by a computer. In this case, the same effect as the above-described embodiment can be obtained by the computer executing the program. Further, such a program may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by a computer and executed to execute the same processing as in the above embodiment. Hereinafter, an example of a computer that executes a load distribution program that realizes the same function as the load distribution apparatus 20 will be described.

図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 computer 1000 includes, for example, a memory 1010, a CPU 1020, a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These units are connected by a bus 1080.

メモリ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 memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM (Random Access Memory) 1012. The ROM 1011 stores a boot program such as BIOS (Basic Input Output System). A hard disk drive 1090 is connected to the hard disk drive interface 1030. A disk drive 1100 is connected to the disk drive interface 1040. A removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100, for example. For example, a mouse 1110 and a keyboard 1120 are connected to the serial port interface 1050. For example, a display 1130 is connected to the video adapter 1060.

ここで、図13に示すように、ハードディスクドライブ1090は、例えば、OS1091、アプリケーションプログラム1092、プログラムモジュール1093およびプログラムデータ1094を記憶する。上記実施形態で説明した各テーブルは、例えばハードディスクドライブ1090やメモリ1010に記憶される。   Here, as shown in FIG. 13, the hard disk drive 1090 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. Each table described in the above embodiment is stored in the hard disk drive 1090 or the memory 1010, for example.

また、負荷分散プログラムは、例えば、コンピュータ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 computer 1000 is described, for example. Specifically, a program module describing each process executed by the load distribution apparatus 20 described in the above embodiment is stored in the hard disk drive 1090.

また、負荷分散プログラムによる情報処理に用いられるデータは、プログラムデータとして、例えば、ハードディスクドライブ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 CPU 1020 reads out the program module 1093 and the program data 1094 stored in the hard disk drive 1090 to the RAM 1012 as necessary, and executes the above-described procedures.

なお、負荷分散プログラムに係るプログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限られず、例えば、着脱可能な記憶媒体に記憶されて、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。あるいは、負荷分散プログラムに係るプログラムモジュール1093やプログラムデータ1094は、LAN(Local Area Network)やWAN(Wide Area Network)等のネットワークを介して接続された他のコンピュータに記憶され、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。   Note that the program module 1093 and the program data 1094 related to the load balancing program are not limited to being stored in the hard disk drive 1090. For example, the program module 1093 and the program data 1094 are stored in a removable storage medium and read by the CPU 1020 via the disk drive 1100 or the like. May be issued. Alternatively, the program module 1093 and the program data 1094 related to the load distribution program are stored in another computer connected via a network such as a LAN (Local Area Network) or a WAN (Wide Area Network), and are transmitted via the network interface 1070. May be read by the CPU 1020.

10,10A〜10D クライアント端末
20 負荷分散装置
21 入出力部
22 制御部
23 記憶部
30,30A〜30D サーバ
221 要求受け付け部
222 要求量カウント部
223 部分領域決定部
224 要求振り分け部
225 部分領域数更新部
10, 10A to 10D Client terminal 20 Load distribution device 21 Input / output unit 22 Control unit 23 Storage unit 30, 30A to 30D Server 221 Request receiving unit 222 Request amount counting unit 223 Partial region determining unit 224 Request distribution unit 225 Updating the number of partial regions Part

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〜4のいずれか1項に記載の負荷分散装置。   The load distribution apparatus according to claim 1, wherein the area is an area obtained by dividing a predetermined plane into a lattice shape. 前記要求量カウント部は、
前記所定期間経過後、前記領域ごとの前記クライアント端末からの要求量を再度カウントすることを特徴とする請求項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:
JP2014079287A 2014-04-08 2014-04-08 Load distribution apparatus, load distribution method, and load distribution system Active JP6219771B2 (en)

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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020170998A1 (en) 2019-02-18 2020-08-27 川本産業株式会社 Earplug and earplug production method

Citations (3)

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

Patent Citations (3)

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