JP2006287605A - Load balancer and program - Google Patents

Load balancer and program Download PDF

Info

Publication number
JP2006287605A
JP2006287605A JP2005104522A JP2005104522A JP2006287605A JP 2006287605 A JP2006287605 A JP 2006287605A JP 2005104522 A JP2005104522 A JP 2005104522A JP 2005104522 A JP2005104522 A JP 2005104522A JP 2006287605 A JP2006287605 A JP 2006287605A
Authority
JP
Japan
Prior art keywords
short
network
address
communication means
load balancer
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.)
Pending
Application number
JP2005104522A
Other languages
Japanese (ja)
Inventor
Toshiyuki Owada
俊幸 大和田
Masato Yabuki
真人 矢吹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Precision Inc
Original Assignee
Seiko Precision Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Precision Inc filed Critical Seiko Precision Inc
Priority to JP2005104522A priority Critical patent/JP2006287605A/en
Publication of JP2006287605A publication Critical patent/JP2006287605A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a load balancer which is capable of maintaining access to a server when a fault occurs. <P>SOLUTION: The load balancer comprises: a first communication means for communicating with a first network to which a plurality of servers are connected; a second communication means for communicating with a second network to which a client is connected, and which operates according to the same protocol as that of the first network; a load distribution means which selects one of the plurality of servers to supply data transmitted from the second communication means to the first communication means and transfers the data to the selected server; and a short-circuit means which short-circuits the first communication means and the second communication means and connects the first network and the second network without interposing a load distribution means. The same IP address as an IP address of one of the plurality of servers is set to the second communication means. When a fault occurs, the short-circuit means is short-circuited. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、IP(Internet Protocol)ネットワークを通したサーバ・クライアント間通信をサーバへの負荷分散をするためのロードバランサに関する。   The present invention relates to a load balancer for distributing a load between servers and clients via an IP (Internet Protocol) network.

従来から、サーバ・クライアントシステムにおいて、特定のサーバへの負荷集中を緩和し、負荷を分散させるために、個々のサーバに対し負荷を適宜割り振るロードバランサを用いた負荷分散システムが利用されている(例えば特許文献1を参照)。
特開2003−174473号公報
2. Description of the Related Art Conventionally, in a server / client system, a load balancing system using a load balancer that appropriately allocates a load to each server has been used in order to alleviate the load concentration on a specific server and distribute the load. For example, see Patent Document 1).
JP 2003-174473 A

多くの場合、ロードバランサを用いた負荷分散システムは、図7に示すように、メインのロードバランサ100の他に、バックアップ用のロードバランサ101を備える。そして、メインのロードバランサ100に障害(故障、ハングアップ、データ量の増大、停電等)が発生した場合、バックアップ用のロードバランサ101に切り替えという対応を実施する。
また、バックアップがない場合には、ウェブサーバ200、201等のIPアドレスを変更する等の対応が必要である。
このように、従来の負荷分散システムにおいては、障害発生時の対応が煩雑であった。また、対応が遅れた場合には、ウェブサーバへのアクセスが不能となる場合もあった。
In many cases, a load distribution system using a load balancer includes a backup load balancer 101 in addition to the main load balancer 100, as shown in FIG. Then, when a failure (failure, hang-up, increase in data amount, power failure, etc.) occurs in the main load balancer 100, a response of switching to the backup load balancer 101 is performed.
If there is no backup, it is necessary to take measures such as changing the IP addresses of the web servers 200 and 201.
As described above, in the conventional load distribution system, the handling at the time of the occurrence of the trouble is complicated. In addition, when the response is delayed, access to the web server may become impossible.

本発明は、上記実情に鑑みてなされたもので、障害発生時にもサーバへのアクセスを維持できるロードバランサ及びプログラムを提供することを目的とする。   The present invention has been made in view of the above circumstances, and an object thereof is to provide a load balancer and a program that can maintain access to a server even when a failure occurs.

本発明に係るロードバランサは、複数のサーバが接続される第1のネットワークとの通信をする第1の通信手段と、クライアントが接続され、前記第1のネットワークと同一のプロトコルに従って動作する、第2のネットワークとの通信をする第2の通信手段と、複数の前記サーバの負荷量に応じて、前記第2の通信手段から前記第1の通信手段へと伝送させるデータを複数の前記サーバのうちのいずれに供給するかを選択し、当該選択された前記サーバにデータを転送する負荷分散手段と、から構成されるロードバランサであって、前記第1の通信手段と前記第2の通信手段とを短絡し、前記負荷分散手段を介さずに前記第1のネットワークと前記第2のネットワークとを接続する短絡手段を更に備え、前記第2の通信手段には、複数の前記サーバのうちのいずれか一のサーバのIP(Internet Protocol)アドレスと同一のIPアドレスが設定される、ことを特徴とする。   The load balancer according to the present invention includes a first communication unit that communicates with a first network to which a plurality of servers are connected, and a client that is connected and operates according to the same protocol as the first network. Second communication means for communicating with the second network, and data to be transmitted from the second communication means to the first communication means in accordance with load amounts of the plurality of servers. A load balancer configured to select which of them to supply and transfer data to the selected server, wherein the first communication unit and the second communication unit And short circuit means for connecting the first network and the second network without going through the load distribution means, and the second communication means includes a plurality of front terminals. Any one of the server's IP (Internet Protocol) address and the same IP address of the server is set, characterized in that.

前記ロードバランサに障害が発生した場合に前記短絡手段に前記第1の通信手段と前記第2の通信手段とを短絡させることを指示する指示情報を供給する、短絡制御手段を更に備え、前記指示情報に応答して前記短絡手段が前記第1の通信手段と前記第2の通信手段とを短絡させてもよい。   And further comprising a short-circuit control means for supplying instruction information to instruct the short-circuit means to short-circuit the first communication means and the second communication means when a failure occurs in the load balancer. In response to the information, the short-circuit means may short-circuit the first communication means and the second communication means.

所定の時間が経過しても前記負荷分散手段の応答がない場合に、前記短絡制御手段が前記指示情報を前記短絡手段に供給してもよい。   The short-circuit control unit may supply the instruction information to the short-circuit unit when there is no response from the load distribution unit even after a predetermined time has elapsed.

前記ロードバランサに電源が供給されていない場合に、前記短絡制御手段が前記指示情報を前記短絡手段に供給してもよい。   The short-circuit control unit may supply the instruction information to the short-circuit unit when power is not supplied to the load balancer.

ロードバランサは、前記第2の通信手段と同一のIPアドレスが設定されている前記サーバが正常に動作している状態で、前記IPアドレスからMACアドレスを求めるためのアドレス解決要求が発生した場合に、前記アドレス解決要求と、これに応答して前記サーバが送信するアドレス解決応答とを取得してアドレス解決情報として保持する保持手段と、前記サーバに障害が発生した場合に、前記保持手段に格納された前記アドレス解決情報に基づき前記サーバに代わってアドレス解決応答を送信する代理応答手段と、を更に備えてもよい。   The load balancer receives an address resolution request for obtaining a MAC address from the IP address in a state where the server in which the same IP address as that of the second communication unit is set is operating normally. Storing the address resolution request and the address resolution response transmitted by the server in response to the address resolution request and storing the address resolution response as address resolution information; and storing the address resolution request in the holding unit when a failure occurs in the server And proxy response means for transmitting an address resolution response on behalf of the server based on the address resolution information.

本発明の第2の観点に係るプログラムは、コンピュータを
、複数のサーバが接続される第1のネットワークとの通信をする第1の通信手段と、クライアントが接続され、前記第1のネットワークと同一のプロトコルに従って動作する、第2のネットワークとの通信をする前記第2の通信手段と、複数の前記サーバの負荷量に応じて前記第2の通信手段から第1の通信手段へと伝送させるデータを複数の前記サーバのうちのいずれに供給するかを選択し、当該選択された前記サーバにデータを転送する負荷分散手段と、前記第1の通信手段と前記第2の通信手段とを短絡し、前記負荷分散手段を介さずに前記第1のネットワークと前記第2のネットワークとを接続する短絡手段と、を備えたロードバランサとして機能させるプログラムであって、前記第2の通信手段には、複数の前記サーバのうちのいずれか一のサーバのIP(Internet Protocol)アドレスと同一のIPアドレスが設定される、ことを特徴とする。
A program according to a second aspect of the present invention is the same as the first network, in which a computer is connected to a first communication means for communicating with a first network to which a plurality of servers are connected, and a client is connected. The second communication means that communicates with the second network that operates according to the protocol of the data, and data that is transmitted from the second communication means to the first communication means according to the load amount of the plurality of servers To which of the plurality of servers is selected, and the load distribution means for transferring data to the selected server, the first communication means, and the second communication means are short-circuited A program that causes a load balancer to function as a load balancer comprising: a short-circuit unit that connects the first network and the second network without going through the load distribution unit; Wherein the second communication means, any one of the server's IP (Internet Protocol) address and the same IP address of the plurality of the server is set, characterized in that.

本発明に係るロードバランサ及びプログラムは、サーバが接続されたネットワークとクライアントが接続されたネットワークとを短絡させる。このため、本発明に係るロードバランサ及びプログラムは、障害発生時にもサーバへのアクセスを維持できる。   The load balancer and program according to the present invention short-circuit a network to which a server is connected and a network to which a client is connected. Therefore, the load balancer and program according to the present invention can maintain access to the server even when a failure occurs.

本発明のロードバランサを負荷分散システム1に適用した場合を例に、図面を参照して説明する。   An example in which the load balancer of the present invention is applied to the load distribution system 1 will be described with reference to the drawings.

図1に示すように、負荷分散システム1は、ロードバランサ100と、ウェブサーバ200と、ウェブサーバ201と、クライアント300と、ファイヤウォール400と、通信ネットワークAと、通信ネットワークBと、から構成される。   As shown in FIG. 1, the load distribution system 1 includes a load balancer 100, a web server 200, a web server 201, a client 300, a firewall 400, a communication network A, and a communication network B. The

通信ネットワークAには、ロードバランサ100と、ウェブサーバ200と、ウェブサーバ201と、が接続される。   A load balancer 100, a web server 200, and a web server 201 are connected to the communication network A.

通信ネットワークBは、例えば、いわゆるイントラネットのようなLAN(Local Area Network)である。通信ネットワークBには、ロードバランサ100と、クライアント300と、ファイヤウォール400と、が接続される。   The communication network B is a LAN (Local Area Network) such as a so-called intranet. A load balancer 100, a client 300, and a firewall 400 are connected to the communication network B.

通信ネットワークAと通信ネットワークBとは、同一のプロトコルの通信ネットワークである。   Communication network A and communication network B are communication networks of the same protocol.

ファイヤウォール400は、通信ネットワークBと外部ネットワークとの、相互のアクセスを管理する、ネットワーク接続管理装置である。   The firewall 400 is a network connection management device that manages mutual access between the communication network B and an external network.

クライアント300は、ウェブサーバ200及び201により供給されるサービスを受けるユーザが利用する端末で、通信ネットワークBに接続される。   The client 300 is a terminal used by a user who receives a service supplied from the web servers 200 and 201 and is connected to the communication network B.

ウェブサーバ200とウェブサーバ201とは、同一のサービスを、クライアント300に、ネットワークを介して提供するウェブサーバであり、通信ネットワークAに接続される。このとき、ウェブサーバ200の通信ネットワークAにおけるIPアドレスはXに設定され、ウェブサーバ201の通信ネットワークAにおけるIPアドレスはYに設定される。   The web server 200 and the web server 201 are web servers that provide the same service to the client 300 via the network, and are connected to the communication network A. At this time, the IP address in the communication network A of the web server 200 is set to X, and the IP address in the communication network A of the web server 201 is set to Y.

ロードバランサ100は、図2に示すように、制御部110と、記憶部120と、入力部130と、出力部140と、通信制御部150と、から構成される。   As shown in FIG. 2, the load balancer 100 includes a control unit 110, a storage unit 120, an input unit 130, an output unit 140, and a communication control unit 150.

