JP2019071564A - Load balancer, load balancing system, and load balancing program - Google Patents
Load balancer, load balancing system, and load balancing program Download PDFInfo
- Publication number
- JP2019071564A JP2019071564A JP2017197037A JP2017197037A JP2019071564A JP 2019071564 A JP2019071564 A JP 2019071564A JP 2017197037 A JP2017197037 A JP 2017197037A JP 2017197037 A JP2017197037 A JP 2017197037A JP 2019071564 A JP2019071564 A JP 2019071564A
- Authority
- JP
- Japan
- Prior art keywords
- packet
- dispatcher
- distribution
- balancer
- upstream
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
【課題】仮想パケット振り分け装置間のデータのコピーを減らして性能劣化を防ぐ。【解決手段】物理サーバは、複数の仮想マシン2−0〜2−5と、仮想マシン2−0〜2−5にパケットを振り分けると共に相互にパケットを渡すディスパッチャ3−0〜3−2と、仮想マシン2のうちいずれかに送信する上りパケットを、バランサ振分テーブル51に基づいてディスパッチャ3−0〜3−2のいずれかに振り分けると共に、この上りパケットへの応答である下りパケットが所定割合を超えて異なるディスパッチャ3から中継されてきたとき、バランサ振分テーブル51を修正するバランサ4とを備える。【選択図】図2PROBLEM TO BE SOLVED: To prevent performance deterioration by reducing data copying between virtual packet distribution devices. A physical server has a plurality of virtual machines 2-0 to 2-5, and a dispatcher 3-0 to 3-2 that distributes packets to virtual machines 2-0 to 2-5 and passes packets to each other. The uplink packet to be transmitted to any of the virtual machines 2 is distributed to any of the dispatchers 3 to 3-2 based on the balancer distribution table 51, and the downlink packet which is a response to this uplink packet is a predetermined ratio. It is provided with a balancer 4 that modifies the balancer distribution table 51 when relayed from different dispatchers 3 beyond the above. [Selection diagram] Fig. 2
Description
本発明は、仮想化環境下において複数の仮想マシンに対して負荷の振り分けを行う負荷分散装置、負荷分散システム、および負荷分散プログラムに関する。 The present invention relates to a load distribution apparatus, load distribution system, and load distribution program for distributing loads to a plurality of virtual machines in a virtualized environment.
物理サーバ上の仮想マシン間を高速に接続する技術として、ソフトウェアで実現された仮想パッチパネル技術や仮想スイッチ技術が存在する(非特許文献1)。これら仮想パケット振り分け技術では、宛先IPアドレス等の識別子に基づき、仮想マシンへの振り分けを行う。 As a technology for connecting virtual machines on a physical server at high speed, there are a virtual patch panel technology and a virtual switch technology implemented by software (Non-Patent Document 1). In these virtual packet distribution techniques, distribution to virtual machines is performed based on an identifier such as a destination IP address.
図20は、比較例の物理サーバを示す概念図である。
物理サーバ1Aは、負荷分散装置の一例を含んでおり、ネットワークNを介してクライアント端末6a〜6cに接続されている。
FIG. 20 is a conceptual diagram showing a physical server of a comparative example.
The physical server 1A includes an example of a load distribution device, and is connected to the
この物理サーバ1Aには、仮想マシン2−0〜2−2が具現化され、更にディスパッチャ3を含んだ仮想パケット振り分け装置7が具現化されている。仮想マシン2−0には、IPアドレスaが払い出されている。仮想マシン2−1には、IPアドレスbが払い出されている。仮想マシン2−2には、IPアドレスcが払い出されている。
In the physical server 1A, virtual machines 2-0 to 2-2 are embodied, and a virtual
なお、図面では各仮想マシン2のことを“VM”(Virtual Machine)と省略して記載している。この仮想パケット振り分け装置7は、例えば上りパケットの送信先IPアドレスを元に、この上りパケットを仮想マシン2−0〜2−2のうちいずれかに振り分ける。ここではクライアント端末6aが送信するパケットは、仮想マシン2−0に振り分けられる。クライアント端末6bが送信するパケットは、仮想マシン2−1に振り分けられる。クライアント端末6cが送信するパケットは、仮想マシン2−2に振り分けられる。
In the drawings, each
仮想マシンへの接続を行う仮想パケット振り分け装置を性能向上する際には、仮想パケット振り分け装置をスケールアウトさせる方法がある。その際、物理サーバが備える複数のCPUコア(不図示)を利用して並列化を行い、個々の仮想パケット振り分け装置への負荷分散を行うことが考えられる。これをバランサ−ディスパッチャ構成という。 In order to improve the performance of a virtual packet distribution device connected to a virtual machine, there is a method of scaling out the virtual packet distribution device. At that time, parallelization may be performed using a plurality of CPU cores (not shown) provided in the physical server, and load distribution to each of the virtual packet distribution devices may be performed. This is called a balancer-dispatcher configuration.
バランサは、ラウンドロビンなどのように、ボトルネックにならない単純なロジックとする必要がある。ここでは仮想マシンのインタフェースを変更させないために、仮想マシンを複数のディスパッチャに接続することは考慮しない。このとき、負荷分散により特定のディスパッチャに振り分けられたパケットは、このディスパッチャに直接に接続されている仮想マシンに宛先が無い場合、別のディスパッチャに振り分けられる。このディスパッチャ間転送に付随するデータのコピー処理がオーバヘッドとなり、負荷分散装置の性能劣化を招くおそれがある。 The balancer should be simple logic that does not become a bottleneck, such as round robin. Here, in order not to change the interface of the virtual machine, it is not considered to connect the virtual machine to multiple dispatchers. At this time, packets distributed to a specific dispatcher by load distribution are distributed to another dispatcher if there is no destination in the virtual machine directly connected to this dispatcher. The data copying process accompanying the inter-dispatcher transfer may be overhead, which may lead to performance degradation of the load distribution apparatus.
そこで、本発明は、負荷分散装置、負荷分散システム、および負荷分散プログラムにおいて、仮想パケット振り分け装置間のデータのコピーを減らして性能劣化を防ぐことを課題とする。 Therefore, the present invention has an object of preventing performance degradation by reducing data copying between virtual packet distribution devices in a load distribution device, a load distribution system, and a load distribution program.
前記した課題を解決するため、請求項1に記載の発明では、複数の仮想マシンと、前記複数の仮想マシンにパケットを振り分けると共に相互にパケットを渡す複数のディスパッチャと、前記仮想マシンのうちのいずれかに送信する上りパケットを、振分テーブルに基づいて前記複数のディスパッチャのいずれかに振り分けると共に、前記上りパケットへの応答である下りパケットが所定割合を超えて異なるディスパッチャから中継されてきたとき、前記振分テーブルを修正するバランサと、を備えることを特徴とする負荷分散装置とした。
In order to solve the above-mentioned problems, in the invention according to
このようにすることで、仮想パケット振り分け装置間のデータのコピーを減らして性能劣化を防ぐことができる。 By doing this, it is possible to reduce the data copy between the virtual packet distribution devices and prevent the performance deterioration.
請求項2に記載の発明では、前記バランサは、上りパケットに固有の識別子のハッシュ値と前記振分テーブルとに基づいて前記上りパケットを振り分けるディスパッチャを特定し、下りパケットに固有の識別子のハッシュ値と前記振分テーブルに基づいて、前記下りパケットに対応する上りパケットを振り分けたディスパッチャを特定する、ことを特徴とする請求項1に記載の負荷分散装置とした。
In the invention according to
このようにすることで、下りパケットに対応する上りパケットを振り分けたディスパッチャを特定することができる。よって、ディスパッチャ跨ぎによる性能劣化が発生していることを容易に検知できる。 By doing this, it is possible to specify the dispatcher that has distributed the upstream packet corresponding to the downstream packet. Therefore, it can be easily detected that the performance degradation due to the crossing of dispatchers is occurring.
請求項3に記載の発明では、前記バランサは、所定のハッシュ値の上りパケットへの応答である下りパケットを最も多く送信したディスパッチャを特定し、特定した当該ディスパッチャに前記所定のハッシュ値の上りパケットを振り分けるように前記振分テーブルを修正する、ことを特徴とする請求項2に記載の負荷分散装置とした。
In the invention according to
このようにすることで、ディスパッチャ跨ぎによる性能劣化を抑えることができる。 By doing this, it is possible to suppress the performance degradation due to the crossing of dispatchers.
請求項4に記載の発明では、前記バランサは、所定のハッシュ値の上りパケットへの応答である下りパケットを送信した割合と、ディスパッチャ間の転送効率とによって、前記上りパケットの送信先のディスパッチャごとの振分効率を算出して、前記振分効率を最大化するディスパッチャを特定し、特定した当該ディスパッチャに前記所定のハッシュ値の上りパケットを振り分けるように前記振分テーブルを修正する、ことを特徴とする請求項2に記載の負荷分散装置とした。
In the invention according to
このようにすることで、ディスパッチャ間の転送効率を考慮して、より正確にディスパッチャ跨ぎによる性能劣化を抑えることができる。 In this way, it is possible to more accurately suppress the performance degradation due to the crossing of dispatchers in consideration of the transfer efficiency between dispatchers.
請求項5に記載の発明では、前記固有の識別子は、前記上りパケットの送信先情報および前記下りパケットの送信元情報である、ことを特徴とする請求項2に記載の負荷分散装置とした。
The invention according to
このようにすることで、バランサは、負荷分散処理を高速に行うことができる。 By doing this, the balancer can perform load distribution processing at high speed.
請求項6に記載の発明では、前記バランサは、前記固有の識別子からハッシュ値を計算するハッシュ関数による全体の振分効率が所定の閾値以下ならば、更に振分効率のよいハッシュ関数に変更する、ことを特徴とする請求項2に記載の負荷分散装置とした。
In the invention according to
このようにすることで、本発明によれば、ハッシュ値の重複による振分効率の低下を回避することができる。 By doing so, according to the present invention, it is possible to avoid a decrease in distribution efficiency due to duplication of hash values.
請求項7に記載の発明では、複数の仮想マシンと、前記複数の仮想マシンにパケットを振り分けると共に相互にパケットを渡す複数のディスパッチャと、前記仮想マシンのうちのいずれかに送信する上りパケットを、振分テーブルに基づいて前記複数のディスパッチャのいずれかに振り分けると共に、前記上りパケットへの応答である下りパケットが所定割合を超えて異なるディスパッチャから中継されてきたとき、前記振分テーブルを修正するバランサと、を備えることを特徴とする負荷分散システムとした。
In the invention according to
このようにすることで、仮想パケット振り分け装置間のデータのコピーを減らして性能劣化を防ぐことができる。 By doing this, it is possible to reduce the data copy between the virtual packet distribution devices and prevent the performance deterioration.
請求項8に記載の発明では、複数の仮想マシンと、前記複数の仮想マシンにパケットを振り分けると共に相互にパケットを渡す複数のディスパッチャとが具現化されたコンピュータを、前記仮想マシンのうちのいずれかに送信する上りパケットを、振分テーブルに基づいて前記複数のディスパッチャのいずれかに振り分ける負荷分散手段、前記上りパケットへの応答である下りパケットが所定割合を超えて異なるディスパッチャから中継されてきたとき、前記振分テーブルを修正するテーブル変更手段、として機能させるための負荷分散プログラムとした。 In the invention according to claim 8, a computer in which a plurality of virtual machines and a plurality of dispatchers for distributing packets to the plurality of virtual machines and delivering the packets to each other is embodied as any one of the virtual machines. Load distribution means for distributing an upstream packet to be transmitted to one of the plurality of dispatchers based on a distribution table, and when a downstream packet as a response to the upstream packet is relayed from different dispatchers exceeding a predetermined ratio And a load distribution program for functioning as table changing means for correcting the distribution table.
このようにすることで、仮想パケット振り分け装置間のデータのコピーを減らして性能劣化を防ぐことができる。 By doing this, it is possible to reduce the data copy between the virtual packet distribution devices and prevent the performance deterioration.
本発明によれば、仮想パケット振り分け装置間のデータのコピーを減らして性能劣化を防ぐことが可能となる。 According to the present invention, it is possible to reduce the copying of data between virtual packet distribution devices and prevent performance deterioration.
以降、比較例と本発明を実施するための形態を、各図と各数式を参照して詳細に説明する。
《比較例》
図21は、比較例の物理サーバ1Bの内部構成とパケットの流れを示す図である。
バランサ4は、上りパケットのためにパケット受信部41と上りハッシュ部42と負荷分散部43とバランサ振分テーブル51(図22参照)を備え、下りパケットのためにパケット集約部46とパケット送信部48とを備える。
Hereinafter, the comparative example and the mode for carrying out the present invention will be described in detail with reference to the respective drawings and the respective formulas.
Comparative Example
FIG. 21 is a diagram showing the internal configuration of the
The
パケット受信部41は、クライアント端末6からのパケットを受信する。上りハッシュ部42は、受信したパケットに対しハッシュ計算を行い、ハッシュ値を算出する。負荷分散部43は、ハッシュ値とバランサ振分テーブル51によって送信先のディスパッチャ3を特定し、特定したディスパッチャ3に対してパケットを送信する。
パケット集約部46は、各ディスパッチャ3からのパケットを集約する。パケット送信部48は、下りパケットをクライアント端末6に送信する。
The
The
ディスパッチャ3−0は、上りパケットのためにパケット受信部31と振分部32とディスパッチャ振分テーブル35−0(図23参照)とを備え、下りパケットのためにパケット集約部33とパケット送信部34とを備える。ディスパッチャ3−1は、ディスパッチャ振分テーブル35−1(図24参照)を備え、ディスパッチャ3−0と同様に構成されている。ディスパッチャ3−2は、ディスパッチャ振分テーブル35−2(図25参照)を備え、ディスパッチャ3−0と同様に構成されている。
The dispatcher 3-0 includes the
パケット受信部31は、バランサ4または他のディスパッチャ3−1,3−2から上りパケットを受信する。振分部32は、ディスパッチャ振分テーブル35−0(図23参照)を参照して、目的の仮想マシン2−0,2−1またはディスパッチャ3−1,3−2に上りパケットを送信する。
パケット集約部33は、仮想マシン2−0,2−1から受信した下りパケットを集約する。パケット送信部34は、集約した下りパケットをバランサ4に送信する。
The
The
仮想マシン2−0は、パケット受信部21とパケット処理部22とパケット送信部23とを備える。他の仮想マシン2−1〜2−5も、仮想マシン2−0と同様に構成されている。仮想マシン2−0,2−1はディスパッチャ3−0に接続されている。仮想マシン2−0には、IPアドレスaが払い出されている。仮想マシン2−1には、IPアドレスbが払い出されている。
The virtual machine 2-0 includes a
仮想マシン2−2,2−3はディスパッチャ3−1に接続されている。仮想マシン2−2には、IPアドレスcが払い出されている。仮想マシン2−3には、IPアドレスdが払い出されている。
仮想マシン2−4,2−5はディスパッチャ3−2に接続されている。仮想マシン2−4には、IPアドレスeが払い出されている。仮想マシン2−5には、IPアドレスfが払い出されている。
The virtual machines 2-2 and 2-3 are connected to the dispatcher 3-1. An IP address c is distributed to the virtual machine 2-2. An IP address d is assigned to the virtual machine 2-3.
The virtual machines 2-4 and 2-5 are connected to the dispatcher 3-2. An IP address e is distributed to the virtual machine 2-4. An IP address f is assigned to the virtual machine 2-5.
パケット受信部21は、ディスパッチャ3−0から上りパケットを受信する。パケット処理部22は、この仮想マシン2−0のロジックに基づき上りパケットを処理し、下りパケットを生成する。パケット送信部23は、下りパケットを自身が接続されているディスパッチャ3−0に送信する。
The
図22は、バランサ振分テーブル51を示す図である。
バランサ振分テーブル51は、ハッシュ値欄と送信先欄とを含んで構成される。
ハッシュ値欄は、上りパケットの識別子のハッシュ値に対応している。送信先欄のD0〜D2は、ハッシュ値に対応する送信先のディスパッチャ3−0〜3−2を示している。負荷分散部43は、上りパケットの識別子のハッシュ値とバランサ振分テーブル51に基づいて送信先のディスパッチャ3を特定する。
FIG. 22 shows the balancer distribution table 51. As shown in FIG.
The balancer distribution table 51 is configured to include a hash value field and a transmission destination field.
The hash value column corresponds to the hash value of the identifier of the upstream packet. D0 to D2 in the transmission destination column indicate dispatchers 3-0 to 3-2 of the transmission destination corresponding to the hash value. The
図23は、ディスパッチャ3−0が備えるディスパッチャ振分テーブル35−0を示す図である。
ディスパッチャ振分テーブル35−0は、識別子欄と送信先欄とを含んで構成される。
識別子欄は、上りパケットの識別子に対応している。送信先欄のV0,V1は、この識別子に対応する送信先の仮想マシン2−0,2−1を示している。送信先欄のD1,D2は、この識別子に対応する転送先のディスパッチャ3−1,3−2を示している。
FIG. 23 is a diagram showing the dispatcher distribution table 35-0 included in the dispatcher 3-0.
The dispatcher distribution table 35-0 is configured to include an identifier field and a transmission destination field.
The identifier column corresponds to the identifier of the upstream packet. V0 and V1 of the transmission destination column indicate virtual machines 2-0 and 2-1 of the transmission destination corresponding to this identifier. D1 and D2 of the destination column indicate dispatchers 3-1 and 3-2 of the transfer destination corresponding to this identifier.
振分部32は、このディスパッチャ振分テーブル35−0と上りパケットの識別子に基づいて、目的の仮想マシン2−0,2−1またはディスパッチャ3−1,3−2を特定する。更に振分部32は、目的の仮想マシン2−0,2−1またはディスパッチャ3−1,3−2に上りパケットを送信する。
The
図24は、ディスパッチャ3−1が備えるディスパッチャ振分テーブル35−1を示す図である。
ディスパッチャ振分テーブル35−1は、識別子欄と送信先欄とを含んで構成される。
識別子欄は、上りパケットの識別子に対応している。送信先欄のV2,V3は、この識別子に対応する送信先の仮想マシン2−2,2−3を示している。送信先欄のD0,D2は、この識別子に対応する転送先のディスパッチャ3−0,3−2を示している。
FIG. 24 is a diagram showing the dispatcher distribution table 35-1 provided in the dispatcher 3-1.
The dispatcher distribution table 35-1 is configured to include an identifier field and a transmission destination field.
The identifier column corresponds to the identifier of the upstream packet. V2 and V3 in the transmission destination column indicate virtual machines 2-2 and 2-3 of the transmission destination corresponding to this identifier. D0 and D2 of the transmission destination column indicate dispatchers 3-0 and 3-2 of the transfer destination corresponding to this identifier.
振分部32は、このディスパッチャ振分テーブル35−1と上りパケットの識別子に基づいて、目的の仮想マシン2−2,2−3またはディスパッチャ3−0,3−2を特定する。更に振分部32は、目的の仮想マシン2−2,2−3またはディスパッチャ3−0,3−2に上りパケットを送信する。
The
図25は、ディスパッチャ3−2が備えるディスパッチャ振分テーブル35−2を示す図である。
ディスパッチャ振分テーブル35−2は、識別子欄と送信先欄とを含んで構成される。
識別子欄は、上りパケットの識別子に対応している。送信先欄のV4,V5は、この識別子に対応する送信先の仮想マシン2−4,2−5を示している。送信先欄のD0,D1は、この識別子に対応する転送先のディスパッチャ3−0,3−1を示している。
FIG. 25 is a diagram showing a dispatcher distribution table 35-2 provided in the dispatcher 3-2.
The dispatcher distribution table 35-2 is configured to include an identifier field and a transmission destination field.
The identifier column corresponds to the identifier of the upstream packet. V4 and V5 in the transmission destination column indicate virtual machines 2-4 and 2-5 of the transmission destination corresponding to this identifier. D0 and D1 in the destination column indicate dispatchers 3-0 and 3-1 of the transfer destination corresponding to this identifier.
振分部32は、このディスパッチャ振分テーブル35−2と上りパケットの識別子に基づいて、目的の仮想マシン2−4,2−5またはディスパッチャ3−0,3−1を特定する。更に振分部32は、目的の仮想マシン2−4,2−5またはディスパッチャ3−0,3−1に上りパケットを送信する。
The
これらディスパッチャ振分テーブル35−0〜35−2を全体として見ると、識別子aの上りパケットは仮想マシン2−0に送信される。識別子bの上りパケットは仮想マシン2−1に送信される。識別子cの上りパケットは仮想マシン2−2に送信される。識別子dの上りパケットは仮想マシン2−3に送信される。識別子eの上りパケットは仮想マシン2−4に送信される。識別子fの上りパケットは仮想マシン2−5に送信される。 Looking at the dispatcher distribution tables 35-0 to 35-2 as a whole, the upstream packet of the identifier a is transmitted to the virtual machine 2-0. The upstream packet of the identifier b is transmitted to the virtual machine 2-1. The upstream packet of the identifier c is transmitted to the virtual machine 2-2. The upstream packet of the identifier d is transmitted to the virtual machine 2-3. The upstream packet of the identifier e is transmitted to the virtual machine 2-4. The upstream packet of the identifier f is transmitted to the virtual machine 2-5.
図26は、比較例における物理サーバ1B上の負荷分散システムによる振分動作を示す図である。
この物理サーバ1Bには、仮想マシン2−0〜2−5が具現化され、更にディスパッチャ3−0〜3−2とバランサ4とが具現化されている。以下、各仮想マシン2−0〜2−5を区別しないときには、単に仮想マシン2と記載する。ディスパッチャ3−0〜3−2を区別しないときには、単にディスパッチャ3と記載する。ディスパッチャ3−0は、NUMA(Non-Uniform Memory Access)ノード71上に具現化されている。ディスパッチャ3−1,3−2は、NUMAノード72上に具現化されている。バランサ4が備える上りハッシュ55は、上りパケットの識別子から算出したハッシュ値である。
FIG. 26 is a diagram showing the distribution operation by the load distribution system on the
In the
負荷分散先をランダムに決定してしまうと、NUMA構成等でキャッシュ共有が困難な場合にディスパッチャ3間のデータのコピーに伴う性能劣化が懸念される。そのためバランサ4は、なるべく上りパケットの宛先である仮想マシン2が直接に接続されたディスパッチャ3に対して、この上りパケットを送る必要がある。ここでバランサ4は、上りパケットの識別子から算出したハッシュ値により、ディスパッチャ3を選択している。
If the load distribution destination is randomly determined, there is a concern that the performance may be degraded due to copying of data between the
バランサ4は、識別子aの上りパケットと識別子cの上りパケットをディスパッチャ3−0に振り分けている。ディスパッチャ3−0は、識別子aの上りパケットを仮想マシン2−0に振り分け、識別子cの上りパケットをディスパッチャ3−1に振り分ける。その後、ディスパッチャ3−1は、識別子cの上りパケットを仮想マシン2−2に振り分ける。このとき、識別子cの上りパケットは、ディスパッチャ3−0とディスパッチャ3−1を跨いでいる。このように、異なるNUMAノード71,72を跨いでいるため、所定のオーバヘッドが発生し、負荷分散装置の性能劣化を招くおそれがある。
The
なお、同様のオーバヘッドは、識別子d〜fの上りパケットをディスパッチャ3−0に振り分けた場合と、識別子a,bの上りパケットをディスパッチャ3−1,3−2に振り分けた場合に発生する。このとき、上りパケットは異なるNUMAノード71,72を跨いで送信される。
The same overhead occurs when the upstream packets of the identifiers d to f are distributed to the dispatcher 3-0 and when the upstream packets of the identifiers a and b are distributed to the dispatchers 3-1 and 3-2. At this time, uplink packets are transmitted across
バランサ4が識別子c,dの上りパケットをディスパッチャ3−2に振り分けた場合と、識別子e,fの上りパケットをディスパッチャ3−1に振り分けた場合にも所定のオーバヘッドが発生する。しかし、同じNUMAノード72に属するディスパッチャ3−1,3−2間の送信であるため、異なるNUMAノード71,72を跨ぐ送信よりもオーバヘッドは少ない。
A predetermined overhead occurs also when the
バランサ4が識別子a,bの上りパケットをディスパッチャ3−0に振り分けた場合には、ディスパッチャ3の跨ぎは発生せず、オーバヘッドが発生しない。同様に、識別子c,dの上りパケットをディスパッチャ3−1に振り分けた場合と、識別子e,fの上りパケットをディスパッチャ3−2に振り分けた場合には、ディスパッチャ3の跨ぎは発生せず、オーバヘッドが発生しない。
When the
《本実施形態》
図1は、本実施形態の物理サーバ1を示す構成図である。
サービスを享受するクライアント端末6と、サービスを提供する物理サーバ1とは、インターネット92と社内ネットワーク91を介して接続されている。この物理サーバ1のCPU(不図示)は、負荷分散プログラム(不図示)を実行することによって、図1の各部を具現化する。物理サーバ1は、負荷分散装置の一例であるディスパッチャ3−0〜3−2とバランサ4とを含んでいる。
<< this embodiment >>
FIG. 1 is a block diagram showing the
The
物理サーバ1内には、不図示のハイパーバイザによって複数の仮想マシン2−0〜2−5が具現化されている。仮想マシン2−0,2−1は、ディスパッチャ3−0に接続されている。仮想マシン2−0には、IPアドレスaが払い出されている。仮想マシン2−1には、IPアドレスbが払い出されている。クライアント端末6は、送信先アドレスをaとするパケットを送信することにより、仮想マシン2−0のサービスを享受する。クライアント端末6は、送信先アドレスをbとするパケットを送信することにより、仮想マシン2−1のサービスを享受する。
In the
仮想マシン2−2,2−3は、ディスパッチャ3−1に接続されている。仮想マシン2−2には、IPアドレスcが払い出されている。仮想マシン2−3には、IPアドレスdが払い出されている。クライアント端末6は、送信先アドレスをcとするパケットを送信することにより、仮想マシン2−2のサービスを享受する。クライアント端末6は、送信先アドレスをdとするパケットを送信することにより、仮想マシン2−3のサービスを享受する。
The virtual machines 2-2 and 2-3 are connected to the dispatcher 3-1. An IP address c is distributed to the virtual machine 2-2. An IP address d is assigned to the virtual machine 2-3. The
仮想マシン2−4,2−5は、ディスパッチャ3−2に接続されている。仮想マシン2−4には、IPアドレスeが払い出されている。仮想マシン2−5には、IPアドレスfが払い出されている。クライアント端末6は、送信先アドレスをeとするパケットを送信することにより、仮想マシン2−4のサービスを享受する。クライアント端末6は、送信先アドレスをfとするパケットを送信することにより、仮想マシン2−5のサービスを享受する。
The virtual machines 2-4 and 2-5 are connected to the dispatcher 3-2. An IP address e is distributed to the virtual machine 2-4. An IP address f is assigned to the virtual machine 2-5. The
ディスパッチャ3−0〜3−2は、クライアント端末6が送信した上りパケットを仮想マシン2−0〜2−5のいずれかに振り分けると共に、この上りパケットを相互に受け渡す。ディスパッチャ3−0〜3−2同士は互いに接続され、どのディスパッチャ3からも目的の仮想マシン2に上りパケットを送信することが可能である。ディスパッチャ3−0は、NUMAノード71上に具現化されている。ディスパッチャ3−1,3−2は、NUMAノード72上に具現化されている。更にディスパッチャ3−0〜3−2は、バランサ4に接続されている。
The dispatchers 3-0-2 distribute the upstream packets transmitted by the
バランサ4は、仮想マシン2−0〜2−5のうちいずれかに送信する上りパケットを、バランサ振分テーブル51(図5参照)に基づいてディスパッチャ3−0〜3−2のいずれかに振り分ける。バランサ4は、所定のハッシュ値の上りパケットへの応答である下りパケットを送信した割合と、ディスパッチャ3間の転送効率の情報によって、この上りパケットの送信先のディスパッチャ3ごとの振分効率を算出して、この振分効率を最大化するディスパッチャ3を特定し、特定したディスパッチャ3に所定のハッシュ値の上りパケットを振り分けるようにバランサ振分テーブル51を修正する。具体的にいうとバランサ4は、上りパケットへの応答である下りパケットが所定割合を超えて異なるディスパッチャ3から中継されてきたときに、バランサ振分テーブル51を修正するとよい。これによりバランサ4は、パケットの振分効率の低下を抑止することができる。
The
図2は、物理サーバ1(負荷分散装置)の構成とパケットの流れを示す図である。
バランサ4は、上りパケットのためにパケット受信部41と上りハッシュ部42と負荷分散部43とバランサ振分テーブル51(図5参照)とを備える。
FIG. 2 is a diagram showing the configuration of the physical server 1 (load distribution device) and the flow of packets.
The
バランサ4は、ハッシュ関数を決定するためにパラメータリスト54(図10参照)とハッシュ決定部44とを備える。ハッシュ決定部44が決定したハッシュ関数は、上りハッシュ部42と下りハッシュ部47とが使用する。バランサ4は、このバランサ振分テーブル51を修正するためにテーブル変更部45とディスパッチャテーブル52(図11参照)と統計テーブル53(図9参照)とを備える。更にバランサ4は、下りパケットのためにパケット集約部46と下りハッシュ部47とパケット送信部48とを備える。
The
パケット受信部41は、クライアント端末6からの上りパケットを受信する。上りハッシュ部42は、受信した上りパケットに対しハッシュ計算を行う。負荷分散部43は、ハッシュ値とバランサ振分テーブル51とによって送信先のディスパッチャ3を特定し、特定したディスパッチャ3に対して上りパケットを送信する。これによりバランサ4は、上りパケットに固有の識別子のハッシュ値とバランサ振分テーブル51とに基づいて、この上りパケットを振り分けるディスパッチャ3を特定する。
The
ハッシュ決定部44は、パラメータリスト54を参照しつつハッシュ関数を決定する。パラメータリスト54は、各パラメータにおけるハッシュ関数の振り分け効率を記録するためのリストである。これによりバランサ4は、固有の識別子からハッシュ値を計算するハッシュ関数による全体の振分効率が閾値以下ならば、更に振分効率のよいハッシュ関数に変更することができる。
The hash determination unit 44 determines a hash function while referring to the
テーブル変更部45は、統計テーブル53を元に、ハッシュ値に対する送信先のディスパッチャ3を変更するためにバランサ振分テーブル51を修正する。バランサ4は、バランサ振分テーブル51が所定のハッシュ値の上りパケットをディスパッチャ3−0に振り分けるように設定されている。例えば、この上りパケットへの応答である下りパケットがディスパッチャ3−1から統計的に最も多く送信されたとき、バランサ4は、所定のハッシュ値の上りパケットをディスパッチャ3−1に振り分けるようにバランサ振分テーブル51を修正する。これにより、上りパケットがディスパッチャ3を跨いで送信されることを抑制することができ、仮想パケット振り分け装置間のデータのコピーを減らして性能劣化を防ぐことができる。
The
パケット集約部46は、各ディスパッチャ3から受信した下りパケットを集約する。下りハッシュ部47は、集約した下りパケットに対しハッシュ計算を行う。これにより、この下りパケットに対応する上りパケットの送信先のディスパッチャ3が特定可能となる。更に下りハッシュ部47は、この下りパケットの応答元と、この下りパケットに対応する上りパケットの送信先との関係を統計テーブル53に記録する。パケット送信部48は、下りパケットをクライアント端末6に送信する。
The
ディスパッチャ3−0は、上りパケットのためにパケット受信部31と振分部32とディスパッチャ振分テーブル35−0(図6参照)とを備え、下りパケットのためにパケット集約部33とパケット送信部34とを備える。ディスパッチャ3−1は、ディスパッチャ振分テーブル35−1(図7参照)を備え、ディスパッチャ3−0と同様に構成されている。ディスパッチャ3−2は、ディスパッチャ振分テーブル35−2(図8参照)を備え、ディスパッチャ3−0と同様に構成されている。
The dispatcher 3-0 includes a
パケット受信部31は、バランサ4または他のディスパッチャ3−1,3−2から上りパケットを受信する。振分部32は、ディスパッチャ振分テーブル35−0を参照し、目的の仮想マシン2−0,2−1またはディスパッチャ3−1,3−2に上りパケットを送信する。
パケット集約部33は、仮想マシン2−0,2−1から受信した下りパケットを集約する。パケット送信部34は、集約した下りパケットをバランサ4に送信する。
The
The
仮想マシン2−0は、パケット受信部21とパケット処理部22とパケット送信部23とを備える。他の仮想マシン2−1〜2−5も、仮想マシン2−0と同様に構成されている。仮想マシン2−2,2−3はディスパッチャ3−1に接続されている。仮想マシン2−4,2−5はディスパッチャ3−2に接続されている。
The virtual machine 2-0 includes a
パケット受信部21は、ディスパッチャ3−0から上りパケットを受信する。パケット処理部22は、仮想マシン2−0のロジックに基づき上りパケットを処理し、下りパケットを生成する。パケット送信部23は、パケット処理部22が生成した下りパケットを自身が接続されているディスパッチャ3−0に送信する。
The
図3は、バランサ4のハッシュ関数変更処理を示すフローチャートである。
後記する図4のハッシュ関数変更処理(ステップS20)において、図3に示したハッシュ関数変更処理が呼び出される。
ステップS10において物理サーバ1のCPU(不図示)は、初期化時であるか否かを判定する。ここで初期化時とは、この負荷分散プログラムが起動した後の最初の処理のことをいう。物理サーバ1のCPU(不図示)は、初期化時ならば(Yes)ステップS11に進み、初期化時で無いならば(No)ステップS13の処理に進む。
FIG. 3 is a flowchart showing the hash function change process of the
In the hash function change process (step S20) in FIG. 4 described later, the hash function change process shown in FIG. 3 is called.
In step S10, the CPU (not shown) of the
《初期化時の処理》
ステップS11において、物理サーバ1のCPU(不図示)は、予め仮想マシン2の数が判明している場合はそれを参考にしてハッシュ分割数を決定し、ハッシュ分割数に応じたハッシュ関数を決定する。
ステップS12において、物理サーバ1のCPU(不図示)は、ハッシュ関数にハッシュパラメータがある場合はそれを決定し、ステップS19の処理に進む。なお、初期化時におけるハッシュパラメータは、任意のものであってもよい。
<< Processing at initialization >>
In step S11, if the number of
In step S12, if there is a hash parameter in the hash function, the CPU (not shown) of the
《初期化時以外の処理》
ステップS13において、物理サーバ1のCPU(不図示)は、現在の振分効率をパラメータリスト54に記録する。その後、CPUは、このハッシュ関数に係る全てのハッシュパラメータを試行したか否かを判定する(ステップS14)。物理サーバ1のCPU(不図示)は、全てのハッシュパラメータを試行していないならば(No)、未使用のハッシュパラメータを選択し(ステップS15)、ステップS19の処理に進む。物理サーバ1のCPU(不図示)は、全てのハッシュパラメータを試行したならば(Yes)、全てのハッシュ関数を試行したか否かを判定する(ステップS16)。物理サーバ1のCPU(不図示)は、全てのハッシュ関数を試行していないならば(No)、未使用のハッシュ関数を選択し(ステップS17)、ステップS19の処理に進む。
物理サーバ1のCPU(不図示)は、全てのハッシュ関数を試行したならば(Yes)、パラメータリスト54から最も振分効率の高いハッシュ関数とハッシュパラメータの組合せを選択し(ステップS18)、ステップS19の処理に進む。
Processing other than initialization
In step S 13, the CPU (not shown) of the
If all the hash functions have been tried (Yes), the CPU (not shown) of the
《共通処理》
ステップS19において、CPUは、ハッシュ値ごとに振分先のディスパッチャ3を決定したバランサ振分テーブル51を作成し、図3の処理を終了する。振分先のディスパッチャ3は、図4に示したバランサ振分テーブル51の修正処理(ステップS24)で最適値に修正するので、この時点ではランダムであってもよい。
"Common processing"
In step S19, the CPU creates a balancer distribution table 51 in which the
図4は、バランサ4の振分処理を示すフローチャートである。
ステップS20において物理サーバ1のCPU(不図示)は、ハッシュ関数変更処理(図3参照)を実行する。このハッシュ関数変更処理は、ハッシュ関数を決定してバランサ振分テーブル51を作成する処理である。その後、物理サーバ1のCPU(不図示)は、統計テーブル53の値をリセットする(ステップS21)。
FIG. 4 is a flowchart showing the distribution process of the
In step S20, the CPU (not shown) of the
ステップS22において物理サーバ1のCPU(不図示)は、この統計テーブル53を参照して、ディスパッチャ3からの全応答パケット数Rが閾値Trを超えているならば、ステップS23に進む。物理サーバ1のCPU(不図示)は、全応答パケット数Rが閾値Trを超えていないならば、ステップS22に戻る。
ステップS23において物理サーバ1のCPU(不図示)は、統計テーブル53とディスパッチャテーブル52とを元に、ハッシュ値ごと且つ送信先ごとの振分効率eikを計算する。ハッシュ値ごと且つ送信先ごとの振分効率eikは、式(1)で算出される。
The CPU (not shown) of the
In step S23, the CPU (not shown) of the
ステップS24において物理サーバ1のCPU(不図示)は、振分効率eikを最大化するk(送信先のディスパッチャ3)を決定して、決定した送信先のディスパッチャ3を元にバランサ振分テーブル51を修正する。ここでハッシュ値ごとに最大化した振分効率eiは、式(2)で算出される。
In step S24, the CPU (not shown) of the
なお、NUMA構成を有さないサーバでは、異なるディスパッチャ3間を転送する効率はほぼ等しいと推定される。この場合、振分効率eikを最大化するk(送信先のディスパッチャ3)は、下りパケットの送信数が最も多いディスパッチャ3となる。
ステップS25において物理サーバ1のCPU(不図示)は、ハッシュ値ごとの振分効率eiの平均値を算出し、全体の振分効率Eとする。全体の振分効率Eは、以下の式(3)で算出される。
In a server that does not have the NUMA configuration, the efficiency of transferring between
次いでステップS26において物理サーバ1のCPU(不図示)は、全体の振分効率Eが閾値Teを超えている場合(Yes)にステップS21に戻る。全体の振分効率Eが閾値Teを超えていない場合(No)、物理サーバ1のCPU(不図示)は、ステップS20に戻り、ハッシュ関数とハッシュパラメータの選びなおしを含むハッシュ関数変更処理を実施する。
Then, in step S26 in the
図5は、バランサ振分テーブル51を示す図である。
バランサ振分テーブル51は、ハッシュ値欄と送信先欄とを含んで構成される。
ハッシュ値欄は、上りパケットの識別子のハッシュ値に対応している。送信先欄のD0〜D2は、ハッシュ値に対応する送信先のディスパッチャ3−0〜3−2を示している。負荷分散部43は、上りパケットの識別子のハッシュ値とバランサ振分テーブル51に基づいて送信先のディスパッチャ3を特定する。
FIG. 5 is a diagram showing the balancer distribution table 51. As shown in FIG.
The balancer distribution table 51 is configured to include a hash value field and a transmission destination field.
The hash value column corresponds to the hash value of the identifier of the upstream packet. D0 to D2 in the transmission destination column indicate dispatchers 3-0 to 3-2 of the transmission destination corresponding to the hash value. The
図6は、ディスパッチャ3−0が備えるディスパッチャ振分テーブル35−0を示す図である。
ディスパッチャ振分テーブル35−0は、識別子欄と送信先欄とを含んで構成される。
識別子欄は、上りパケットの識別子に対応している。送信先欄のV0,V1は、この識別子に対応する送信先の仮想マシン2−0,2−1を示している。送信先欄のD1,D2は、この識別子に対応する転送先のディスパッチャ3−1,3−2を示している。
FIG. 6 is a diagram showing the dispatcher distribution table 35-0 included in the dispatcher 3-0.
The dispatcher distribution table 35-0 is configured to include an identifier field and a transmission destination field.
The identifier column corresponds to the identifier of the upstream packet. V0 and V1 of the transmission destination column indicate virtual machines 2-0 and 2-1 of the transmission destination corresponding to this identifier. D1 and D2 of the destination column indicate dispatchers 3-1 and 3-2 of the transfer destination corresponding to this identifier.
振分部32は、このディスパッチャ振分テーブル35−0と上りパケットの識別子に基づいて、目的の仮想マシン2−0,2−1またはディスパッチャ3−1,3−2を特定する。更に振分部32は、目的の仮想マシン2−0,2−1またはディスパッチャ3−1,3−2に上りパケットを送信する。
The
図7は、ディスパッチャ3−1が備えるディスパッチャ振分テーブル35−1を示す図である。
ディスパッチャ振分テーブル35−1は、識別子欄と送信先欄とを含んで構成される。
識別子欄は、上りパケットの識別子に対応している。送信先欄のV2,V3は、この識別子に対応する送信先の仮想マシン2−2,2−3を示している。送信先欄のD0,D2は、この識別子に対応する転送先のディスパッチャ3−0,3−2を示している。
FIG. 7 is a diagram showing the dispatcher distribution table 35-1 provided in the dispatcher 3-1.
The dispatcher distribution table 35-1 is configured to include an identifier field and a transmission destination field.
The identifier column corresponds to the identifier of the upstream packet. V2 and V3 in the transmission destination column indicate virtual machines 2-2 and 2-3 of the transmission destination corresponding to this identifier. D0 and D2 of the transmission destination column indicate dispatchers 3-0 and 3-2 of the transfer destination corresponding to this identifier.
振分部32は、このディスパッチャ振分テーブル35−1と上りパケットの識別子に基づいて、目的の仮想マシン2−2,2−3またはディスパッチャ3−0,3−2を特定する。更に振分部32は、目的の仮想マシン2−2,2−3またはディスパッチャ3−0,3−2に上りパケットを送信する。
The
図8は、ディスパッチャ3−2が備えるディスパッチャ振分テーブル35−2を示す図である。
ディスパッチャ振分テーブル35−2は、識別子欄と送信先欄とを含んで構成される。
識別子欄は、上りパケットの識別子に対応している。送信先欄のV4,V5は、この識別子に対応する送信先の仮想マシン2−4,2−5を示している。送信先欄のD0,D1は、この識別子に対応する転送先のディスパッチャ3−0,3−1を示している。
FIG. 8 is a diagram showing the dispatcher distribution table 35-2 included in the dispatcher 3-2.
The dispatcher distribution table 35-2 is configured to include an identifier field and a transmission destination field.
The identifier column corresponds to the identifier of the upstream packet. V4 and V5 in the transmission destination column indicate virtual machines 2-4 and 2-5 of the transmission destination corresponding to this identifier. D0 and D1 in the destination column indicate dispatchers 3-0 and 3-1 of the transfer destination corresponding to this identifier.
振分部32は、このディスパッチャ振分テーブル35−2と上りパケットの識別子に基づいて、目的の仮想マシン2−4,2−5またはディスパッチャ3−0,3−1を特定する。更に振分部32は、目的の仮想マシン2−4,2−5またはディスパッチャ3−0,3−1に上りパケットを送信する。
The
図9は、統計テーブル53を示す図である。
統計テーブル53には、上りパケットのハッシュ値と、各ディスパッチャ3がこの上りパケットに対応した下りパケットを応答した数とが格納されている。
ハッシュ値0の上りパケットについては、ディスパッチャ3−0(D0)が、この上りパケットに対応した100個の下りパケットを応答している。
ハッシュ値1の上りパケットについては、ディスパッチャ3−1(D1)が、この上りパケットに対応した150個の下りパケットを応答している。
ハッシュ値2の上りパケットについては、ディスパッチャ3−2(D2)が、この上りパケットに対応した50個の下りパケットを応答している。
ハッシュ値3の上りパケットについては、ディスパッチャ3−1(D1)が、この上りパケットに対応した50個の下りパケットを応答し、ディスパッチャ3−2(D2)が、この上りパケットに対応した100個の下りパケットを応答している。
ハッシュ値4の上りパケットは送信されていない。また、ハッシュ値5の上りパケットについては、ディスパッチャ3−0(D0)が、この上りパケットに対応した150個の下りパケットを応答している。
FIG. 9 is a diagram showing the statistics table 53.
The statistics table 53 stores the hash value of the uplink packet and the number of each
The dispatcher 3-0 (D 0) responds to 100 uplink packets corresponding to the uplink packet for the uplink packet with the
As for the upstream packet having the hash value of 1, the dispatcher 3-1 (D1) responds 150 downstream packets corresponding to the upstream packet.
For the upstream packet with
For uplink packets with a hash value of 3, dispatcher 3-1 (D1) responds 50 downlink packets corresponding to the uplink packet, and dispatcher 3-2 (D2) responds to 100 uplink packets. Down packet of
An upstream packet with
図10は、パラメータリスト54を示す図である。
パラメータリスト54は、ハッシュ関数欄と、ハッシュパラメータ欄と、振分効率欄を備える。このパラメータリスト54には、ハッシュ関数およびハッシュパラメータを変更した場合の振分効率が記録される。図10において、ハッシュ関数Bかつハッシュパラメータ2の場合の振分効率は、未だ記録されていない。なお、ハッシュ関数欄の括弧内の数字は、分割数を示している。このパラメータリスト54を参照することにより、物理サーバ1のCPUは、最も振分効率のよいハッシュ関数とハッシュパラメータの組合せを選択することができる。
FIG. 10 is a diagram showing the
The
図11は、ディスパッチャテーブル52を示す図である。
ディスパッチャテーブル52には、転送元のディスパッチャ3から転送先のディスパッチャ3までの転送効率が予め記録されている。なお、転送効率の逆数が転送コストである。
FIG. 11 is a diagram showing the dispatcher table 52. As shown in FIG.
In the dispatcher table 52, transfer efficiency from the
図11に示した例では、NUMAノード71,72を跨ぐディスパッチャ3−0からディスパッチャ3−1,3−2への転送コストは、ディスパッチャ3を跨がない場合の転送コスト(例えば、ディスパッチャ3−0からディスパッチャ3−0の転送)に比べて10倍である。
In the example shown in FIG. 11, the transfer cost from the dispatcher 3-0 across the
更に、NUMAノードを跨がないディスパッチャ3−1からディスパッチャ3−2への転送コストは、ディスパッチャ3を跨がない場合の転送コスト(例えば、ディスパッチャ3−1からディスパッチャ3−1の転送)に比べて1.11…倍(0.9の逆数)である。 Furthermore, the transfer cost from dispatchers 3-1 to dispatchers 3-2 that do not cross NUMA nodes is higher than the transfer cost if they do not cross dispatchers 3 (for example, transfer from dispatchers 3-1 to dispatchers 3-1) Is 1.11 ... (reciprocal of 0.9).
図12は、当初の振分動作を示す図である。
当初、バランサ4は、上りパケットに対して、ディスパッチャ3における振り分けの元になる識別子(宛先IPアドレス等)でハッシュをかけ、バランサ振分テーブル51に基づき複数のディスパッチャ3に振り分ける。上りハッシュ55は、上りパケットの識別子から算出したハッシュ値である。
FIG. 12 is a diagram showing an initial distribution operation.
Initially, the
図12に示した例において、バランサ4は、識別子aの上りパケットをディスパッチャ3−0に振り分ける。ディスパッチャ3−0は、この識別子aの上りパケットを仮想マシン2−0に振り分ける。このとき、上りパケットはディスパッチャ3を跨いでおらず、オーバヘッドは発生していない。
In the example shown in FIG. 12, the
更にバランサ4は、識別子cの上りパケットをディスパッチャ3−0に振り分ける。ディスパッチャ3−0は、この識別子cの上りパケットをディスパッチャ3−1に振り分ける。これにより上りパケットはNUMAノード71とNUMAノード72との間を跨ぐため、所定のオーバヘッドが発生する。ディスパッチャ3−1は、この識別子cの上りパケットを仮想マシン2−2に振り分ける。この時点でディスパッチャ3間かつNUMAノード間の転送が発生し、性能劣化の原因となる。
Furthermore, the
図13は、初期状態におけるバランサ振分テーブル51と統計テーブル53に識別子欄を設けたテーブルを示す図である。
テーブルの左端は識別子欄である。その右側2列はハッシュ値欄と送信先欄であり、バランサ振分テーブル51の内容を示している。識別子欄の値に対してハッシュ計算を行うとハッシュ値欄に示された値が算出される。
更にハッシュ値欄と、D0応答数欄、D1応答数欄、D2応答数欄によって、統計テーブル53の内容を示している。図13に示した統計テーブル53は初期状態なので、D0応答数欄、D1応答数欄、D2応答数欄は、全て0でクリアされている。
FIG. 13 is a diagram showing a table in which identifier sections are provided in the balancer distribution table 51 and the statistics table 53 in the initial state.
The left end of the table is an identifier field. The right two columns are a hash value field and a transmission destination field, and indicate the contents of the balancer distribution table 51. When hash calculation is performed on the value of the identifier field, the value indicated in the hash value field is calculated.
Further, the contents of the statistics table 53 are indicated by the hash value column, the D0 response number column, the D1 response number column, and the D2 response number column. Since the statistics table 53 shown in FIG. 13 is in the initial state, the D0 response number column, the D1 response number column, and the D2 response number column are all cleared to 0.
図14は、振分後の応答を示す図である。
バランサ4は、ディスパッチャ3−0〜3−2から受信した下りパケットに対して、この下りパケットの応答元のディスパッチャ3とハッシュ値との対応を統計テーブル53に記録する。上りパケットを送信したディスパッチャ3は、振分の元となる識別子(下りパケットの送信元IPアドレス等)のハッシュ値とバランサ振分テーブル51に基づいて判定することができる。なお、上りパケットの送信先IPアドレスと、この上りパケットの応答である下りパケットの送信元IPアドレスとは同一である。下りハッシュ56は、下りパケットの識別子aから算出したハッシュ値である。
FIG. 14 is a diagram showing a response after distribution.
The
具体的にいうと、バランサ4は、識別子aの下りパケットをディスパッチャ3−0から受信すると、識別子aのハッシュ値を0として算出する。このハッシュ値0とバランサ振分テーブル51に基づいて、この下りパケットに対応する上りパケットの送信先がD0(ディスパッチャ3−0)であることが判定できる。
Specifically, when the downstream packet of the identifier a is received from the dispatcher 3-0, the
更にバランサ4は、識別子cの下りパケットをディスパッチャ3−1から受信すると、識別子cのハッシュ値を1として算出する。このハッシュ値1とバランサ振分テーブル51に基づいて、この下りパケットに対応する上りパケットの送信先がD0(ディスパッチャ3−0)であることが判定できる。
Furthermore, when the downstream packet of the identifier c is received from the dispatcher 3-1, the
図15は、応答後におけるバランサ振分テーブル51と統計テーブル53に識別子欄を設けたテーブルを示す図である。
この統計テーブル53は、ハッシュ値が0の行のD0応答数欄が1に設定される。これは、識別子aの上りパケットおよび下りパケットによるものである。更にハッシュ値が1の行のD1応答数欄が1に設定される。これは、識別子cの上りパケットおよび下りパケットによるものである。
FIG. 15 is a diagram showing a table in which identifier columns are provided in the balancer distribution table 51 and the statistics table 53 after the response.
In the statistics table 53, the D0 response number column of the row having a hash value of 0 is set to 1. This is due to the upstream packet and the downstream packet of the identifier a. Furthermore, the D1 response number column of the row having a hash value of 1 is set to 1. This is due to the upstream packet and the downstream packet of the identifier c.
図16は、集計後におけるバランサ振分テーブル51と統計テーブル53に識別子欄を設けたテーブルを示す図である。
この統計テーブル53は、各識別子のパケットが100個ずつ送受信されたときのものである。
FIG. 16 is a diagram showing a table in which identifier columns are provided in the balancer distribution table 51 and the statistics table 53 after the aggregation.
The statistics table 53 is for when 100 packets of each identifier are transmitted and received.
識別子aの100個の上りパケットがディスパッチャ3−0に振り分けられ、これに対応する100個の下りパケットがディスパッチャ3−0から送信される。このとき、オーバヘッドは無い。 The 100 upstream packets of the identifier a are distributed to the dispatcher 3-0, and the corresponding 100 downstream packets are transmitted from the dispatcher 3-0. There is no overhead at this time.
識別子cの100個の上りパケットがディスパッチャ3−0に振り分けられ、これに対応する100個の下りパケットがディスパッチャ3−1から送信される。このとき、所定のオーバヘッドが発生するため、個数の“100”を太字イタリック体で示している。 The 100 upstream packets of the identifier c are distributed to the dispatcher 3-0, and the corresponding 100 downstream packets are transmitted from the dispatcher 3-1. At this time, since a predetermined overhead occurs, the number "100" is shown in bold italics.
識別子fの100個の上りパケットがディスパッチャ3−1に振り分けられ、これに対応する100個の下りパケットがディスパッチャ3−2から送信される。このとき、所定のオーバヘッドが発生するため、個数の“100”を太字イタリック体で示している。 The 100 upstream packets of the identifier f are distributed to the dispatcher 3-1, and the corresponding 100 downstream packets are transmitted from the dispatcher 3-2. At this time, since a predetermined overhead occurs, the number "100" is shown in bold italics.
識別子d,eの各100個の上りパケットがディスパッチャ3−1に振り分けられ、これに対応する100個の下りパケットがディスパッチャ3−1から送信され、100個の下りパケットがディスパッチャ3−2から送信される。このとき、ディスパッチャ3−2から送信された100個の下りパケットに対応する上りパケットには、幾らかのオーバヘッドが発生するため、個数の“100”を太字イタリック体で示している。 The 100 upstream packets of each of the identifiers d and e are distributed to the dispatcher 3-1, the corresponding 100 downstream packets are transmitted from the dispatcher 3-1, and the 100 downstream packets are transmitted from the dispatcher 3-2 Be done. At this time, some overhead occurs in the upstream packets corresponding to the 100 downstream packets transmitted from the dispatcher 3-2, so the number "100" is shown in bold italics.
識別子bの100個の上りパケットがディスパッチャ3−2に振り分けられ、これに対応する100個の下りパケットがディスパッチャ3−0から送信される。このとき、所定のオーバヘッドが発生するため、個数の“100”を太字イタリック体で示している。 The 100 upstream packets of the identifier b are distributed to the dispatcher 3-2, and the corresponding 100 downstream packets are transmitted from the dispatcher 3-0. At this time, since a predetermined overhead occurs, the number "100" is shown in bold italics.
テーブル変更部45は、統計テーブル53を元に、バランサ振分テーブル51の送信先を、ディスパッチャ3間のデータコピーのコストが小さく効率が高い送信先に変更する。単純にいうとテーブル変更部45は、各ハッシュ値において応答数が最も多いディスパッチャ3を送信先とする。
Based on the statistics table 53, the
図17は、修正後におけるバランサ振分テーブル51と統計テーブル53に識別子欄を設けたテーブルを示す図である。
識別子cの下りパケットは、全てディスパッチャ3−1から送信される。そのためテーブル変更部45は、バランサ振分テーブル51のうち、識別子cのハッシュ値=1に対応する送信先を、D1(ディスパッチャ3−1)に変更している。これにより、上りパケットがディスパッチャ3を跨ぐことが無くなる。
FIG. 17 is a diagram showing a table in which identifier columns are provided in the balancer distribution table 51 and the statistics table 53 after correction.
All downstream packets of the identifier c are transmitted from the dispatcher 3-1. Therefore, the
識別子fの下りパケットは、全てディスパッチャ3−2から送信される。そのためテーブル変更部45は、バランサ振分テーブル51のうち、識別子fのハッシュ値=2に対応する送信先を、D2(ディスパッチャ3−2)に変更している。これにより、上りパケットがディスパッチャ3を跨ぐことが無くなる。
All downlink packets with the identifier f are transmitted from the dispatcher 3-2. Therefore, the
識別子bの下りパケットは、全てディスパッチャ3−0から送信される。そのためテーブル変更部45は、バランサ振分テーブル51のうち、識別子bのハッシュ値=5に対応する送信先を、D0(ディスパッチャ3−0)に変更している。これにより、上りパケットがディスパッチャ3を跨ぐことが無くなる。
All downstream packets of the identifier b are transmitted from the dispatcher 3-0. Therefore, the
識別子d,eの100個の下りパケットがディスパッチャ3−1から送信され、100個の下りパケットがディスパッチャ3−2から送信される。識別子d,eのハッシュ値=3に対応する送信先は、ディスパッチャ3−1,3−2のうちいずれかであればよい。 One hundred downstream packets of identifiers d and e are transmitted from the dispatcher 3-1, and one hundred downstream packets are transmitted from the dispatcher 3-2. The transmission destination corresponding to the hash value = 3 of the identifiers d and e may be any one of the dispatchers 3-1 and 3-2.
《ハッシュ分散処理》
仮に最初のハッシュ関数の振り分け結果が分散されていない場合、所望の振分効率が得られないため、ハッシュ関数を組み直す。ハッシュ関数は必ずしも効率のいいものが見つかるとは限らないため、試行錯誤を繰り返すことで比較的分散されるものを見つけるとよい。
Hash distributed processing
If the distribution result of the first hash function is not distributed, the desired distribution efficiency can not be obtained, so the hash function is reassembled. Since hash functions do not always find efficient ones, it is better to find ones that are relatively dispersed by repeating trial and error.
図18は、ハッシュ値が分散されていない場合のバランサ振分テーブル51と統計テーブル53に識別子欄を設けたテーブルを示す図である。
ここでは選択したハッシュ関数の振り分け結果が分散されておらず、複数の識別子から同一のハッシュ値が算出される。例えば識別子a,c,eのハッシュ値は0であり、識別子b,d,fのハッシュ値は1である。このような場合、バランサ振分テーブル51を修正しても多くのパケットでディスパッチャ3の跨ぎが発生する。
FIG. 18 is a diagram showing a table in which identifier sections are provided in the balancer distribution table 51 and the statistics table 53 when the hash values are not distributed.
Here, the distribution result of the selected hash function is not distributed, and the same hash value is calculated from a plurality of identifiers. For example, the hash values of the identifiers a, c and e are 0, and the hash values of the identifiers b, d and f are 1. In such a case, even if the balancer distribution table 51 is corrected, crossing of the
図18において、ハッシュ値iが0のとき、ハッシュ値ごとの振分効率e0は式(4)で算出され、その値は0.4である。
ハッシュ値iが1のとき、ハッシュ値ごとの振分効率e1は式(5)で算出され、その値は0.666…である。
全体の振分効率Eはこれらの平均値であり、0.5333…である。この全体の振分効率Eが閾値Teを超えていない場合、ハッシュ関数変更処理において未使用のハッシュパラメータや未使用のハッシュ関数が選択され、試行錯誤が行われる。 The overall distribution efficiency E is an average value of these and is 0.5333. If the overall distribution efficiency E does not exceed the threshold value T e , unused hash parameters and unused hash functions are selected in the hash function change process, and trial and error are performed.
図19は、ハッシュ値が分散されており、かつ修正後におけるバランサ振分テーブル51と統計テーブル53に識別子欄を設けたテーブルを示す図である。
選択したハッシュ関数が良くなればテーブル修正によりディスパッチャ3の跨ぎを抑えることが可能である。
FIG. 19 is a diagram showing a table in which hash values are dispersed and identifier columns are provided in the balancer distribution table 51 and the statistics table 53 after correction.
If the selected hash function becomes better, it is possible to suppress the crossing of
図19において、ハッシュ値iが0のとき、ハッシュ値ごとの振分効率e0は1.0である。ハッシュ値iが1のとき、ハッシュ値ごとの振分効率e1は1.0である。ハッシュ値iが2のとき、ハッシュ値ごとの振分効率e2=1.0である。ハッシュ値iが3のとき、ハッシュ値ごとの振分効率e3は式(6)で算出され、その値は0.95である。
ハッシュ値iが5のとき、ハッシュ値ごとの振分効率e5は1.0である。
全体の振分効率Eはこれらの平均値であり、0.99である。このように全体の振分効率Eが閾値Teを超えると、ハッシュパラメータおよびハッシュ関数は変更されなくなる。
When the hash value i is 5, the distribution efficiency e 5 per hash value is 1.0.
The overall distribution efficiency E is an average value of these and is 0.99. Thus, when the overall distribution efficiency E exceeds the threshold T e , the hash parameter and the hash function are not changed.
《実施形態の効果》
仮想マシンへの接続を行う仮想パケット振り分け装置をスケールアウトする際、仮想マシンからの下りパケットの情報を元に負荷分散の振り分けテーブルを随時修正することで仮想パケット振り分け装置間のデータのコピーを減らし、性能劣化を防ぐことが可能になる。
<< Effect of the embodiment >>
When scaling out a virtual packet distribution device connecting to a virtual machine, the load distribution distribution table is modified as needed based on the information on downlink packets from the virtual machine to reduce data copying between the virtual packet distribution devices. It becomes possible to prevent the performance deterioration.
《変形例》
本発明は、上記実施形態に限定されることなく、本発明の趣旨を逸脱しない範囲で、変更実施が可能であり、例えば、次の(a)〜(e)のようなものがある。
<< Modification >>
The present invention is not limited to the above embodiment, and modifications can be made without departing from the spirit of the present invention, and there are, for example, the following (a) to (e).
(a) 上りパケットの識別子は、送信先アドレスに限定されず、送信元アドレスやMAC(Media Access Control)アドレスであってもよい。
(b) ハッシュ分散処理は、全体の振分効率を最大化することに限定されない。識別子リストをハッシュ演算して、ハッシュ値の重複が最小化されるように計算してもよく、限定されない。
(c) 異なるディスパッチャ3間の転送効率の違いを無視してもよい。つまり、所定のハッシュ値を持つ下りパケットを最も多く送信したディスパッチャ3を、バランサ振分テーブル51によって振り分けるディスパッチャとしてもよい。更に異なるディスパッチャ3を跨ぐパケットの割合を振分効率の近似値としてもよい。
(d) ディスパッチャ跨ぎによる振分効率を動的に算出し、パラメータリストを修正してもよい。
(e) バランサやディスパッチャは、単一の物理サーバ上に具現化されるだけではなく、複数の物理サーバ上に具現化された負荷分散システムであってもよい。
(A) The identifier of the upstream packet is not limited to the transmission destination address, and may be a transmission source address or a MAC (Media Access Control) address.
(B) Hash distribution processing is not limited to maximizing the overall distribution efficiency. The identifier list may be hashed and calculated to minimize duplication of hash values, and is not limited.
(C) The difference in transfer efficiency between
(D) The distribution efficiency across dispatchers may be calculated dynamically to correct the parameter list.
(E) The balancer and dispatcher may be not only embodied on a single physical server, but also a load balancing system embodied on a plurality of physical servers.
1,1A,1B 物理サーバ (負荷分散装置・負荷分散システム)
2,2−0〜2−5 仮想マシン
21 パケット受信部
22 パケット処理部
23 パケット送信部
3,3−0〜3−2 ディスパッチャ (仮想パケット振り分け装置の一部)
31 パケット受信部
32 振分部
33 パケット集約部
34 パケット送信部
35 ディスパッチャ振分テーブル
4 バランサ (仮想パケット振り分け装置の一部)
41 パケット受信部
42 上りハッシュ部
43 負荷分散部
44 ハッシュ決定部
45 テーブル変更部
46 パケット集約部
47 下りハッシュ部
48 パケット送信部
51 バランサ振分テーブル
52 ディスパッチャテーブル
53 統計テーブル
54 パラメータリスト
55 上りハッシュ
56 下りハッシュ
6,6a〜6c クライアント端末
7 仮想パケット振り分け装置
71,72 NUMAノード
91 社内ネットワーク
92 インターネット
1, 1A, 1B physical server (load balancer / load balancing system)
2, 2-0-2-5
31
41
Claims (8)
前記複数の仮想マシンにパケットを振り分けると共に相互にパケットを渡す複数のディスパッチャと、
前記仮想マシンのうちのいずれかに送信する上りパケットを、振分テーブルに基づいて前記複数のディスパッチャのいずれかに振り分けると共に、前記上りパケットへの応答である下りパケットが所定割合を超えて異なるディスパッチャから中継されてきたとき、前記振分テーブルを修正するバランサと、
を備えることを特徴とする負荷分散装置。 With multiple virtual machines,
A plurality of dispatchers that distribute packets to the plurality of virtual machines and pass the packets to each other;
An upstream packet to be transmitted to any one of the virtual machines is distributed to one of the plurality of dispatchers based on a distribution table, and a downstream packet which is a response to the upstream packet differs by more than a predetermined ratio. A balancer that corrects the distribution table when relayed from the
A load distribution apparatus comprising:
ことを特徴とする請求項1に記載の負荷分散装置。 The balancer specifies a dispatcher to which the upstream packet is distributed based on a hash value of an identifier unique to the upstream packet and the distribution table, and based on the distribution hash table of the identifier unique to the downstream packet, Identifying a dispatcher to which the upstream packet corresponding to the downstream packet is distributed;
The load distribution device according to claim 1, wherein
ことを特徴とする請求項2に記載の負荷分散装置。 The balancer identifies the dispatcher that has sent the largest number of downlink packets, which is a response to an uplink packet of a predetermined hash value, and distributes the distribution table so as to distribute the uplink packet of the predetermined hash value to the identified dispatcher. Fix,
The load distribution device according to claim 2,
ことを特徴とする請求項2に記載の負荷分散装置。 The balancer calculates the distribution efficiency for each dispatcher of the transmission destination of the uplink packet, based on the ratio of transmitting the downlink packet, which is a response to the uplink packet of a predetermined hash value, and the transfer efficiency between dispatchers, Identifying a dispatcher maximizing the distribution efficiency, and modifying the distribution table so as to distribute an upstream packet of the predetermined hash value to the identified dispatcher;
The load distribution device according to claim 2,
ことを特徴とする請求項2に記載の負荷分散装置。 The unique identifier is transmission destination information of the upstream packet and transmission source information of the downstream packet.
The load distribution device according to claim 2,
ことを特徴とする請求項2に記載の負荷分散装置。 If the overall distribution efficiency by the hash function that calculates a hash value from the unique identifier is equal to or less than a predetermined threshold, the balancer changes to a hash function with better distribution efficiency.
The load distribution device according to claim 2,
前記複数の仮想マシンにパケットを振り分けると共に相互にパケットを渡す複数のディスパッチャと、
前記仮想マシンのうちのいずれかに送信する上りパケットを、振分テーブルに基づいて前記複数のディスパッチャのいずれかに振り分けると共に、前記上りパケットへの応答である下りパケットが所定割合を超えて異なるディスパッチャから中継されてきたとき、前記振分テーブルを修正するバランサと、
を備えることを特徴とする負荷分散システム。 With multiple virtual machines,
A plurality of dispatchers that distribute packets to the plurality of virtual machines and pass the packets to each other;
An upstream packet to be transmitted to any one of the virtual machines is distributed to one of the plurality of dispatchers based on a distribution table, and a downstream packet which is a response to the upstream packet differs by more than a predetermined ratio. A balancer that corrects the distribution table when relayed from the
A load distribution system comprising:
前記仮想マシンのうちのいずれかに送信する上りパケットを、振分テーブルに基づいて前記複数のディスパッチャのいずれかに振り分ける負荷分散手段、
前記上りパケットへの応答である下りパケットが所定割合を超えて異なるディスパッチャから中継されてきたとき、前記振分テーブルを修正するテーブル変更手段、
として機能させるための負荷分散プログラム。 A computer in which a plurality of virtual machines and a plurality of dispatchers that distribute packets to the plurality of virtual machines and pass packets to each other are embodied,
Load distribution means for distributing an upstream packet to be transmitted to any one of the virtual machines to any of the plurality of dispatchers based on a distribution table;
Table changing means for correcting the distribution table when a downstream packet, which is a response to the upstream packet, is relayed from a different dispatcher by exceeding a predetermined ratio
Load balancing program to function as.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017197037A JP6802771B2 (en) | 2017-10-10 | 2017-10-10 | Load distribution equipment, load distribution system, and load distribution program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017197037A JP6802771B2 (en) | 2017-10-10 | 2017-10-10 | Load distribution equipment, load distribution system, and load distribution program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019071564A true JP2019071564A (en) | 2019-05-09 |
| JP6802771B2 JP6802771B2 (en) | 2020-12-23 |
Family
ID=66441952
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017197037A Active JP6802771B2 (en) | 2017-10-10 | 2017-10-10 | Load distribution equipment, load distribution system, and load distribution program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6802771B2 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2004051943A1 (en) * | 2002-12-05 | 2004-06-17 | Fujitsu Limited | Nas load distribution system |
| US20120057591A1 (en) * | 2010-09-07 | 2012-03-08 | Check Point Software Technologies Ltd. | Predictive synchronization for clustered devices |
| JP2012128698A (en) * | 2010-12-16 | 2012-07-05 | Hitachi Ltd | Load distribution blade system |
| JP2015162105A (en) * | 2014-02-27 | 2015-09-07 | 日本電信電話株式会社 | cluster system |
-
2017
- 2017-10-10 JP JP2017197037A patent/JP6802771B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2004051943A1 (en) * | 2002-12-05 | 2004-06-17 | Fujitsu Limited | Nas load distribution system |
| US20120057591A1 (en) * | 2010-09-07 | 2012-03-08 | Check Point Software Technologies Ltd. | Predictive synchronization for clustered devices |
| JP2012128698A (en) * | 2010-12-16 | 2012-07-05 | Hitachi Ltd | Load distribution blade system |
| JP2015162105A (en) * | 2014-02-27 | 2015-09-07 | 日本電信電話株式会社 | cluster system |
Also Published As
| Publication number | Publication date |
|---|---|
| JP6802771B2 (en) | 2020-12-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10855580B2 (en) | Consistent route announcements among redundant controllers in global network access point | |
| US9553809B2 (en) | Asymmetric packet flow in a distributed load balancer | |
| US9432245B1 (en) | Distributed load balancer node architecture | |
| US10038626B2 (en) | Multipath routing in a distributed load balancer | |
| US9559961B1 (en) | Message bus for testing distributed load balancers | |
| US10069903B2 (en) | Distributed load balancer | |
| US10135914B2 (en) | Connection publishing in a distributed load balancer | |
| CN107995123B (en) | Load balancing system and method based on switch | |
| US9942152B2 (en) | Forwarding data packets using a service-based forwarding policy | |
| CA3150018A1 (en) | Messaging platform for delivering real-time messages | |
| US10972554B1 (en) | Management of distributed endpoints | |
| US11451477B2 (en) | Load balanced access to distributed endpoints | |
| US10129152B2 (en) | Setting method, server device and service chain system | |
| WO2015100487A1 (en) | Distributed multi-level stateless load balancing | |
| KR20010088742A (en) | Parallel Information Delievery Method Based on Peer-to-Peer Enabled Distributed Computing Technology | |
| WO2010098969A2 (en) | Load balancing in a multiple server system hosting an array of services | |
| US9864856B2 (en) | Efficient hardware trust verification in data communication systems that comprise network interface cards, central processing units, and data memory buffers | |
| CN112839081A (en) | Load balancing method of cloud cluster | |
| US11425042B2 (en) | Managing data throughput in a distributed endpoint network | |
| Stephens et al. | TCP is harmful to in-network computing: designing a message transport protocol (MTP) | |
| EP3025234A1 (en) | Method and apparatus for providing redundant data access | |
| CN116489157A (en) | Management of distributed endpoints | |
| US11552898B2 (en) | Managing data throughput in a distributed endpoint network | |
| CN114697400B (en) | Service scheduling method, system and VTEP | |
| JP6802771B2 (en) | Load distribution equipment, load distribution system, and load distribution program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20191219 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20201110 |
|
| 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: 20201124 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201127 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6802771 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |