JP2012108685A - Load distribution system - Google Patents
Load distribution system Download PDFInfo
- Publication number
- JP2012108685A JP2012108685A JP2010256388A JP2010256388A JP2012108685A JP 2012108685 A JP2012108685 A JP 2012108685A JP 2010256388 A JP2010256388 A JP 2010256388A JP 2010256388 A JP2010256388 A JP 2010256388A JP 2012108685 A JP2012108685 A JP 2012108685A
- Authority
- JP
- Japan
- Prior art keywords
- server
- request
- memory information
- connection
- client
- 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
Links
Images
Landscapes
- Hardware Redundancy (AREA)
- Computer And Data Communications (AREA)
Abstract
【課題】
セッション管理を行っているサーバの一部を計画的に停止する場合に、そのサーバへの継続リクエストを別のサーバへ振り分け処理を継続させる。
【解決手段】
本発明は停止時間超過後の停止対象サーバ宛の継続リクエストを判定して、新規振り分けサーバを決定し、新規振り分けサーバが停止対象サーバ上のメモリ情報を取得し、その後に継続リクエストを新規振り分けサーバに送信する。また、停止時間を一定時間経過しても継続リクエストを出さないクライアントを特定して、強制的にメモリ情報を移動する。
【選択図】 図1【Task】
When a part of a server performing session management is systematically stopped, the continuation request for that server is distributed to another server.
[Solution]
The present invention determines a continuation request addressed to a stop target server after the stop time is exceeded, determines a new distribution server, the new distribution server acquires memory information on the stop target server, and then sends the continuation request to the new distribution server Send to. In addition, a client that does not issue a continuation request even after a certain period of time has elapsed is specified, and the memory information is forcibly moved.
[Selection] Figure 1
Description
本発明は複数クライアント、前記クライアントからのリクエストをセッション管理している複数サーバと前記複数サーバの負荷を分散させる負荷分散装置から構成される負荷分散システムに関する。 The present invention relates to a load distribution system including a plurality of clients, a plurality of servers that manage sessions from requests from the clients, and a load distribution apparatus that distributes loads of the plurality of servers.
複数クライアント、複数サーバと負荷分散装置から構成される負荷分散システムにおいて、クライアントはサーバ上のページを順に読み出し、それぞれのページで必要なデータ入力してサーバに送信する。このため、サーバ上で稼働するアプリケーションはクライアントからのリクエストと、メモリ上のデータを関連づけるためセッション管理している。セッション管理の方法としては各サーバがページごとにセッションIDを生成してレスポンスデータに埋め込んでクライアントに返し、クライアントは次のリクエスト時にサーバが埋め込んだセッションIDをリクエストデータに入れてサーバに送信する。 In a load distribution system including a plurality of clients, a plurality of servers, and a load distribution apparatus, the client sequentially reads pages on the server, inputs necessary data on each page, and transmits the data to the server. For this reason, an application running on the server performs session management in order to associate a request from a client with data on a memory. As a session management method, each server generates a session ID for each page, embeds it in response data, and returns it to the client. At the next request, the client places the session ID embedded by the server in the request data and transmits it to the server.
クライアントから送信されたセッションIDを調べることで、認証が終了しているのか、自身が生成したセッションIDなのか等を判断することができ、正当なセッションIDを持つリクエストの処理を進めて行くことができる。しかし、セッション管理されているシステムにおいては、メンテナンス等で特定のサーバを停止したい場合に、新規のリクエストは振り分け先を停止予定サーバ以外にすることで、クライアントへの影響を防止出来るが、停止時間前からの継続リクエストは他のサーバに振り分けることができない。単純に振り分け先を変更すると、変更後のサーバにリクエストしたクライアントのセッション情報(メモリ情報)がないためエラーになってしまう。 By examining the session ID sent from the client, it is possible to determine whether the authentication has been completed or the session ID generated by itself, and proceed with the processing of a request with a valid session ID. Can do. However, in a session-managed system, if you want to stop a specific server for maintenance, etc., you can prevent the impact on the client by changing the distribution destination to a server other than the scheduled stop server. A continuation request from before cannot be distributed to other servers. If the distribution destination is simply changed, an error occurs because there is no client session information (memory information) requested from the changed server.
そこで継続リクエストに対応するセッション情報を他のサーバに移動し、移動したサーバへリクエストを割り振る方法が特許文献1で開示されている。
Therefore,
しかし、従来のセッション情報移動方法による振り分け先変更には以下のような問題がある。従来の技術では停止時間超過後の継続リクエストは、一度それまで接続していたサーバに振り分け当該サーバで処理させる。処理終了後に当該サーバから次回振り分けるサーバへセッション情報を移動する。セッション情報の移動が終了すると当該サーバはレスポンスデータ内に負荷分散装置が振り分けサーバを識別するCookie情報を埋め込みクライアントに返す。このCookie情報には次回の振り分け先サーバが記載されている。 However, the change of the distribution destination by the conventional session information moving method has the following problems. In the conventional technology, a continuation request after the stop time is exceeded is distributed to a server that has been connected once and processed by the server. After the process is completed, the session information is moved from the server to the server that will be distributed next time. When the movement of the session information is completed, the server returns Cookie information for identifying the distribution server to the embedded client in the response data. This cookie information describes the next distribution destination server.
この方法ではサーバがCookieを生成してレスポンスデータに埋め込むことになり、一般的に利用されている負荷分散装置がCookieを生成する機能を使用できなくなる。一般的には負荷分散装置はクライアントから最初のリクエストが届くと振り分けるサーバを決定してサーバにリクエストを送信する。サーバが処理を行いレスポンスデータをクライアントに返信するときに負荷分散装置がCookieを生成してレスポンスデータ内に埋め込む。クライアントは次回のリクエスト時に負荷分散装置が生成したCookieを付加してリクエストを送信してくる。負荷分散装置はリクエスト中のcookieを解析して接続すべきサーバを決定し、Cookieを削除してリクエストをサーバに送信する。 In this method, the server generates a cookie and embeds it in the response data, and a load distribution apparatus that is generally used cannot use the function of generating the cookie. In general, when a first request arrives from a client, the load balancer determines a server to distribute and transmits the request to the server. When the server performs processing and returns response data to the client, the load balancer generates a cookie and embeds it in the response data. The client sends a request with the cookie generated by the load balancer at the next request. The load balancer analyzes the cookie in the request to determine a server to be connected, deletes the cookie, and transmits the request to the server.
このような処理を行っている中でサーバが振り分け先を指示するCookieをレスポンスデータ内に埋め込んで負荷分散装置に理解させるには、負荷分散装置でのCookie生成を停止しなければ、2つの異なる振り分け先がレスポンスデータ内に入る可能性が高く正確な振り分けができない。 In order to embed a cookie instructing the distribution destination in the response data and let the load balancer understand the load distribution device while performing such processing, there are two different cases unless cookie generation in the load balancer is stopped. There is a high possibility that the distribution destination is included in the response data, and accurate distribution cannot be performed.
また従来の技術は停止時間を超過してから継続リクエストが来た場合はセッション情報の移動が可能であるが、停止時間超過後しばらくリクエストが来ない場合にはセッション情報を移動することができず、クライアントを救済するにはサーバを停止できない。 Also, in the conventional technology, session information can be moved if a continuation request comes after the stop time is exceeded, but session information cannot be moved if the request does not come for a while after the stop time is exceeded. Can not stop the server to rescue the client.
強制的に全てのセッション情報を移動したとしても次の振り分け先を示したCookieをクライアントに返す手段がないため、クライアントは引き続き停止予定サーバに振り分けられる。また、新たに振り分け先に選択されたサーバは、自身の中で管理していない新しいクライアントから突然リクエストが届くため処理できなくなってしまう。 Even if all the session information is forcibly moved, there is no means to return a cookie indicating the next distribution destination to the client, so the client continues to be distributed to the server to be stopped. In addition, the server newly selected as a distribution destination cannot be processed because a request is suddenly received from a new client that is not managed by itself.
本発明はこのような問題点を解決するためになされるものであり、クライアントに影響を与えることなく継続リクエストを別サーバに振り分けることができる負荷分散システムを提供することを目的とする。 The present invention has been made to solve such problems, and an object of the present invention is to provide a load distribution system that can distribute a continuation request to another server without affecting a client.
上記の目的を達成するために、本発明では以下のような手段を講じる。 In order to achieve the above object, the present invention takes the following measures.
請求項1の発明は、複数クライアントと、複数サーバと、複数クライアントからのリクエストを分散してサーバに振り分ける負荷分散装置を備え、停止対象サーバの選択と停止時間およびメモリ情報強制移動までの待ち時間を入力することのできる入力手段と、停止対象サーバの停止予定時間を監視し停止予定時間になると停止対象サーバに接続禁止フラグをセットし新規の振り分けサーバを決定する振り分け管理手段と、クライアントからの接続要求を解析して停止対象サーバへ接続するか新規サーバへ振り分けるか等の処理内容を分類する接続情報管理手段と、前記接続情報管理手段によって振り分けるサーバの変更が必要と判定された場合に前記サーバ振り分け管理手段によって選択されたサーバに対して停止対象サーバからメモリ情報を取得するよう指示を出し、メモリ情報の移動が終了すると保留していた継続リクエストを新規サーバへ送信するサーバ決定手段と、前記サーバ決定部から送付されたデータをLANへ送信する送受信手段と、前記サーバ決定部からメモリ情報取得の指示を受け取ると停止対象サーバに対してメモリ情報取得リクエストを発行するメモリ情報取得手段と、前記メモリ情報取得手段からメモリ情報取得のリクエストを受け取るとメモリ情報を返信する手段を備える。
The invention of
請求項2の発明は、入力手段によって入力された待ち時間を経過しても継続リクエストが送信されない場合に負荷分散装置内に記録されている接続情報に基づきメモリ情報の移動が必要なクライアントを特定して、そのクライアント用に確保されている停止対象サーバ上のメモリ情報を強制的に新規振り分け先に決定したサーバに移動する手段を備える。
The invention of
本発明によれば停止時間超過後に停止対象サーバへの継続リクエストを中断することな
く、新規に選択したサーバに振り分け、処理を継続できる。
According to the present invention, after the stop time is exceeded, the continuation request to the stop target server can be distributed to the newly selected server and the processing can be continued without interruption.
以下に、本発明を実施するための形態について図面を参照しながら説明する。 Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.
本実施の形態に係わる負荷分散システムは図1のように複数のクライアント100(#1,#2,・・・#n)と複数のサーバ102(#1,#2,・・・#n)とクライアント100(#1,#2,・・・#n)からの接続要求をサーバ102(#1,#2,・・・#n)の負荷を分散させるように各サーバに振り分ける負荷分散装置101を備えた負荷分散システム10に適用される。
As shown in FIG. 1, the load distribution system according to the present embodiment includes a plurality of clients 100 (# 1, # 2,... #N) and a plurality of servers 102 (# 1, # 2,... #N). Load distribution device that distributes connection requests from clients 100 (# 1, # 2,... #N) to each server so as to distribute the load of servers 102 (# 1, # 2,... #N) This is applied to a
クライアントがサーバ上のページを順次呼び出し、各ページでデータを入力していくタイプのアプリケーションが多いため、業務開始から終了まで同一クライアントからのリクエストは同一サーバに接続する必要がある。このようなタイプのアプリケーションで業務途中に他のサーバに接続するとクライアントが入力したデータが無くエラーになってしまう。このように同一クライアントからのリクエストを同一サーバに接続することをセッション維持という。 Since there are many types of applications in which a client sequentially calls pages on a server and inputs data on each page, requests from the same client must be connected to the same server from the start to the end of business. If you connect to another server in the middle of business with this type of application, there will be no data entered by the client and an error will occur. Connecting a request from the same client to the same server in this way is called session maintenance.
このようにセッション維持を行っている業務システムで、メンテナンスのために特定サーバの停止を予定している場合において、負荷分散システム10は停止時間監視を行い、停止予定時間になった場合に停止予定サーバに接続禁止フラグをセットし、新規リクエスト、継続リクエスト共に、以降そのサーバに接続することを禁止する。また、負荷分散アルゴリズムにより選択対象になっているサーバに対して接続禁止フラグをセットした場合は、そのサーバは選択対象から外し、新規振り分け先として別のサーバを決定する。
In a business system that maintains a session in this way, when a specific server is scheduled to be stopped for maintenance, the
新規振り分け先として決定した別のサーバを以下、新サーバという。 Another server determined as a new distribution destination is hereinafter referred to as a new server.
また接続禁止フラグをセットしたサーバ宛に継続リクエストが届いた場合に、新サーバに対して、それまで接続していたサーバ(以下、旧サーバという)からメモリ情報を取得する指示を出す。メモリ情報取得の指示を受けて新サーバは旧サーバにメモリ情報取得の要求を出しメモリ情報を取得する。メモリ情報取得完了後に負荷分散装置101は保留していていたクライアントからの継続リクエストを新サーバに送信する。
In addition, when a continuation request arrives at the server for which the connection prohibition flag is set, the new server is instructed to acquire memory information from the server connected so far (hereinafter referred to as the old server). In response to the memory information acquisition instruction, the new server issues a memory information acquisition request to the old server to acquire memory information. After the memory information acquisition is completed, the
クライアント100(#1,#2,・・・#n)、負荷分散装置101およびサーバ102(#1,#2,・・・#n)はLAN103に接続されルータ等を介して複数のサブネットから構成されることもある。これを実現するために負荷分散装置101は図2および図3に示す構成をしている。
The clients 100 (# 1, # 2,... #N), the
まず、本実施例の動作概要を図11を使用して説明する。 First, an outline of the operation of this embodiment will be described with reference to FIG.
ここでの説明は旧サーバ1203が停止予定サーバであり、シーケンス55とシーケンス56の間で停止時間に達した場合の例である。
The description here is an example where the
セッション維持を行っている業務システムにおいて、1201はリクエストを送信するクライアント、1202は処理を振り分ける負荷分散装置、1203は旧サーバ、1204は新サーバである。クライアント1201から負荷分散装置1202の仮想IPアドレス宛に接続要求が来ると接続を確立する(シーケンス50)。接続確立後にクライアント1201から新規のリクエストが仮想IPアドレス宛に送信される(シーケンス51)。負荷分散装置1202は新規のリクエストを受け取ると、旧サーバ1203に接続要求を出し接続を確立(シーケンス52)し、クライアントからのリクエストを旧サーバ1203に送信する(シーケンス53)。旧サーバはリクエストを受け取ると、それに応じてレスポンスを負荷分散装置1202に返信する(シーケンス54)。負荷分散装置1202は旧サーバ1203からのレスポンスをクライアント1201に返信する(シーケンス55)。
In a business system that maintains a session, 1201 is a client that transmits a request, 1202 is a load balancer that distributes processing, 1203 is an old server, and 1204 is a new server. When a connection request is received from the
この時点で旧サーバ1203は停止時間に達するため振り分け禁止になる。そして新サーバ1204が新規の振り分けサーバとして決定される。
At this time, since the
クライアントは継続のリクエスト(シーケンス56)を仮想IPアドレス宛に送信するが、旧サーバ1203への振り分けは禁止になっているので、負荷分散装置1202はリクエストを一旦保留して、新サーバ1204に対してリクエストしてきたクライアントのために確保された旧サーバ上のメモリ情報を取得するように指示を出す(シーケンス57、シーケンス58)。新サーバ1204は指示に従い、仮想IPアドレス宛に旧サーバのメモリ情報取得の接続要求を出す(シーケンス59)。接続が確立するとメモリ情報取得のリクエストを同じく仮想IPアドレス宛に送信する(シーケンス60)。
The client sends a continuation request (sequence 56) to the virtual IP address, but since distribution to the
負荷分散装置1202は新サーバからのメモリ取得リクエストを受け取ると、旧サーバに対して接続要求を出し接続を確立する(シーケンス61)。接続確立後にメモリ取得リクエストを旧サーバ1203に送信する(シーケンス62)。旧サーバ1203はリクエストを受け取るとリクエストデータ内にあるクライアント1201のセッション情報を見て、対応するメモリ情報をレスポンスする(シーケンス63)。このレスポンスを新サーバが受け取ることで(シーケンス64)、メモリ情報の取得ができる。
When receiving the memory acquisition request from the new server, the load balancer 1202 issues a connection request to the old server and establishes a connection (sequence 61). After the connection is established, a memory acquisition request is transmitted to the old server 1203 (sequence 62). When the
メモリ情報の取得が終了すると負荷分散装置1202は、新サーバに接続要求を出して接続を確立する(シーケンス65)。その後保留していたクライアントからリクエストを送信する(シーケンス66)。リクエストを受け取った新サーバ1204は処理を行いレスポンスを返信する(シーケンス67)。負荷分散装置1202は新サーバ1204からのレスポンスをクライアントに返信する(シーケンス68)。
When the acquisition of the memory information is completed, the load distribution apparatus 1202 issues a connection request to the new server and establishes a connection (sequence 65). Thereafter, a request is transmitted from the suspended client (sequence 66). The
以下に本実施例の詳細を説明する。 Details of the present embodiment will be described below.
図2は負荷分散装置101の概略構成図であり、クライアント100(#1,#2,・
・・#n)およびサーバ102(#1,#2,・・・#n)をLAN103で接続するためのスイッチ部200、スイッチ部200を制御するコントローラ201、クライアントからの接続要求に対する振り分けサーバ決定、新サーバに対する旧サーバからのメモリ情報の取得指示、停止予定サーバの停止予定時間の監視、パケットを解析して処理内容を決定するCPU部202、CPU部202が使用するメモリ203,各種情報を格納しておくディスク部204から構成される。
FIG. 2 is a schematic configuration diagram of the
.. #N) and the server 102 (# 1, # 2,... #N) are connected by the
図3はパケットの送受信、パケットの解析、振り分け先サーバの決定、停止時間監視、設定情報入力を行う負荷分散装置101に備えられる機能ブロック図である。送受信部301の動作は図4のフローチャートを使用して説明する。
FIG. 3 is a functional block diagram provided in the
負荷分散装置101に入力される負荷分散装置101の仮想IPアドレス宛のパケット、サーバからのレスポンスおよび負荷分散装置101を通過するパケットを受け取り(ステップS1)、接続情報管理部302に送信する(ステップS2)。また、サーバ決定部303で処理されたパケットおよびデータを受け取り(ステップS3)、コネクション確立済みであるかを図8の状態管理テーブルの接続元IPアドレス801および接続元ポート番号802を参照して判定する(ステップS4)。接続元IPアドレス801および接続元ポート番号802はコネクション確立直後に登録するため、登録されていれば確立済みであると判定する。
A packet addressed to the virtual IP address of the
コネクションが確立済みの場合はサーバ決定部303から受け取ったパケットをLAN103に送信する(ステップS5)。コネクションが確立済みでない場合はクライアントまたはサーバとコネクション確立処理を行い(ステップS6)、サーバ決定部303から受け取ったデータをLAN103に送信する(ステップS5)。
If the connection has been established, the packet received from the
コネクション確立の例としてTCPの3ウェイハンドシェイクがある。 An example of connection establishment is a TCP three-way handshake.
接続情報管理部302の動作は図5A、図5Bのフローチャートを使用して説明する。 The operation of the connection information management unit 302 will be described using the flowcharts of FIGS. 5A and 5B.
接続情報管理部302は、送受信部301から送られたパケットを受け取り(ステップS11)、パケットを解析する(ステップS12)。まず負荷分散装置101の仮想IPアドレス宛のパケットか否かを判定する(ステップS13)する。 The connection information management unit 302 receives the packet sent from the transmission / reception unit 301 (step S11) and analyzes the packet (step S12). First, it is determined whether the packet is addressed to the virtual IP address of the load balancer 101 (step S13).
仮想IPアドレスはVIPと略して表記されることもありクライアント100(#1,#2,・・・#n)に対してサーバ102(#1,#2,・・・#n)の複数IPアドレスを1つのIPアドレスと見せる役割を持つ。 The virtual IP address may be abbreviated as VIP, and a plurality of IPs of the server 102 (# 1, # 2,... #N) with respect to the client 100 (# 1, # 2,... #N). It has a role of showing an address as one IP address.
仮想IPアドレス宛で無い場合は負荷分散装置101を通過するパケットかサーバからのレスポンスであるため、パケットを通過させるフォワードフラグに1をセット(ステップS20)して、サーバ決定部303に通知する(ステップS19)。
If it is not addressed to the virtual IP address, it is a packet that passes through the
サーバ決定部303の動作を図6A、図6B、図6Cのフローチャートを使用して説明する。
The operation of the
サーバ決定部303は、接続情報管理部302から処理内容フラグをセットしたデータを受け取る(ステップS41)とセットされたフラグの解析を行う(ステップS42)。
When the
フォワードフラグが1の場合(ステップS43)負荷分散装置101を通過するパケットか、サーバからのレスポンスであるかを切り分ける(ステップS44)。
When the forward flag is 1 (step S43), it is determined whether the packet passes through the
ステップ44での判定の結果、サーバからのレスポンスでなかった場合、負荷分散装置101を単純に通過するパケットであるので、何も処理を行わずに送受信部301に通知する(ステップS46)。サーバからのレスポンスか否かは図8の状態管理テーブルの接続先IPアドレス804と接続先ポート番号805を参照し登録されているIPアドレスおよびポート番号が、ソースIPアドレスおよびソースポート番号として使用されているかどうかで判定できる。
If the result of determination in
負荷分散装置101はクライアントから仮想IPアドレス宛のリクエストを受信すると、宛先IPアドレスを選択したサーバのIPアドレスに変換してサーバに送信する。レスポンス時はソースIPアドレスはサーバのIPアドレス、宛先IPアドレスはクライアントのIPアドレスが指定されている。ポート番号についても同様である。このため、接続したサーバのIPアドレスがソースIPとして使用されていれば、サーバからのレスポンスと判定できる。
When receiving the request addressed to the virtual IP address from the client, the
ステップ44での判定の結果、レスポンスであればレスポンス返送処理をおこなう(ステップS45)。サーバからのレスポンスには、旧サーバからのメモリ情報移動のレスポンス(例:シーケンス63)と、クライアントからのリクエストに対するサーバからのレスポンス(例:シーケンス54)の2種類がある。このため、どちらのレスポンスであるかを切り分ける。
If the result of determination in
レスポンスのソースIPアドレスと接続先IPアドレス804、ソースポート番号と接続先ポート番号805を比較し、一致していて、かつ宛先IPアドレスが負荷分散対象サーバ102(#1,#2,・・・#n)であれば、旧サーバからのメモリ情報移動のレスポンスと判定できる。
The source IP address and connection
宛先IPアドレスが負荷分散対象サーバ102(#1,#2,・・・#n)でなければクライアントのリクエストに対するレスポンスであると判定できる。 If the destination IP address is not the load distribution target server 102 (# 1, # 2,... #N), it can be determined that the response is a response to the client request.
クライアントからのリクエストに対するレスポンス返送処理としては、ソースIPアドレスをサーバのIPアドレスから負荷分散装置101の仮想IPアドレスへの付け替えを行う。MACアドレスについても同様の付け替え処理を行い、送受信部301に通知する(ステップS46)。クライアントは負荷分散装置101の仮想IPアドレス宛にリクエストを出すため、レスポンス時にソースIPアドレスを仮想IPアドレスに変換しないとクライアントは別の装置からレスポンスが来たと認識しレスポンスを受け取れない。MACアドレスについても同様である。
As a response return process for the request from the client, the source IP address is changed from the server IP address to the virtual IP address of the
メモリ情報移動のための旧サーバからのレスポンス返送処理も同じである。 The response return process from the old server for moving the memory information is the same.
接続情報管理部302は、ステップ13での判定の結果、仮想IPアドレス宛のパケットである場合はクライアントからの接続要求か、メモリ情報取得のための新サーバからの接続要求であるから、ソースIPアドレスが負荷分散対象サーバ102(#1,#2,・・・#n)のIPアドレスであるか否かを判定する(ステップS14)。負荷分散対象サーバ102(#1,#2,・・・#n)のIPアドレスは図9のサーバ管理テーブルの接続先サーバIPアドレス902を参照することで取得する。
If the result of determination in
ソースIPアドレスが負荷分散対象サーバ102(#1,#2,・・・#n)のアドレスでない場合は、クライアント101(#1,#2,・・・#n)からの接続要求であるで、新規リクエストか継続リクエストかを判定(ステップS15)する。状態管理テーブルの接続先サーバ名803〜接続先ポート番号805は新規クエストをサーバに振り分けたときに登録されるので、登録されていなければ新規リクエストであると判定できる。
If the source IP address is not the address of the load balancing target server 102 (# 1, # 2,... #N), it is a connection request from the client 101 (# 1, # 2,... #N). Whether the request is a new request or a continuation request is determined (step S15). Since the connection
ステップS15での判定の結果、新規リクエストでなければ継続リクエストになるので、振り分け管理部304からの通知を元に停止時間が超過しているか否かを判定(ステップS16)する。停止時間になると振り分け管理部304より通知がくるため、通知の有無で停止時間超過を判定する。 If the result of determination in step S15 is that it is not a new request, it will be a continuation request, so it is determined whether or not the stop time has exceeded based on the notification from the distribution management unit 304 (step S16). Since notification is received from the distribution management unit 304 when the stop time is reached, it is determined whether or not the stop time is exceeded based on the presence or absence of the notification.
停止時間に達していなければ継続リクエストの処理を実行するため負荷分散フラグに1をセットし(ステップS18)、サーバ決定部303に通知する(ステップS19)。
If the stop time has not been reached, the load distribution flag is set to 1 to execute the continuation request process (step S18), and the
サーバ決定部303は、受け取ったデータのフラグを解析し、負荷分散フラグが1であることを認識し(ステップS67)、状態管理テーブルの接続元IPアドレス801と接続元ポート番号802を参照して、どのクライアントからのリクエストであるか特定し(ステップS68)、804を参照して接続するサーバを特定する(ステップS69)。
The
サーバ決定後はサーバへの転送処理としてソースIPアドレスの変換およびMACアドレスの変換を行い(ステップS70)、負荷分散処理フラグを0にして(ステップS71)、送受信部301へ通知する(ステップS46)。 After the server is determined, source IP address conversion and MAC address conversion are performed as transfer processing to the server (step S70), the load distribution processing flag is set to 0 (step S71), and the transmission / reception unit 301 is notified (step S46). .
接続情報管理部302は、ステップS16の判定の結果、停止時間を超過している場合は、振り分け先を変更する必要があるため、クライアントからの継続リクエストをメモリまたはディスク上に、一時保留して、サーバ変更フラグに1をセットし(ステップS17)、サーバ決定部303に通知する(ステップS19)。一時保留した継続リクエストは新サーバと旧サーバ間のメモリ移動終了後に処理される。
If the result of determination in step S16 indicates that the stop time has been exceeded, the connection information management unit 302 needs to change the distribution destination. Therefore, the connection information management unit 302 temporarily holds the continuation request from the client on the memory or the disk. The server change flag is set to 1 (step S17), and the
サーバ決定部303でサーバ変更フラグが1と判定されると(ステップS81)、サーバ管理テーブルの振り分け対象サーバ904を参照し(ステップS82)、振り分け先サーバを決定する(ステップS83)。選択されるサーバは振り分け対象サーバ904で1がセットされているサーバであり、ラウンドロビンの場合は順番に選択するサーバが変更される。なお、負荷分散方式は他の方式を指定しても良い。
When the server change flag is determined to be 1 by the server determination unit 303 (step S81), the
振り分け管理部304の動作を図7のフローチャートを使用して説明する。 The operation of the distribution management unit 304 will be described using the flowchart of FIG.
振り分け管理部304は、入力部305を通して入力された停止時間を監視していて(ステップS201)、停止時間になると接続情報管理部302とサーバ決定部303に停止時間超過の通知を出し(ステップS202)、停止対象サーバに対して図9のサーバ管理テーブルの接続禁止フラグ905に9をセットする(ステップS203)。接続禁止フラグをセットしたサーバが、選択対象(振り分け対象サーバ904に1がセットされている)になっている場合は(ステップS204)、振り分けサーバ904に0をセットする。振り分け対象サーバ904を1から0に変更し選択対象サーバが無くなった場合、新しい選択対象として次のサーバが選択されるように1をセットする(ステップS205)。
The distribution management unit 304 monitors the stop time input through the input unit 305 (step S201), and when the stop time is reached, notifies the connection information management unit 302 and the
サーバ決定部303は、新サーバ決定後に新サーバに対して旧サーバのメモリ上にある継続リクエストを出したクライアントのメモリ情報を取得するための指示を行うサーバ間通信起動パケットを作成する(ステップS84)。この指示パケットには、保留中のクライアントリクエストから取り出した、サーバが発行したセッション情報およびサーバ決定部303がセットするメモリ情報取得指示フラグが含まれる。サーバ間通信起動パケット作成後にサーバ変更フラグを0にセットして(ステップS85)、送受信部301に通知する(ステップ46)。
The
接続情報管理部302は、ステップS15での判定の結果、新規リクエストであれば新規負荷分散フラグに1をセットして(ステップS21)、サーバ決定部303に通知する。
If the result of determination in step S15 is a new request, the connection information management unit 302 sets a new load distribution flag to 1 (step S21), and notifies the
例えばPOSTやGETといったHTTPメソッドを見てリクエストと判定し、図8の状態管理テーブルの接続先サーバ名803〜接続先ポート番号805が登録されていなければ新規と判定する。
For example, the HTTP method such as POST or GET is determined as a request, and if the connection
接続先サーバ名803は振り分けを行ったサーバ名であり負荷分散装置101の設定情報で定義される。接続先サーバIPアドレス804は振り分けを行ったサーバのIPアドレスであり、この情報も負荷分散装置101の設定情報で定義される。接続先ポート番号805は接続を行ったサービスポート番号であり80はHTTPを示す。この接続先サーバ名803〜接続先ポート番号805は新規クエストをサーバに振り分けたときに登録されるので、登録されていなければ新規リクエストであると判定できる。
The connection
サーバ決定部303で新規負荷分散フラグが1と判定された(ステップS61)場合は、図9のサーバ管理テーブルの仮想IPアドレス901を参照して宛先に指定されている仮想IPアドレスを選択する。振り分け対象サーバは仮想IPアドレス毎に指定されるので、選択した仮想IPアドレス901のグループに属するサーバ902を選択するために、振り分け対象サーバ904を参照および更新する(ステップS62)。振り分け対象サーバ904には選択するサーバが記載されており、振り分け対象サーバ904が1になっているサーバが選択される(ステップS63)。サーバ選択後は選択したサーバを0にして、状態管理テーブルの負荷分散方式903の負荷分散方式に基づき次回選択されるサーバに1をセットする。
When the
仮想IPアドレス901、サーバ名902、負荷分散方式903の情報は負荷分散装置101の設定情報に定義されているため、設定情報から抽出して状態管理テーブルを作成する。
Since the information on the
サーバ決定後は状態管理テーブルの接続先サーバ名803〜接続先ポート番号805に接続するサーバ情報を登録して(ステップ64)、サーバとの接続処理を行う(ステップS65)。クライアントは負荷分散装置101の仮想IPアドレス宛にリクエスト送信するため、宛先のIPアドレスとMACアドレスを選択したサーバのアドレス変換する必要があるため、アドレス変換処理を行う。ステップS65の処理終了後は新規負荷分散フラグを0にして(ステップS66)、送受信部301に通知する(ステップS46)。
After the server is determined, the server information to be connected to the connection
接続情報管理部302は、ステップ14での判定の結果、ソースIPアドレスが負荷分散対象サーバ102(#1,#2,・・・#n)の場合は、新サーバと旧サーバとのメモリ情報引き継ぎの処理であるため、送受信部301経由で取得したパケットで処理の状態を判定し(ステップS24)、図10のサーバ間通信状態テーブルの新サーバ1002と旧サーバ1003を更新する(ステップS25)。サーバ間通信状態テーブルの1001は監視する項目を示し、本実施例ではFINとFINに対するACKを監視する。例えば新サーバからのFINフラグがセットされたパケットであれば、新サーバ1002のFIN欄に1をセットする。このように新サーバと旧サーバのFINとFINに対するACK全てに1がセットされるとコネクションクローズ状態と判定する。
If the result of determination in
処理の状態がコネクションクローズと判定された場合(ステップS26)はメモリ情報の移動終了を示すので、負荷分散装置101で保留していたクライアントからの継続リクエストを新サーバに送信するためにサーバ決定部303に通知する(ステップS19)。
When it is determined that the processing state is the connection closed (step S26), it indicates the end of the movement of the memory information, so that the server determination unit transmits the continuation request from the client held by the
サーバ決定部303でサーバ間通信フラグが1でないと判定されると(ステップ86)状態管理テーブルに新サーバの情報を登録し(ステップ89)、保留していたクライアントからの継続リクエストを新サーバへの接続処理を実施し(ステップ90)、送受信部301へ通知する(ステップ46)。
When the
接続情報管理部302は、処理の状態がコネクションクローズで無い場合は、まだ新サーバと旧サーバとのメモリ情報の移動が終了していないことを示すので、引き続きサーバ間の通信を行うためにサーバ間通信フラグに1をセットし(ステップS27)、サーバ決定部に通知する(ステップS19)。 If the processing status is not connection closed, the connection information management unit 302 indicates that the movement of memory information between the new server and the old server has not been completed. The inter-communication flag is set to 1 (step S27), and the server determination unit is notified (step S19).
サーバ決定部303でサーバ間通信フラグが1と判定(ステップS86)された場合はメモリ情報取得のための、新サーバと旧サーバの通信であるのでサーバ間通信処理を行う(ステップS87)。
If the
ステップ84で作成されたパケットを受け取った新サーバは、旧サーバのメモリ情報取得のために通信を開始する。まず、新サーバは負荷分散装置101の仮想IPアドレス宛に接続要求を出し接続を確立する(シーケンス59)。その後、新サーバは仮想IPアドレス宛にメモリ情報取得のリクエスト送信する(シーケンス60)。このリクエストにはステップ84で作成したパケットに埋め込んだクライアントリクエストに含まれるセッション情報が含まれている。
The new server that has received the packet created in
リクエストを受け取った負荷分散装置101は、状態管理テーブルのセッション情報806を参照して、旧サーバを特定する。旧サーバが特定できたら宛先IPアドレスを旧サーバのIPアドレスに変換して、旧サーバに対して接続要求をだし、接続を確立し(シーケンス61)、新サーバからのリクエストを送信する(シーケンス62)。
The
新サーバからのリクエストを受け取った旧サーバはリクエストに含まれるセッション情報を基にして対応するメモリ情報をレスポンスとして返信する(シーケンス63)。旧サーバからのレスポンスを受信した負荷分散装置101は送信時に変換した宛先IPアドレスを仮想IPアドレスに変換し新サーバにレスポンスを送信する(シーケンス64)。
The old server that has received the request from the new server returns the corresponding memory information as a response based on the session information included in the request (sequence 63). The
ステップS87の処理が終了するとサーバ間通信フラグを0にセットして(ステップS88)送受信301へ通知する(ステップS46)。 When the processing in step S87 is completed, the server-to-server communication flag is set to 0 (step S88), and the transmission / reception 301 is notified (step S46).
ステップS86での判定の結果、サーバ間通信フラグが1でなければ、状態管理テーブルに新サーバの情報を登録し(ステップ89)、保留していたクライアントからの継続リクエストを新サーバへの接続処理を実施し(ステップ90)送受信部301へ通知する(ステップ46)。 As a result of the determination in step S86, if the inter-server communication flag is not 1, information on the new server is registered in the state management table (step 89), and a continuation request from the suspended client is connected to the new server. (Step 90), and notifies the transmitter / receiver 301 (step 46).
本発明の第2の実施例のサーバ決定部303の動作を図6Dのフローチャートを使用して説明する。
The operation of the
停止予定時間を超過して直ぐにアクセスしてきたクライアントに対しては上記方法で接続サーバを変更できるが停止予定時間を経過しても、しばらくアクセスしてこないクライアントもいるため、サーバ決定部303はサーバ管理テーブルの待ち時間907を参照し停止時間からの待ち時間を監視する(ステップS101)。待ち時間907で指定された待ち時間を経過してもアクセスしてこないクライアントに対しては、状態管理テーブルの接続先サーバ名803〜接続先ポート番号805を参照して(ステップS102)、クライアントを特定する。次にサーバ管理テーブルの振り分け対象サーバ904を参照して新サーバを決定し(ステップS103)、強制的にサーバ間通信起動パケットを作成して(ステップS104)、送受信部301へ通知する(ステップS105)。この処理により強制的にメモリ情報の移動を開始する。
For clients that have accessed immediately after exceeding the scheduled stop time, the connection server can be changed by the above method. However, even if the scheduled stop time elapses, some clients do not access for a while. The waiting time from the stop time is monitored with reference to the waiting time 907 in the management table (step S101). For a client that does not access even after the waiting time specified in waiting time 907 has elapsed, refer to the connection
待ち時間を超過してアクセスしてきたクライアントがいても、メモリ情報は移動済みであるため、処理の継続が可能になる。 Even if there is a client that has accessed after exceeding the waiting time, since the memory information has been moved, the processing can be continued.
100 クライアント
101 負荷分散装置
102 サーバ
200 スイッチ部
201 コントローラ
202 CPU
203 メモリ
204 ディスク
301 送受信部
302 接続情報管理部
303 サーバ決定部
304 振り分け管理部
305 入力部
801 接続元IPアドレス
802 接続元ポート番号
803 接続先サーバ名
804 接続先サーバのIPアドレス
805 接続先サーバのポート番号
806 継続リクエストに含まれるセッション情報システム本部
901 負荷分散装置に設定されている仮想IPアドレス
902 接続先サーバのIPアドレス
903 負荷分散方式
904 振り分け対象サーバ
905 接続禁止フラグ
906 停止予定時間
907 メモリ情報強制移動までの待ち時間
100
203
Claims (2)
前記複数サーバのうち特定のサーバを計画的に停止させるために停止対象サーバ、停止時間およびメモリ情報強制移動までの待ち時間を入力できる入力手段と、
前記停止対象サーバの停止予定時間を監視し停止予定時間になると前記停止対象サーバに接続禁止フラグをセットし新規の振り分けサーバを決定する振り分け管理手段と、
前記クライアントからの接続要求を解析して前記停止対象サーバへ接続するか新規サーバへ振り分けるか等の処理内容を分類する接続情報管理手段と、
前記接続情報管理手段によって振り分けるサーバの変更が必要と判定された場合に前記振り分け管理手段によって選択された前記サーバに対して前記停止対象サーバからメモリ情報を取得するよう指示を出し、メモリ情報の移動が終了すると保留していた継続リクエストを新規サーバへ送信するサーバ決定手段と、
前記サーバ決定部から送付されたデータをLANへ送信する送受信手段と、
前記サーバ決定部からメモリ情報取得の指示を受け取ると前記停止対象サーバに対してメモリ情報取得リクエストを発行するメモリ情報取得手段と、
前記メモリ情報取得手段からメモリ情報移動のリクエストを受け取るとメモリ情報を返信するメモリ情報返信手段を備えた負荷分散システム。 A load distribution system including a load distribution device that distributes connection requests from a plurality of servers and a plurality of clients and distributes the requests to the plurality of servers,
An input means capable of inputting a stop target server, a stop time, and a waiting time until forced movement of memory information in order to systematically stop a specific server among the plurality of servers;
A distribution management means for monitoring a scheduled stop time of the stop target server and setting a connection prohibition flag on the stop target server and determining a new distribution server when the scheduled stop time is reached;
A connection information management means for analyzing a connection request from the client and classifying processing contents such as whether to connect to the server to be stopped or to distribute to a new server;
When the connection information management unit determines that the distribution server needs to be changed, the server selected by the distribution management unit is instructed to acquire memory information from the server to be stopped, and the memory information is moved. Server determination means for sending a continuation request that has been suspended to the new server when
A transmission / reception means for transmitting data sent from the server determination unit to the LAN;
Memory information acquisition means for issuing a memory information acquisition request to the stop target server when receiving an instruction to acquire memory information from the server determination unit;
A load distribution system comprising memory information return means for returning memory information upon receiving a memory information movement request from the memory information acquisition means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010256388A JP2012108685A (en) | 2010-11-17 | 2010-11-17 | Load distribution system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010256388A JP2012108685A (en) | 2010-11-17 | 2010-11-17 | Load distribution system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2012108685A true JP2012108685A (en) | 2012-06-07 |
Family
ID=46494243
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2010256388A Pending JP2012108685A (en) | 2010-11-17 | 2010-11-17 | Load distribution system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2012108685A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014178828A (en) * | 2013-03-14 | 2014-09-25 | Nec Corp | Dual system |
| JP2016095645A (en) * | 2014-11-13 | 2016-05-26 | 株式会社東芝 | Connection control device, connection control method, connection control system, and computer program |
| JP2018109867A (en) * | 2017-01-04 | 2018-07-12 | 富士通株式会社 | Session management program, session management method, information processing apparatus, and information processing system |
| JP2019159844A (en) * | 2018-03-13 | 2019-09-19 | 富士通株式会社 | Control program, control and information processing apparatus |
-
2010
- 2010-11-17 JP JP2010256388A patent/JP2012108685A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014178828A (en) * | 2013-03-14 | 2014-09-25 | Nec Corp | Dual system |
| US9558149B2 (en) | 2013-03-14 | 2017-01-31 | Nec Corporation | Dual system |
| JP2016095645A (en) * | 2014-11-13 | 2016-05-26 | 株式会社東芝 | Connection control device, connection control method, connection control system, and computer program |
| JP2018109867A (en) * | 2017-01-04 | 2018-07-12 | 富士通株式会社 | Session management program, session management method, information processing apparatus, and information processing system |
| JP2019159844A (en) * | 2018-03-13 | 2019-09-19 | 富士通株式会社 | Control program, control and information processing apparatus |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11418620B2 (en) | Service request management | |
| KR100621092B1 (en) | Method and apparatus for sharing application using P2P protocol | |
| CN105337961B (en) | The method and server communicated with client | |
| CN101662506B (en) | Load balancing method based on CPU kernel sharing and device thereof | |
| EP1180886B1 (en) | Load balancing method and system | |
| US9058213B2 (en) | Cloud-based mainframe integration system and method | |
| EP3211902B1 (en) | Hls-based capability control method, hls-based capability control service system, and slb server | |
| JP4616159B2 (en) | Cluster system, load balancer, node transfer method, and node transfer program | |
| JP2014502382A (en) | System and method for balancing servers based on server load conditions | |
| EP2140351B1 (en) | Method and apparatus for cluster data processing | |
| KR20140016309A (en) | Providing a witness service | |
| CN102195882A (en) | Method and device for selecting route according to data stream application type | |
| CN104683435A (en) | Network system, method of keeping connected, electronic device, server, program | |
| JP2005182641A (en) | Dynamic load balancing system and dynamic load balancing method | |
| JP2012108685A (en) | Load distribution system | |
| US20150189004A1 (en) | Method and farm load balancing device for establishing a bi-directional server to server communication and computer program thereof | |
| GB2460509A (en) | Event controller | |
| CN109067509A (en) | Distributed node signal transmission method and system, shared calculate node and signaling gateway | |
| CN114024968B (en) | Message sending method and device based on intermediate equipment and electronic equipment | |
| CN104363235A (en) | Communication method, device and system and communication channel establishing method and device | |
| CN109144919A (en) | A kind of interface method and device | |
| JP2007219637A (en) | Load balancing system and program thereof | |
| KR101146742B1 (en) | METHOD OF DISTRIBUTED SESSION MANAGEMENT IN SaaS AND SESSION MANAGEMENT SYSTEM THEROF | |
| CN110945852B (en) | Method and device for establishing connection between physical OLT and virtual OLT | |
| KR101869925B1 (en) | Method for connecting web servers and web application servers and was admin server using the same |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20120521 |