入力部130は、例えば、キーボード、マウス等から構成され、ユーザによる操作を受け付け、操作情報を制御部110に供給する。
出力部140は、例えば、表示装置、プリンタ等から構成され、制御部110の制御に従い出力情報をユーザに提供する。
The input unit 130 includes, for example, a keyboard, a mouse, and the like, receives an operation by a user, and supplies operation information to the control unit 110.
The output unit 140 includes, for example, a display device, a printer, and the like, and provides output information to the user under the control of the control unit 110.

通信制御部150は、図3に示すように、LANポート154Aと、LANポート154Bと、リレー部151Aと、リレー部151Bと、通信回路152Aと、通信回路152Bと、短絡リレー153と、から構成される。   As shown in FIG. 3, the communication control unit 150 includes a LAN port 154A, a LAN port 154B, a relay unit 151A, a relay unit 151B, a communication circuit 152A, a communication circuit 152B, and a short-circuit relay 153. Is done.

LANポート154Aは通信ネットワークAに接続され、LANポート154Bは通信ネットワークBに接続される。
このとき、LANポート154Aの通信ネットワークAにおけるIP(Internet Protocol)アドレスはZに設定される。また、LANポート154Bの通信ネットワークBにおけるIPアドレスはXに設定される。
The LAN port 154A is connected to the communication network A, and the LAN port 154B is connected to the communication network B.
At this time, the IP (Internet Protocol) address in the communication network A of the LAN port 154A is set to Z. The IP address in the communication network B of the LAN port 154B is set to X.

上記のように、本実施の形態の負荷分散システム1においては、ロードバランサ100のLANポート154Bの通信ネットワークBにおけるIPアドレスと、ウェブサーバ200の通信ネットワークAにおけるIPアドレスとが、同一に設定される。
そして、LANポート154Bの通信ネットワークBにおけるIPアドレスXは、クライアント300がウェブサーバ200及び201にアクセスする際の仮想的なIPアドレスとなる。
As described above, in the load distribution system 1 of the present embodiment, the IP address in the communication network B of the LAN port 154B of the load balancer 100 and the IP address in the communication network A of the web server 200 are set to be the same. The
The IP address X in the communication network B of the LAN port 154B is a virtual IP address when the client 300 accesses the web servers 200 and 201.

リレー部151Aは、接点A又は接点Cのいずれか一方を、接点Bと選択的に接続するスイッチである。いずれの接点を選択するかは、制御部110の制御に基づき選択される。
リレー部151Bは、リレー部151Aと同様に、接点a又は接点cのいずれか一方を、接点bと選択的に接続するスイッチである。いずれの接点を選択するかは、制御部110の制御に基づき選択される。
The relay unit 151A is a switch that selectively connects either the contact A or the contact C to the contact B. Which contact is selected is selected based on the control of the control unit 110.
The relay unit 151B is a switch that selectively connects either the contact point a or the contact point c with the contact point b, similarly to the relay unit 151A. Which contact is selected is selected based on the control of the control unit 110.

通信回路152Aは、リレー部151Aが接点Aと接点Bとを接続している場合に、ロードバランサ100の通信ネットワークAを介した通信を制御する。より具体的には、通信回路152Aは、通信ネットワークA上に、ウェブサーバ200又は201からパケットが送出されると、これらを全て受け取り、制御部110に供給する。また、通信回路152A、制御部110から供給されたパケットを通信ネットワークAに送出する。   The communication circuit 152A controls communication via the communication network A of the load balancer 100 when the relay unit 151A connects the contact A and the contact B. More specifically, the communication circuit 152A receives all the packets from the web server 200 or 201 on the communication network A and supplies them to the control unit 110. The packet supplied from the communication circuit 152A and the control unit 110 is sent to the communication network A.

通信回路152Bは、リレー部151Bが接点aと接点bとを接続している場合に、ロードバランサ100の通信ネットワークBを介した通信を制御する。より具体的には、通信回路152Bは、通信ネットワークBを介して、クライアント300から宛先IPアドレスがXであるパケットを受け取ると、これを制御部110に供給する。また、通信回路152Bは、制御部110から供給されたパケットを通信ネットワークBに送出する。   The communication circuit 152B controls communication via the communication network B of the load balancer 100 when the relay unit 151B connects the contact point a and the contact point b. More specifically, when receiving a packet whose destination IP address is X from the client 300 via the communication network B, the communication circuit 152B supplies this to the control unit 110. In addition, the communication circuit 152B sends the packet supplied from the control unit 110 to the communication network B.

短絡リレー153は、接点Xと接点Yとの間を手動操作により接続/切断可能な切替スイッチである。図3に示すように、接点Xはリレー部151Aの接点Cと接続され、接点Yはリレー部151Bの接点cと接続される。
短絡リレー153は、接点Xと接点Yとを接続状態とすることにより、後述のデータスルー機能が有効とし、切断状態とすることによりデータスルー機能が無効とする。
The short-circuit relay 153 is a changeover switch that can connect / disconnect between the contact X and the contact Y by manual operation. As shown in FIG. 3, the contact X is connected to the contact C of the relay unit 151A, and the contact Y is connected to the contact c of the relay unit 151B.
The short-circuit relay 153 enables the data through function described later by connecting the contact X and the contact Y, and disables the data through function by setting the disconnection state.

制御部110は、CPU(Central Processing Unit)、所定の時間を計時するタイマ等から構成され、記憶部120に格納されたプログラムに従って、ロードバランサ100の全体の動作を制御する。
具体的には、制御部110は、例えば、以下に述べる、負荷バランス機能、データスルー機能、ARP(Address Resolution Protocol)代理応答機能を実現させるようにロードバランサ100の全体を制御する。
The control unit 110 includes a CPU (Central Processing Unit), a timer for measuring a predetermined time, and the like, and controls the overall operation of the load balancer 100 according to a program stored in the storage unit 120.
Specifically, the control unit 110 controls the entire load balancer 100 so as to realize, for example, a load balance function, a data through function, and an ARP (Address Resolution Protocol) proxy response function described below.

制御部110は、通信回路152Bから供給される宛先IPアドレスがXであるパケットを、ウェブサーバ200及び201の負荷の量に応じて、一方に負荷が集中しないように、いずれのウェブサーバに転送するかを選択する、負荷バランス機能を実現する。   The control unit 110 transfers the packet whose destination IP address is X supplied from the communication circuit 152B to any web server so that the load is not concentrated on one side according to the load amount of the web servers 200 and 201. Realize a load balance function to select whether to do.

制御部110は、所定期間内のCPUの応答の有無に応じて、リレー部151A及びリレー部151Bを制御することにより、データスルー機能を実現する。   The control unit 110 realizes a data through function by controlling the relay unit 151A and the relay unit 151B in accordance with the presence or absence of a CPU response within a predetermined period.

制御部110は、ウェブサーバ200に障害が発生した場合に、IPアドレスXに対応するMAC(Media Access Control)アドレスを求めるARP要求が発生した場合、記憶部120に予め格納しておいたARP情報に基づき、ウェブサーバ200に代わってARP応答を送信する、ARP代理応答機能を実現する。   If a failure occurs in the web server 200 and an ARP request for a MAC (Media Access Control) address corresponding to the IP address X is generated, the control unit 110 stores the ARP information stored in the storage unit 120 in advance. Based on the above, an ARP proxy response function for transmitting an ARP response on behalf of the web server 200 is realized.

このように構成される負荷分散システム1において、ロードバランサ100が実現する、負荷バランス機能、データスルー機能、ARP代理応答機能について、それぞれ詳細に説明する。   In the load distribution system 1 configured as described above, the load balance function, the data through function, and the ARP proxy response function realized by the load balancer 100 will be described in detail.

負荷バランス機能を実現するために、ロードバランサ100の制御部110は以下のように動作する。   In order to realize the load balance function, the control unit 110 of the load balancer 100 operates as follows.

すなわち、制御部110は、宛先IPアドレスがXであるパケットを受け取ると、通信回路152A及び通信ネットワークAを介して、ウェブサーバ200の負荷量とウェブサーバ201の負荷量とを取得する。そして、制御部110は、負荷量が小さいウェブサーバをパケットの転送先として選択する。   That is, when the control unit 110 receives a packet whose destination IP address is X, the control unit 110 acquires the load amount of the web server 200 and the load amount of the web server 201 via the communication circuit 152A and the communication network A. Then, the control unit 110 selects a web server with a small load as a packet transfer destination.

制御部110は、パケットの転送先としてウェブサーバ200を選択した場合には、当該パケットをそのまま通信回路152Aに供給する。
また、制御部110は、パケットの転送先としてウェブサーバ201を選択した場合には、パケットの宛先IPアドレスをYに変更してから当該変更後のパケットを通信回路152Aに供給する。
When the web server 200 is selected as the packet transfer destination, the control unit 110 supplies the packet to the communication circuit 152A as it is.
In addition, when the web server 201 is selected as a packet transfer destination, the control unit 110 changes the destination IP address of the packet to Y, and then supplies the changed packet to the communication circuit 152A.

なお、上記の負荷バランス機能実行時とは逆方向の通信時、すなわち、通信ネットワークAから通信ネットワークBにパケットを送る場合には、制御部110は、次のように動作する。すなわち、制御部110は、通信回路152Aから、ウェブサーバ200が送出したパケットを受け取ると、そのパケットを、通信回路152Bを介してそのまま通信ネットワークBに送出する。また、ウェブサーバ201が送出したパケットを受け取ると、パケットの送信元IPアドレスをXに変更してから当該変更後のパケットを通信回路152Bに供給する。   It should be noted that the controller 110 operates as follows when communicating in the opposite direction to when the load balance function is executed, that is, when sending a packet from the communication network A to the communication network B. That is, when the control unit 110 receives a packet sent from the web server 200 from the communication circuit 152A, the control unit 110 sends the packet to the communication network B as it is via the communication circuit 152B. When the packet sent by the web server 201 is received, the source IP address of the packet is changed to X, and then the changed packet is supplied to the communication circuit 152B.

データスルー機能を実現するために、ロードバランサ100の制御部110は以下のように動作する。   In order to implement the data through function, the control unit 110 of the load balancer 100 operates as follows.

すなわち、制御部110は、タイマで計時する所定の期間内に、CPUの応答が有るか否かを監視する。そして、制御部110は、所定の期間内にCPUの応答が有る場合には、リレー部151Aの接点Aと接点B、リレー部151Bの接点aと接点b、をそれぞれ接続させる。この場合、通信ネットワークAと通信ネットワークBとの間を伝送されるパケットは、制御部110を介することとなる。従って、通信ネットワークBから通信ネットワークAへと伝送されるパケットは、上述の負荷バランス機能により、ウェブサーバ200又は201のいずれかに伝送される(データスルー機能は働かない)。   That is, the control unit 110 monitors whether or not there is a response from the CPU within a predetermined period measured by a timer. Then, when there is a CPU response within a predetermined period, the control unit 110 connects the contact A and the contact B of the relay unit 151A and the contact a and the contact b of the relay unit 151B, respectively. In this case, a packet transmitted between the communication network A and the communication network B passes through the control unit 110. Therefore, a packet transmitted from the communication network B to the communication network A is transmitted to either the web server 200 or 201 by the above-described load balance function (data through function does not work).

一方、制御部110は、所定の期間内にCPUの応答がない場合には、リレー部151Aの接点Cと接点B、リレー部151Bの接点cと接点b、をそれぞれ接続させる。この場合、通信ネットワークAと通信ネットワークBとの間を伝送されるパケットは、短絡リレー153を介することとなる。従って、上述の負荷バランス機能は利用されず、パケットの宛先IPアドレスは常にXとなる。つまり、全てのパケットがウェブサーバ200に伝送される(データスルー機能が働く)。   On the other hand, when the CPU does not respond within a predetermined period, control unit 110 connects contact C and contact B of relay unit 151A and contact c and contact b of relay unit 151B. In this case, a packet transmitted between the communication network A and the communication network B passes through the short circuit relay 153. Therefore, the load balance function described above is not used, and the destination IP address of the packet is always X. That is, all packets are transmitted to the web server 200 (data through function works).

なお、短絡リレー153が切断状態となっている場合には、リレー部151Aの接点Cと接点B、リレー部151Bの接点cと接点b、がそれぞれ接続されても、パケットは通信ネットワークAと通信ネットワークBとの間を伝送できない。すなわち、データスルー機能は無効となる。   When the short-circuit relay 153 is in a disconnected state, even if the contact C and contact B of the relay unit 151A and the contact c and contact b of the relay unit 151B are connected, the packet is communicated with the communication network A. Transmission to and from network B is not possible. That is, the data through function is disabled.

ARP代理応答機能を実現するために、ロードバランサ100の制御部110は以下のように動作する。   In order to realize the ARP proxy response function, the control unit 110 of the load balancer 100 operates as follows.

まず、ARP代理応答機能を実行するのに先立ち、ウェブサーバ200が正常に機能しているときには、制御部110は、図4のフローチャートに示されるような、通常応答処理を実行することにより、ウェブサーバ200のMACアドレスを取得しておく。   First, prior to executing the ARP proxy response function, when the web server 200 is functioning normally, the control unit 110 executes the normal response process as shown in the flowchart of FIG. The MAC address of the server 200 is acquired.

ウェブサーバ200が正常に機能している状態でクライアント300からIPアドレスXに対応するMACアドレスを求める要求(ARP要求)が発生すると、負荷分散システム1は、通常応答処理を開始する。
通常応答処理が開始されると、制御部110は、当該ARP要求を記憶部120に記憶する(ステップS100)。そして、制御部110は、ARP要求の内容を変更せずに通信制御部150を介して、当該ARP要求を通信ネットワークAに転送する(ステップS110)。
When a request for requesting a MAC address corresponding to the IP address X (ARP request) is generated from the client 300 while the web server 200 is functioning normally, the load distribution system 1 starts normal response processing.
When the normal response process is started, the control unit 110 stores the ARP request in the storage unit 120 (step S100). Then, the control unit 110 transfers the ARP request to the communication network A via the communication control unit 150 without changing the content of the ARP request (step S110).

そして、ウェブサーバ200がARP要求への結果(ARP応答)を送信する(ステップS120)と、制御部110は、通信制御部150を介してこれを受け取り、当該ARP応答に含まれるMACアドレスを、先に保存したARP要求に対応付けて保存する(ステップS130)。また、制御部110は、要求元のクライアント300宛に、当該ARP応答を通信ネットワークBに転送する(ステップS140)。クライアントがARP応答を受信して(ステップS150)、通常応答処理は終了となる。   Then, when the web server 200 transmits the result (ARP response) to the ARP request (step S120), the control unit 110 receives this via the communication control unit 150, and determines the MAC address included in the ARP response as follows. The data is stored in association with the previously stored ARP request (step S130). Also, the control unit 110 transfers the ARP response to the communication network B to the requesting client 300 (step S140). The client receives the ARP response (step S150), and the normal response process ends.

制御部110は、ウェブサーバ200が正常に機能しているか否かを監視する。そして、ウェブサーバ200が正常に機能していないことを検知した場合、制御部110は、図5に示す代理応答処理を実行することで、ARP代理応答機能を実現する。   The control unit 110 monitors whether the web server 200 is functioning normally. And when it detects that the web server 200 is not functioning normally, the control part 110 implement | achieves an ARP proxy response function by performing the proxy response process shown in FIG.

IPアドレスXについてのARP要求をクライアント300が発生すると、負荷分散システム1は代理応答処理を開始する。
制御部110は、ARP要求に応答して、ウェブサーバ200が正常に動作していたときに予め取得しておいたMACアドレスを用いて、代理でARP応答を送出する(ステップS200)。
When the client 300 generates an ARP request for the IP address X, the load distribution system 1 starts proxy response processing.
In response to the ARP request, the control unit 110 sends an ARP response on behalf of the proxy using the MAC address acquired in advance when the web server 200 is operating normally (step S200).

クライアント300がARP応答を受け取ると(ステップS210)、クライアント300はコネクション要求を発生する(ステップS220)。制御部110は、コネクション要求を受け取ると、通信制御部150を介して、ウェブサーバ201に対するARP要求を発生する(ステップS230)。これに対しウェブサーバ201はARP応答を発生する(ステップS240)。制御部110は、ARP応答を受信し(ステップS250)、ウェブサーバ201へのコネクション要求を送信する(ステップS260)。これに応答し、ウェブサーバ201は、クライアント300とのコネクションを確立する(ステップS270)。以上で代理応答処理が終了となる。   When the client 300 receives the ARP response (step S210), the client 300 generates a connection request (step S220). Upon receiving the connection request, the control unit 110 generates an ARP request for the web server 201 via the communication control unit 150 (step S230). In response to this, the web server 201 generates an ARP response (step S240). The control unit 110 receives the ARP response (step S250) and transmits a connection request to the web server 201 (step S260). In response to this, the web server 201 establishes a connection with the client 300 (step S270). This completes the proxy response process.

なお、ウェブサーバ200を別のハードウェアに置き換えることで、復旧した場合には、ロードバランサ100の制御部110は、通常応答処理を実行し、ARP情報を更新する。   When the web server 200 is restored by replacing it with another hardware, the control unit 110 of the load balancer 100 executes normal response processing and updates the ARP information.

次に、図6に示すフローチャートを参照して、ロードバランサ100に供給されるデータ量が増大し、データスルー機能が働いた場合に実施される、負荷分散システム1の障害発生時動作について、具体的に説明する。   Next, with reference to the flowchart shown in FIG. 6, the operation at the time of failure of the load distribution system 1 performed when the data amount supplied to the load balancer 100 increases and the data through function operates will be described. I will explain it.

データスルー機能が働いたときには、通信ネットワークAと通信ネットワークBとは、ロードバランサ100の通信制御部150内のリレー部151Aと、短絡リレー153と、リレー部151Bと、を介して物理的に短絡されている。   When the data through function is activated, the communication network A and the communication network B are physically short-circuited via the relay unit 151A, the short-circuit relay 153, and the relay unit 151B in the communication control unit 150 of the load balancer 100. Has been.

このような状態で、クライアント300が、ウェブサーバ200及び201の仮想的なIPアドレス(すなわち、ロードバランサのLANポート154BのIPアドレス)であるXに対し、ARP要求を発生すると、障害発生時動作が開始される。ARP要求は、ロードバランサ100のLANポート154Bに受け取られるが、リレー部151Bと、短絡リレー153と、リレー部151Aとを介して、そのままLANポート154Aから通信ネットワークAに送出される(ステップS300)。   In this state, when the client 300 generates an ARP request for X, which is the virtual IP address of the web servers 200 and 201 (that is, the IP address of the LAN port 154B of the load balancer), the operation when a failure occurs Is started. The ARP request is received by the LAN port 154B of the load balancer 100, but is directly sent from the LAN port 154A to the communication network A via the relay unit 151B, the short-circuit relay 153, and the relay unit 151A (step S300). .

通信ネットワークAに送出されたARP要求は、宛先IPアドレスがXであるため、ウェブサーバ200により受信され、ウェブサーバ200は、ARP応答を発生する(ステップS310)。   The ARP request sent to the communication network A is received by the web server 200 because the destination IP address is X, and the web server 200 generates an ARP response (step S310).

ARP応答は、ロードバランサ100のLANポート154Aに受け取られるが、リレー部151Aと、短絡リレー153と、リレー部151Bとを経由して、そのままLANポート154Bから通信ネットワークBに送出される(ステップS320)。   The ARP response is received by the LAN port 154A of the load balancer 100, but is directly sent from the LAN port 154B to the communication network B via the relay unit 151A, the short-circuit relay 153, and the relay unit 151B (step S320). ).

通信ネットワークBに送出されたARP応答は、クライアント300により受信される(ステップS330)。次に、クライアント300は、コネクション要求を発生する(ステップS340)。   The ARP response sent to the communication network B is received by the client 300 (step S330). Next, the client 300 generates a connection request (step S340).

コネクション要求は、ロードバランサ100のLANポート154Bに受け取られるが、リレー部151Bと、短絡リレー153と、リレー部151Aとを介して、そのままLANポート154Aから通信ネットワークAに送出される(ステップS350)。   The connection request is received by the LAN port 154B of the load balancer 100, but is directly sent from the LAN port 154A to the communication network A via the relay unit 151B, the short-circuit relay 153, and the relay unit 151A (step S350). .

通信ネットワークAに送出されたコネクション要求は、ウェブサーバ200に受信され、ウェブサーバ200は、クライアント300とのコネクションを確立する(ステップS360)。以上で障害発生時動作が終了となる。   The connection request sent to the communication network A is received by the web server 200, and the web server 200 establishes a connection with the client 300 (step S360). This is the end of the operation when a failure occurs.

このように、本実施の形態の負荷分散システム1では、通信ネットワークBにおけるロードバランサ100のIPアドレスと、通信ネットワークAにおけるウェブサーバ200のIPアドレスとが同一に設定される。そして、障害発生時には、ロードバランサ100が通信ネットワークAと通信ネットワークBとを短絡する。このため、短絡状態に成っているときに、クライアント300が、ウェブサーバ200及び201の仮想的なIPアドレス(すなわちロードバランサ100)にアクセスしようとした場合、そのアクセスは、通信ネットワークA及び通信ネットワークBの設定を変更することなく、通信ネットワークA上のウェブサーバ200へのアクセスへと転化されることが可能である。   Thus, in the load distribution system 1 of the present embodiment, the IP address of the load balancer 100 in the communication network B and the IP address of the web server 200 in the communication network A are set to be the same. When a failure occurs, the load balancer 100 short-circuits the communication network A and the communication network B. For this reason, when the client 300 tries to access the virtual IP addresses (that is, the load balancer 100) of the web servers 200 and 201 in the short-circuit state, the access is made by the communication network A and the communication network. It is possible to convert the access to the web server 200 on the communication network A without changing the setting of B.

以上で説明したように、本実施の形態の負荷分散システム1は、CPUがハングアップしてロードバランサ100が応答しなくなるような障害が発生した場合でも、ウェブサーバへのアクセスを維持できる。   As described above, the load distribution system 1 according to the present embodiment can maintain access to the web server even when a failure occurs such that the CPU hangs up and the load balancer 100 does not respond.

上記の実施の形態では、ロードバランサ100のCPUが正常に機能しているか否かに応じてリレー部151A及びリレー部151Bを切り替える場合を例に説明した。しかし、本発明のロードバランサは、ロードバランサに供給されるデータ量を監視し、データ量が所定の閾値を越えたか否かに応じて、リレー部151A及びリレー部151Bを切り替えるようにしてもよい。
これにより、ロードバランサ100がハングアップすることを防ぎつつ、ウェブサーバへのアクセスを維持することが可能となる。
In the above embodiment, the case where the relay unit 151A and the relay unit 151B are switched according to whether the CPU of the load balancer 100 is functioning normally has been described as an example. However, the load balancer of the present invention may monitor the amount of data supplied to the load balancer and switch between the relay unit 151A and the relay unit 151B depending on whether the data amount exceeds a predetermined threshold. .
This makes it possible to maintain access to the web server while preventing the load balancer 100 from hanging up.

また、本発明のロードバランサは、ロードバランサ100の電源のON/OFFに応じてリレー部151A及びリレー部151Bを切り替えるようにしてもよい。
これにより、ロードバランサ100に停電が発生した場合でも、ウェブサーバへのアクセスを維持することが可能となる。
In addition, the load balancer of the present invention may switch between the relay unit 151A and the relay unit 151B in accordance with ON / OFF of the power supply of the load balancer 100.
Thereby, even when a power failure occurs in the load balancer 100, it is possible to maintain access to the web server.

また、本発明のロードバランサは、手動でリレー部151A及びリレー部151Bを切り替える手段を備えてもよい。   The load balancer of the present invention may include means for manually switching between the relay unit 151A and the relay unit 151B.

上記の実施の形態では、負荷分散システム1に2台のウェブサーバが含まれる場合を例に説明した。しかし、ウェブサーバの数は3台以上であっても構わない。   In the above embodiment, the case where the load distribution system 1 includes two web servers has been described as an example. However, the number of web servers may be three or more.

以上、この発明の実施の形態を説明したが、本発明にかかるロードバランサは、専用のシステムによらず、通常のコンピュータシステムを用いて実現可能である。例えば、通信ネットワークA及び通信ネットワークBに接続されたコンピュータに、上述の制御部110と、記憶部120と、入力部130と、出力部140と、通信制御部150と、の動作を実行させるためのプログラムを格納した媒体(CD−ROM、MO等)からこれらのプログラムをインストールすることにより、当該コンピュータは、上述の処理を実行するロードバランサとして機能する。   Although the embodiment of the present invention has been described above, the load balancer according to the present invention can be realized using a normal computer system, not a dedicated system. For example, to cause a computer connected to the communication network A and the communication network B to execute the operations of the control unit 110, the storage unit 120, the input unit 130, the output unit 140, and the communication control unit 150 described above. By installing these programs from a medium (CD-ROM, MO, etc.) storing these programs, the computer functions as a load balancer that executes the above-described processing.

また、コンピュータにプログラムを提供する方法は任意である。例えば、プログラムは、通信回線の掲示板(BBS)にアップロードされ、通信回線を介してコンピュータに配信されてもよい。また、プログラムは、プログラムを表す信号により搬送波を変調した変調波により伝送され、この変調波を受信した装置が変調波を復調してこのプログラムを復元するようにしてもよい。そして、コンピュータは、このプログラムを起動して、OSの制御のもと、他のアプリケーションプログラムと同様に実行する。これにより、コンピュータは、上述の処理を実行するロードバランサとして機能する。   Further, the method for providing the program to the computer is arbitrary. For example, the program may be uploaded to a bulletin board (BBS) on a communication line and distributed to a computer via the communication line. The program may be transmitted by a modulated wave obtained by modulating a carrier wave with a signal representing the program, and a device that receives the modulated wave may demodulate the modulated wave to restore the program. Then, the computer activates this program and executes it in the same manner as other application programs under the control of the OS. Thus, the computer functions as a load balancer that executes the above-described processing.

なお、OSが処理の一部を分担する場合、あるいは、OSが本願発明の1つの構成要素の一部を構成するような場合、記録媒体は、その部分を除いたプログラムを格納してもよい。   When the OS shares a part of the process, or when the OS constitutes a part of one component of the present invention, the recording medium may store a program excluding that part. .

負荷分散システムの構成を示すブロック図である。It is a block diagram which shows the structure of a load distribution system. ロードバランサの構成を示すブロック図である。It is a block diagram which shows the structure of a load balancer. 通信制御部の構成を示すブロック図である。It is a block diagram which shows the structure of a communication control part. 通常応答処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a normal response process. 代理応答処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a proxy response process. 負荷分散システムの障害発生時動作の手順を説明するフローチャートである。It is a flowchart explaining the procedure of the operation | movement at the time of the failure occurrence of a load distribution system. 従来の負荷分散システムの構成を示すブロック図である。It is a block diagram which shows the structure of the conventional load distribution system.

符号の説明Explanation of symbols

100 ロードバランサ
200 ウェブサーバ
201 ウェブサーバ
300 クライアント
400 ファイヤウォール
100 Load balancer 200 Web server 201 Web server 300 Client 400 Firewall

Claims (6)

複数のサーバが接続される第1のネットワークとの通信をする第1の通信手段と、
クライアントが接続され、前記第1のネットワークと同一のプロトコルに従って動作する、第2のネットワークとの通信をする第2の通信手段と、
複数の前記サーバの負荷量に応じて、前記第2の通信手段から前記第1の通信手段へと伝送させる宛先となるサーバを複数の前記サーバから選択し、当該選択された前記サーバにデータを転送する負荷分散手段と、
から構成されるロードバランサであって、
前記第1の通信手段と前記第2の通信手段とを短絡し、前記負荷分散手段を介さずに前記第1のネットワークと前記第2のネットワークとを接続する短絡手段を更に備え、
前記第2の通信手段には、複数の前記サーバのうちのいずれか一のサーバのIP(Internet Protocol)アドレスと同一のIPアドレスが設定される、
ことを特徴とするロードバランサ。
First communication means for communicating with a first network to which a plurality of servers are connected;
A second communication means for communicating with a second network, to which a client is connected and which operates according to the same protocol as the first network;
According to load amounts of the plurality of servers, a server serving as a destination to be transmitted from the second communication unit to the first communication unit is selected from the plurality of servers, and data is transmitted to the selected server. Load balancing means to transfer,
A load balancer comprising:
Short-circuit means for short-circuiting the first communication means and the second communication means, and connecting the first network and the second network without going through the load distribution means,
In the second communication means, the same IP address as the IP (Internet Protocol) address of any one of the servers is set.
A load balancer characterized by that.
前記ロードバランサに障害が発生した場合に前記短絡手段に前記第1の通信手段と前記第2の通信手段とを短絡させることを指示する指示情報を供給する、短絡制御手段を更に備え、
前記指示情報に応答して前記短絡手段が前記第1の通信手段と前記第2の通信手段とを短絡させる、
ことを特徴とする請求項1に記載のロードバランサ。
Short-circuit control means for supplying instruction information instructing the short-circuit means to short-circuit the first communication means and the second communication means when a failure occurs in the load balancer;
In response to the instruction information, the short-circuit means short-circuits the first communication means and the second communication means,
The load balancer according to claim 1.
所定の時間が経過しても前記負荷分散手段の応答がない場合に、前記短絡制御手段が前記指示情報を前記短絡手段に供給する、
ことを特徴とする請求項2に記載のロードバランサ。
The short-circuit control means supplies the instruction information to the short-circuit means when there is no response from the load distribution means even after a predetermined time has elapsed;
The load balancer according to claim 2.
前記ロードバランサに電源が供給されていない場合に、前記短絡制御手段が前記指示情報を前記短絡手段に供給する、
ことを特徴とする請求項2又は3に記載のロードバランサ。
When the power is not supplied to the load balancer, the short circuit control means supplies the instruction information to the short circuit means,
The load balancer according to claim 2 or 3, wherein
前記第2の通信手段と同一のIPアドレスが設定されている前記サーバが正常に動作している状態で、前記IPアドレスからMACアドレスを求めるためのアドレス解決要求が発生した場合に、前記アドレス解決要求と、これに応答して前記当該サーバが送信するアドレス解決応答とを取得してアドレス解決情報として保持する保持手段と、
前記サーバに障害が発生した場合に、前記保持手段に格納された前記アドレス解決情報に基づき前記サーバに代わってアドレス解決応答を送信する代理応答手段と、を更に備える、
ことを特徴とする請求項1から4のいずれか1項に記載のロードバランサ。
When an address resolution request for obtaining a MAC address from the IP address is generated in a state where the server set with the same IP address as the second communication unit is operating normally, the address resolution is performed. A holding means for acquiring a request and an address resolution response transmitted by the server in response to the request and holding it as address resolution information;
Proxy response means for transmitting an address resolution response on behalf of the server based on the address resolution information stored in the holding means when a failure occurs in the server;
The load balancer according to any one of claims 1 to 4, wherein
コンピュータを、
複数のサーバが接続される第1のネットワークとの通信をする第1の通信手段と、
クライアントが接続され、前記第1のネットワークと同一のプロトコルに従って動作する、第2のネットワークとの通信をする第2の通信手段と、
複数の前記サーバの負荷量に応じて前記第2の通信手段から前記第1の通信手段へと伝送させるデータを複数の前記サーバのうちのいずれに供給するかを選択し、当該選択された前記サーバにデータを転送する負荷分散手段と、
前記第1の通信手段と前記第2の通信手段とを短絡し、前記負荷分散手段を介さずに前記第1のネットワークと前記第2のネットワークとを接続する短絡手段と、
を備えたロードバランサとして機能させるプログラムであって、
前記第2の通信手段には、複数の前記サーバのうちのいずれか一のサーバのIP(Internet Protocol)アドレスと同一のIPアドレスが設定される、
ことを特徴とするプログラム。
Computer
First communication means for communicating with a first network to which a plurality of servers are connected;
A second communication means for communicating with a second network, to which a client is connected and which operates according to the same protocol as the first network;
Select which of the plurality of servers supplies data to be transmitted from the second communication means to the first communication means according to the load amount of the plurality of servers, and the selected Load balancing means for transferring data to the server;
Short-circuit means for short-circuiting the first communication means and the second communication means, and connecting the first network and the second network without going through the load distribution means;
A program that functions as a load balancer with
In the second communication means, the same IP address as the IP (Internet Protocol) address of any one of the servers is set.
A program characterized by that.
JP2005104522A 2005-03-31 2005-03-31 Load balancer and program Pending JP2006287605A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005104522A JP2006287605A (en) 2005-03-31 2005-03-31 Load balancer and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005104522A JP2006287605A (en) 2005-03-31 2005-03-31 Load balancer and program

Publications (1)

Publication Number Publication Date
JP2006287605A true JP2006287605A (en) 2006-10-19

Family

ID=37409035

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005104522A Pending JP2006287605A (en) 2005-03-31 2005-03-31 Load balancer and program

Country Status (1)

Country Link
JP (1) JP2006287605A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011014964A (en) * 2009-06-30 2011-01-20 Fujitsu Ltd Switch device, and method of controlling switch
JP2011146761A (en) * 2010-01-12 2011-07-28 Nec Computertechno Ltd Multi-node system, inter-node switch, and data relay method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011014964A (en) * 2009-06-30 2011-01-20 Fujitsu Ltd Switch device, and method of controlling switch
JP2011146761A (en) * 2010-01-12 2011-07-28 Nec Computertechno Ltd Multi-node system, inter-node switch, and data relay method

Similar Documents

Publication Publication Date Title
KR101678711B1 (en) Load balancing across layer-2 domains
WO2017114017A1 (en) Computer device, system and method for implementing load balancing
US9219641B2 (en) Performing failover in a redundancy group
US9058213B2 (en) Cloud-based mainframe integration system and method
JP5828954B2 (en) Packet processing method and router during server failure
US8462767B2 (en) Internet protocol compliant private branch electronic exchange and a method for redundantly configuring terminal interfaces
US20120311184A1 (en) IP Address Assignment System, Dynamic Host Configuration Protocol Server, And Method Of Assigning An IP Address
US20080285436A1 (en) Methods, systems, and computer program products for providing site redundancy in a geo-diverse communications network
JP2004266819A (en) Router setting method and router device
US9569145B2 (en) Gateway apparatus
JP5808700B2 (en) Communication control device, communication control system, virtualization server management device, switch device, and communication control method
CN107294845A (en) VRRP load-balancing methods and device
JPWO2010046977A1 (en) COMMUNICATION CONTROL PROGRAM, COMMUNICATION CONTROL DEVICE, COMMUNICATION CONTROL SYSTEM, AND COMMUNICATION CONTROL METHOD
JP2006287605A (en) Load balancer and program
KR100768631B1 (en) Method And Apparatus For Content Routing Of Content Level In The Content Delivery Network
CN115801642B (en) RDMA communication management module, method, equipment and medium based on state control
JP7486261B2 (en) Information processing device and information processing method
JP2006270680A (en) Layer two switch device
WO2013183231A1 (en) Communication system, communication control method, communication relay system, and communication relay control method
JP2006197051A (en) Network communication control unit and method
CN114900526A (en) Load balancing method and system, computer storage medium and electronic device
JP2626622B2 (en) OSI communication system
JP5432203B2 (en) Resource distribution system
JP2738362B2 (en) Network connection device
JP5125207B2 (en) IP telephone communication system and IP telephone communication method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061204

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081020

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081028

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081225

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090407