JP4154287B2 - Server load balancing method, load balancing system, server, and load balancing device - Google Patents

Server load balancing method, load balancing system, server, and load balancing device Download PDF

Info

Publication number
JP4154287B2
JP4154287B2 JP2003173127A JP2003173127A JP4154287B2 JP 4154287 B2 JP4154287 B2 JP 4154287B2 JP 2003173127 A JP2003173127 A JP 2003173127A JP 2003173127 A JP2003173127 A JP 2003173127A JP 4154287 B2 JP4154287 B2 JP 4154287B2
Authority
JP
Japan
Prior art keywords
server
servers
load
distribution
port number
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.)
Expired - Fee Related
Application number
JP2003173127A
Other languages
Japanese (ja)
Other versions
JP2005010983A (en
Inventor
俊之 須藤
健 川崎
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2003173127A priority Critical patent/JP4154287B2/en
Publication of JP2005010983A publication Critical patent/JP2005010983A/en
Application granted granted Critical
Publication of JP4154287B2 publication Critical patent/JP4154287B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、複数のサーバへの負荷を分散するための技術に関し、特に、サーバの負荷を動的に検出し、また、振り分けの割合などを自動的に決定するのに用いて好適な技術に関する。
【0002】
【従来の技術】
近年、インターネットの普及により、サーバへのアクセスの負荷を低減するために、サービスプロバイダなどが複数のサーバに負荷を分散させる装置(負荷分散装置)を運用している。
この負荷分散装置においては、例えば、下記の特許文献1にも記載されているように、サーバ群との間で負荷計測のための通信を行なったり、中継するサービスパケット〔FTP(File Transfer Protocol)やHTTP(Hyper Text Transfer Protocol)等のパケットデータ〕を監視して接続数やサーバの応答(レスポンス)時間を計測したりすることによって、各サーバの負荷状態を把握し、これに応じてサービスを複数サーバに分配することが行なわれる。
【0003】
【特許文献1】
特許第3369445号公報(特開平11−96128号公報)
【0004】
【発明が解決しようとする課題】
しかしながら、このような従来の負荷分散装置では、負荷分散のためのサーバ設定や、サーバ毎の振り分けの割合などの設定をオペレータが手動で行なうことによって、運用がなされている。例えば、負荷分散装置に新たにサーバを接続する場合、そのサーバの設定を負荷分散装置に反映する必要がある。また、サービス(コンテンツ)の種類によって担当サーバを分けるような場合にも、負荷分散装置に対して設定を加える必要がある。
【0005】
さらに、従来の負荷分散装置は、サーバ単位で負荷状況を測定しており、受信パケットの振り分けもサーバ単位で行なっているため、1つのサーバが複数のアプリケーションプログラム(以下、「サーバアプリケーション」ともいう)をそなえている場合に、その一部のアプリケーションが動作中で当該アプリケーションに対応するサービスパケットの処理が可能な状態にあっても、当該サーバにはパケットが振り分けられなかったり、対応するサーバアプリケーションが動作していないのにも関わらずパケットが振り分けられてしまったりといった非効率な運用がなされてしまう。
【0006】
本発明は、以上のような課題に鑑み創案されたもので、オペレータ等の人手を介さずに負荷分散の設定を自動的に行なえ、且つ、サーバで動作中のアプリケーションを考慮した効率的な負荷分散を行なえるようにすることを目的とする。
【0007】
【課題を解決するための手段】
上記の目的を達成するために、本発明のサーバ負荷分散方法は、数のサーバと、アプリケーションプログラム毎にポート番号が設定されたインタフェースポートを介して該複数のサーバと接続されて受信パケットを該複数のサーバに振り分ける負荷分散装置とえた負荷分散システムに用いられるサーバ負荷分散方法において、前記負荷分散装置前記複数のサーバから通知されパケット受信待ちのインタフェースポートのポート番号に基づいて、どのサーバがどのポート番号でパケット受信待ちとなっているかを示す情報を該複数のサーバのいずれかへ通知し、該情報が通知された該サーバは、該情報により特定される他のサーバとの間でネゴシエーションを行なうことにより決定した前記受信パケットの振り分けルールを前記負荷分散装置へ通知し、該負荷分散装置は、通知された該振り分けルールに従って受信パケットを振り分けることを特徴としている。
【0008】
ここで、前記振り分けルールは、前記受信パケットによりリクエストされるコンテンツの種類に応じた振り分けルールであってもよい。
【0009】
次に、本発明の負荷分散システムは、数のサーバと、アプリケーションプログラム毎にポート番号が設定されたインタフェースポートを介して該複数のサーバと接続されて受信パケットを該複数のサーバに振り分ける負荷分散装置とえたシステムにおいて、前記サーバパケット受信待ちのインタフェースポートを有する他のサーバとネゴシエーションを行ない受信パケットの振り分けルールを決定するネゴシエーション手段と、該ネゴシエーション手段で決定した該振り分けルールを前記負荷分散装置へ通知する振り分けルール通知手段と、を備え、該負荷分散装置前記サーバから該振り分けルールを受信する振り分けルール受信手段と、該振り分けルール受信手段で受信した該振り分けルールに従って受信パケットを振り分ける受信パケット振り分け手段とえたことを特徴としている。
ここで、前記振り分けルールは、前記同一ポート番号でパケット受信待ちの前記複数のサーバが、それぞれ配信するコンテンツの種類の分担についてのルールであってもよい。
【0010】
さらに、本発明のサーバは、受信パケットを複数のサーバに振り分ける負荷分散装置と、アプリケーションプログラム毎にポート番号が設定されたインタフェースポートを介して接続されサーバにおいて、前記負荷分散装置と接続されている前記複数のサーバのうち、パケット受信待ちのインタフェースポートを有するサーバとネゴシエーションを行ない、受信パケットの振り分けルールを決定するネゴシエーション手段と、該ネゴシエーション手段で決定した該振り分けルールを前記負荷分散装置へ通知する振り分けルール通知手段とえたことを特徴としている。
ここで、前記振り分けルールは、前記受信パケットによりリクエストされるコンテンツの種類に応じた振り分けルールであってもよい。
【0011】
次に、本発明の負荷分散装置は、複数のサーバと、アプリケーションプログラム毎にポート番号が設定されたインタフェースポートを介して接続されて、受信パケットを該複数のサーバに振り分ける負荷分散装置において、前記複数のサーバから通知されるパケット受信待ちのインタフェースポートのポート番号に基づいて、どのサーバがどのポート番号でパケット受信待ちとなっているかを示す情報を該複数のサーバのいずれかへ通知するサーバ情報通知手段と、該情報が通知されたサーバ同士がネゴシエーションを行ない決定する前記受信パケットの振り分けルールを、該複数のサーバのいずれかから受信する振り分けルール受信手段と、該振り分けルール受信手段で受信した該振り分けルールに従って受信パケットを振り分ける受信パケット振り分け手段と、えたことを特徴としている。
ここで、前記振り分けルールは、前記受信パケットによりリクエストされるコンテンツの種類に応じた振り分けルールであってもよい。
さらに、本発明のサーバ負荷分散方法は、それぞれ1以上のアプリケーションプログラムを有する複数のサーバと、該アプリケーションプログラム毎にポート番号が設定されたインタフェースポートを介して該複数のサーバと接続されて受信パケットを該複数のサーバに振り分ける負荷分散装置と、を備えた負荷分散システムに用いるサーバ負荷分散方法において、前記複数のサーバは、それぞれ、パケット受信待ちのインタフェースポートのポート番号を該負荷分散装置へ通知し、前記負荷分散装置は、該通知された該ポート番号に基づいて、どのサーバがどのポート番号でパケット受信待ちとなっているかを示す情報を該複数のサーバのいずれかへ通知し、該情報が通知された該サーバは、該複数のサーバ同士でネゴシエーションを行なうことにより決定した前記受信パケットの振り分けルールを前記負荷分散装置へ通知し、該負荷分散装置は、通知された該振り分けルールに従って受信パケットを振り分けることを特徴としている。
ここで、前記振り分けルールは、前記受信パケットによりリクエストされるコンテンツの種類に応じた振り分けルールであってもよい。
【0012】
【発明の実施の形態】
〔A〕第1実施形態の説明
図1は本発明の第1実施形態としての負荷分散システムの構成を示すブロック図で、この図1に示す負荷分散システム1は、複数のサーバ(計算機)2−1,2−2,2−3,…(以下、サーバA,B,C,…とそれぞれ表記することもある)と、これらのサーバ2−i(iは2以上の整数)と図示しない複数のクライアント(計算機)が接続されたLAN等のネットワークとの間において、上記クライアントからのユーザパケット(サービスリクエスト)をサーバ2−iに振り分けてサーバ2−iの負荷を分散させる負荷分散装置3とをそなえて構成されている。
【0013】
そして、各サーバ2−iは、それぞれ、FTPやHTTP等で通信可能な1以上のアプリケーションプログラム(サーバプログラム)21,オペレーティングシステム(OS)22,ハードウェア部23等をそなえて構成され、負荷分散装置3は、負荷分散制御プログラム31,オペレーティングシステム(OS)32,ハードウェア部33等をそなえて構成されている。なお、負荷分散装置3は、ハードウェア部33のインタフェース部333により、各サーバ2−iとそれぞれ起動中のアプリケーションプログラム21に応じたインタフェースポート(ポート番号)を介して接続される。
【0014】
ここで、サーバ2−iにおいて、アプリケーションプログラム(以下、「サーバアプリケーション」ともいう)21は、クライアントと接続(通信)する機能を有するプログラムであって、OS22により起動されると、クライアントとの通信のために、OS22との間で特定のポート番号を指定してソケットをオープンする機能を有するものである。具体的に、サーバアプリケーション21は、ソケット関数〔socket()関数〕を実行することでソケット(socket)を作成(ソケットオープン)し、バインド関数〔bind()関数〕を実行して作成したソケットに名前を付け(IPアドレス及びポート番号を割り当て)、さらに、リスニング関数〔listen()関数〕を実行して、パケット受信待ち(クライアントからの接続要求待ち)状態になる。
【0015】
なお、ポート番号(単に「ポート」と称することもある)とは、インターネット上の通信において、複数の相手と同時に接続を行なうためにIPアドレスの下に設けられたサブ(補助)アドレス(一般に、0から65535までの数字)を意味する。TCP/IP(Transmission Control Protocol/Internet Protocol)で通信を行なう計算機は、ネットワーク内での住所にあたるIPアドレスをもっているが、複数の計算機(IPアドレス)と同時に通信するために、補助アドレスとして複数の「ポート」をもっている。
【0016】
この「ポート」とIPアドレスとを組み合わせたネットワークアドレスを「ソケット」と呼び、接続を行なう場合は必ずこのIPアドレスとポート番号の組(ソケット)を指定する。そして、指定されたIPアドレスと他のIPアドレス上のポートとが結合(バインド)することにより、複数のIPアドレス(クライアント)との同時通信が可能となるのである。
【0017】
つまり、TCP/IP通信において、データの送受信は、通常、「ソケット」単位で行なわれる。換言すれば、「ソケット」には、通信を行なうアプリケーション21がTCP/IPを扱うための仮想的なインタフェースという意味もある。そして、アプリケーション21は、IPアドレスと「ポート」の組である「ソケット」を指定して回線を開く(オープンする)だけで、通信手順の詳細を気にすることなくデータの送受信を行なうことができる。
【0018】
次に、OS22は、サーバ2−iの全体動作を統括制御するものであるが、本実施形態では、上述のごとくパケット受信待ち状態となった(ソケットオープンした)サーバアプリケーション21に対応するポート番号を自サーバの識別子(例えば、IPアドレス)とともに負荷分散装置3へ通知するためのメッセージ(以下、ポート番号通知メッセージという)を生成するポート番号通知部221としての機能をそなえており、これにより、負荷分散装置3では、どのサーバ2−iがどのポート番号でパケット受信待ちとなっているか(つまり、現在、どのサーバ2−iでどのサーバアプリケーション21が起動しているか)を把握することが可能となる。
【0019】
なお、ハードウェア部23には、負荷分散装置3との通信を可能にするインタフェース等が設けられている。
一方、負荷分散装置3において、負荷分散制御プログラム31は、クライアントから受信されたパケット(ユーザパケット)を複数のサーバ2−iへ振り分けてサーバ2−iの負荷を分散させるためのプログラムであるが、ここでは、次のような機能を兼ね備えている。
【0020】
(1)サーバ2−iからOS32を通じて通知されるポート番号通知メッセージを受信するポート番号受信部311としての機能
(2)このポート番号受信部311で受信されたポート番号に基づいて、例えば図2に示すように、ポート番号とそのポート番号でパケット受信待ちとなっているサーバ(識別子)とを対応付けたポート番号/サーバ対応表(テーブル)4を作成するポート番号/サーバ対応表作成部312としての機能
かかるポート番号/サーバ対応表4により、負荷分散装置3は、例えば、サーバ2−1とサーバ2−3がそれぞれ同じポート番号=#1(アプリケーションa)でパケット受信待ちとなっており、サーバ2−1とサーバ2−2がそれぞれ同じポート番号=#2(アプリケーションb)でパケット受信待ちとなっており、サーバ2−2と2−3がそれぞれ同じポート番号=#3(アプリケーションc)でパケット受信待ちとなっていることを把握することが可能となる。
【0021】
OS32は、負荷分散装置3の全体動作を統括制御するものであるが、ここでは、上述のごとくポート番号/サーバ対応表作成部312により作成されたポート/サーバ対応表4をハードウェア部33におけるRAM等のメモリ331に格納・保持させる機能もそなえている。
そして、ハードウェア部33における分散制御部332は、上記メモリ331に保持されたポート番号/サーバ対応表4に基づいて、クライアントから受信されるユーザパケットの振り分け先を決定して、その振り分け先サーバ2−i宛に受信パケットを転送する分散制御を行なうものである。つまり、この分散制御部332と上記の負荷分散制御プログラム31とで、上記の対応表4に基づいて同一ポート番号でパケット受信待ちとなっているサーバ2−iに受信パケットを振り分ける受信パケット部としての機能が実現されていることになる。
【0022】
なお、この負荷分散の際の振り分けルールについては公知の手法を用いることができる。例えば、同一ポート番号#j(ただし、jは0以上の整数)でパケット受信待ちのサーバ2−iに公平に振り分けてもよいし、後述するように、当該サーバ2−iの負荷を実測してその実測値に応じて振り分け比率(割合)を変えるようにしてもよい。
【0023】
以下、上述のごとく構成された本実施形態の負荷分散システムの動作について、図3を参照しながら説明する。
まず、例えば、サーバ2−1,2−2(サーバA,B)において、クライアントと接続(通信)するためのサーバアプリケーション21が起動すると(ステップS1)、クライアントとの通信のために、当該アプリケーション21は、OS22との間で或るポート番号#jを指定してソケットをオープンする。即ち、サーバアプリケーション21は、socket()関数を実行することでsocketを作成し、bind()関数を実行してsocketに名前を付け、次いで、listen()関数を実行して、パケット受信待ち状態となる。
【0024】
この段階で、OS22は、ポート番号通知部221により、オープンしたソケットに割り当てられたIPアドレス,ポート番号#jを負荷分散装置3に通知するためのポート番号通知メッセージを作成し、オープンしたソケットを通じて接続している負荷分散装置3に対して、当該メッセージを送信する(ステップS2)。
【0025】
負荷分散装置3では、負荷分散制御プログラム31において、上記メッセージがポート番号受信部311で受信されると、当該ポート番号#jを基に、ポート番号/サーバ対応表作成部312が、前記のポート番号/サーバ対応表4(以下、単に「対応表4」と表記することがある)を作成する。この対応表4は、OS32の機能により、メモリ331に保持されて登録(更新)される(ハードウェア部33に対するテーブル設定;ステップS3)。
【0026】
その後、クライアントからのユーザパケット(接続要求)が負荷分散装置3にて受信されると(ユーザアクセス;ステップS4)、分散制御部332が、メモリ331にアクセスして、保持されている対応表4を参照し(ステップS5)、負荷分散させる(受信ユーザパケットの振り分け先)サーバ2−iを決定し、決定したサーバ2−i宛にインタフェース部333を通じて受信ユーザパケットを出力することで負荷分散を行なう(ステップS6)。
【0027】
例えば図4においては、ポート番号#1でパケット受信待ちとなっているサーバアプリケーション21に対応する受信ユーザパケットがサーバA,Bへそれぞれ振り分けられ、ポート番号#2でパケット受信待ちとなっているサーバアプリケーション21に対応する受信ユーザパケットがサーバAへ振り分けられている状態を示している。
【0028】
以上のようにして、複数サーバ2−iへの負荷分散を、オペレータによる設定なしで負荷分散装置3において自動的に決定して、ユーザアクセスをサーバ2−iでオープンしているポート(起動中のサーバアプリケーション21)単位で効率良く分散させることが可能となる。
〔B〕第2実施形態の説明
図5は本発明の第2実施形態としての負荷分散システムの構成を示すブロック図で、この図5に示す負荷分散システム1は、図1により前述したシステムに比して、負荷分散装置3の負荷分散制御プログラム31に、応答時間管理部313としての機能がそなえられている点が異なる。なお、その他の既述の符号と同一符号を付して示す構成要素については、特に断らない限り、既述のものと同一もしくは同様のものである。
【0029】
ここで、上記の応答時間管理部313は、サーバ2−iから通知されるパケット受信待ち状態となっているポート#jに対して或るデータ(例えば、ファイルデータでもよいし、WEBコンテンツ等でもよい)を受信するためにアクセス(テストアクセス)して(即ち、リクエストメッセージを送信して)、そのデータを受信するまでの時間(応答時間)をサーバ2−i別に計測して管理するもので、本実施形態では、計測した応答時間に応じてサーバ2−iへの受信ユーザパケットの振り分け比率が決定されて前記対応表4に反映されるようになっている。
【0030】
例えば、応答時間管理部313は、計測したポート番号#jに対する応答時間をサーバ2−i別に比較して、サーバ2−iへの受信ユーザパケットの振り分け比率を決定する(例えば、応答時間の短いサーバ2−iほど振り分け比率を高くする等)。
つまり、この応答時間管理部313は、ポート番号受信部311でポート番号の通知を受けると、そのポート番号別にサーバ2−iにアクセスして当該アクセスに対する応答時間をそれぞれ計測する(第1)応答時間計測部313aとしての機能と、その計測結果に基づいてサーバ2−iへの受信パケットの振り分け比率を決定する(第1)振り分け比率決定部313bとしての機能とを兼ね備えていることになる。
【0031】
そして、この場合、ポート番号/サーバ対応表作成部312は、例えば図6に示すように、サーバ2−iからポート番号#jの通知を受けて対応表4を作成する際、上述のごとく決定した振り分け比率をポート番号#j及びサーバ2−iと対応付けた対応表4を作成するようになっている。
なお、この図6においては、同一ポート番号=#1でパケット受信待ち状態となっている2台のサーバA,Bの応答時間計測の結果、サーバAの負荷の方が軽いため、サーバBに振り分けるパケット数の2倍をサーバAに振り分けることが示されている。
【0032】
以下、上述のごとく構成された本実施形態の負荷分散システムの動作について、図7を参照しながら説明すると、まず、この場合も、例えば、サーバ2−iにおいて、クライアントと接続(通信)するアプリケーション21が起動して、或るポート番号#jを指定してソケットがオープンすると、OS22は、ポート番号通知部221により、オープンしたポート番号#jを自サーバ2−iのIPアドレスとともに負荷分散装置3に通知する(ステップS11)。
【0033】
負荷分散装置3では、負荷分散制御プログラム31において、サーバ2−iから通知されたポート番号#jを基に、ポート番号/サーバ対応表作成部312が、ポート番号/サーバ対応表4を作成する。この対応表4は、OS32の機能により、メモリ331に保持されて登録(更新)される(ステップS12)。
その後、負荷分散装置12は、負荷分散制御プログラム31の応答時間管理部313により、サーバ2−i別にポート番号#jに対するテストアクセスを行なって、その応答が返ってくるまでの時間(データ受信までの時間)を計測する(ステップS13,S14)。
【0034】
ポート番号/対応表作成部312は、応答時間管理部313による計測結果を基にそのサーバ2−iに割り振る負荷の割合(振り分け比率)を計算し、その結果を対応表4に付加して反映させる(ステップS15)。当該対応表4は、OS32の機能により、ハードウェア部33のメモリ331に書き込まれ、その後にユーザパケットが受信されると、負荷分散装置3は、分散制御部332により、その対応表4に書き込まれた負荷の割合で当該受信ユーザパケットの振り分けを行なう。
【0035】
以上のようにして、本実施形態では、オペレータによる明示的な設定なしで、ポート番号#j単位で自動的にサーバ2−iに対する振り分け比率を決定(変更)して、負荷分散制御を効率良く行なうことができる。また、サーバ2−iの増減設,サーバ2−iの電源入/切があっても、自動的に、対応表4の登録・更新が行なわれるので、オペレータ等による明示的な設定なしに、最適な負荷分散制御が実現される。
【0036】
なお、上述した例では、負荷分散装置3がサーバ2−iの負荷を計測するに当たって、そのための通信(テストアクセス)を行なっているが、勿論、例えば、サーバ2−iからそのCPU使用率を通知させるなど、他の手法によって計測することも可能である。
(B1)第2実施形態の第1変形例の説明
上述したように振り分け比率を決定した後、サーバ2−iの負荷状態が変わることも考えられる。これに対応するためには、負荷分散装置3の上記応答時間管理部313(第1応答時間計測部313a)によって、上記テストアクセスを定期的に行なってその応答時間を計測するようにしてもよい。
【0037】
即ち、図7により上述したステップS13〜S15の処理を定期的に繰り返し行ない、それに対するサーバ2−iの応答時間をそれぞれ計測して、その応答時間に応じた振り分け比率の再計算(再決定)を(第1)振り分け比率決定部313bによって行なうことで、サーバ2−iの負荷状態に応じて動的に振り分け比率を定期的に更新するようにするのである(図8参照)。これにより、サーバ2−iの負荷変動に対応して振り分け比率を最適化することができ、効率良く負荷分散を行なうことができる。
【0038】
(B2)第2実施形態の第2変形例の説明
図9は図5により上述した負荷分散システムの第2変形例を示すブロック図で、この図9に示す負荷分散システム1は、前記の応答時間管理部313に代えて、応答時間管理部314がそなえられている点が異なる。
この応答時間管理部314は、サーバ2−i宛のユーザパケット(接続要求)及びそれに対する当該サーバ2−iからクライアント宛の応答データの流れをポート番号#j別に監視して、サーバ2−i宛のユーザパケットに対する応答データを受信するまでの時間を計測するもので、その計測結果に応じてサーバ2−iへの受信ユーザパケットの振り分け比率が決定されて前記対応表4に反映されるようになっている。
【0039】
つまり、本例では、上述した第1変形例のようにサーバ2−iの負荷を計測するために、負荷分散装置3からサーバ2−iにテストアクセスするのではなく、ユーザアクセス(ユーザパケット)及びその応答をポート番号#j単位で常時監視してサーバ2−iのユーザアクセスに対する応答時間をそれぞれ計測することで、サーバ2−iの負荷を計測するようになっているのである。
【0040】
このため、本変形例の応答時間管理部314は、複数のサーバ2−iに対するユーザアクセスをポート番号別に監視して当該サーバ2−iのユーザアクセスに対する応答時間をそれぞれ計測する(第2)応答時間計測部314aとしての機能と、その計測結果に基づいてサーバ2−iへの受信パケットの振り分け比率を決定する(第2)振り分け比率決定部314bとしての機能とを兼ね備えている。
【0041】
これにより、第1変形例のようにサーバ2−iに対してテストアクセスを行なう場合に比して、サーバ2−iと負荷分散装置3との間のトラフィックを増大させることなく、且つ、より精度の高いサーバ負荷監視を実現しながら、ポート番号#j単位で自動的にサーバ2−iに対する振り分け比率を決定して、負荷分散制御を効率良く行なうことができる。
【0042】
なお、この場合、負荷分散装置3は、応答時間管理部314によるユーザアクセスの監視結果によりポート番号/対応表作成部312において定期的に対応表4の振り分け比率を再計算して、その計算結果を対応表4に反映させるようにすることもできる。このようにすれば、サーバ2−iの負荷変動に対応して振り分け比率を最適化することができ、より効率良く負荷分散を行なうことができる。
【0043】
(B3)第2実施形態の第3変形例の説明
上述した第1及び第2変形例では、対応表4の作成及び対応表4の定期的な更新を負荷分散装置3によるテストアクセス又は負荷分散装置3でのユーザアクセス監視のいずれかのサーバ負荷測定手法により行なっているが、例えば図10に示すように、対応表4の作成は負荷分散装置3によるテストアクセス(ステップS11〜S15)、対応表4の定期的な更新はユーザアクセスの監視(ステップS16〜S18)により行なってもよいし、逆に、対応表4の作成はユーザアクセスの監視、対応表4の定期的な更新は負荷分散装置3によるテストアクセスというように、サーバ負荷測定手法を組み合わせて行なうことも可能である。
【0044】
〔C〕第3実施形態の説明
図11は本発明の第3実施形態としての負荷分散システムの構成を示すブロック図で、この図11に示す負荷分散システム1は、図1,図5又は図9により前述したシステムに比して、各サーバ2−iのアプリケーション21に、それぞれポリシー制御部211としての機能がそなえられるとともに、負荷分散装置3の負荷分散制御プログラム31に、ポリシー管理部315がそなえられている点が異なる。
【0045】
また、本実施形態では、サーバ2−i毎に異なるコンテンツの種類(例えば、サーバ2−iがWEBサーバであった場合、jpgやgif等の画像データと、html文書等の文字データ等)を扱う場合を想定する。なお、以下においても、既述の符号と同一符号を付すものは、特に断らない限り、既述のものと同一もしくは同様のものである。
【0046】
ここで、負荷分散装置3のポリシー管理部315は、サーバ2−iから通知されたポート番号を基に同じポート番号#jで複数のサーバ2−iでパケット受信待ち状態になっていることを認識すると、それらのサーバ2−iに当該ポート番号#jでパケット受信待ち状態になっているサーバの情報(IPアドレス等)を通知するとともに、その後に、当該サーバ2−i間でネゴシエーションにより決定した下記の振り分けルール(ポリシー)を受信すると、当該振り分けルールをポート番号/サーバ対応表作成部312によって作成された対応表4に反映させるものである。
【0047】
つまり、ポリシー管理部315は、どのサーバ2−iがどのポート番号でパケット受信待ちとなっているかを示す情報を複数のサーバ2−iに通知するサーバ情報通知部315aとしての機能と、当該通知を受けたサーバ2−i同士が受信パケットの振り分けルールのネゴシエーションを行なうことによりいずれかのサーバ2−iから通知される振り分けルールを受信する振り分けルール受信部315bとしての機能とを兼ね備えているのである。
【0048】
一方、サーバ2−iのポリシー制御部211は、上記の負荷分散装置3のポリシー管理部315から通知されるサーバ情報(IPアドレス)により特定される他のサーバ2−k(kは自然数でk≠j)におけるポリシー制御部211とネゴシエーションして、お互いにどの種類のコンテンツの提供を担当するか(振り分けルール)を決定し、その結果(振り分けルール)を負荷分散装置3に通知するものである。
【0049】
つまり、本例のサーバ2−iは、以下の(1)〜(3)に示す各部としての機能を兼ね備えていることになる。
(1)ポート番号通知部221によりポート番号を負荷分散装置3へ通知した後、負荷分散装置3からどのサーバ2−iがどのポート番号でパケット受信待ちとなっているかを示す情報の通知を受けるサーバ情報受信部211a
(2)サーバ情報受信部211aで受信した情報に基づいて他のサーバ2−iと受信パケットの振り分けルールのネゴシエーションを行なって振り分けルールを決定するネゴシエーション部211b
(3)ネゴシエーション部211bにより決定した振り分けルールを負荷分散装置3へ通知する振り分けルール通知部211c
以下、上述のごとく構成された本実施形態の負荷分散システムの動作について、図12及び図13を参照しながら説明する。
【0050】
まず、この場合も、例えば図12に示すように、サーバ2−1(サーバA)において、クライアントと接続(通信)するアプリケーション21が起動して(ステップS21)、或るポート番号#jを指定してソケットがオープンすると、OS22は、ポート番号通知部221により、オープンしたポート番号#jを自サーバ2−iのIPアドレスとともに負荷分散装置3に通知する(ステップS22)。
【0051】
負荷分散装置3では、負荷分散制御プログラム31において、サーバ2−iから通知されたポート番号#jを基に、ポート番号/サーバ対応表作成部312が、ポート番号/サーバ対応表4を作成する。この対応表4は、OS32の機能により、メモリ331に保持されて登録(更新)される(ステップS23)。
一方、サーバ2−2(サーバB)においても、図12に示すように、クライアントと接続する或るサーバアプリケーション21が起動して(ステップS24)、或るポート番号#jを指定してソケットがオープンすると、OS22は、ポート番号通知部221により、オープンしたポート番号#jを自サーバ2−iのIPアドレスとともに負荷分散装置3に通知する(ステップS25)。
【0052】
負荷分散装置3では、負荷分散制御プログラム31において、サーバ2−iから通知されたポート番号#jを基に、ポート番号/サーバ対応表作成部312が、ポート番号/サーバ対応表4を更新し、その内容が、OS32の機能により、メモリ331に保持されたポート番号/サーバ対応表4に反映される(ステップS26)。
【0053】
そして、負荷分散装置3は、ポリシー管理部315により、上記対応表4の内容に基づいて、同一ポート番号がオープンしているサーバアドレスをいずれかのサーバA,B(例えば、サーバB)に通知する(ステップS27)。この通知を受けたサーバBは、図12及び図13に示すように、ポリシー制御部211によって、自己及び他のサーバAが担当するコンテンツの種類を決定する。即ち、例えば、サーバAは画像等のコンテンツの配信を担当し、サーバBはhtmlファイル等の配信を担当する等の役割分担を決定する。
【0054】
サーバBは、決定した役割分担(振り分けルール)を負荷分散装置3から通知されたサーバアドレスをもつサーバAに通知し(ステップS28)、サーバAは、サーバBからの通知内容(振り分けポリシー)に問題がなく許容できれば、その旨をサーバBに応答する(ステップS29)。サーバBは、当該応答を受けることにより、決定した振り分けポリシーをサーバAとのネゴシエーション結果としてポリシー制御部211によって負荷分散装置3に通知する(ステップS30)。
【0055】
そして、負荷分散装置3は、ポリシー管理部312により、サーバBから通知された振り分けポリシーの内容を対応表4に反映(設定)して更新する(ステップS31)。以降、負荷分散装置3は、当該対応表4に従ってサーバA,Bに対する受信ユーザパケットの振り分けを実行する。
即ち、負荷分散装置3は、例えば、クライアントからのリクエスト(HTTPアクセス等)に対して、リクエストされたファイルの種類を判断して当該リクエスト(受信ユーザパケット)の振り分け先をサーバA,Bに分散させる。
【0056】
このように、負荷分散装置3に、同じポートが開いているサーバ2−iのアドレスをサーバ2−iに通知する機能をもたせ、その通知を受けたサーバ2−iに、同じポートが開いている他のサーバ2−iと相互に振り分けルール決定のためのネゴシエーションを行なう機能をもたせることにより、サーバ2−iの扱うコンテンツの種類で担当サーバ2−iを自動的に分類・整理することが可能となる。したがって、オペレータ等により設定作業等の手間が省け、ネットワーク運用のコスト削減が期待できる。
【0057】
なお、上記の例では、コンテンツの種類によって「振り分けルール」を決定しているが、勿論、他の要素によって決定するようにしてもよい。
また、本発明は、上述した各実施形態に限定されず、本発明の趣旨を逸脱しない範囲で種々変形して実施できることはいうまでもない。
〔D〕付記
(付記1) 1以上のアプリケーションプログラムを有する複数のサーバと、該複数のサーバとそれぞれ該アプリケーションプログラムに応じたインタフェースポートを介して接続されて受信パケットを該複数のサーバに振り分けることにより該サーバの負荷を分散させる負荷分散装置とをそなえた負荷分散システムにおいて、
該複数のサーバが、それぞれ、パケット受信待ちのポート番号を該負荷分散装置へ通知し、
該負荷分散装置が、該サーバから通知されたポート番号に基づいて、同一ポート番号でパケット受信待ちとなっている複数のサーバへ受信パケットを振り分けることを特徴とする、サーバ負荷分散方法。
【0058】
(付記2) 該負荷分散装置が、
該ポート番号の通知を受けると、該ポート番号別に該サーバにアクセスして当該アクセスに対する応答時間をそれぞれ計測し、
当該計測結果に基づいて該複数のサーバへの該受信パケットの振り分け比率を決定することを特徴とする、付記1記載のサーバ負荷分散方法。
【0059】
(付記3) 該負荷分散装置が、
該サーバに対するアクセスを定期的に行なって該応答時間を定期的に計測し、当該計測結果に基づいて該受信パケットの振り分け比率を定期的に変更することを特徴とする、付記2記載のサーバ負荷分散方法。
(付記4) 該負荷分散装置が、
該複数のサーバに対するユーザアクセスをポート番号別に監視して該サーバの該ユーザアクセスに対する応答時間をそれぞれ計測し、
当該計測結果に基づいて該複数のサーバへの該受信パケットの振り分け比率を決定することを特徴とする、付記2記載のサーバ負荷分散方法。
【0060】
(付記5) 該負荷分散装置が、
該ユーザアクセスに対する該サーバの応答時間を定期的に計測し、
当該計測結果に基づいて該受信パケットの振り分け比率を定期的に変更することを特徴とする、付記4記載のサーバ負荷分散方法。
(付記6) 該負荷分散装置が、通知されたポート番号を基にどのサーバがどのポート番号でパケット受信待ちとなっているかを示す情報を複数のサーバに通知し、
該通知を受けたサーバ同士が、該受信パケットの振り分けルールのネゴシエーションを行なって、その結果をいずれかのサーバが該負荷分散装置に通知し、
該負荷分散装置が、通知された振り分けルールに従って該受信パケットの振り分けを行なうことを特徴とする、付記1記載のサーバ負荷分散方法。
【0061】
(付記7) 1以上のアプリケーションプログラムを有する複数のサーバと、該複数のサーバとそれぞれ該アプリケーションプログラムに応じたインタフェースポートを介して接続されて受信パケットを該複数のサーバに振り分けることにより該サーバの負荷を分散させる負荷分散装置とをそなえた負荷分散システムであって、
該サーバが、それぞれ、
該アプリケーションプログラムが起動してパケット受信待ちとなったポート番号を該負荷分散装置へ通知するポート番号通知手段をそなえるとともに、
該負荷分散装置が、
該サーバの該ポート番号通知手段から該ポート番号の通知を受けるポート番号受信手段と、
該ポート番号受信手段で受信したポート番号を基に同一ポート番号でパケット受信待ちとなっているサーバについての対応表を作成する対応表作成手段と、
該対応表作成手段で作成された該対応表に基づいて同一ポート番号でパケット受信待ちとなっているサーバに受信パケットを振り分ける受信パケット振り分け手段とをそなえたことを特徴とする、負荷分散システム。
【0062】
(付記8) 1以上のアプリケーションプログラムを有する複数のサーバと、該複数のサーバとそれぞれ該アプリケーションプログラムに応じたインタフェースポートを介して接続されて受信パケットを該複数のサーバに振り分けることにより該サーバの負荷を分散させる負荷分散装置とをそなえた負荷分散システムに使用される該負荷分散装置であって、
該サーバからパケット受信待ちとなっているポート番号の通知を受けるポート番号受信手段と、
該ポート番号受信手段で受信したポート番号を基に同一ポート番号でパケット受信待ちとなっているサーバについての対応表を作成する対応表作成手段と、
該対応表作成手段で作成された該対応表に基づいて同一ポート番号でパケット受信待ちとなっているサーバに受信パケットを振り分ける受信パケット振り分け手段とをそなえたことを特徴とする、負荷分散システムに使用される負荷分散装置。
【0063】
(付記9) 該受信パケット振り分け手段が、
該ポート番号受信手段で該ポート番号の通知を受けると、該ポート番号別に該サーバにアクセスして当該アクセスに対する応答時間をそれぞれ計測する第1応答時間計測手段と、
該第1応答時間計測手段の計測結果に基づいて該複数のサーバへの該受信パケットの振り分け比率を決定する第1振り分け比率決定手段とをそなえて構成されたことを特徴とする、付記8記載の負荷分散システムに使用される負荷分散装置。
【0064】
(付記10) 該第1応答時間計測手段が、該サーバに対するアクセスを定期的に行なって該応答時間を定期的に計測するように構成されるとともに、
該第1振り分け比率決定手段が、該第1応答時間計測手段の計測結果に基づいて該受信パケットの振り分け比率を定期的に変更するように構成されたことを特徴とする、付記9記載の負荷分散システムに使用される負荷分散装置。
【0065】
(付記11) 該受信パケット振り分け手段が、
該複数のサーバに対するユーザアクセスをポート番号別に監視して該サーバの該ユーザアクセスに対する応答時間をそれぞれ計測する第2応答時間計測手段と、
該第2応答時間計測手段の計測結果に基づいて該複数のサーバへの該受信パケットの振り分け比率を決定する第2振り分け比率決定手段とをそなえて構成されたことを特徴とする、付記8記載の負荷分散システムに使用される負荷分散装置。
【0066】
(付記12) 該第2応答時間計測手段が、該ユーザアクセスに対する該サーバの応答時間を定期的に計測するように構成されるとともに、
該第2振り分け比率決定手段が、該第2応答時間計測手段の計測結果に基づいて該受信パケットの振り分け比率を定期的に変更するように構成されたことを特徴とする、付記11記載の負荷分散システムに使用される負荷分散装置。
【0067】
(付記13) 該受信パケット振り分け手段が、
該ポート番号受信手段で受信したポート番号に基づいて、どのサーバがどのポート番号でパケット受信待ちとなっているかを示す情報を複数のサーバに通知するサーバ情報通知手段と、
該通知を受けたサーバ同士が該受信パケットの振り分けルールのネゴシエーションを行なうことによりいずれかのサーバから通知される該振り分けルールを受信する振り分けルール受信手段とをそなえ、
該振り分けルール受信手段で受信された該振り分けルールに従って該受信パケットの振り分けを行なうように構成されたことを特徴とする、付記8記載の負荷分散システムに使用される負荷分散装置。
【0068】
(付記14) 1以上のアプリケーションプログラムを有する複数のサーバと、該複数のサーバとそれぞれ該アプリケーションプログラムに応じたインタフェースポートを介して接続されて受信パケットを該複数のサーバに振り分けることにより該サーバの負荷を分散させる負荷分散装置とをそなえた負荷分散システムに使用される該サーバであって、
該アプリケーションプログラムが起動してパケット受信待ちとなったポート番号を該負荷分散装置へ通知するポート番号通知手段をそなえたことを特徴とする、負荷分散システムに使用されるサーバ。
【0069】
(付記15) 該ポート番号通知手段により該ポート番号を該負荷分散装置へ通知した後、該負荷分散装置からどのサーバがどのポート番号でパケット受信待ちとなっているかを示す情報の通知を受けるサーバ情報受信手段と、
該サーバ情報受信手段で受信した情報に基づいて他のサーバと該受信パケットの振り分けルールのネゴシエーションを行なって振り分けルールを決定するネゴシエーション手段と、
該ネゴシエーション手段により決定した振り分けルールを該負荷分散装置へ通知する振り分けルール通知手段とをさらにそなえたことを特徴とする、付記14記載の負荷分散システムに使用されるサーバ。
【0070】
【発明の効果】
以上のように、本発明によれば、オペレータ等による明示的な設定なしに、負荷を分散させるサーバの決定、その負荷分散の振り分け割合の決定、サーバの状態の変化に動的に負荷の振り分け割合の変更、コンテンツの種類による負荷分散対象となるサーバの選択などが可能となり、少ないコストでのネットワーク運用が期待できるので、ネットワーク通信の分野において極めて有用である。
【図面の簡単な説明】
【図1】本発明の第1実施形態としての負荷分散システムの構成を示すブロック図である。
【図2】図1に示す負荷分散装置のポート番号/サーバ対応表作成機能を説明すべく負荷分散装置及びサーバの構成を示すブロック図である。
【図3】図1に示す負荷分散システムの動作を説明するためのシーケンス図である。
【図4】図1に示す負荷分散システムの動作を説明するための図である。
【図5】本発明の第2実施形態としての負荷分散システムの構成を示すブロック図である。
【図6】図5に示す負荷分散システムの動作を説明するための図である。
【図7】図5に示す負荷分散システムの動作を説明するためのシーケンス図である。
【図8】図7に示す負荷分散システムの第1変形例の動作を説明するためのシーケンス図である。
【図9】図5に示す負荷分散システムの第2変形例を示すブロック図である。
【図10】図9に示す負荷分散システムの動作を説明するためのシーケンス図である。
【図11】本発明の第3実施形態としての負荷分散システムの構成を示すブロック図である。
【図12】図11に示す負荷分散システムの動作を説明するためのシーケンス図である。
【図13】図11に示す負荷分散システムの動作を説明するための図である。
【符号の説明】
1 負荷分散システム
2−1,2−2,2−3,… サーバ
3 負荷分散装置
4 ポート番号/サーバ対応表(テーブル)
21 アプリケーションプログラム(サーバプログラム)
22 オペレーティングシステム(OS)
23 ハードウェア部
31 負荷分散制御プログラム
32 オペレーティングシステム(OS)
33 ハードウェア部
211 ポリシー制御部
211a サーバ情報受信部
211b ネゴシエーション部
211c 振り分けルール通知部
221 ポート番号通知部
312 ポート番号/サーバ対応表作成部
313 応答時間管理部
313a (第1)応答時間計測部
313b (第1)振り分け比率決定部
314 応答時間管理部
314a (第2)応答時間計測部
314b (第2)振り分け比率決定部
315 ポリシー管理部
315a サーバ情報通知部
315b 振り分けルール受信部
331 メモリ
332 分散制御部
333 インタフェース部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a technique for distributing loads to a plurality of servers, and more particularly to a technique suitable for dynamically detecting a server load and automatically determining a distribution ratio and the like. .
[0002]
[Prior art]
In recent years, with the spread of the Internet, in order to reduce the load of access to a server, a service provider or the like operates an apparatus (load distribution apparatus) that distributes the load to a plurality of servers.
In this load balancer, for example, as described in Patent Document 1 below, a service packet [FTP (File Transfer Protocol) that performs communication for load measurement with a server group or relays it. And the HTTP (Hyper Text Transfer Protocol) packet data) to measure the number of connections and server response time, etc. Distribution to multiple servers is performed.
[0003]
[Patent Document 1]
Japanese Patent No. 3369445 (Japanese Patent Laid-Open No. 11-96128)
[0004]
[Problems to be solved by the invention]
However, such a conventional load distribution apparatus is operated by an operator manually performing settings such as server settings for load distribution and a distribution ratio for each server. For example, when a new server is connected to the load balancer, it is necessary to reflect the server settings on the load balancer. Also, when the server in charge is divided according to the type of service (content), it is necessary to add settings to the load balancer.
[0005]
Furthermore, since the conventional load distribution apparatus measures the load status in units of servers and distributes received packets in units of servers, one server is also referred to as a plurality of application programs (hereinafter also referred to as “server applications”). ), Even if some of the applications are running and the service packet corresponding to the application can be processed, packets cannot be distributed to the server, or the corresponding server application Inefficient operation such as packets being distributed even though is not working.
[0006]
The present invention was devised in view of the above problems, and can automatically set load distribution without human intervention such as an operator, and can efficiently load an application in consideration of an application running on a server. The purpose is to enable dispersion.
[0007]
[Means for Solving the Problems]
  In order to achieve the above object, the server load balancing method of the present invention includes:DuplicateNumber of servers,A port number was set for each application programVia interface portWith the plurality of serversConnected and distributes received packets to multiple serversNegativeWith load balancer,ThePreparationLoad balancing systemServer load balancing methodInAboveLoad balancerIs,The plurality ofNotified by the serverRuWaiting for packet receptionBased on the port number of the interface port, information indicating which server is waiting to receive a packet at which port number is notified to any of the plurality of servers, and the server notified of the information Notifying the load distribution device of the distribution rule of the received packet determined by performing negotiation with another server specified by the information, and the load distribution device according to the notified distribution ruleIt is characterized by sorting received packets.
[0008]
  here,The distribution rule is a distribution rule corresponding to the type of content requested by the received packet.May be.
[0009]
  Next, the load balancing system of the present invention isDuplicateNumber of servers,A port number was set for each application programVia interface portWith the plurality of serversConnected and distributes received packets to multiple serversNegativeWith load balancer,ThePreparationSystemsmellAndAboveserverIs,Negotiation means for negotiating with another server having an interface port waiting for packet reception to determine a distribution rule for received packets, and distribution rule notification means for notifying the distribution rule determined by the negotiation means to the load balancer; With, The load balancerIs,A distribution rule for receiving the distribution rule from the serverReceiving means; andSorting rulesReceived by receiving meansAccording to the distribution ruleReceive packet distribution means for distributing received packets and,ThePreparationIt is characterized by that.
  Here, the distribution rule may be a rule regarding sharing of types of contents distributed by the plurality of servers waiting for packet reception with the same port number.
[0010]
  Furthermore, the present inventionserverIsA load balancer that distributes received packets to multiple servers;Application programA port number was set for eachConnected via interface portRuserversmellAndNegotiation means for negotiating with a server having an interface port waiting for packet reception among the plurality of servers connected to the load balancer and determining a distribution rule for received packets, and the distribution determined by the negotiation means Distribution rule notification for notifying the load balancer of rulesMeans and,ThePreparationIt is characterized by that.
  Here, the distribution rule may be a distribution rule corresponding to the type of content requested by the received packet.
[0011]
  Next, load balancing of the present inventionapparatusIsIn a load balancer that is connected to a plurality of servers via an interface port in which a port number is set for each application program, and distributes received packets to the plurality of servers, a packet reception waiting notification notified from the plurality of servers Based on the port number of the interface port, server information notifying means for notifying one of the plurality of servers of information indicating which server is waiting to receive a packet at which port number, and the server to which the information is notified A distribution rule receiving unit that receives the distribution rule of the received packet that is negotiated and determined from any of the plurality of servers, and a reception packet distribution that distributes the received packet according to the distribution rule received by the distribution rule reception unit Means,ThePreparationIt is characterized by that.
  Here, the distribution rule may be a distribution rule corresponding to the type of content requested by the received packet.
  Furthermore, the server load distribution method of the present invention is a received packet connected to a plurality of servers each having one or more application programs and an interface port in which a port number is set for each application program. And a load distribution device for distributing the data to the plurality of servers, wherein the plurality of servers respectively notify the load distribution device of the port number of the interface port waiting for packet reception. The load balancer notifies one of the plurality of servers of information indicating which server is waiting to receive a packet at which port number based on the notified port number, and the information The server notified of this is negotiated among the plurality of servers. It notifies the distribution rule of the received packet is determined to the load balancer by, the load balancer is characterized in that for distributing the received packet in accordance with the notified the sorting rule.
  Here, the distribution rule may be a distribution rule corresponding to the type of content requested by the received packet.
[0012]
DETAILED DESCRIPTION OF THE INVENTION
[A] Description of the first embodiment
FIG. 1 is a block diagram showing a configuration of a load distribution system as a first embodiment of the present invention. The load distribution system 1 shown in FIG. 1 includes a plurality of servers (computers) 2-1, 2-2, 2- 3,... (Hereinafter also referred to as servers A, B, C,...), These servers 2-i (i is an integer of 2 or more) and a plurality of clients (computers) not shown. A load distribution device 3 that distributes user packets (service requests) from the client to the server 2-i and distributes the load on the server 2-i with a network such as a LAN.
[0013]
Each server 2-i is configured to include one or more application programs (server programs) 21, an operating system (OS) 22, a hardware unit 23, and the like that can communicate with each other by FTP, HTTP, and the like. The apparatus 3 includes a load distribution control program 31, an operating system (OS) 32, a hardware unit 33, and the like. The load balancer 3 is connected to each server 2-i by an interface unit 333 of the hardware unit 33 through an interface port (port number) corresponding to the application program 21 being activated.
[0014]
Here, in the server 2-i, an application program (hereinafter also referred to as “server application”) 21 is a program having a function of connecting (communication) with a client, and is activated by the OS 22 to communicate with the client. Therefore, it has a function of opening a socket by designating a specific port number with the OS 22. Specifically, the server application 21 executes a socket function [socket () function] to create a socket (socket open), and executes a bind function [bind () function] to create the socket. A name is assigned (IP address and port number are assigned), and a listening function (listen () function) is executed to enter a packet reception waiting state (waiting for a connection request from a client).
[0015]
A port number (sometimes simply referred to as a “port”) is a sub (auxiliary) address (generally, provided below an IP address for simultaneous connection with a plurality of parties in communication on the Internet. A number from 0 to 65535). A computer that performs communication using TCP / IP (Transmission Control Protocol / Internet Protocol) has an IP address corresponding to an address in the network. In order to communicate simultaneously with a plurality of computers (IP addresses), a plurality of " Have a port.
[0016]
A network address combining this “port” and an IP address is called a “socket”, and when making a connection, a set (socket) of this IP address and port number is always specified. The designated IP address and a port on another IP address are bound (bound), thereby enabling simultaneous communication with a plurality of IP addresses (clients).
[0017]
That is, in TCP / IP communication, data transmission / reception is normally performed in units of “sockets”. In other words, the “socket” also means a virtual interface for the communication application 21 to handle TCP / IP. The application 21 can transmit and receive data without worrying about the details of the communication procedure simply by specifying (socket) which is a set of an IP address and “port” and opening (opening) the line. it can.
[0018]
Next, the OS 22 performs overall control of the overall operation of the server 2-i. In this embodiment, as described above, the port number corresponding to the server application 21 that is in a packet reception waiting state (socket-opened). Is provided with a function as a port number notification unit 221 for generating a message (hereinafter referred to as a port number notification message) for notifying the load balancer 3 together with its own server identifier (for example, IP address). The load balancer 3 can grasp which server 2-i is waiting to receive a packet at which port number (that is, which server application 21 is currently running on which server 2-i). It becomes.
[0019]
The hardware unit 23 is provided with an interface that enables communication with the load balancer 3.
On the other hand, in the load distribution device 3, the load distribution control program 31 is a program for distributing packets (user packets) received from clients to a plurality of servers 2-i to distribute the load on the server 2-i. Here, it has the following functions.
[0020]
(1) Function as a port number receiving unit 311 for receiving a port number notification message notified from the server 2-i through the OS 32
(2) Based on the port number received by the port number receiving unit 311, for example, as shown in FIG. 2, the port number is associated with a server (identifier) waiting for packet reception at that port number. Function as port number / server correspondence table creation unit 312 for creating port number / server correspondence table (table) 4
According to the port number / server correspondence table 4, the load balancer 3 is, for example, that the server 2-1 and the server 2-3 are waiting for packet reception with the same port number = # 1 (application a). -1 and server 2-2 are waiting to receive a packet with the same port number = # 2 (application b), and servers 2-2 and 2-3 have a packet with the same port number = # 3 (application c). It becomes possible to grasp that it is waiting for reception.
[0021]
The OS 32 performs overall control of the entire operation of the load distribution apparatus 3. Here, the port / server correspondence table 4 created by the port number / server correspondence table creation unit 312 as described above is stored in the hardware unit 33. A function of storing and holding in a memory 331 such as a RAM is also provided.
Then, the distribution control unit 332 in the hardware unit 33 determines the distribution destination of the user packet received from the client based on the port number / server correspondence table 4 held in the memory 331, and the distribution destination server 2-i performs distributed control to forward the received packet to the destination. That is, the distribution control unit 332 and the load distribution control program 31 serve as a reception packet unit that distributes the reception packet to the server 2-i waiting for packet reception with the same port number based on the correspondence table 4 described above. The function is realized.
[0022]
A publicly known method can be used for the distribution rule at the time of load distribution. For example, the same port number #j (where j is an integer greater than or equal to 0) may be allocated fairly to the server 2-i waiting for packet reception, and as will be described later, the load on the server 2-i is measured. The distribution ratio (ratio) may be changed according to the actually measured value.
[0023]
Hereinafter, the operation of the load distribution system of the present embodiment configured as described above will be described with reference to FIG.
First, for example, in the servers 2-1 and 2-2 (servers A and B), when the server application 21 for connecting (communication) with the client is started (step S1), the application is used for communication with the client. 21 designates a certain port number #j with the OS 22 and opens a socket. That is, the server application 21 creates a socket by executing the socket () function, executes the bind () function, names the socket, and then executes the listen () function to wait for packet reception. It becomes.
[0024]
At this stage, the OS 22 creates a port number notification message for notifying the load balancer 3 of the IP address and port number #j assigned to the opened socket by the port number notifying unit 221 and through the opened socket. The message is transmitted to the connected load balancer 3 (step S2).
[0025]
In the load distribution apparatus 3, when the message is received by the port number reception unit 311 in the load distribution control program 31, the port number / server correspondence table creation unit 312 uses the port number #j to determine the port number. A number / server correspondence table 4 (hereinafter simply referred to as “correspondence table 4”) is created. The correspondence table 4 is stored and registered (updated) in the memory 331 by the function of the OS 32 (table setting for the hardware unit 33; step S3).
[0026]
Thereafter, when a user packet (connection request) from the client is received by the load balancer 3 (user access; step S4), the distribution control unit 332 accesses the memory 331 and holds the correspondence table 4 (Step S5), the server 2-i to which the load distribution (distribution destination of the received user packet) is determined, and the received user packet is output to the determined server 2-i through the interface unit 333 to distribute the load. Perform (step S6).
[0027]
For example, in FIG. 4, the received user packet corresponding to the server application 21 waiting for packet reception at port number # 1 is distributed to servers A and B, respectively, and the server waiting for packet reception at port number # 2 A state in which the received user packet corresponding to the application 21 is distributed to the server A is shown.
[0028]
As described above, the load distribution to the plurality of servers 2-i is automatically determined in the load distribution device 3 without setting by the operator, and the user access is opened on the server 2-i (active) Can be efficiently distributed in units of server applications 21).
[B] Description of the second embodiment
FIG. 5 is a block diagram showing a configuration of a load distribution system according to the second embodiment of the present invention. The load distribution system 1 shown in FIG. 5 includes a load distribution device 3 as compared with the system described above with reference to FIG. The difference is that the load distribution control program 31 has a function as the response time management unit 313. It should be noted that other constituent elements denoted by the same reference numerals as those already described are the same as or similar to those already described unless otherwise specified.
[0029]
Here, the response time management unit 313 receives certain data (for example, file data, WEB content, etc.) for the port #j in the packet reception waiting state notified from the server 2-i. (I.e., sending a request message) and measuring the time (response time) until receiving the data for each server 2-i and managing it. In the present embodiment, the distribution ratio of received user packets to the server 2-i is determined according to the measured response time and reflected in the correspondence table 4.
[0030]
For example, the response time management unit 313 compares the response time for the measured port number #j for each server 2-i, and determines the distribution ratio of received user packets to the server 2-i (for example, the response time is short). For example, the server 2-i increases the distribution ratio).
That is, when the port number receiving unit 311 receives the port number notification, the response time management unit 313 accesses the server 2-i for each port number and measures the response time for the access (first) response. The function as the time measurement unit 313a and the function as the (first) distribution ratio determination unit 313b that determines the distribution ratio of the received packets to the server 2-i based on the measurement result are combined.
[0031]
In this case, the port number / server correspondence table creation unit 312 determines as described above when creating the correspondence table 4 upon receiving the notification of the port number #j from the server 2-i, for example, as shown in FIG. Correspondence table 4 in which the assigned distribution ratio is associated with port number #j and server 2-i is created.
In FIG. 6, since the load on server A is lighter as a result of the response time measurement of two servers A and B waiting for packet reception with the same port number = # 1, It is shown that twice the number of packets to be distributed is distributed to the server A.
[0032]
Hereinafter, the operation of the load distribution system according to the present embodiment configured as described above will be described with reference to FIG. 7. First, also in this case, for example, an application connected (communication) with a client in the server 2-i. When the socket 21 is opened by designating a certain port number #j, the OS 22 causes the port number notifying unit 221 to specify the opened port number #j together with the IP address of the server 2-i as a load balancer. 3 is notified (step S11).
[0033]
In the load balancer 3, in the load balance control program 31, the port number / server correspondence table creation unit 312 creates the port number / server correspondence table 4 based on the port number #j notified from the server 2-i. . This correspondence table 4 is stored in the memory 331 and registered (updated) by the function of the OS 32 (step S12).
Thereafter, the load distribution apparatus 12 performs test access to the port number #j for each server 2-i by the response time management unit 313 of the load distribution control program 31, and the time until the response is returned (until data reception). Is measured) (steps S13 and S14).
[0034]
The port number / correspondence table creation unit 312 calculates the ratio (distribution ratio) of the load to be allocated to the server 2-i based on the measurement result by the response time management unit 313, and adds the result to the correspondence table 4 for reflection. (Step S15). The correspondence table 4 is written into the memory 331 of the hardware unit 33 by the function of the OS 32, and when a user packet is received thereafter, the load balancer 3 writes the correspondence table 4 into the correspondence table 4 by the distribution control unit 332. The received user packet is distributed at the load ratio.
[0035]
As described above, in this embodiment, the distribution ratio for the server 2-i is automatically determined (changed) for each port number #j without explicit setting by the operator, and load distribution control is efficiently performed. Can be done. In addition, even if the server 2-i is increased or decreased and the server 2-i is turned on / off, the correspondence table 4 is automatically registered / updated. Optimal load balancing control is realized.
[0036]
In the above-described example, the load distribution device 3 performs communication (test access) for measuring the load on the server 2-i. Of course, for example, the CPU usage rate is determined from the server 2-i. It is also possible to measure by other methods such as notification.
(B1) Description of the first modification of the second embodiment
It is also conceivable that the load state of the server 2-i changes after determining the distribution ratio as described above. In order to cope with this, the response time management unit 313 (first response time measurement unit 313a) of the load distribution apparatus 3 may periodically perform the test access and measure the response time. .
[0037]
That is, the processing of steps S13 to S15 described above with reference to FIG. 7 is periodically repeated, the response time of the server 2-i is measured, and the distribution ratio is recalculated (redetermined) according to the response time. (First) by the distribution ratio determining unit 313b, the distribution ratio is dynamically updated periodically according to the load state of the server 2-i (see FIG. 8). Thereby, the distribution ratio can be optimized corresponding to the load fluctuation of the server 2-i, and load distribution can be performed efficiently.
[0038]
(B2) Description of second modification of second embodiment
9 is a block diagram showing a second modification of the load distribution system described above with reference to FIG. 5. The load distribution system 1 shown in FIG. 9 includes a response time management unit 314 instead of the response time management unit 313. Different points are provided.
The response time management unit 314 monitors the user packet (connection request) addressed to the server 2-i and the flow of response data addressed to the client from the server 2-i according to the port number #j. The time until the response data for the addressed user packet is received is measured, and the distribution ratio of the received user packet to the server 2-i is determined according to the measurement result and reflected in the correspondence table 4. It has become.
[0039]
That is, in this example, in order to measure the load of the server 2-i as in the first modification described above, instead of performing test access from the load distribution device 3 to the server 2-i, user access (user packet) In addition, the load on the server 2-i is measured by constantly monitoring the response in units of the port number #j and measuring the response time for user access of the server 2-i.
[0040]
For this reason, the response time management unit 314 of the present modification monitors user access to the plurality of servers 2-i for each port number and measures the response time for user access of the server 2-i, respectively (second) response It has both a function as the time measuring unit 314a and a function as the (second) distribution ratio determining unit 314b that determines the distribution ratio of received packets to the server 2-i based on the measurement result.
[0041]
As a result, the traffic between the server 2-i and the load balancer 3 can be increased without increasing the traffic between the server 2-i and the server 2-i as in the first modification. While realizing highly accurate server load monitoring, the distribution ratio for the server 2-i can be automatically determined for each port number #j, and load distribution control can be performed efficiently.
[0042]
In this case, the load balancer 3 periodically recalculates the allocation ratio of the correspondence table 4 in the port number / correspondence table creation unit 312 based on the user access monitoring result by the response time management unit 314, and the calculation result Can also be reflected in the correspondence table 4. In this way, the distribution ratio can be optimized corresponding to the load fluctuation of the server 2-i, and load distribution can be performed more efficiently.
[0043]
(B3) Description of the third modification of the second embodiment
In the first and second modified examples described above, the server load measurement of either the test access by the load balancer 3 or the user access monitoring by the load balancer 3 is performed by creating the correspondence table 4 and periodically updating the correspondence table 4. For example, as shown in FIG. 10, the correspondence table 4 is created by test access by the load balancer 3 (steps S11 to S15), and the correspondence table 4 is regularly updated by monitoring user access (steps). S16 to S18) may be performed, and conversely, the creation of the correspondence table 4 is monitored by user access, and the periodic update of the correspondence table 4 is a test access by the load balancer 3, so that the server load measurement method is used. It is also possible to carry out in combination.
[0044]
[C] Description of the third embodiment
FIG. 11 is a block diagram showing a configuration of a load distribution system as a third embodiment of the present invention. The load distribution system 1 shown in FIG. 11 is different from the system described above with reference to FIGS. The application 21 of each server 2-i is provided with a function as the policy control unit 211, and the load distribution control program 31 of the load distribution device 3 is provided with a policy management unit 315.
[0045]
In the present embodiment, different types of contents for each server 2-i (for example, when the server 2-i is a WEB server, image data such as jpg and gif and character data such as an html document). Assume the case of handling. In the following description, the same reference numerals as those described above are the same as or similar to those described above unless otherwise specified.
[0046]
Here, the policy management unit 315 of the load distribution apparatus 3 confirms that a plurality of servers 2-i are waiting to receive a packet with the same port number #j based on the port number notified from the server 2-i. Upon recognition, the server 2-i is notified of the information (IP address, etc.) of the server waiting for packet reception at the port number #j, and then determined by negotiation between the servers 2-i. When the following distribution rule (policy) is received, the distribution rule is reflected in the correspondence table 4 created by the port number / server correspondence table creation unit 312.
[0047]
That is, the policy management unit 315 functions as a server information notification unit 315a that notifies the plurality of servers 2-i of information indicating which server 2-i is waiting for packet reception at which port number, and the notification Since the server 2-i having received the request also negotiates the distribution rule of the received packet, it has a function as the distribution rule receiving unit 315b that receives the distribution rule notified from any of the servers 2-i. is there.
[0048]
On the other hand, the policy control unit 211 of the server 2-i receives another server 2-k (k is a natural number, k) specified by the server information (IP address) notified from the policy management unit 315 of the load balancer 3 described above. ≠ j) is negotiated with the policy control unit 211 to determine what type of content each is responsible for (distribution rule) and notify the load distribution apparatus 3 of the result (distribution rule). .
[0049]
That is, the server 2-i of this example also has functions as each unit shown in the following (1) to (3).
(1) After the port number is notified to the load balancer 3 by the port number notifying unit 221, the load balancer 3 is notified of information indicating which server 2-i is waiting for packet reception at which port number. Server information receiving unit 211a
(2) Negotiation unit 211b for determining a distribution rule by negotiating a distribution packet distribution rule with another server 2-i based on information received by the server information reception unit 211a
(3) A distribution rule notification unit 211c that notifies the load distribution device 3 of the distribution rule determined by the negotiation unit 211b.
Hereinafter, the operation of the load distribution system of the present embodiment configured as described above will be described with reference to FIGS. 12 and 13.
[0050]
First, also in this case, for example, as shown in FIG. 12, in the server 2-1 (server A), the application 21 connected (communication) with the client is started (step S 21), and a certain port number #j is designated. When the socket is opened, the OS 22 notifies the load distribution device 3 of the opened port number #j together with the IP address of the own server 2-i by the port number notification unit 221 (step S22).
[0051]
In the load balancer 3, in the load balance control program 31, the port number / server correspondence table creation unit 312 creates the port number / server correspondence table 4 based on the port number #j notified from the server 2-i. . This correspondence table 4 is stored in the memory 331 and registered (updated) by the function of the OS 32 (step S23).
On the other hand, also in the server 2-2 (server B), as shown in FIG. 12, a server application 21 connected to the client is activated (step S24), and a socket is specified by specifying a certain port number #j. When opened, the OS 22 notifies the load distribution apparatus 3 of the opened port number #j together with the IP address of the own server 2-i by the port number notifying unit 221 (step S25).
[0052]
In the load balancer 3, in the load balance control program 31, the port number / server correspondence table creation unit 312 updates the port number / server correspondence table 4 based on the port number #j notified from the server 2-i. The contents are reflected in the port number / server correspondence table 4 held in the memory 331 by the function of the OS 32 (step S26).
[0053]
Then, the load balancer 3 notifies the server address at which the same port number is open to one of the servers A and B (for example, the server B) by the policy management unit 315 based on the contents of the correspondence table 4. (Step S27). Upon receiving this notification, the server B determines the type of content handled by itself and other servers A by the policy control unit 211 as shown in FIGS. That is, for example, the server A is responsible for distributing content such as images, and the server B is responsible for distributing the content such as html files.
[0054]
The server B notifies the determined role assignment (distribution rule) to the server A having the server address notified from the load balancer 3 (step S28), and the server A includes the notification content (distribution policy) from the server B. If there is no problem and it is acceptable, a response to that effect is sent to server B (step S29). Upon receiving the response, the server B notifies the load distribution device 3 of the determined distribution policy as a result of negotiation with the server A by the policy control unit 211 (step S30).
[0055]
Then, the load distribution apparatus 3 reflects (sets) and updates the contents of the distribution policy notified from the server B in the correspondence table 4 by the policy management unit 312 (step S31). Thereafter, the load balancer 3 distributes received user packets to the servers A and B according to the correspondence table 4.
That is, the load distribution device 3 determines the type of the requested file and distributes the distribution destination of the request (received user packet) to the servers A and B, for example, in response to a request from a client (HTTP access or the like). Let
[0056]
In this way, the load balancer 3 is provided with a function of notifying the server 2-i of the address of the server 2-i having the same port open, and the same port is opened to the server 2-i that has received the notification. By having a function of negotiating with each other server 2-i for determining a distribution rule, the server 2-i can be automatically classified and arranged according to the type of content handled by the server 2-i. It becomes possible. Accordingly, it is possible to reduce the network operation cost by eliminating the trouble of setting work by an operator or the like.
[0057]
In the above example, the “distribution rule” is determined depending on the type of content, but may be determined based on other factors.
Further, the present invention is not limited to the above-described embodiments, and it goes without saying that various modifications can be made without departing from the spirit of the present invention.
[D] Appendix
(Supplementary note 1) A plurality of servers having one or more application programs, and a plurality of servers connected to the plurality of servers via interface ports corresponding to the application programs, respectively, and distributing received packets to the plurality of servers. In a load distribution system having a load distribution device for distributing the load,
Each of the plurality of servers notifies the load balancer of the port number waiting for packet reception,
A server load distribution method, wherein the load distribution apparatus distributes received packets to a plurality of servers waiting for packet reception with the same port number based on a port number notified from the server.
[0058]
(Appendix 2) The load balancer is
Upon receiving the notification of the port number, the server is accessed for each port number and the response time for the access is measured,
The server load distribution method according to appendix 1, wherein a distribution ratio of the received packets to the plurality of servers is determined based on the measurement result.
[0059]
(Appendix 3) The load balancer is
The server load according to appendix 2, wherein access to the server is periodically performed, the response time is periodically measured, and the distribution ratio of the received packets is periodically changed based on the measurement result. Distribution method.
(Appendix 4) The load balancer is
Monitor the user access to the plurality of servers by port number and measure the response time of the server to the user access,
The server load distribution method according to appendix 2, wherein a distribution ratio of the received packets to the plurality of servers is determined based on the measurement result.
[0060]
(Appendix 5) The load balancer is
Periodically measure the response time of the server to the user access;
The server load distribution method according to appendix 4, wherein the distribution ratio of the received packets is periodically changed based on the measurement result.
(Appendix 6) The load distribution apparatus notifies a plurality of servers of information indicating which server is waiting for packet reception at which port number based on the notified port number,
The servers that have received the notification negotiate the distribution rule of the received packet, and either server notifies the load balancer of the result,
The server load distribution method according to appendix 1, wherein the load distribution apparatus distributes the received packet according to the notified distribution rule.
[0061]
(Supplementary Note 7) A plurality of servers having one or more application programs, and a plurality of servers connected to the plurality of servers through interface ports corresponding to the application programs, respectively, and distributing received packets to the plurality of servers. A load distribution system including a load distribution device for distributing a load,
Each of the servers
A port number notifying means for notifying the load balancer of the port number for which the application program is activated and waiting to receive a packet;
The load balancer is
Port number receiving means for receiving notification of the port number from the port number notifying means of the server;
Correspondence table creating means for creating a correspondence table for servers waiting to receive packets with the same port number based on the port number received by the port number receiving means;
A load distribution system comprising: a received packet distribution unit that distributes a received packet to a server that is waiting to receive a packet with the same port number based on the correspondence table created by the correspondence table creating unit.
[0062]
(Supplementary note 8) A plurality of servers having one or more application programs, and a plurality of servers connected to the plurality of servers via interface ports corresponding to the application programs, respectively, and distributing received packets to the plurality of servers. A load distribution device used in a load distribution system including a load distribution device for distributing a load,
Port number receiving means for receiving a notification of the port number waiting for packet reception from the server;
Correspondence table creating means for creating a correspondence table for servers waiting to receive packets with the same port number based on the port number received by the port number receiving means;
A load distribution system comprising: a received packet distribution unit that distributes received packets to a server that is waiting to receive a packet with the same port number based on the correspondence table created by the correspondence table creation unit The load balancer used.
[0063]
(Supplementary note 9) The received packet distribution means
When the port number receiving means receives the notification of the port number, first response time measuring means for accessing the server for each port number and measuring the response time for the access,
Appendix 8 characterized by comprising first distribution ratio determining means for determining the distribution ratio of the received packets to the plurality of servers based on the measurement result of the first response time measuring means. Load balancer used in other load balancing systems.
[0064]
(Supplementary Note 10) The first response time measurement means is configured to periodically access the server and periodically measure the response time,
The load according to appendix 9, wherein the first distribution ratio determining means is configured to periodically change the distribution ratio of the received packet based on the measurement result of the first response time measuring means. A load balancer used in a distributed system.
[0065]
(Supplementary Note 11) The received packet distribution means includes:
Second response time measuring means for monitoring user access to the plurality of servers by port number and measuring response times of the servers for the user access, respectively;
Appendix 8 characterized by comprising second distribution ratio determining means for determining the distribution ratio of the received packets to the plurality of servers based on the measurement result of the second response time measuring means. Load balancer used in other load balancing systems.
[0066]
(Supplementary note 12) The second response time measuring means is configured to periodically measure the response time of the server to the user access,
The load according to appendix 11, wherein the second distribution ratio determining means is configured to periodically change the distribution ratio of the received packet based on the measurement result of the second response time measuring means. A load balancer used in a distributed system.
[0067]
(Supplementary note 13) The received packet distribution means includes:
Server information notifying means for notifying a plurality of servers of information indicating which server is waiting for packet reception at which port number, based on the port number received by the port number receiving means;
A distribution rule receiving means for receiving the distribution rule notified from any of the servers by the server receiving the notification negotiating the distribution rule of the received packet;
9. The load distribution apparatus used for the load distribution system according to appendix 8, wherein the received packet is distributed according to the distribution rule received by the distribution rule receiving means.
[0068]
(Supplementary Note 14) A plurality of servers having one or more application programs, and a plurality of servers connected to the plurality of servers via interface ports corresponding to the application programs, respectively, and distributing received packets to the plurality of servers. A server used in a load distribution system including a load distribution device for distributing a load,
A server used in a load balancing system, comprising port number notifying means for notifying the load balancing device of a port number waiting for packet reception after the application program is activated.
[0069]
(Supplementary Note 15) A server that receives information indicating which server is waiting to receive a packet at which port number from the load balancer after the port number is notified to the load balancer by the port number notifying unit. Information receiving means;
Negotiation means for determining a distribution rule by negotiating a distribution rule of the received packet with another server based on information received by the server information reception means;
15. The server used in the load distribution system according to appendix 14, further comprising distribution rule notification means for notifying the load distribution apparatus of the distribution rule determined by the negotiation means.
[0070]
【The invention's effect】
As described above, according to the present invention, without explicit setting by an operator or the like, determination of a server to distribute the load, determination of a distribution ratio of the load distribution, and dynamic distribution of the load to a change in the state of the server Since it is possible to change the ratio, select a server to be a load distribution target depending on the type of content, and expect network operation at a low cost, it is extremely useful in the field of network communication.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a load distribution system as a first embodiment of the present invention.
2 is a block diagram showing a configuration of a load distribution apparatus and a server in order to explain a port number / server correspondence table creation function of the load distribution apparatus shown in FIG. 1;
FIG. 3 is a sequence diagram for explaining the operation of the load distribution system shown in FIG. 1;
4 is a diagram for explaining the operation of the load distribution system shown in FIG. 1; FIG.
FIG. 5 is a block diagram showing a configuration of a load distribution system as a second exemplary embodiment of the present invention.
6 is a diagram for explaining the operation of the load distribution system shown in FIG. 5; FIG.
7 is a sequence diagram for explaining the operation of the load distribution system shown in FIG. 5. FIG.
FIG. 8 is a sequence diagram for explaining the operation of the first modification of the load distribution system shown in FIG. 7;
FIG. 9 is a block diagram showing a second modification of the load distribution system shown in FIG. 5;
10 is a sequence diagram for explaining the operation of the load distribution system shown in FIG. 9. FIG.
FIG. 11 is a block diagram showing a configuration of a load distribution system as a third exemplary embodiment of the present invention.
12 is a sequence diagram for explaining the operation of the load distribution system shown in FIG. 11. FIG.
13 is a diagram for explaining the operation of the load distribution system shown in FIG. 11. FIG.
[Explanation of symbols]
1 Load balancing system
2-1, 2-2, 2-3, ... Server
3 Load balancer
4 Port number / server correspondence table (table)
21 Application program (server program)
22 Operating System (OS)
23 Hardware part
31 Load balancing control program
32 Operating System (OS)
33 Hardware part
211 Policy control unit
211a Server information receiver
211b Negotiation part
211c Distribution rule notification part
221 Port number notification section
312 Port number / server correspondence table creation part
313 Response time manager
313a (first) response time measurement unit
313b (first) distribution ratio determining unit
314 Response time manager
314a (second) response time measurement unit
314b (Second) distribution ratio determining unit
315 Policy Management Department
315a Server information notification unit
315b Distribution rule receiver
331 memory
332 Distributed control unit
333 interface section

Claims (10)

数のサーバと、アプリケーションプログラム毎にポート番号が設定されたインタフェースポートを介して該複数のサーバと接続されて受信パケットを該複数のサーバに振り分ける負荷分散装置とえた負荷分散システムに用いられるサーバ負荷分散方法において、
前記負荷分散装置前記複数のサーバから通知されパケット受信待ちのインタフェースポートのポート番号に基づいて、どのサーバがどのポート番号でパケット受信待ちとなっているかを示す情報を該複数のサーバのいずれかへ通知し、
該情報が通知された該サーバは、該情報により特定される他のサーバとの間でネゴシエーションを行なうことにより決定した前記受信パケットの振り分けルールを前記負荷分散装置へ通知し、
該負荷分散装置は、通知された該振り分けルールに従って受信パケットを振り分けることを特徴とするサーバ負荷分散方法。
And multiple servers, load balancing port number that example Bei and a load balancer Ru distributed to the plurality of servers received packets is connected to a plurality of servers via the configured interface port for each application program In the server load balancing method used in the system,
The load balancer based on the port number of the interface port of the notified Ru waiting to receive packets from the plurality of servers, the information indicating which server is any port number and waiting to receive packets plurality of servers Notify either
The server notified of the information notifies the load distribution apparatus of the distribution rule of the received packet determined by negotiating with another server specified by the information,
The load balancer notified distributes the received packet in accordance with the distribution rule, features and to salicylate over server load balancing method that.
前記振り分けルールは、前記受信パケットによりリクエストされるコンテンツの種類に応じた振り分けルールであることを特徴とする請求項1記載のサーバ負荷分散方法。 The sorting rule, server load balancing method Motomeko 1 wherein you being a distribution rule according to the type of content that is requested by the received packet. 数のサーバと、アプリケーションプログラム毎にポート番号が設定されたインタフェースポートを介して該複数のサーバと接続されて受信パケットを該複数のサーバに振り分ける負荷分散装置とえた負荷分散システムにおいて、
前記サーバ
パケット受信待ちのインタフェースポートを有する他のサーバとネゴシエーションを行ない受信パケットの振り分けルールを決定するネゴシエーション手段と、
該ネゴシエーション手段で決定した該振り分けルールを前記負荷分散装置へ通知する振り分けルール通知手段と、を備え
該負荷分散装置
前記サーバから該振り分けルールを受信する振り分けルール受信手段と、
振り分けルール受信手段で受信した該振り分けルールに従って受信パケットを振り分ける受信パケット振り分け手段とえたことを特徴とする負荷分散システム。
And multiple servers, load balancing port number that example Bei and a load balancer Ru distributed to the plurality of servers received packets is connected to a plurality of servers via the configured interface port for each application program system Te smell,
The server,
Negotiation means for negotiating with another server having an interface port waiting for packet reception to determine a distribution rule for received packets;
Distribution rule notification means for notifying the load distribution device of the distribution rule determined by the negotiation means ,
The load balancer,
A sorting rule reception means for receiving the distribution rule from the server,
Load balancing system that is characterized in that example Bei and a reception packet distribution means for distributing the received packet in accordance with the distribution rule received by the sorting rule reception means.
前記振り分けルールは、前記同一ポート番号でパケット受信待ちの前記複数のサーバが、それぞれ配信するコンテンツの種類の分担についてのルールであることを特徴とする請求項3記載の負荷分散システム 4. The load distribution system according to claim 3 , wherein the distribution rule is a rule for sharing of types of contents distributed by the plurality of servers waiting for packet reception at the same port number . 受信パケットを複数のサーバに振り分ける負荷分散装置と、アプリケーションプログラム毎にポート番号が設定されたインタフェースポートを介して接続されサーバにおいて、
前記負荷分散装置と接続されている前記複数のサーバのうち、パケット受信待ちのインタフェースポートを有するサーバとネゴシエーションを行ない、受信パケットの振り分けルールを決定するネゴシエーション手段と、
該ネゴシエーション手段で決定した該振り分けルールを前記負荷分散装置へ通知する振り分けルール通知手段と、
を備えたことを特徴とするサーバ。
A load balancer that distributes the received packet to a plurality of servers, Te server odor port number for each application program Ru is connected via the interface port set,
Negotiation means for negotiating with a server having an interface port waiting for packet reception among the plurality of servers connected to the load balancer, and determining a distribution rule for received packets;
A distribution rule notification means for notifying the distribution rule determined by the negotiation means to the load balancer;
Features and to salicylate over server further comprising: a.
前記振り分けルールは、前記受信パケットによりリクエストされるコンテンツの種類に応じた振り分けルールであることを特徴とする請求項5記載のサーバ。The server according to claim 5, wherein the distribution rule is a distribution rule corresponding to a type of content requested by the received packet. 複数のサーバと、アプリケーションプログラム毎にポート番号が設定されたインタフェースポートを介して接続されて、受信パケットを該複数のサーバに振り分ける負荷分散装置において、In a load balancer that is connected to a plurality of servers via an interface port in which a port number is set for each application program and distributes received packets to the plurality of servers.
前記複数のサーバから通知されるパケット受信待ちのインタフェースポートのポート番号に基づいて、どのサーバがどのポート番号でパケット受信待ちとなっているかを示す情報を該複数のサーバのいずれかへ通知するサーバ情報通知手段と、Based on the port number of the interface port waiting for packet reception notified from the plurality of servers, a server for notifying one of the plurality of servers of information indicating which server is waiting for packet reception at which port number Information notification means;
該情報が通知されたサーバ同士がネゴシエーションを行ない決定する前記受信パケットの振り分けルールを、該複数のサーバのいずれかから受信する振り分けルール受信手段とA distribution rule receiving means for receiving, from one of the plurality of servers, a distribution rule for the received packet, which is determined by negotiation between the servers notified of the information; ,
該振り分けルール受信手段で受信した該振り分けルールに従って受信パケットを振り分ける受信パケット振り分け手段と、Received packet sorting means for sorting received packets according to the sorting rule received by the sorting rule receiving means;
を備えたことを特徴とする負荷分散装置。A load balancer comprising:
前記振り分けルールは、前記受信パケットによりリクエストされるコンテンツの種類に応じた振り分けルールであることを特徴とする請求項7記載の負荷分散装置。The load distribution apparatus according to claim 7, wherein the distribution rule is a distribution rule corresponding to a type of content requested by the received packet. それぞれ1以上のアプリケーションプログラムを有する複数のサーバと、該アプリケーションプログラム毎にポート番号が設定されたインタフェースポートを介して該複数のサーバと接続されて受信パケットを該複数のサーバに振り分ける負荷分散装置と、を備えた負荷分散システムに用いるサーバ負荷分散方法において、A plurality of servers each having one or more application programs, and a load distribution device that is connected to the plurality of servers via an interface port in which a port number is set for each application program and distributes received packets to the plurality of servers. In a server load balancing method used in a load balancing system comprising
前記複数のサーバは、それぞれ、パケット受信待ちのインタフェースポートのポート番号を該負荷分散装置へ通知し、Each of the plurality of servers notifies the load balancer of the port number of the interface port waiting for packet reception,
前記負荷分散装置は、該通知された該ポート番号に基づいて、どのサーバがどのポート番号でパケット受信待ちとなっているかを示す情報を該複数のサーバのいずれかへ通知し、The load balancer notifies one of the plurality of servers of information indicating which server is waiting for packet reception at which port number based on the notified port number;
該情報が通知された該サーバは、該複数のサーバ同士でネゴシエーションを行なうことにより決定した前記受信パケットの振り分けルールを前記負荷分散装置へ通知し、The server notified of the information notifies the load distribution apparatus of the distribution rule of the received packet determined by performing negotiation between the plurality of servers.
該負荷分散装置は、通知された該振り分けルールに従って受信パケットを振り分ける、The load balancer distributes received packets according to the notified distribution rule.
ことを特徴とするサーバ負荷分散方法。A server load balancing method.
前記振り分けルールは、前記受信パケットによりリクエストされるコンテンツの種類に応じた振り分けルールであることを特徴とする請求項9記載のサーバ負荷分散方法。The server load distribution method according to claim 9, wherein the distribution rule is a distribution rule according to a type of content requested by the received packet.
JP2003173127A 2003-06-18 2003-06-18 Server load balancing method, load balancing system, server, and load balancing device Expired - Fee Related JP4154287B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003173127A JP4154287B2 (en) 2003-06-18 2003-06-18 Server load balancing method, load balancing system, server, and load balancing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003173127A JP4154287B2 (en) 2003-06-18 2003-06-18 Server load balancing method, load balancing system, server, and load balancing device

Publications (2)

Publication Number Publication Date
JP2005010983A JP2005010983A (en) 2005-01-13
JP4154287B2 true JP4154287B2 (en) 2008-09-24

Family

ID=34097041

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003173127A Expired - Fee Related JP4154287B2 (en) 2003-06-18 2003-06-18 Server load balancing method, load balancing system, server, and load balancing device

Country Status (1)

Country Link
JP (1) JP4154287B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4672405B2 (en) 2005-03-17 2011-04-20 パナソニック株式会社 Communication system, information processing system, connection server, processing server, information processing apparatus, and information processing method
JP4728026B2 (en) * 2005-03-29 2011-07-20 株式会社野村総合研究所 Load balancing system and load balancing method
JP4703634B2 (en) * 2007-12-05 2011-06-15 セイコープレシジョン株式会社 Load balancer
JP5181181B2 (en) * 2008-03-11 2013-04-10 インターナショナル・ビジネス・マシーンズ・コーポレーション Power saving method for computer system
JP5618886B2 (en) 2011-03-31 2014-11-05 株式会社日立製作所 Network system, computer distribution apparatus, and computer distribution method
JP5729209B2 (en) * 2011-08-12 2015-06-03 富士通株式会社 Information processing apparatus, information processing system test method, and program
JP5908284B2 (en) * 2012-01-19 2016-04-26 株式会社東芝 Medical image management system
JP6127618B2 (en) * 2013-03-15 2017-05-17 株式会社リコー Information processing apparatus, information processing system, relay method, and program
JP6369318B2 (en) * 2014-12-15 2018-08-08 株式会社リコー Information processing system, device, information processing method, and program

Also Published As

Publication number Publication date
JP2005010983A (en) 2005-01-13

Similar Documents

Publication Publication Date Title
US11374885B2 (en) Dynamic subscription and message routing on a topic between publishing nodes and subscribing nodes
US7353276B2 (en) Bi-directional affinity
US7490162B1 (en) Method and system for forwarding messages received at a traffic manager
US9092271B2 (en) Load balancing for single-address tenants
JP3566626B2 (en) System for managing resources in heterogeneous server devices
US6963917B1 (en) Methods, systems and computer program products for policy based distribution of workload to subsets of potential servers
US8838830B2 (en) Optimizing distributed computer networks
US7315896B2 (en) Server network controller including packet forwarding and method therefor
US8499086B2 (en) Client load distribution
US8176495B2 (en) Client affinity in distributed load balancing systems
US20020059170A1 (en) Load balancing between multiple web servers
US20020143953A1 (en) Automatic affinity within networks performing workload balancing
US7380002B2 (en) Bi-directional affinity within a load-balancing multi-node network interface
US20050050202A1 (en) Methods, systems and computer program products for application instance level workload distribution affinities
EP2692095B1 (en) Method, apparatus and computer program product for updating load balancer configuration data
US20020143965A1 (en) Server application initiated affinity within networks performing workload balancing
KR20050084802A (en) Remote dynamic configuration of a web server to provide capacity on demand
JP2012090194A (en) Network system
JP4154287B2 (en) Server load balancing method, load balancing system, server, and load balancing device
JP2003108537A (en) Load dispersing method and system of service request to server on network
WO2004072800A2 (en) Dynamic subscription and message routing on a topic between a publishing node and subscribing nodes
US20220286415A1 (en) Dynamic Subscription and Message Routing on a Topic Between Publishing Nodes and Subscribing Nodes
JP2006350404A (en) Priority control method, computer system, and management device
JP2003131960A (en) Data relay method
US20180063220A1 (en) Systems and methods to provide hypertext transfer protocol 2.0 optimization through multiple links

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060612

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071218

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080218

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: 20080617

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080707

R150 Certificate of patent or registration of utility model

Ref document number: 4154287

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110711

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110711

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120711

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120711

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130711

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees