JP6543090B2 - Load balancing device, load balancing method and program - Google Patents
Load balancing device, load balancing method and program Download PDFInfo
- Publication number
- JP6543090B2 JP6543090B2 JP2015106330A JP2015106330A JP6543090B2 JP 6543090 B2 JP6543090 B2 JP 6543090B2 JP 2015106330 A JP2015106330 A JP 2015106330A JP 2015106330 A JP2015106330 A JP 2015106330A JP 6543090 B2 JP6543090 B2 JP 6543090B2
- Authority
- JP
- Japan
- Prior art keywords
- servers
- server
- processing
- round trip
- trip time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Computer And Data Communications (AREA)
Description
この発明は、負荷分散装置、負荷分散方法及びプログラムに関する。 The present invention relates to a load distribution device, a load distribution method, and a program.
従来から、クライアントからのリクエストを、設定された負荷分散方式に基づいて複数のサーバに振り分ける負荷分散装置が広く用いられている。
負荷分散方式としては、例えば、各サーバに順番にリクエストを振り分けるラウンドロビン方式などが知られている。
2. Description of the Related Art Conventionally, a load distribution device that distributes requests from clients to a plurality of servers based on a set load distribution method has been widely used.
As a load distribution method, for example, a round robin method in which requests are distributed to each server in order is known.
また、特許文献1には、別の負荷分散方式として、パケットの優先度に応じて重み付けを行い、その重み付けにより定まる順序でパケットを振り分ける負荷分散方式が記載されている。
Further, as another load distribution method,
ところで、従来のラウンドロビン方式や特許文献1に記載の負荷分散方式では、全サーバにリクエストを振り分けるので、全サーバを稼動しておく必要がある。
このため、クライアントからのリクエストを処理するのに、全サーバのリソースを使用する必要がない場合であっても、全サーバを平均的に使用することから消費電力が高くなる傾向があった。
このようなことから、負荷分散装置に接続される複数のサーバの省電力化を図ることが望まれている。
By the way, in the conventional round robin method and the load distribution method described in
For this reason, even if it is not necessary to use the resources of all the servers to process the request from the client, the power consumption tends to be high because all the servers are used on average.
From such a thing, it is desired to save power of a plurality of servers connected to the load distribution device.
そこで、この発明は、上述した事情に鑑みてなされたものであって、複数のサーバの省電力化を図る場合に好適な負荷分散装置等を提供することを目的とする。 Then, this invention is made in view of the situation mentioned above, Comprising: It aims at providing a suitable load distribution apparatus etc., when achieving power saving of a plurality of servers.
上記目的を達成するため、この発明の第1の観点に係る負荷分散装置は、
クライアントと複数のサーバとにネットワークを介して接続される負荷分散装置であって、
前記複数のサーバにかかる負荷の指標となる測定値を取得する測定値取得手段と、
前記複数のサーバのうち、前記クライアントからの単位時間当たりの処理要求を応答処理するのに必要な最小サーバ台数を求める最小サーバ台数取得手段と、
前記最小サーバ台数取得手段で求めた最小サーバ台数と、前記測定値取得手段で取得した測定値と、に基づいて、前記複数のサーバが単位時間当たりに処理要求を応答処理可能な処理性能値を求める処理性能値取得手段と、
前記処理性能値取得手段で求めた処理性能値と前記測定値の変動とに基づいて、前記複数のサーバのうち前記クライアントからの処理要求を応答処理するサーバを選択する選択手段と、
前記選択手段で選択したサーバに、前記クライアントからの処理要求を振り分ける振分手段と、
を備えたことを特徴とする。
In order to achieve the above object, a load distribution device according to a first aspect of the present invention is:
A load balancer connected to a client and a plurality of servers via a network,
Measurement value acquisition means for acquiring a measurement value that is an indicator of the load on the plurality of servers;
Among the plurality of servers, a minimum number-of-servers acquiring unit for acquiring the minimum number of servers necessary for responding to the processing request per unit time from the client;
Based on the minimum number of servers obtained by the minimum server number obtaining means and the measured value obtained by the measured value obtaining means, a processing performance value capable of responding to a processing request per unit time by the plurality of servers Processing performance value acquisition means to be obtained;
Selection means for selecting a server that responds to the processing request from the client among the plurality of servers based on the processing performance value obtained by the processing performance value acquisition means and the fluctuation of the measurement value;
Distribution means for distributing the processing request from the client to the server selected by the selection means;
It is characterized by having.
また、前記測定値取得手段は、前記負荷の指標となる測定値として、前記クライアントからの単位時間当たりの処理要求数を取得するとよい。
また、前記測定値取得手段は、前記負荷の指標となる測定値として、前記クライアントからの単位時間当たりの処理要求に対して応答処理した処理数を取得するとよい。
Further, the measurement value acquisition unit may acquire the number of processing requests per unit time from the client as a measurement value that is an index of the load.
Further, the measurement value acquisition unit may acquire, as a measurement value serving as an index of the load, the number of processes processed in response to the processing request per unit time from the client.
また、前記最小サーバ台数取得手段は、
前記単位時間当たりの処理要求を前記複数のサーバに転送してから、該複数のサーバより応答処理を受信するまでにかかった平均往復時間を基準往復時間として求める基準往復時間取得手段と、
前記平均往復時間を前記複数のサーバの台数を減らして求める平均往復時間取得手段と、を備え、
前記平均往復時間が前記基準往復時間から算出される所定の許容往復時間を越えるサーバ台数を特定し、該特定したサーバ台数に1台サーバ台数を加算した台数を前記最小サーバ台数とするとよい。
Further, the minimum server number acquisition unit
Reference round trip time obtaining means for obtaining an average round trip time taken to receive response processing from the plurality of servers after transferring the processing request per unit time to the plurality of servers, as a reference round trip time;
An average round trip time acquiring unit for obtaining the average round trip time by reducing the number of the plurality of servers;
It is preferable to specify the number of servers in which the average round trip time exceeds a predetermined allowable round trip time calculated from the reference round trip time, and add the number of one server to the specified number of servers as the minimum number of servers.
また、前記最小サーバ台数取得手段は、
前記単位時間当たりの処理要求を応答処理する各サーバのCPU使用率から平均CPU使用率を求める平均CPU使用率取得手段を備え、
前記平均CPU使用率が所定の上限率を超えるサーバ台数を特定し、該特定したサーバ台数に1台サーバ台数を加算した台数を前記最小サーバ台数とするとよい。
Further, the minimum server number acquisition unit
The system comprises an average CPU utilization acquisition means for calculating an average CPU utilization from the CPU utilization of each server that processes the processing request per unit time in response.
It is preferable to specify the number of servers whose average CPU usage rate exceeds a predetermined upper limit rate and add the number of one server to the specified number of servers as the minimum number of servers.
また、前記選択手段は、前記処理性能値取得手段で求めた処理性能値と前記変動する測定値との間にマージンができるように、前記複数のサーバのうち前記クライアントからの処理要求を応答処理するサーバを選択するとよい。 Further, the selection means responds to the processing request from the client among the plurality of servers so that there is a margin between the processing performance value obtained by the processing performance value acquisition means and the fluctuating measurement value. Choose a server to
また、前記振分手段は、前記選択手段が選択したサーバが2台以上の場合、該選択したサーバの性能比に応じて前記クライアントからの処理要求を振り分けるとよい。 In addition, when the number of servers selected by the selection unit is two or more, the distribution unit may distribute the processing request from the client according to the performance ratio of the selected server.
また、前記振分手段は、前記選択手段が前記マージンができるように選択したサーバが2台以上の場合、処理負荷が他のサーバに比べて軽いサーバを含むように、負荷分散比を示す重み付け係数を前記2台以上の各サーバに付与し、該付与した重み付け係数に基づいて前記クライアントからの処理要求を振り分けるとよい。 Further, the distribution unit is weighted to indicate a load distribution ratio so that the processing load includes a server lighter than other servers when two or more servers are selected so that the selection unit can make the margin. A coefficient may be assigned to each of the two or more servers, and the processing request from the client may be distributed based on the assigned weighting coefficient.
また、前記振分手段は、前記各サーバに付与する重み付け係数の比を、前記測定値の変動に応じて動的に変化させ、該変化させた重み付け係数の比に基づいて前記クライアントからの処理要求を振り分けるとよい。 Further, the distribution means dynamically changes the ratio of the weighting factor to be given to each of the servers according to the fluctuation of the measured value, and processing from the client based on the changed ratio of the weighting factor It is good to distribute the request.
また、前記振分手段は、前記測定値の上昇に伴って、前記各サーバに付与する重み付け係数の比を等しくするとよい。 Further, it is preferable that the distribution unit equalizes the ratio of weighting factors to be given to the servers as the measurement value increases.
また、前記処理性能値取得手段は、前記複数のサーバの台数に増減があった場合、前記処理性能値を求め直すとよい。 Further, the processing performance value acquiring unit may recalculate the processing performance value when there is an increase or decrease in the number of the plurality of servers.
上記目的を達成するため、この発明の第2の観点に係る負荷分散装置は、
複数のサーバ全体での処理性能値を、自装置の外部から取得する処理性能値取得手段と、
前記処理性能値取得手段で取得した処理性能値と、前記複数のサーバにかかる負荷の指標となる測定値の変動と、に基づいて、前記複数のサーバのうちクライアントからの処理要求を応答処理するサーバを選択する選択手段と、
前記選択手段で選択したサーバに、前記クライアントからの処理要求を振り分ける振分手段と、
を備えたことを特徴とする。
In order to achieve the above object, a load distribution device according to a second aspect of the present invention is:
Processing performance value acquisition means for acquiring processing performance values of a plurality of servers from the outside of the own device;
The processing request from the client among the plurality of servers is subjected to response processing based on the processing performance value acquired by the processing performance value acquiring means and the fluctuation of the measured value serving as an index of the load on the plurality of servers. Selection means for selecting a server;
Distribution means for distributing the processing request from the client to the server selected by the selection means;
It is characterized by having.
上記目的を達成するため、この発明の第3の観点に係る負荷分散方法は、
前記複数のサーバにかかる負荷の指標となる測定値を取得する測定値取得ステップと、
前記複数のサーバのうち、クライアントからの単位時間当たりの処理要求を応答処理するのに必要な最小サーバ台数を求める最小サーバ台数取得ステップと、
前記最小サーバ台数取得ステップにおいて求めた最小サーバ台数と、前記測定値取得ステップにおいて取得した測定値と、に基づいて、前記複数のサーバが単位時間当たりに処理要求を応答処理可能な処理性能値を求める処理性能値取得ステップと、
前記処理性能値取得ステップにおいて求めた処理性能値と前記測定値の変動とに基づいて、前記複数のサーバのうち前記クライアントからの処理要求を応答処理するサーバを選択する選択ステップと、
前記選択ステップにおいて選択したサーバに、前記クライアントからの処理要求を振り分ける振分ステップと、
を備えたことを特徴とする。
In order to achieve the above object, a load distribution method according to a third aspect of the present invention is:
A measurement value acquisition step of acquiring a measurement value that is an index of the load on the plurality of servers;
Among the plurality of servers, a minimum number of servers obtaining step for obtaining a minimum number of servers necessary for responding to processing requests per unit time from clients.
Based on the minimum number of servers obtained in the minimum server number obtaining step and the measured value obtained in the measured value obtaining step, a processing performance value capable of responding to a processing request per unit time by the plurality of servers Processing performance value acquisition step to be determined;
A selection step of selecting a server to which the processing request from the client is to be subjected to response processing among the plurality of servers based on the processing performance value obtained in the processing performance value acquisition step and the fluctuation of the measurement value;
A distribution step of distributing the processing request from the client to the server selected in the selection step;
It is characterized by having.
上記目的を達成するため、この発明の第4の観点に係るプログラムは、
クライアントと複数のサーバとにネットワークを介して接続されるコンピュータを、
前記複数のサーバにかかる負荷の指標となる測定値を取得する測定値取得手段、
前記複数のサーバのうち、前記クライアントからの単位時間当たりの処理要求を応答処理するのに必要な最小サーバ台数を求める最小サーバ台数取得手段、
前記最小サーバ台数取得手段で求めた最小サーバ台数と、前記測定値取得手段で取得した測定値と、に基づいて、前記複数のサーバが単位時間当たりに処理要求を応答処理可能な処理性能値を求める処理性能値取得手段、
前記処理性能値取得手段で求めた処理性能値と前記測定値の変動とに基づいて、前記複数のサーバのうち前記クライアントからの処理要求を応答処理するサーバを選択する選択手段、
前記選択手段で選択したサーバに、前記クライアントからの処理要求を振り分ける振分手段、
として機能させるためのプログラムである。
In order to achieve the above object, a program according to a fourth aspect of the present invention is
A computer connected via a network to a client and multiple servers,
Measurement value acquisition means for acquiring measurement values that are indicators of the load on the plurality of servers,
Among the plurality of servers, a minimum number-of-servers acquiring unit for acquiring the minimum number of servers necessary for responding to the processing request per unit time from the client,
Based on the minimum number of servers obtained by the minimum server number obtaining means and the measured value obtained by the measured value obtaining means, a processing performance value capable of responding to a processing request per unit time by the plurality of servers Processing performance value acquisition means to
Selecting means for selecting a server to which the processing request from the client is to be subjected to response processing among the plurality of servers based on the processing performance value obtained by the processing performance value acquiring means and the fluctuation of the measured value;
Distribution means for distributing the processing request from the client to the server selected by the selection means;
Is a program to function as
この発明によれば、複数のサーバの省電力化を図ることができる。 According to the present invention, power saving of a plurality of servers can be achieved.
(第1実施形態)
以下、この発明の第1実施形態を図面に基づいて説明する。
図1に示すように、負荷分散装置100は、複数のクライアント200と複数のサーバ(1乃至5)とにネットワークを介して接続される。負荷分散装置100と複数のサーバとの間のネットワークとしては例えばLAN(Local Area Network)であり、負荷分散装置100と複数のクライアント200との間のネットワークとしては例えばインターネット、LANである。
なお、以下の説明において、個々のサーバを特段特定して説明する必要がない場合は、適宜、複数のサーバ、全サーバ、各サーバなどと称して説明する。また、この実施形態では、理解を容易にするために、サーバ台数は5台とし、各サーバの性能及び消費電力は同じであることを前提として説明する。
First Embodiment
Hereinafter, a first embodiment of the present invention will be described based on the drawings.
As shown in FIG. 1, the
In the following description, in the case where it is not necessary to specifically identify and explain each server, it will be appropriately referred to as a plurality of servers, all servers, each server and the like. Further, in this embodiment, in order to facilitate understanding, it is assumed that the number of servers is five and the performance and power consumption of each server are the same.
負荷分散装置100は、ネットワークを介して送信される複数のクライアント200からの処理要求を中継して、各サーバに振り分けるロードバランサである。この実施形態では、負荷分散装置100は、消費電力を抑えるために処理要求を全サーバに振り分けずに、選択したサーバに振り分ける。この点については、後述する。
The
複数のサーバは、複数のクライアント200からの処理要求に応じて、HTML(HyperText Markup Language)文書や画像などのデータを応答処理として提供するウェブサーバである。
複数のクライアント200はそれぞれ、ユーザの入力操作を受け付けて処理要求を送信するPC(Personal Computer)である。また、複数のクライアント200はそれぞれ、各サーバから提供されるデータに基づいて、ディスプレイなどの表示手段にHTML文書や画像などを表示する。ここで、処理要求としては例えばhttp(HyperText Transfer Protocol)リクエストであり、応答処理としては例えばhttpレスポンスである。
複数のクライアント200は、便宜上3台(クライアント210、220及び230)のみ図示するが、実際には、数百数千がインターネットを介して負荷分散装置100と接続され、複数の処理要求が各サーバに振り分けられる。
The plurality of servers are web servers that provide data such as HTML (HyperText Markup Language) documents and images as response processing in response to processing requests from a plurality of
Each of the plurality of
Although only a plurality of clients 200 (
次に、図2を参照しながら、負荷分散装置100のハードウェア構成について説明する。図2に示すように、負荷分散装置100は、CPU(Central Processing Unit)101とフラッシュROM(Read Only Memory)102とRAM(Random Access Memory)103とネットワークI/F(Interface)104と、を備える。
このうち、CPU101は、負荷分散装置100全体を制御する中央演算装置である。
フラッシュROM102は、CPU101が実行する負荷分散に係るプログラムを格納している不揮発性メモリである。
Next, the hardware configuration of the
Among them, the
The
RAM103は、CPU101が実行するプログラムを一時的に展開し、CPU101が負荷分散に係る処理を行う際の作業領域として使用する揮発性メモリである。
ネットワークI/F104は、この負荷分散装置100が、複数のサーバ、複数のクライアント200とネットワークを介して通信を行うためのインタフェースである。
A random access memory (RAM) 103 is a volatile memory used as a work area when the program executed by the
A network I /
ここで、CPU101は、フラッシュROM102内の負荷分散に係るプログラムを読み出し、RAM103に展開した後、そのプログラムに従って負荷分散装置100を制御することで、図3に示すような各部の機能を実現することができる。
機能としては、図3に示すように、トランザクション数取得部10、最小サーバ台数取得部20、最大トランザクション数取得部30、サーバ選択部40及び振分部50を備える。
Here, the
As functions, as shown in FIG. 3, the number of
まず、トランザクション数取得部10は、複数のクライアント200からの毎秒当たりの処理要求に対して応答処理したトランザクション数(TPS:Transaction Per Sec)を測定して、そのトランザクション数を取得する。ここで、トランザクションとは、処理要求に対して応答処理するまでを一体不可分のものとしてまとめた一連の処理を言う。
例えば、トランザクション数取得部10は、クライアント210から受信した1つの処理要求をサーバ1に転送し、そのサーバ1からの応答処理を受信すると1トランザクションとする。このようにして、トランザクション数取得部10は、複数のクライアント200からの処理要求を各サーバに転送し、その各サーバからの応答処理を受信するとトランザクションをカウントしていく。
First, the transaction
For example, the transaction
ここで、トランザクション数は、複数のサーバにかかる負荷の指標となる測定値とも言える。このため、トランザクション数が多ければ高負荷、低ければ低負荷となる。この実施形態においては、負荷の指標となる測定値として、トランザクション数(TPS)を例にとって説明する。また、このトランザクション数は、処理数とも呼ぶ。 Here, the number of transactions can be said to be a measurement value that is an indicator of the load on a plurality of servers. Therefore, the higher the number of transactions, the higher the load, and the lower the load, the lower the load. In this embodiment, the number of transactions (TPS) will be described as an example of a measurement value as an index of load. The number of transactions is also called the number of processes.
この実施形態においては、負荷分散先を選択する前(すなわち、全サーバが稼働している場合)、トランザクション数取得部10は、複数のクライアント200からの毎秒当たり処理要求に応じて、全サーバが応答処理したトランザクション数を測定して取得する。一方、負荷分散先を選択した後(すなわち、休止サーバが含まれる場合)、トランザクション数取得部10は、複数のクライアント200からの毎秒当たりの処理要求に応じて、稼動サーバが応答処理したトランザクション数を測定して取得する。
なお、トランザクション数は、障害などにより応答処理ができなかったような例外を除き、原則処理要求の数と一致する。また、トランザクション数取得部10は、測定値取得手段に相当する。
In this embodiment, before selecting the load distribution destination (that is, when all the servers are operating), the transaction
The number of transactions is in principle the same as the number of processing requests, with the exception that the response processing could not be performed due to a failure or the like. The transaction
次に、最小サーバ台数取得部20は、複数のサーバのうち、複数のクライアント200からの毎秒当たりの処理要求を応答処理するのに必要な最小サーバ台数を求める。
具体的には、まず、基準往復時間取得部21は、毎秒当たりの処理要求を複数のサーバに転送してから、その複数のサーバより応答処理を受信するまでにかかった平均往復時間を基準往復時間として求める。
次に、平均往復時間取得部22は、平均往復時間を複数のサーバの台数を減らして求め、その求めた平均往復時間と、基準往復時間から算出される所定の許容往復時間と、を比較する。
Next, the minimum number-of-servers acquisition unit 20 obtains the minimum number of servers necessary for responding to the processing request per second from the plurality of
Specifically, first, the reference round trip
Next, the average round trip
次に、最小サーバ台数取得部20は、平均往復時間が所定の許容往復時間を越えるサーバ台数を特定し、その特定したサーバ台数に1台サーバ台数を加算した台数を最小サーバ台数とする。この最小サーバ台数取得部20による最小サーバ台数を求める具体的な処理については、後述する。
なお、最小サーバ台数取得部20は最小サーバ台数取得手段に、基準往復時間取得部21は基準往復時間取得手段に、平均往復時間取得部22は平均往復時間取得手段に、それぞれ相当する。
Next, the minimum number-of-servers acquisition unit 20 specifies the number of servers whose average round-trip time exceeds the predetermined allowable round-trip time, and sets the number of one server as the minimum number of servers. Specific processing for obtaining the minimum number of servers by the minimum server number acquisition unit 20 will be described later.
The minimum server number acquisition unit 20 corresponds to the minimum server number acquisition unit, the reference round trip
次に、最大トランザクション数取得部30は、最小サーバ台数取得部20で求めた最小サーバ台数と、トランザクション数取得部10で取得した測定値であるトランザクション数と、に基づいて、複数のサーバが毎秒当たりに処理要求を応答処理可能な最大トランザクション数(最大TPS)を求める。
具体的には、最大トランザクション数取得部30は、求めた最小サーバ台数と負荷分散先を選択する前に測定した全サーバが応答処理したトランザクション数との比から、全サーバ5台での最大トランザクション数を求める。この最大トランザクション数を求める際の具体例については後述する。
なお、この最大トランザクション数は、複数のサーバ全体での最大の処理性能値を示す。また、最大トランザクション数取得部30は、処理性能値取得手段に相当する。
Next, the maximum number-of-
Specifically, the maximum number of
The maximum number of transactions indicates the maximum processing performance value of the plurality of servers as a whole. Also, the maximum transaction
次に、サーバ選択部40は、求めた最大の処理性能値である最大トランザクション数と、測定したトランザクション数の変動と、に基づいて、複数のサーバのうち複数のクライアント200からの処理要求を応答処理するサーバを選択する。
換言すると、サーバ選択部40は、最大トランザクション数取得部30で求めた最大トランザクション数(最大TPS)に対するトランザクション数取得部10で取得したトランザクション数(TPS)の割合に応じて、複数のサーバのうち複数のクライアント200からの処理要求を応答処理するサーバを選択する。つまり、サーバ選択部40は、振り分けるサーバ台数を決定する。
具体的には、サーバ選択部40は、測定したトランザクション数の変動に従って、動的に応答処理させるサーバ台数を増減する。例えば、最大TPSに対するTPSの割合が小さい場合、すなわち測定したトランザクション数が少ない場合は、全サーバを稼動する必要がないので、サーバ選択部40は、例えばサーバ1とサーバ2の2台を選択する。なお、選択にあたっては、複数のサーバのうち任意のサーバが選択される。また、サーバ選択部40は、選択手段に相当する。
Next, the
In other words, the
Specifically, the
次に、振分部50は、サーバ選択部40で選択したサーバに、複数のクライアント200からの処理要求を振り分ける。振り分けの手法は任意であるが、例えば、ラウンドロビン方式に従って均等に振り分けられる。なお、振分部50は、振分手段に相当する。
Next, the
以上、図1乃至図3を参照しながら説明した負荷分散装置100において、例えば、一つの特徴的な点は、最小サーバ台数を求め、求めた最小サーバ台数に基づいて全サーバの最大の処理性能値を求める点である。そこで、以下この点に関連する最小サーバ台数取得処理について、図4のフローチャートを参照しながら説明する。
この処理は、負荷分散装置100を起動した直後や複数のサーバの運用を開始した後の所定時間毎(例えば、一週間に一回)などに実施される。また、トランザクション数取得部10が測定して取得したトランザクション数は1000TPSであるとする。
As described above, in the
This process is performed immediately after activating the
まず、最小サーバ台数取得部20は、サーバ数をサーバ台数としてセットする(ステップS11)。この実施形態においては、最小サーバ台数取得部20は、サーバ数を5台としてセットする。 First, the minimum number-of-servers acquisition unit 20 sets the number of servers as the number of servers (step S11). In this embodiment, the minimum server number acquisition unit 20 sets the number of servers as five.
次に、基準往復時間取得部21は、基準往復時間を測定する(ステップS12)。具体的には、基準往復時間取得部21は、毎秒当たりの処理要求を複数のサーバに転送してから、その複数のサーバより応答処理を受信するまでにかかった平均往復時間を基準往復時間とする。この平均往復時間が例えば1m秒の場合、図5に示すように5台の時の平均往復時間(基準往復時間)が1m秒となる。
Next, the reference round trip
次に、最小サーバ台数取得部20は、許容往復時間を算出する(ステップS13)。具体的には、最小サーバ台数取得部20は、基準往復時間に所定の係数を乗じて許容往復時間を算出する。例えば、基準往復時間である1m秒に係数2を乗じて許容往復時間2m秒を求める。なお、係数は、負荷分散装置100の管理ユーザが所望の値を設定できる。
Next, the minimum number-of-servers acquisition unit 20 calculates the allowable round trip time (step S13). Specifically, the minimum server number acquisition unit 20 multiplies the reference round trip time by a predetermined coefficient to calculate an allowable round trip time. For example, 1 ms, which is a reference round trip time, is multiplied by a
次に、平均往復時間取得部22は、サーバ数をサーバ数−1としてセットする(ステップS14)。この実施形態においては、最小サーバ台数取得部20は、サーバ数を4台にセットする。
Next, the average round trip
次に、平均往復時間取得部22は、サーバ数=0か否か判定する(ステップS15)。ここで、サーバ数は4台で0ではないので(ステップS15;No)、平均往復時間取得部22は、平均往復時間を測定する(ステップS16)。
具体的には、平均往復時間取得部22は、サーバ台数が4台のときの平均往復時間1.1m秒を求める(図5参照)。
ここで、一般的に、サーバ台数が減少するとサーバ1台当たりが処理要求を応答処理する数が増加するため、平均往復時間が長くなる。
Next, the average round trip
Specifically, the average round trip
Here, in general, when the number of servers decreases, the number of server servers responding to processing requests increases, so the average round trip time becomes longer.
次に、最小サーバ台数取得部20は、平均往復時間が許容往復時間以下か否か判定する(ステップS17)。ここで、平均往復時間1.1秒は許容往復時間2m秒以下なので(ステップS17;Yes)、ステップS14に戻ってサーバ台数を1台減らしてステップS15乃至S17の処理を再度行う。このように、ステップS14乃至S17の処理では、サーバ台数を1台ずつ減らしてその都度、平均往復時間が許容往復時間以下か否か判定する。そして、平均往復時間が許容往復時間を越えるまで(ステップS17;No)、ステップS14乃至17の処理を繰り返す。 Next, the minimum server number acquisition unit 20 determines whether the average round trip time is equal to or less than the allowable round trip time (step S17). Here, since the average round trip time of 1.1 seconds is equal to or less than the allowable round trip time of 2 ms (step S17; Yes), the process returns to step S14, reduces the number of servers by one, and performs steps S15 to S17 again. As described above, in the processes of steps S14 to S17, the number of servers is reduced one by one, and it is determined each time whether the average round trip time is equal to or less than the allowable round trip time. Then, the processes in steps S14 to S17 are repeated until the average round trip time exceeds the allowable round trip time (step S17; No).
図5の例では、サーバ台数が1台のときに、平均往復時間2.5m秒が許容往復時間2m秒を超える(ステップS17;No)。この場合、最小サーバ台数取得部20は、最小サーバ台数=サーバ数+1にして(ステップS18)、処理を終了する。上記図5の例の場合、最小サーバ台数取得部20は、最小サーバ台数を、許容往復時間を超えたサーバ台数1台の直前の台数2台にして、処理を終了する。
この場合、最小サーバ台数は2台で測定したトランザクション数(処理数)は1000TPSなので、最大TPSは、1000TPS×5台/2台=2500TPSとなる。このため、サーバ1台当たりが処理可能なトランザクション数は500TPSとなる。
In the example of FIG. 5, when the number of servers is one, the average round trip time of 2.5 msec exceeds the allowable round trip time of 2 msec (step S17; No). In this case, the minimum server number acquisition unit 20 sets the minimum server number = server number + 1 (step S18), and ends the process. In the case of the example of FIG. 5, the minimum number-of-servers acquiring unit 20 sets the minimum number of servers to two immediately before the number of servers exceeding the allowable round trip time, and ends the processing.
In this case, since the minimum server number is two and the number of transactions (processing number) measured is 1000 TPS, the maximum TPS is 1000 TPS × 5 units / 2 units = 2500 TPS. Therefore, the number of transactions that can be processed per server is 500 TPS.
一方で、図5の例の場合と異なり、サーバ台数が1台のときでも、平均往復時間が許容往復時間以下の場合(ステップS17;Yes)、ステップS14に戻ってサーバ数が0となって(ステップS15;Yes)、最小サーバ台数取得部20は、最小サーバ台数を1台にして(ステップS19)、処理を終了する。
この場合、最小サーバ台数は1台で測定したトランザクション数(処理数)は1000TPSなので、最大TPSは、1000TPS×5台/1台=5000TPSとなる。このため、サーバ1台当たりが処理可能なトランザクション数は1000TPSとなる。
On the other hand, unlike the example of FIG. 5, even when the number of servers is one, if the average round trip time is equal to or less than the allowable round trip time (step S17; Yes), the process returns to step S14 and the number of servers is zero. (Step S15; Yes), the minimum number-of-servers acquiring unit 20 sets the minimum number of servers to one (Step S19), and ends the process.
In this case, since the minimum number of servers is one and the number of transactions (number of processing) measured is 1000 TPS, the maximum TPS is 1000 TPS × 5/1 = 5000 TPS. Therefore, the number of transactions that can be processed per server is 1000 TPS.
このように、いったん最大トランザクション数(最大TPS)を求めておけば、後はトランザクション数(TPS)の変動に応じて、サーバ選択部40が必要なサーバ台数を決定してその台数分だけサーバを選択する。例えば、最大TPSが2500TPSで測定したTPSが1000TPSだとサーバを2台(例えば、サーバ1及び2)、測定したTPSが1100だとサーバを3台(例えば、サーバ1乃至3)、それぞれ選択することになる。
In this way, once the maximum number of transactions (maximum TPS) has been obtained, the
以上、図4の処理において、負荷分散装置100は、トランザクション数取得部10、最小サーバ台数取得部20及び最大トランザクション数取得部30の機能を備えたことにより、複数のサーバ台数から1台ずつサーバを減らして平均往復時間を測定し、その平均往復時間が所定の許容往復時間を越えたサーバ台数を特定し、その特定したサーバ台数に1台サーバ台数を加算した台数(許容往復時間を越える直前の台数)を最小サーバ台数として、最大トランザクション数を求めることができる。
このため、使用サーバ台数を決定するために必要となる最大の処理性能値を求めることができる。従って、最大の処理性能値をユーザが求める必要がない。また、選択しなかったサーバについては休止(アイドル)状態にできる。このため、ユーザの手間を省きつつ、負荷分散装置100に接続される複数のサーバの省電力化を図ることができる。
As described above, in the process of FIG. 4, the
Therefore, it is possible to obtain the maximum processing performance value required to determine the number of servers used. Therefore, there is no need for the user to obtain the maximum processing performance value. In addition, servers that have not been selected can be put into the idle state. For this reason, power saving of a plurality of servers connected to the
なお、平均往復時間取得部22は、平均往復時間を複数のサーバの台数を減らして求め、その求めた平均往復時間と基準往復時間との差である遅延時間を求めてもよい。この場合、最小サーバ台数取得部20は、遅延時間が所定の許容遅延時間を越えるサーバ台数を特定し、その特定したサーバ台数に1台サーバ台数を加算した台数を最小サーバ台数とする。
The average round trip
具体的には、まず、ステップS13において許容往復時間を算出することに代えて、最小サーバ台数取得部20は、基準往復時間から許容遅延時間(例えば、基準往復時間が1m秒の場合、その1m秒を基準として許容される遅延時間を1m秒として)算出する。次に、サーバ台数を減らした場合(4台、3台、2台など)の遅延時間(平均往復時間と基準往復時間との差)を順に求め、その都度求めた遅延時間と許容遅延時間とを比較して、遅延時間が許容遅延時間を超えたサーバ台数(例えば、1台のときの遅延時間が許容遅延時間1m秒を超える1.5m秒であれば、直前の2台)を、最小サーバ台数とする。
これにより、許容往復時間に代えて許容遅延時間を用いて、上記第1実施形態と同様の効果、すなわちユーザの手間を省きつつ、負荷分散装置100に接続される複数のサーバの省電力化を図ることができる。
Specifically, first, instead of calculating the allowable reciprocation time in step S13, the minimum number-of-servers acquiring unit 20 calculates the allowable delay time from the reference reciprocation time (for example, when the reference reciprocation time is 1 ms, 1 m Calculate the allowable delay time on the basis of seconds as 1 millisecond). Next, the delay time (difference between the average round trip time and the reference round trip time) when the number of servers is reduced (four, three, two, etc.) is sequentially determined, and the delay time and the allowable delay time determined each time The number of servers whose delay time exceeds the allowable delay time (for example, if the delay time of one is 1.5 ms, which exceeds the allowable delay of 1 Assume the number of servers.
As a result, power consumption of a plurality of servers connected to the
(第2実施形態)
次に、この発明の第2実施形態を図6乃至図8を参照しながら説明する。
第2実施形態では、負荷分散装置100′が、平均CPU使用率に基づいて最小サーバ台数を求める点が第1実施形態と異なる。そこで、この異なる点を中心に以下説明する。
なお、第2実施形態において、負荷分散装置100′のハードウェア構成は、第1実施形態の負荷分散装置100と同じである。また、負荷分散装置100′の機能については、図3に示した基準往復時間取得部21及び平均往復時間取得部22に代えて、図6に示すように平均CPU使用率取得部23を備える点が異なる。
Second Embodiment
Next, a second embodiment of the present invention will be described with reference to FIGS.
The second embodiment is different from the first embodiment in that the
In the second embodiment, the hardware configuration of the load distribution apparatus 100 'is the same as that of the
平均CPU使用率取得部23は、毎秒当たりの処理要求を応答処理する各サーバのCPU使用率から平均CPU使用率を求める。例えば、平均CPU使用率取得部23は、測定したトランザクション数が1000TPSの場合において、異なるサーバ台数(5台、4台、3台など)での平均CPU使用率を求める。
The average CPU usage
ここで、各サーバよりCPU使用率を取得する手法は任意である。例えば、各サーバに予めSNMP(Simple Network Management Protocol)エージェントと呼ばれるサーバ監視用のモジュールをインストールしておき、そのSNMPエージェントに対して負荷分散装置100′がSNMPゲットのコマンドを発行することによりCPU使用率を取得できる。
なお、別の手法により、CPU使用率を取得しても構わない。また、平均CPU使用率取得部23は、平均CPU使用率取得手段に相当する。
Here, the method of acquiring the CPU usage rate from each server is arbitrary. For example, a server monitoring module called SNMP (Simple Network Management Protocol) agent is installed in advance in each server, and the load balancer 100 'issues an SNMP get command to the SNMP agent to use the CPU. You can get the rate.
Note that the CPU usage rate may be acquired by another method. Further, the average CPU usage
次に、図7を参照しながら、第2実施形態に係る最小サーバ台数取得処理の流れについて説明する。なお、実施のタイミングは、第1実施形態と同じである。また、トランザクション数取得部10が測定して取得した、トランザクション数は1000TPSであるとする。
Next, the flow of the minimum server number acquisition process according to the second embodiment will be described with reference to FIG. The implementation timing is the same as in the first embodiment. Further, it is assumed that the number of transactions measured and acquired by the number-of-
まず、最小サーバ台数取得部20は、サーバ数をサーバ台数(5台)としてセットする(ステップS21)。次に、平均CPU使用率取得部23は、平均CPU使用率を算出する(ステップS22)。例えば、平均CPU使用率取得部23は、サーバ台数5台の平均CPU使用率を40%と算出する(図8参照)。
First, the minimum number-of-servers acquisition unit 20 sets the number of servers as the number of servers (five servers) (step S21). Next, the average CPU usage
次に、最小サーバ台数取得部20は、平均CPU使用率が上限率以下か否か判定する(ステップS23)。上限率は、予め負荷分散装置100′の管理ユーザが設定しておく。この第2実施形態では、一例として、上限率を80%として説明する。 Next, the minimum number-of-servers acquisition unit 20 determines whether the average CPU usage rate is less than or equal to the upper limit rate (step S23). The upper limit rate is set in advance by the management user of the load distribution apparatus 100 '. In the second embodiment, the upper limit rate is 80% as an example.
ここで、サーバ5台の平均CPU使用率が図8と異なる85%の場合、平均CPU使用率が上限率を超えるので(ステップS23;No)、最小サーバ台数取得部20は、最小サーバ台数=サーバ台数(5台)にして(ステップS30)、処理を終了する。全サーバで上限率を超えてしまう場合は、全サーバで対応せざるを得ないからである。この場合、全サーバ5台の最大TPSは、1000TPS(サーバ1台当たりで処理可能な処理数が200TPS)となる。 Here, if the average CPU usage rate of the five servers is 85% different from that of FIG. 8, the average CPU usage rate exceeds the upper limit rate (step S23; No), the minimum server number acquisition unit 20 is the minimum server number = The number of servers (five) is set (step S30), and the process is ended. If the upper limit rate is exceeded for all servers, it is necessary to cope with all servers. In this case, the maximum TPS of all five servers is 1000 TPS (the number of processes that can be processed per server is 200 TPS).
一方、サーバ5台の平均CPU使用率が図8の40%の場合、平均CPU使用率が上限率以下なので(ステップS23;Yes)、サーバ数を1台減らして(ステップS24)、4台とする。次に、サーバ数(4台)=0ではないので(ステップS25;No)、平均CPU使用率取得部23は、4台での平均CPU使用率を算出する(ステップS26)。次に、最小サーバ台数取得部20は、4台での平均CPU使用率が上限率以下か否か判定する(ステップS27)。
On the other hand, if the average CPU usage rate of five servers is 40% in FIG. 8, the average CPU usage rate is below the upper limit rate (step S23; Yes), the number of servers is reduced by one (step S24). Do. Next, since the number of servers (4) is not 0 (step S25; No), the average CPU usage
ここで、図8の例の場合、4台の平均CPU使用率は50%なので、平均CPU使用率50%は上限率80%以下となり(ステップS27;Yes)、ステップS24に戻る。ステップS24乃至S27は、第1実施形態のステップS14乃至S17と対応する処理であり、平均CPU使用率が上限率を超えるまで(ステップS27;No)、サーバ台数を1台ずつ減らしながらその都度、平均CPU使用率を算出して、算出した平均CPU使用率が上限率以下か否か判定する。 Here, in the case of the example of FIG. 8, since the average CPU utilization rate of four units is 50%, the upper limit rate of 50% is 50% or less (step S27; Yes), and the process returns to step S24. Steps S24 to S27 correspond to steps S14 to S17 in the first embodiment, and each time the number of servers is reduced by one until the average CPU usage rate exceeds the upper limit rate (step S27; No). The average CPU usage rate is calculated, and it is determined whether the calculated average CPU usage rate is less than or equal to the upper limit rate.
図8の例の場合、サーバ台数1台の場合のCPU使用率が85%となって、上限率80%を超えるので(ステップS27;No)、最小サーバ台数取得部20は、最小サーバ台数=サーバ数+1にして(ステップS28)、すなわち最小サーバ台数を2台にして処理を終了する。
この場合、最小サーバ台数が2台で測定したTPSが1000TPSなので、最大TPSは第1実施形態と同じ2500TPSとなる。
In the case of the example of FIG. 8, the CPU usage rate for one server is 85% and exceeds the upper limit rate 80% (step S27; No), the minimum number of servers acquiring unit 20 is the minimum number of servers = The number of servers + 1 is set (step S28), that is, the minimum number of servers is set to two, and the process is ended.
In this case, since the TPS measured when the minimum number of servers is two is 1000 TPS, the maximum TPS is the same 2500 TPS as in the first embodiment.
一方、図8の例の場合と異なりサーバ台数1台の場合のCPU使用率が75%の場合、上限率80%を超えないので(ステップS27;Yes)、ステップS24に戻ってサーバ数=0となり(ステップS25;Yes)、最小サーバ台数取得部20は、最小サーバ台数を1台にして(ステップS29)、処理を終了する。
この場合、最小サーバ台数が1台で測定したTPSが1000TPSなので、最大TPSは第1実施形態と同じ5000TPSとなる。
On the other hand, unlike the example of FIG. 8, when the CPU usage rate for one server is 75%, the upper limit rate does not exceed 80% (step S27; Yes), the process returns to step S24 and the number of servers = 0 (Step S25; Yes), the minimum server number acquisition unit 20 sets the minimum number of servers to one (step S29), and ends the process.
In this case, since the TPS measured with one minimum server is 1000 TPS, the maximum TPS is the same 5000 TPS as the first embodiment.
以上、図6乃至図8を参照しながら説明した第2実施形態においては、負荷分散装置100′が平均CPU使用率取得部23の機能を備えることにより、許容往復時間に基づいて最小サーバ台数を求める手法に代えて平均CPU使用率が上限率を超えるかに基づいて最小サーバ台数を求める。具体的には、負荷分散装置100′は、平均CPU使用率が所定の上限率を超えるサーバ台数を特定し、その特定したサーバ台数に1台サーバ台数を加算した台数を最小サーバ台数として、最大トランザクション数を求めることができる。
このため、第1実施形態と同様に最大の処理性能値を自動で求めることができることに加えて、平均CPU使用率を用いるので許容往復時間を用いる場合と比較して、最小サーバ台数を求める際より高い確度で処理性能が限界に達したと判断することができる。
As described above, in the second embodiment described with reference to FIGS. 6 to 8, the
For this reason, in addition to the ability to automatically obtain the maximum processing performance value as in the first embodiment, the average CPU usage rate is used, and therefore the minimum number of servers can be obtained as compared to the case where the allowable round trip time is used. It can be determined that the processing performance has reached the limit with higher accuracy.
以上で各実施形態の説明を終了するが、負荷分散装置100(100′)の具体的な構成や処理の内容などが上述の各実施形態で説明したものに限られないことはもちろんである。 This is the end of the description of each embodiment, but it goes without saying that the specific configuration of the load distribution apparatus 100 (100 ') and the contents of processing are not limited to those described in the above embodiments.
例えば、第1実施形態では、httpリクエストなどの処理要求の往復時間に基づいて最小サーバ台数を求めるようにしたが、これに限られない。例えば、処理要求に代えてネットワーク疎通の確認で用いられるPingを使って最小サーバ台数を求めてもよい。
具体的には、負荷分散装置100がIP(Internet Protocol)パケットを発行し各サーバに送信してから返答を受信するまでの平均往復時間を用いるようにする。この際、第1実施形態と同様に、サーバ5台のときの平均往復時間を基準として、4台、3台、2台と順に1台ずつ台数を減らして平均往復時間を求めて最小サーバ台数を求めるようにする。これにより、負荷分散装置100によるPingを用いたサーバの死活監視を流用して、最小サーバ台数を求めることができる。
For example, in the first embodiment, the minimum number of servers is obtained based on the round trip time of the processing request such as the http request, but the present invention is not limited to this. For example, the minimum number of servers may be determined using Ping used in network communication confirmation instead of the processing request.
Specifically, the average round trip time from when the
また、第1実施形態の最小サーバ台数取得処理においては、処理要求に対して各サーバから応答処理があって往復時間を求めることができることを前提として説明したが、応答がなく往復時間を求めることができない場合もある。
このような場合、負荷分散装置100に予めタイムアウトの時間を設定しておき、その時間以内に応答がなければ、最小サーバ台数取得処理を強制終了してもよい。あるいは、タイムアウトしなかった直前の台数(例えば、3台で応答があったものの2台で応答がないような場合は3台)を最小サーバ台数としてもよい。
Moreover, in the minimum server number acquisition process of the first embodiment, although it has been described on the premise that each server responds to the processing request and the round trip time can be determined, it is determined that the round trip time is not received. Sometimes you can not.
In such a case, a time-out time may be set in advance in the
また、第1及び第2実施形態では、所定の閾値(許容往復時間又は平均CPU使用率の上限率)を用いて、最小サーバ台数を求めるようにしたが、これに限られない。例えば、各サーバが処理要求に対する応答処理を所定時間以内に処理できない場合、及び各サーバが自身でCPU使用率を測定して所定の上限率を超えた場合、エラーメッセージなどのアラートを負荷分散装置100(100′)に送信してもよい。これにより、負荷分散装置100(100′)は、所定の閾値を超えるか否かにより最小サーバ台数を求めるのに代えて、受信したエラーメッセージに基づいて最小サーバ台数を求めることができるので、処理負荷を軽減することができる。 Further, in the first and second embodiments, the minimum number of servers is obtained using a predetermined threshold (the allowable round trip time or the upper limit rate of the average CPU usage rate), but the present invention is not limited to this. For example, when each server can not process the response process to the process request within a predetermined time, and when each server measures the CPU usage rate by itself and exceeds a predetermined upper limit rate, an alert such as an error message can be load-balanced. It may be sent to 100 (100 '). As a result, the load distribution apparatus 100 (100 ') can calculate the minimum number of servers based on the received error message instead of determining the minimum number of servers depending on whether the predetermined threshold is exceeded or not. The load can be reduced.
また、第1及び第2実施形態では、サーバ1台でも許容往復時間又はCPU使用率の上限率を超えない場合は、サーバ1台を最小サーバ台数としたが(ステップS19、S29参照)、これに限られない。例えば、最小サーバ台数取得処理を開始したときのトランザクション数(TPS)が非常に少ない場合、すなわち複数のクライアント200からの処理要求数が非常に少ない場合も想定される。
このような場合において、最小サーバ台数を1台とすると、後でトランザクション数が増えた場合対処できない場合もあるので、最小サーバ台数を1台にすることに代えて(ステップS19、S29の処理に代えて)、トランザクション数が増えた段階で最小サーバ台数取得処理をリスタートさせてもよい。例えば、トランザクション数が所定数になったら、リスタートすることが考えられる。
Further, in the first and second embodiments, even if only one server does not exceed the allowable round trip time or the upper limit rate of the CPU utilization, one server is set as the minimum number of servers (see steps S19 and S29). It is not limited to. For example, it is also assumed that the number of transactions (TPS) when the minimum server number acquisition process is started is very small, that is, the number of processing requests from a plurality of
In such a case, assuming that the minimum number of servers is one, it may not be possible to cope with the case where the number of transactions increases later, so instead of setting the minimum number of servers to one (Steps S19 and S29) Alternatively, the minimum server number acquisition process may be restarted when the number of transactions has increased. For example, it is conceivable to restart when the number of transactions reaches a predetermined number.
また、第1及び第2実施形態において、最小サーバ台数取得処理は、負荷分散装置100(100′)を起動した直後や複数のサーバの運用を開始した後の所定時間毎(例えば、一週間に一回)などに実施されることとしたが、これに限られない。例えば、サーバ台数が増減したタイミングで最小サーバ台数取得処理を実施してもよい。これにより、システムのマイグレーションなどサーバ台数が変わったタイミングで最大処理性能値を求め直すことができる。
また、サーバ台数が増減したタイミングに限らず、サーバの入れ替えによりサーバの性能に変更があった場合やサーバのコンテンツが変更になった場合などにも、同様に最小サーバ台数取得処理を実施してもよい。
In the first and second embodiments, the minimum number of servers acquisition process is performed every predetermined time after starting the load balancer 100 (100 ′) or after starting operation of a plurality of servers (for example, in one week) Although it was decided to be implemented once, etc., it is not limited to this. For example, the minimum server number acquisition process may be performed at the timing when the number of servers increases or decreases. As a result, it is possible to obtain the maximum processing performance value again at the timing when the number of servers has changed, such as system migration.
Also, not only when the number of servers has increased or decreased, but also when there is a change in server performance due to server replacement, or when the server content has changed, etc., the minimum number of servers is acquired similarly. It is also good.
また、第1及び第2実施形態において、各サーバの消費電力は同じであることを前提として説明したが、これに限られない。例えば、各サーバの消費電力が異なることもある。この場合、負荷分散装置100(100′)は、予めサーバ1乃至5の消費電力を記憶しておき、負荷分散先のサーバを選択する場合には、消費電力が小さいサーバを優先的に選択するとよい。このことにより、休止サーバは必然的に消費電力が高いものとなるので、省電力化を高めることができる。
また、性能対電力比が大きいサーバを優先的に選択してもよい。性能対電力比は、例えば、サーバの性能を消費電力で除した値を示す。この場合、予めサーバ1乃至5の性能対電力比を記憶しておき、負荷分散先のサーバを選択する場合には、性能対電力比が小さいサーバを優先的に選択するとよい。
In the first and second embodiments, the power consumption of each server is described to be the same, but the present invention is not limited to this. For example, the power consumption of each server may be different. In this case, when the load distribution apparatus 100 (100 ') stores the power consumption of the
Also, a server with a large performance to power ratio may be selected preferentially. The performance to power ratio indicates, for example, a value obtained by dividing the performance of the server by the power consumption. In this case, the performance to power ratios of the
また、第1及び第2実施形態において、各サーバの性能は同じであることを前提として説明したが、これに限られない。例えば、各サーバの性能が異なることもある。この場合、負荷分散装置100のサーバ選択部40が選択したサーバが2台以上の場合、その選択したサーバの性能比に応じて複数のクライアント200からの処理要求を振り分けるとよい。例えば、選択したサーバがサーバ1と2の場合、性能に応じた重み付けの比に従って処理要求をサーバ1と2に振り分けるとよい。これにより、サーバの性能を考慮して応答処理を行うことができる。
In the first and second embodiments, the description has been made on the premise that the performance of each server is the same, but the present invention is not limited to this. For example, the performance of each server may be different. In this case, when there are two or more servers selected by the
また、第1及び第2実施形態においては、負荷の指標となる測定値として、トランザクション数(TPS)を例にとって説明したが、これに限られない。例えば、負荷の指標となる測定値として、複数のクライアント200からの単位時間当たりの処理要求数を用いてもよい。この場合、負荷分散装置100(100′)は、例えば、毎秒当たりのhttpリクエスト数を測定値として取得する。そして、負荷分散装置100(100′)は、求めた最小サーバ台数と、取得したhttpリクエスト数と、に基づいて、複数のサーバが毎秒当たりにhttpリクエストを応答処理可能な最大リクエスト数を処理性能値として求める。そして、求めた最大リクエスト数と、測定したリクエスト数の変動と、に基づいて、稼動させるサーバを選択すればよい。
Further, in the first and second embodiments, the number of transactions (TPS) has been described as an example of the measurement value serving as the load index, but the present invention is not limited to this. For example, the number of processing requests per unit time from a plurality of
また、第1及び第2実施形態においては、複数のサーバ全体での最大の処理性能値を負荷分散装置100(100′)が求める場合を例にとって説明したが、これに限られない。例えば、負荷分散装置100(100′)は、最大の処理性能値(例えば、最大トランザクション数など)を自装置の外部から取得してもよい。
具体的には、自装置の外部で最小サーバ台数を求め、求めた最小サーバ台数と測定した測定値(例えば、トランザクション数)とから予め処理性能値を求めておく。そして、負荷分散装置100(100′)は、予め自装置の外部で求めておいた処理性能値を、ネットワークなどを介して受信して記憶しておく。そして、負荷分散装置100(100′)は、外部から取得した処理性能値と測定値(例えば、トランザクション数)の変動とに基づいて、動的に負荷分散先のサーバを選択する。
これにより、負荷分散装置100(100′)は、自装置で処理性能値を求めるための機能(トランザクション数取得部10、最小サーバ台数取得部20、最大トランザクション数取得部30)を備える必要がないので、処理負荷を抑えつつ、複数のサーバの省電力化を図ることができる。
Further, in the first and second embodiments, although the case where the load distribution apparatus 100 (100 ') obtains the maximum processing performance value of the plurality of servers as a whole has been described as an example, the present invention is not limited thereto. For example, the load distribution apparatus 100 (100 ′) may acquire the maximum processing performance value (for example, the maximum number of transactions, etc.) from the outside of the own apparatus.
Specifically, the minimum number of servers is obtained outside the own apparatus, and the processing performance value is obtained in advance from the calculated minimum number of servers and the measured value (for example, the number of transactions) measured. Then, the load distribution apparatus 100 (100 ') receives and stores processing performance values obtained outside the own apparatus in advance via a network or the like. Then, the load distribution apparatus 100 (100 ′) dynamically selects a load distribution destination server based on the processing performance value acquired from the outside and the fluctuation of the measured value (for example, the number of transactions).
As a result, the load distribution apparatus 100 (100 ') need not have the function (the number of
(第3実施形態)
第1実施形態の説明では、急激なトランザクション(処理要求)の増加がないことを前提にして、サーバ選択部40が複数のサーバの内の何台かにトランザクションを振り分けるかを決める説明をした。しかし、その振り分けた状態が、各サーバの処理性能値に近い場合に(処理マージンが無い場合)、さらに急激なトランザクションの増加があった場合には、応答処理が出来ないトランザクションが発生する。配分先のサーバを追加するためには所定の処理時間がかかるため、その処理時間内に取得した処理性能値を超えるトランザクションを処理できないからである。第3実施形態では、サーバ選択部40が、急激なトランザクションの増加を考慮して振分先のサーバ台数を決定する技術について説明する。
Third Embodiment
In the description of the first embodiment, it has been described that the
また、第1実施形態の説明では、サーバ選択部40が選択したサーバに対して、振分部50が、取得したトランザクションをラウンドロビン方式に従って均等に振り分ける説明をした。一般的に、急激なトランザクションの増加時に応答処理が出来ない未処理トランザクション量を減らすためには、トランザクションを各サーバに均等配分したほうが未処理トランザクションを減らすことが出来る。一方、同一性能の複数のサーバに同一量のトランザクションを振り分ける場合、トランザクションを均等に振り分けるよりもサーバに重み付け係数を付与して振り分けた方が、つまり、処理負荷が軽いサーバが出来るようにトランザクションを振り分けた方が、全体の消費電力を下げることが出来る。サーバの処理能力にマージンを持って運用する場合でも、トランザクションの振分方法を考慮することによって全体の消費電力を削減することは好ましい。第3実施形態では、この重み付け係数を付与した振分技術についても説明する。
Further, in the description of the first embodiment, the
本実施形態では、理解を容易にするために、図1に示すシステム全体のサーバ台数をサーバ1からサーバ3の3台として説明する。各サーバの処理性能値は1000TPSとする。
In the present embodiment, in order to facilitate understanding, the number of servers in the entire system shown in FIG. 1 will be described as three servers,
なお、第3実施形態において、負荷分散装置100のハードウェア構成は、第1実施形態の負荷分散装置100と同じである。また、負荷分散装置100の機能構成についても、図3に示した構成と同じである。ただし、サーバ選択部40と振分部50は、以下に説明する機能を有する。
In the third embodiment, the hardware configuration of the
まず、サーバ選択部40が、急激なトランザクション量の増加に対する処理マージンを持ったサーバ台数を選択する機能について説明する。サーバ選択部40は、最大トランザクション数取得部30(処理性値取得手段に対応する)で取得した処理性能値とトランザクション数取得部10で取得したトランザクション量(測定値に対応する)との間に処理マージンが出来るように、クライアントからのトランザクション(要求処理)を応答処理するサーバを選択する。具体的には、トランザクション数取得部10で取得したトランザクション量が、最大トランザクション数取得部30で求めた最大トランザクション量の所定の割合になると、トランザクションを振り分けるサーバ台数を1台追加する。
First, the function in which the
本実施形態では、サーバの処理性能値の50%を超えるトランザクションを取得した場合、サーバ選択部40は、サーバの選択台数を1台追加する。図9に示す例では、サーバ1とサーバ2の2台で稼働している場合、サーバ1台の処理性能値は1000TPSであるので、サーバ選択部40は、トランザクション量が2000TPSの50%である1000TPSを超えると振分先のサーバ台数を3台にする。
In the present embodiment, when a transaction exceeding 50% of the processing performance value of the server is acquired, the
次に、振分部50が、トランザクションの振分先のサーバに重み付け係数を付与し、その重み付け係数に基づいてトランザクションを振り分ける機能について説明する。重み付け係数の付与方法は他のサーバに対して処理負荷が軽いサーバが出来るように付与する。本実施形態では、トランザクション量(測定値に対応する)に応じて5段階に重み付け係数を動的に変化させて付与する。具体的には、トランザクション量が少ないほど付与する重み付け係数の比を大きくし、処理負荷が軽いサーバが出来るように重み付け係数を付与する。そして、トランザクション量の増加に伴い、重み付け係数が次第に等しくなるように動的に変化させる。急激なトランザクションの増加に対する各サーバのマージンを大きくすることと、後述するサーバ全体の消費電力の削減との調和を図るためである。
Next, a function will be described in which the
図9に示す例では、振分部50は、トランザクション量が、最大トランザクション数取得部30で求めたサーバ1台の処理性能値の10%未満の場合は、トランザクション量の10%をサーバ2に振り分け、残りのトランザクションをサーバ1に振り分ける。つまり、サーバ1とサーバ2へのトランザクション量の振分比を(9:1)とする。振分部50は、トランザクション量が最大トランザクション数の10%以上で20%未満の場合は、トランザクション量の20%をサーバ2に振り分け、残りのトランザクションをサーバ1に振り分ける。つまり、サーバ1とサーバ2へのトランザクション量の振分比を(8:2)とする。以下同様に、振分部50は、トランザクション量に応じて、サーバ1とサーバ2へのトランザクション量の振分比を(7:3)(6:4)(5:5)と動的に変化させて設定する。このように、トランザクション量(測定値に対応する)の上昇に伴って、各サーバに付与する振分比(重み付け係数の比)が次第に等しくなるようにする。
In the example illustrated in FIG. 9, when the transaction amount is less than 10% of the processing performance value of one server obtained by the maximum number of
トランザクション量が1000TPSを超えると、サーバ選択部40は、サーバ1、サーバ2、サーバ3の3台を振分先のサーバとして選択する。この場合、先に稼働している2台のサーバ処理量(50%負荷で稼働させるので、500TPS×2台=1000TPS)を取得したトランザクション量から引く。そして、その残トランザクション量がサーバ3の処理性能値の0から10%に該当する場合、3台目のサーバ3にトランザクション量の10%を配分し、残りのトランザクションをサーバ1とサーバ2に均等配分する。残トランザクション量がサーバ3の処理性能値の10%以上で20%未満の場合、3台目のサーバ3にトランザクション量の20%を配分し、残りのトランザクションをサーバ1とサーバ2に均等配分する。以下同様に、トランザクション量に応じて重み付け係数を図9に示すように付与する。
When the transaction amount exceeds 1000 TPS, the
本実施形態における重み付け係数(X:X:S)の付与方法を数式化すると、下記となる。パラメータSは、サーバ1台の処理性能値に対するトランザクション量で決まるパラメータであり、1から5の自然数である。上述したように、10%未満の場合はS=1、10%以上で20%以下の場合はS=2である。
X=(5N−S)/(N−1) ・・・式(1)
S:5段階のパラメータ
N:サーバ選択部40が選択したサーバ台数
例えば、N=2の場合、サーバ1とサーバ2の振分比は、トランザクション量によって、(9:1)(8:2)(7:3)(6:4)(5:5)と変化する。
The weighting coefficient (X: X: S) assignment method according to the present embodiment is as follows. The parameter S is a parameter determined by the transaction amount for the processing performance value of one server, and is a natural number of 1 to 5. As described above, in the case of less than 10%, S = 1, and in the case of 10% or more and 20% or less, S = 2.
X = (5N-S) / (N-1) .. Formula (1)
S: 5-step parameter
N: Number of servers selected by the
サーバに重み付け係数を付与してその重み付け係数に応じてトランザクションを振り分ける理由は、サーバ全体の消費電力を削減するためである。サーバは、サーバの負荷率が高いほど、CPUのクロック周波数を上げて処理能力を向上させるので、サーバの負荷率が高いほど消費電力が上昇する場合が多い。そのため、サーバの負荷率と消費電力との関係は、図10(a)に示すグラフのように、サーバの負荷率が軽いほど消費電力が低下する傾向がある。また、所定の負荷率(例えば、50%程度)になると、ベストエフォートで動作する領域となるので、それ以上処理負荷が重くなると消費電力の上昇率は緩やかになる傾向にある。図10(b)は、(X:S)の振分比で、同一量のトランザクションを2台のサーバに振り分けた場合の、振分比によるサーバ全体の消費電力の差を示す例である。図10(b)の「消費電力指数」の欄は、サーバの負荷率が50%時のサーバの消費電力を100とした場合の、サーバ負荷率ごとの消費電力の相対指数の例である。図10(b)の「消費電力指数の合計」の欄に示すように、同一量のトランザクションを2台のサーバに振り分ける場合、処理負荷が重いサーバと処理負荷が軽いサーバが出来るようにトランザクションの振分比を偏らせたほうが、サーバ全体の消費電力は低下する。同一量のトランザクションを3台以上のサーバに振り分ける場合も、追加稼働させたサーバの処理負荷を軽くすることにより、トランザクションを均等に振り分けた場合よりも、サーバ全体の消費電力を下げることが出来る。 The reason for assigning weighting factors to servers and distributing transactions according to the weighting factors is to reduce the power consumption of the entire server. Since the server increases the clock frequency of the CPU and improves the processing capacity as the server load factor is higher, the power consumption often increases as the server load factor is higher. Therefore, as for the relationship between the load factor of the server and the power consumption, as the load factor of the server is lighter, the power consumption tends to decrease as shown by the graph shown in FIG. In addition, when the load factor (for example, about 50%) is reached, the area operates with best effort, so the rate of increase in power consumption tends to be moderate when the processing load becomes heavier. FIG. 10B is an example showing the difference in power consumption of the entire server according to the distribution ratio when the same amount of transactions is distributed to two servers by the distribution ratio of (X: S). The column of “power consumption index” in FIG. 10B is an example of a relative index of power consumption for each server load factor when the power consumption of the server when the server load factor is 50% is 100. As shown in the column "sum of power consumption index" in FIG. 10 (b), when the same amount of transactions is distributed to two servers, the transactions are processed so that a server with a heavy processing load and a server with a light processing load can be created. If the distribution ratio is biased, the power consumption of the entire server decreases. Even when the same amount of transactions is distributed to three or more servers, the power consumption of the entire server can be reduced by reducing the processing load of the additionally operated server, as compared to the case where the transactions are evenly distributed.
例えば、300TPSで動作しているときに、トランザクション量が1200TPSに急激に増加した場合、サーバ1の1台のみで稼働していた場合、200TPSのトランザクションが未処理になってしまう。しかし、図9に示すようにサーバ1とサーバ2に(8:2)にトランザクションを振り分けて2台で稼働すると、サーバ1には960TPS、サーバ2には240TPSのトランザクションが振り分けられ、未処理のトランザクションは発生しない。さらに、上述したように、トランザクションを均等配分した場合に比べて、サーバ全体の消費電力を低減することができる。
For example, when operating at 300 TPS, if the transaction volume sharply increases to 1200 TPS, and if only one
なお、第3実施形態で説明したマージンの設け方は、上述した方法には限定されることはない。例えば、サーバの処理性能値の60%とか70%を閾値としてサーバを追加するようにしてもよい。サーバの処理性能値には、第1実施形態で説明した平均往復時間を使用してもよいし、第2実施形態で説明した平均CPU使用率を使用してもよい。また、所定のトランザクション量をマージンとして確保するように、サーバ選択部40が振分先サーバの台数を選択してもよい。
The method of providing the margin described in the third embodiment is not limited to the method described above. For example, servers may be added with a threshold of 60% or 70% of the processing performance value of the server. As the processing performance value of the server, the average round trip time described in the first embodiment may be used, or the average CPU usage rate described in the second embodiment may be used. Further, the
また、第3実施形態で説明した重み付け係数の付与方法は、第3実施形態で説明した例に限定されることはない。サーバ全体の消費電力が下がるようにトランザクションの振分比を決めるように重み付け係数を付与すればよく、トランザクション量に比例した配分に限定することも、自然数の比に限定する必要もない。 Further, the method of applying weighting coefficients described in the third embodiment is not limited to the example described in the third embodiment. A weighting factor may be assigned to determine the distribution ratio of transactions so as to reduce the power consumption of the entire server, and there is no need to limit the distribution to the proportion of transactions or limit the ratio to natural numbers.
なお、以上の説明では、測定した基準往復時間から許容往復時間を決定する説明をしたが、許容往復時間を予め決められた要求仕様として外部から取得して、フラッシュROM102もしくはRAM103に記憶しておいてもよい。
In the above description, the allowable reciprocation time is determined from the measured reference reciprocation time. However, the allowable reciprocation time is acquired from the outside as a predetermined required specification and stored in the
また、この発明の負荷分散装置100は、通常のPC等のコンピュータによっても実現することができる。
具体的には、上記各実施形態では、負荷分散装置100のプログラムが、フラッシュROM102に予め記憶されているものとして説明した。しかし、フラッシュROM102のプログラムをコンピュータにインストールして、上述の各部機能を実行することができるコンピュータを構成してもよい。なお、プログラムは、フラッシュROM102に限らず、その他のコンピュータ読み取り可能な記録媒体(例えば、フレキシブルディスク、CD−ROM(Compact Disc-Read Only Memory)、DVD(Digital Versatile Disk)及びMOディスク(Magneto Optical Disc)等)に格納してコンピュータに配布してもよいことはもちろんである。
The
Specifically, in each of the above embodiments, the program of the
また、プログラムをインターネット等の通信ネットワーク上のサーバ装置が有するディスク装置等に格納しておき、例えば、コンピュータにダウンロード等するようにしてもよい。さらに、通信ネットワークを介してプログラムを転送しながら起動実行することによっても、上述の負荷分散装置100の処理を達成することができる。
The program may be stored in a disk device or the like included in a server device on a communication network such as the Internet, and may be downloaded to a computer, for example. Furthermore, the processing of the
1乃至5 サーバ
10 トランザクション数取得部
20 最小サーバ台数取得部
21 基準往復時間取得部
22 平均往復時間取得部
23 平均CPU使用率取得部
30 最大トランザクション数取得部
40 サーバ選択部
50 振分部
100(100′) 負荷分散装置
101 CPU
102 フラッシュROM
103 RAM
104 ネットワークI/F
210、220、230 クライアント
1 to 5
102 Flash ROM
103 RAM
104 Network I / F
210, 220, 230 clients
Claims (13)
前記複数のサーバにかかる負荷の指標となる測定値を取得する測定値取得手段と、
単位時間当たりの処理要求を前記複数のサーバに転送してから、該複数のサーバより応答処理を受信するまでにかかった平均往復時間を基準往復時間として求める基準往復時間取得手段と、
前記平均往復時間を前記複数のサーバの台数を減らして求める平均往復時間取得手段と、
前記平均往復時間が前記基準往復時間から算出される所定の許容往復時間を越えるサーバ台数を特定し、該特定したサーバ台数に1台サーバ台数を加算した台数を最小サーバ台数として取得する最小サーバ台数取得手段と、
前記最小サーバ台数取得手段で求めた最小サーバ台数と、前記測定値取得手段で取得した測定値と、に基づいて、前記複数のサーバが前記単位時間当たりに前記処理要求を応答処理可能な処理性能値を求める処理性能値取得手段と、
前記処理性能値取得手段で求めた処理性能値と前記測定値の変動とに基づいて、前記複数のサーバのうち前記クライアントからの処理要求を応答処理するサーバを選択する選択手段と、
前記選択手段で選択したサーバに、前記クライアントからの処理要求を振り分ける振分手段と、
を備えたことを特徴とする負荷分散装置。 A load balancer connected to a client and a plurality of servers via a network,
Measurement value acquisition means for acquiring a measurement value that is an indicator of the load on the plurality of servers;
Reference round trip time acquiring means for obtaining an average round trip time taken to receive response processing from the plurality of servers after transferring a processing request per unit time to the plurality of servers, as a reference round trip time;
Average round trip time obtaining means for obtaining the average round trip time by reducing the number of the plurality of servers;
The minimum number of servers obtained by specifying the number of servers whose average round trip time exceeds the predetermined allowable round trip time calculated from the reference round trip time and adding the number of one server to the specified number of servers as the minimum number of servers Acquisition means,
Processing performance with which the plurality of servers can process the processing request per unit time on the basis of the minimum number of servers obtained by the minimum server number obtaining means and the measured value obtained by the measured value obtaining means Processing performance value obtaining means for obtaining a value;
Selection means for selecting a server that responds to the processing request from the client among the plurality of servers based on the processing performance value obtained by the processing performance value acquisition means and the fluctuation of the measurement value;
Distribution means for distributing the processing request from the client to the server selected by the selection means;
A load distribution apparatus characterized by comprising:
前記複数のサーバにかかる負荷の指標となる測定値を取得する測定値取得手段と、
単位時間当たりの処理要求を応答処理する各サーバのCPU使用率から平均CPU使用率を求める平均CPU使用率取得手段と、
前記平均CPU使用率が所定の上限率を超えるサーバ台数を特定し、該特定したサーバ台数に1台サーバ台数を加算した台数を最小サーバ台数として取得する最小サーバ台数取得手段と、
前記最小サーバ台数取得手段で求めた最小サーバ台数と、前記測定値取得手段で取得した測定値と、に基づいて、前記複数のサーバが前記単位時間当たりに前記処理要求を応答処理可能な処理性能値を求める処理性能値取得手段と、
前記処理性能値取得手段で求めた処理性能値と前記測定値の変動とに基づいて、前記複数のサーバのうち前記クライアントからの処理要求を応答処理するサーバを選択する選択手段と、
前記選択手段で選択したサーバに、前記クライアントからの処理要求を振り分ける振分手段と、
を備えたことを特徴とする負荷分散装置。 A load balancer connected to a client and a plurality of servers via a network,
Measurement value acquisition means for acquiring a measurement value that is an indicator of the load on the plurality of servers;
Average CPU utilization acquisition means for calculating the average CPU utilization from the CPU utilization of each server that processes response requests per unit time
A minimum number-of-servers acquisition unit that specifies the number of servers whose average CPU usage rate exceeds a predetermined upper limit rate, and adds the number of one server to the specified number of servers as the minimum number of servers;
Processing performance with which the plurality of servers can process the processing request per unit time on the basis of the minimum number of servers obtained by the minimum server number obtaining means and the measured value obtained by the measured value obtaining means Processing performance value obtaining means for obtaining a value;
Selection means for selecting a server that responds to the processing request from the client among the plurality of servers based on the processing performance value obtained by the processing performance value acquisition means and the fluctuation of the measurement value;
Distribution means for distributing the processing request from the client to the server selected by the selection means;
A load distribution apparatus characterized by comprising:
ことを特徴とする請求項1または2に記載の負荷分散装置。 The measurement value acquisition unit acquires the number of processing requests per unit time from the client as a measurement value that is an index of the load.
The load distribution device according to claim 1 or 2, characterized in that:
ことを特徴とする請求項1または2に記載の負荷分散装置。 The measurement value acquisition unit acquires, as a measurement value serving as an index of the load, the number of processes processed in response to the processing request per unit time from the client.
The load distribution device according to claim 1 or 2, characterized in that:
前記処理性能値取得手段で求めた処理性能値と前記変動する測定値との間にマージンができるように、前記複数のサーバのうち前記クライアントからの処理要求を応答処理するサーバを選択する、
ことを特徴とする請求項1乃至4の何れか一項に記載の負荷分散装置。 The selection means is
The server which responds to the processing request from the client is selected among the plurality of servers so that there is a margin between the processing performance value determined by the processing performance value acquiring means and the fluctuating measurement value.
The load distribution device according to any one of claims 1 to 4, characterized in that:
前記選択手段が前記マージンができるように選択したサーバが2台以上の場合、処理負荷が他のサーバに比べて軽いサーバを含むように、負荷分散比を示す重み付け係数を前記2台以上の各サーバに付与し、該付与した重み付け係数に基づいて前記クライアントからの処理要求を振り分ける、
ことを特徴とする請求項5に記載の負荷分散装置。 The distribution means is
When there are two or more servers selected by the selection means so as to allow the margin, each of the two or more weighting factors indicating a load distribution ratio so that the processing load includes a server lighter than other servers. Assigned to the server, and the processing request from the client is distributed based on the assigned weighting factor.
The load distribution device according to claim 5, wherein
前記各サーバに付与する重み付け係数の比を、前記測定値の変動に応じて動的に変化させ、該変化させた重み付け係数の比に基づいて前記クライアントからの処理要求を振り分ける、
ことを特徴とする請求項6に記載の負荷分散装置。 The distribution means is
The ratio of the weighting factor given to each server is dynamically changed according to the fluctuation of the measurement value, and the processing request from the client is distributed based on the changed ratio of the weighting factor.
7. The load distribution device according to claim 6, wherein:
前記測定値の上昇に伴って、前記各サーバに付与する重み付け係数の比を等しくする、
ことを特徴とする請求項7に記載の負荷分散装置。 The distribution means is
Equalize the ratio of weighting factors given to each of the servers as the measurement value increases
The load distribution device according to claim 7, characterized in that:
ことを特徴とする請求項1乃至8の何れか一項に記載の負荷分散装置。 The processing performance value acquiring unit recalculates the processing performance value when there is an increase or decrease in the number of the plurality of servers.
The load distribution device according to any one of claims 1 to 8, characterized in that:
前記複数のサーバにかかる負荷の指標となる測定値を取得する測定値取得ステップと、
単位時間当たりの処理要求を前記複数のサーバに転送してから、該複数のサーバより応答処理を受信するまでにかかった平均往復時間を基準往復時間として求める基準往復時間取得ステップと、
前記平均往復時間を前記複数のサーバの台数を減らして求める平均往復時間取得ステップと、
前記平均往復時間が前記基準往復時間から算出される所定の許容往復時間を越えるサーバ台数を特定し、該特定したサーバ台数に1台サーバ台数を加算した台数を最小サーバ台数として取得する最小サーバ台数取得ステップと、
前記最小サーバ台数取得ステップにおいて求めた最小サーバ台数と、前記測定値取得ステップにおいて取得した測定値と、に基づいて、前記複数のサーバが前記単位時間当たりに前記処理要求を応答処理可能な処理性能値を求める処理性能値取得ステップと、
前記処理性能値取得ステップにおいて求めた処理性能値と前記測定値の変動とに基づいて、前記複数のサーバのうち前記クライアントからの処理要求を応答処理するサーバを選択する選択ステップと、
前記選択ステップにおいて選択したサーバに、前記クライアントからの処理要求を振り分ける振分ステップと、
を備えたことを特徴とする負荷分散方法。 A load balancing method performed by a load balancing apparatus connected to a client and a plurality of servers via a network, comprising:
A measurement value acquisition step of acquiring a measurement value indicative of load on the plurality of servers,
A reference round trip time obtaining step of obtaining an average round trip time taken to receive response processing from the plurality of servers after transferring a processing request per unit time to the plurality of servers, as a reference round trip time;
An average round trip time acquiring step of obtaining the average round trip time by reducing the number of the plurality of servers;
The minimum number of servers obtained by specifying the number of servers whose average round trip time exceeds the predetermined allowable round trip time calculated from the reference round trip time and adding the number of one server to the specified number of servers as the minimum number of servers Acquisition step,
Processing performance with which the plurality of servers can process the processing request per unit time on the basis of the minimum number of servers obtained in the minimum server number acquiring step and the measured value acquired in the measured value acquiring step Processing performance value acquisition step for obtaining a value;
A selection step of selecting a server to which the processing request from the client is to be subjected to response processing among the plurality of servers based on the processing performance value obtained in the processing performance value acquisition step and the fluctuation of the measurement value;
A distribution step of distributing the processing request from the client to the server selected in the selection step;
And a load distribution method characterized by comprising.
前記複数のサーバにかかる負荷の指標となる測定値を取得する測定値取得ステップと、
単位時間当たりの処理要求を応答処理する各サーバのCPU使用率から平均CPU使用率を求める平均CPU使用率取得ステップと、
前記平均CPU使用率が所定の上限率を超えるサーバ台数を特定し、該特定したサーバ台数に1台サーバ台数を加算した台数を最小サーバ台数として取得する最小サーバ台数取得ステップと、
前記最小サーバ台数取得ステップにおいて求めた最小サーバ台数と、前記測定値取得ステップにおいて取得した測定値と、に基づいて、前記複数のサーバが前記単位時間当たりに前記処理要求を応答処理可能な処理性能値を求める処理性能値取得ステップと、
前記処理性能値取得ステップにおいて求めた処理性能値と前記測定値の変動とに基づいて、前記複数のサーバのうち前記クライアントからの処理要求を応答処理するサーバを選択する選択ステップと、
前記選択ステップにおいて選択したサーバに、前記クライアントからの処理要求を振り分ける振分ステップと、
を備えたことを特徴とする負荷分散方法。 A load balancing method performed by a load balancing apparatus connected to a client and a plurality of servers via a network, comprising:
A measurement value acquisition step of acquiring a measurement value indicative of load on the plurality of servers,
An average CPU utilization acquisition step of calculating an average CPU utilization from the CPU utilization of each server that processes the processing request per unit time in response;
A minimum number of servers acquiring step of specifying the number of servers having the average CPU usage rate exceeding a predetermined upper limit rate, and adding the number of one server to the number of identified servers as the minimum number of servers;
Processing performance with which the plurality of servers can process the processing request per unit time on the basis of the minimum number of servers obtained in the minimum server number acquiring step and the measured value acquired in the measured value acquiring step Processing performance value acquisition step for obtaining a value;
A selection step of selecting a server to which the processing request from the client is to be subjected to response processing among the plurality of servers based on the processing performance value obtained in the processing performance value acquisition step and the fluctuation of the measurement value;
A distribution step of distributing the processing request from the client to the server selected in the selection step;
And a load distribution method characterized by comprising.
前記複数のサーバにかかる負荷の指標となる測定値を取得する測定値取得手段、
単位時間当たりの処理要求を前記複数のサーバに転送してから、該複数のサーバより応答処理を受信するまでにかかった平均往復時間を基準往復時間として求める基準往復時間取得手段、
前記平均往復時間を前記複数のサーバの台数を減らして求める平均往復時間取得手段、
前記平均往復時間が前記基準往復時間から算出される所定の許容往復時間を越えるサーバ台数を特定し、該特定したサーバ台数に1台サーバ台数を加算した台数を最小サーバ台数として取得する最小サーバ台数取得手段、
前記最小サーバ台数取得手段で求めた最小サーバ台数と、前記測定値取得手段で取得した測定値と、に基づいて、前記複数のサーバが前記単位時間当たりに前記処理要求を応答処理可能な処理性能値を求める処理性能値取得手段、
前記処理性能値取得手段で求めた処理性能値と前記測定値の変動とに基づいて、前記複数のサーバのうち前記クライアントからの処理要求を応答処理するサーバを選択する選択手段、
前記選択手段で選択したサーバに、前記クライアントからの処理要求を振り分ける振分手段、
として機能させるためのプログラム。 A computer connected via a network to a client and multiple servers,
Measurement value acquisition means for acquiring measurement values that are indicators of the load on the plurality of servers,
Reference round trip time acquiring means for obtaining an average round trip time taken to receive response processing from the plurality of servers after transferring a processing request per unit time to the plurality of servers, as a reference round trip time;
An average round trip time acquiring unit which obtains the average round trip time by reducing the number of the plurality of servers;
The minimum number of servers obtained by specifying the number of servers whose average round trip time exceeds the predetermined allowable round trip time calculated from the reference round trip time and adding the number of one server to the specified number of servers as the minimum number of servers Acquisition means,
Processing performance with which the plurality of servers can process the processing request per unit time on the basis of the minimum number of servers obtained by the minimum server number obtaining means and the measured value obtained by the measured value obtaining means Processing performance value acquisition means for determining the value,
Selecting means for selecting a server to which the processing request from the client is to be subjected to response processing among the plurality of servers based on the processing performance value obtained by the processing performance value acquiring means and the fluctuation of the measured value;
Distribution means for distributing the processing request from the client to the server selected by the selection means;
Program to function as.
前記複数のサーバにかかる負荷の指標となる測定値を取得する測定値取得手段、
単位時間当たりの処理要求を応答処理する各サーバのCPU使用率から平均CPU使用率を求める平均CPU使用率取得手段、
前記平均CPU使用率が所定の上限率を超えるサーバ台数を特定し、該特定したサーバ台数に1台サーバ台数を加算した台数を最小サーバ台数として取得する最小サーバ台数取得手段、
前記最小サーバ台数取得手段で求めた最小サーバ台数と、前記測定値取得手段で取得した測定値と、に基づいて、前記複数のサーバが前記単位時間当たりに前記処理要求を応答処理可能な処理性能値を求める処理性能値取得手段、
前記処理性能値取得手段で求めた処理性能値と前記測定値の変動とに基づいて、前記複数のサーバのうち前記クライアントからの処理要求を応答処理するサーバを選択する選択手段、
前記選択手段で選択したサーバに、前記クライアントからの処理要求を振り分ける振分手段、
として機能させるためのプログラム。 A computer connected via a network to a client and multiple servers,
Measurement value acquisition means for acquiring measurement values that are indicators of the load on the plurality of servers,
Average CPU utilization acquisition means for calculating the average CPU utilization from the CPU utilization of each server that processes response requests per unit time
A minimum number of servers acquiring unit for specifying the number of servers having the average CPU usage rate exceeding a predetermined upper limit rate and adding the number of one server to the number of identified servers as the minimum number of servers;
Processing performance with which the plurality of servers can process the processing request per unit time on the basis of the minimum number of servers obtained by the minimum server number obtaining means and the measured value obtained by the measured value obtaining means Processing performance value acquisition means for determining the value,
Selecting means for selecting a server to which the processing request from the client is to be subjected to response processing among the plurality of servers based on the processing performance value obtained by the processing performance value acquiring means and the fluctuation of the measured value;
Distribution means for distributing the processing request from the client to the server selected by the selection means;
Program to function as.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2015106330A JP6543090B2 (en) | 2014-05-28 | 2015-05-26 | Load balancing device, load balancing method and program |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014110579 | 2014-05-28 | ||
| JP2014110579 | 2014-05-28 | ||
| JP2015106330A JP6543090B2 (en) | 2014-05-28 | 2015-05-26 | Load balancing device, load balancing method and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2016006638A JP2016006638A (en) | 2016-01-14 |
| JP6543090B2 true JP6543090B2 (en) | 2019-07-10 |
Family
ID=55225020
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2015106330A Active JP6543090B2 (en) | 2014-05-28 | 2015-05-26 | Load balancing device, load balancing method and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6543090B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6392380B2 (en) * | 2017-01-05 | 2018-09-19 | みずほ情報総研株式会社 | Service support system, service support method, and service support program |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007128382A (en) * | 2005-11-07 | 2007-05-24 | Nec Corp | Performance prediction method of cluster system and device |
| JP2011076468A (en) * | 2009-09-30 | 2011-04-14 | Nomura Research Institute Ltd | Load management device, information processing system and load management method |
| JP5843459B2 (en) * | 2011-03-30 | 2016-01-13 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | Information processing system, information processing apparatus, scaling method, program, and recording medium |
-
2015
- 2015-05-26 JP JP2015106330A patent/JP6543090B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2016006638A (en) | 2016-01-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4984169B2 (en) | Load distribution program, load distribution method, load distribution apparatus, and system including the same | |
| KR100589831B1 (en) | Load balancing of servers in a cluster | |
| CN109218355B (en) | Load balancing engine, client, distributed computing system and load balancing method | |
| US9154549B2 (en) | Dynamic server farms | |
| US8103774B2 (en) | System and method for load-balancing in a resource infrastructure running application programs | |
| JP2010204876A (en) | Distributed system | |
| US10397131B2 (en) | Method and system for determining bandwidth demand | |
| JP5244717B2 (en) | Load allocation control method and load distribution system | |
| JP2006511137A5 (en) | ||
| JP2012099062A (en) | Service cooperation system and information processing system | |
| JP2015011365A (en) | Provisioning device, system, provisioning method, and provisioning program | |
| JP2005182641A (en) | Dynamic load balancing system and dynamic load balancing method | |
| KR101448413B1 (en) | Method and apparatus for scheduling communication traffic in atca-based equipment | |
| CN102217247A (en) | Method, apparatus and system for implementing multiple web application requests scheduling | |
| US10171572B2 (en) | Server pool management | |
| JP2005092862A (en) | Load balancing method and client / server system | |
| JP6543090B2 (en) | Load balancing device, load balancing method and program | |
| CN111385328B (en) | Business request processing method, system and electronic device | |
| KR20160025926A (en) | Apparatus and method for balancing load to virtual application server | |
| CN114489463A (en) | Method and device for dynamically adjusting QOS (quality of service) of storage volume and computing equipment | |
| CN102984079A (en) | Controlling method and system for load balancing | |
| CN114726860B (en) | A load balancing system and load balancing method for streaming media transmission | |
| TWI591487B (en) | The system automatically expands the method | |
| CN108243225B (en) | A distributed system, management method and access method | |
| JP2008059040A (en) | Load control system and method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180305 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20181105 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190108 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190307 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190319 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190510 |
|
| 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: 20190528 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190614 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6543090 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |