JP2005135125A - Fail-over processing method - Google Patents

Fail-over processing method Download PDF

Info

Publication number
JP2005135125A
JP2005135125A JP2003369813A JP2003369813A JP2005135125A JP 2005135125 A JP2005135125 A JP 2005135125A JP 2003369813 A JP2003369813 A JP 2003369813A JP 2003369813 A JP2003369813 A JP 2003369813A JP 2005135125 A JP2005135125 A JP 2005135125A
Authority
JP
Japan
Prior art keywords
web
server
request
web application
normal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003369813A
Other languages
Japanese (ja)
Inventor
Katsutoshi Asaki
克利 朝木
Hideo Takahashi
英男 高橋
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2003369813A priority Critical patent/JP2005135125A/en
Publication of JP2005135125A publication Critical patent/JP2005135125A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)
  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To ensure that no old session information is referred to whenever a Web AP server may fail, and obtain a method for preventing a mismatch between two systems by a communication failure, only by software. <P>SOLUTION: The fail-over processing method uses a normal system server and a standby system server. The normal system server receives a first request, reads out first session information used in processing the first request, and copies and stores the first session information to a storage device of the standby system server. When receiving a second request, the normal system server invalidates the first session information stored in the storage device of the standby system server before starting to process the second request. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、正常系と待機系から成るサーバプログラムの冗長構成により、正常系サーバプログラムの障害時に待機系サーバプログラムが処理を引き継ぐフェイルオーバ処理方法に関する。   The present invention relates to a failover processing method in which a standby server program takes over processing in the event of a failure of a normal server program due to a redundant configuration of server programs including a normal system and a standby system.

Webで買い物ができるオンラインショッピングサイトのような商用のWebサイトでは、利用者に常にサービスを提供できるように、24時間365日運転を可能とする高可用性が求められている。   Commercial Web sites such as online shopping sites that allow customers to shop on the Web are required to have high availability that can be operated 24 hours a day, 365 days a year so that services can always be provided to users.

このような商用のWebサイトは一般に、Webサーバと、Webサーバと連携動作してアプリケーションプログラムを実行するWebアプリケーションサーバ(Web APサーバ)、そして、アプリケーションプログラムが参照するデータ、又は処理した結果のデータを管理するデータベース管理システム(DBMS)の3層から構成される。   Such a commercial website generally has a web server, a web application server (Web AP server) that executes an application program in cooperation with the web server, and data that the application program refers to or results of processing. It consists of three layers of database management system (DBMS) that manages

WebブラウザからWebサイトにアクセスすることにより、HTTPリクエストがWebサーバに到着する。Webサーバでは到着したHTTPリクエストの宛先URLを参照して、URLに対応するHTMLファイルや画像ファイルをWebブラウザに返信するか、又はWeb APサーバにリクエストを転送するかどうかを判断する。Web APサーバにリクエストを転送する場合、Web APサーバでは転送されてきたリクエストの宛先URLに対応するアプリケーションプログラムを実行する。オンラインショッピングサイトにおける商品選択・確認・決済といった、ユーザから入力されるデータに基づく処理は、Web APサーバでアプリケーションプログラムを実行することにより行われる。このアプリケーションプログラムは、必要に応じて、DBMSと通信を行い、データベースから必要なデータを検索して取り出したり、処理したデータをデータベースに格納したりする。   By accessing the web site from the web browser, the HTTP request arrives at the web server. The Web server refers to the destination URL of the arrived HTTP request, and determines whether to return an HTML file or an image file corresponding to the URL to the Web browser or to transfer the request to the Web AP server. When transferring a request to the Web AP server, the Web AP server executes an application program corresponding to the destination URL of the transferred request. Processing based on data input by the user, such as product selection / confirmation / settlement at an online shopping site, is performed by executing an application program on the Web AP server. This application program communicates with the DBMS as necessary to search and retrieve necessary data from the database, and store the processed data in the database.

このようなWebサーバ、Web APサーバとDBMSから構成されるWebサイトの可用性を高める方法としては、Webサーバ、Web APサーバ、DBMSをそれぞれ冗長に複数起動しておき、いずれかのサーバに障害が起きた場合には、冗長に起動しておいた代わりのサーバで処理を引き継ぐ方法がある。この方法では、一部のサーバの障害がWebサイト全体の停止には繋がらず、Webサイトとしては処理を続けることができる。しかし、Web APサーバに障害が起きた場合には、Webサイト全体の停止には繋がらないものの、以下の理由により、ユーザにはエラーを返すことになってしまう。   One way to increase the availability of a Web site that consists of a Web server, Web AP server, and DBMS is to start multiple redundant Web servers, Web AP servers, and DBMSs. If it happens, there is a method to take over the processing with an alternative server that has been activated redundantly. In this method, failure of some servers does not lead to the suspension of the entire website, and the website can continue processing. However, if the Web AP server fails, the entire Web site will not be stopped, but an error will be returned to the user for the following reasons.

Web上で実現されるアプリケーションは一般に、アプリケーションを構成する一連のページを、リンクをたどって順次呼び出すことにより実行される。そして、それぞれのページではユーザにデータを段階的に入力させ、アプリケーションの処理が完了した時点でそれまでに入力されたデータを一括してデータベースに登録する構成を採ることが多い。例えば、ショッピングサイトでは、アプリケーションを構成する個々のページで、まず、購入商品を選択させ、次に、住所やクレジットカードの番号等のデータを入力させ、最後に決済を行った時点で一括してそれらのデータをデータベースに格納する。   An application implemented on the Web is generally executed by sequentially calling a series of pages constituting the application by following links. In many cases, each page is configured to allow the user to input data step by step, and when the processing of the application is completed, the data input up to that point is collectively registered in a database. For example, in a shopping site, on the individual pages that make up the application, you first have to select a product to be purchased, then enter data such as an address and credit card number, and at the time of the final settlement, Store those data in the database.

この時、データベースに登録するまでに段階的に入力された中間的なデータをクライアントに対応付けて保持している必要がある。市販のWeb APサーバではメモリ上でそれらのデータをクライアントに対応つけて保持する機能を提供している。そのため、Web APサーバに障害が起きるとこのメモリ上のデータが失われてしまい、ユーザがそれまで入力した購入商品や住所などのデータが消えてしまう。よって、冗長に起動しておいた他のWeb APサーバではユーザの処理を引き継ぐことができず、アプリケーションはユーザにエラーを返すことになってしまう。   At this time, it is necessary to store the intermediate data input stepwise before being registered in the database in association with the client. A commercially available Web AP server provides a function for storing such data in memory in association with the client. Therefore, when a failure occurs in the Web AP server, the data on this memory is lost, and data such as purchased items and addresses that the user has entered so far are lost. Therefore, other Web AP servers that have been activated redundantly cannot take over user processing, and the application will return an error to the user.

このメモリ上の中間的なデータをセッション情報と呼ぶ。そして、Web APサーバは、クライアントとセッション情報とを対応付けるために、クライアントに対してセッションIDと呼ぶ識別子を発行し、それに対応付けてセッション情報を管理している。また、Web APサーバがセッションIDを発行する際には、セッションIDにそのクライアントのセッション情報を保持するWeb APサーバを識別するIDを含める。Webサーバでは、リクエストに含まれるセッションIDを元に、同一のクライアントからのリクエストを毎回同じWeb APサーバに転送する。   This intermediate data on the memory is called session information. The Web AP server issues an identifier called a session ID to the client in order to associate the client with the session information, and manages the session information in association with the identifier. When the Web AP server issues a session ID, the session ID includes an ID for identifying the Web AP server holding the session information of the client. In the Web server, based on the session ID included in the request, the request from the same client is transferred to the same Web AP server every time.

Web APサーバの障害により個々のユーザがエラーに遭遇してしまう上記の問題を解決するために、メモリ上のセッション情報を二重化し、Web APサーバの障害に備える方法の例として、非特許文献1がある。   In order to solve the above-mentioned problem that an individual user encounters an error due to a failure of the Web AP server, as an example of a method for preparing session failure in the Web AP server by duplicating the session information on the memory, Non-Patent Document 1 There is.

この非特許文献1の従来例では、Web APサーバを複数起動しておき、あるWeb APサーバでリクエスト処理に使用したセッション情報を、リクエスト処理後に他のWeb APサーバのメモリ上にバックアップすることにより、セッション情報を二重化している。   In the conventional example of Non-Patent Document 1, a plurality of Web AP servers are started, and the session information used for request processing by a certain Web AP server is backed up on the memory of another Web AP server after request processing. , Session information is duplicated.

上記従来例では、下記に示す問題への配慮がなされているかどうかは開示されていないが、セッション情報を単に二重化するだけでは、Web APサーバに障害が起きるタイミングによっては、古いセッション情報を用いてリクエスト処理を引き継いでしまう場合がある。具体的には、あるWeb APサーバでリクエスト処理を行った後、そのリクエスト処理で更新されたセッション情報をバックアップする前にそのWeb APサーバに障害が起きた場合、バックアップ先であるWeb APサーバには更新された新しいセッション情報がバックアップされず、以前の古いセッション情報が残ってしまう。そして、その後のリクエストでは、代わりのWeb APサーバがその古いセッション情報を用いて処理を行ってしまうという問題が発生する。   In the above conventional example, it is not disclosed whether consideration is given to the following problems, but by simply duplicating the session information, depending on the timing when the Web AP server fails, old session information may be used. The request processing may be taken over. Specifically, after processing a request on a certain Web AP server, if a failure occurs in that Web AP server before backing up the session information updated by that request processing, the backup is performed on the Web AP server that is the backup destination. The new updated session information is not backed up and the previous old session information remains. In subsequent requests, there arises a problem that the alternative Web AP server performs processing using the old session information.

さらに、Web APサーバ間のバックアップのための通信に障害が発生した場合、正常時にリクエスト処理を行っているWeb APサーバはバックアップ先のWeb APサーバにセッション情報をバックアップできないまま処理を続ける。すると、その2つのWeb APサーバ間で、保持しているセッション情報のデータの内容が異なってしまう。この状態で正常時にリクエスト処理を行っているWeb APサーバに障害が起きると、バックアップ先のWeb APサーバでは古いバックアップを用いて処理を行ってしまうという問題が発生する。   Furthermore, when a failure occurs in communication for backup between Web AP servers, the Web AP server that performs request processing at the normal time continues processing without being able to back up the session information to the backup Web AP server. Then, the contents of the session information data held between the two Web AP servers differ. In this state, if a failure occurs in the Web AP server that is processing requests normally, the backup destination Web AP server performs processing using the old backup.

このような通信障害が原因で起きる2つの系の間の不整合を防止する従来例としては特許文献1における「二重化通信システム」がある。この従来例では、正常時にリクエスト処理を行う正常系ホストと、正常時は正常系ホストの稼動状態を常に監視して正常系ホストに障害が起きたときだけリクエスト処理を行う待機系ホストを設ける。待機系ホストは定期的に正常系ホストと通信を行うことにより稼動監視を行い、正常系ホストが稼動していると判断している間は処理を引き継がない。そして、稼動監視によって正常系ホストが停止していると判断した場合、正常系ホストとの通信路に障害が発生している場合を考慮して、稼動している可能性のある正常系ホストの電源を専用のハードウェアを用いて切断する。これにより、通信障害によって2つの系の間で不整合が起きる前に、どちらか一方の稼動を確実に停止し、もう一方だけで処理を継続する方法を採っている。   As a conventional example for preventing inconsistency between two systems caused by such communication failure, there is a “duplex communication system” in Patent Document 1. In this conventional example, a normal host that performs request processing when normal and a standby host that performs request processing only when a failure occurs in the normal host by constantly monitoring the operating state of the normal host during normal operation are provided. The standby host periodically monitors the operation by communicating with the normal host, and does not take over the processing while determining that the normal host is operating. If it is determined by operation monitoring that the normal host has stopped, considering the case where a failure has occurred in the communication path with the normal host, Disconnect power using dedicated hardware. Thus, before inconsistency occurs between the two systems due to a communication failure, the operation of either one is surely stopped, and the processing is continued only by the other.

Scott Hawkins 著、”BEA WebLogic Server Administration Kit”、Prentice Hall Ptr 出版、2003、p.77Scott Hawkins, “BEA WebLogic Server Administration Kit”, Prentice Hall Ptr, 2003, p.77

特開2000−20336号JP 2000-20336 A

上記の従来技術を用いて、24時間365日止まることなくサービスを提供する商用の大規模Webサイトを構築しようとした場合、以下の問題が生じる。   When the above-mentioned conventional technology is used to construct a commercial large-scale Web site that provides services without stopping for 24 hours 365 days, the following problems arise.

商用のWebサイトでは、可用性に加えて信頼性も必要とされる。また、近年の大規模Webサイトは、安価なPCを大量に購入し、そのPC上でWebサーバやWeb APサーバを起動して負荷分散を行い、高負荷に耐えられるような構成を採っている。   Commercial Web sites require reliability in addition to availability. In addition, large-scale websites in recent years have been configured to be able to withstand high loads by purchasing a large number of inexpensive PCs and starting up the Web server or Web AP server on that PC to distribute the load. .

第一の問題は、非特許文献1の従来例で開示されている方法のみで、単にメモリ上のセッション情報を二重化するだけでは、Web APサーバの障害のタイミングによっては、古いセッション情報を参照して処理を継続してしまうという問題である。   The first problem is only the method disclosed in the conventional example of Non-Patent Document 1, and simply duplicating the session information in the memory refers to the old session information depending on the failure timing of the Web AP server. This is a problem of continuing processing.

第二の問題は、特許文献1の従来例は、近年の大規模Webサイトの構成には適さないという問題である。なぜなら、コストを削減するため安価なPCを大量に設置しているにも関わらず、その全てに電源を制御する専用のハードウェアを設置するのはコストの面から現実的ではないためである。   The second problem is that the conventional example of Patent Document 1 is not suitable for the configuration of a large-scale Web site in recent years. This is because it is not practical from the viewpoint of cost to install dedicated hardware for controlling the power supply in all of them even though a large number of inexpensive PCs are installed to reduce costs.

本発明では、上記従来技術の問題点を鑑みて、以下の二つの課題を解決することを目的とする。第一に、どのタイミングでWeb APサーバに障害が起きても古いセッション情報を参照してしまうことがないことを保証する。第二に、通信障害による2つの系の間の不整合を防止する方法をソフトウェアだけで実現する。   The present invention aims to solve the following two problems in view of the problems of the prior art. First, it guarantees that old session information will not be referenced no matter what timing the Web AP server fails. Second, a method for preventing inconsistency between two systems due to communication failure is realized only by software.

本発明における正常系サーバと待機系サーバとを用いたフェイルオーバ処理方法であって、前記正常系サーバが、第一のリクエストを受信し、当該第一のリクエストの処理で使用した第一のセッション情報を読み出し、前記待機系サーバの記憶装置へ前記第一のセッション情報をコピーして格納し、前記正常系サーバが、第二のリクエストを受信した場合に、第二のリクエストの処理を開始する前に、前記待機系サーバの記憶装置に格納された前記第一のセッション情報を無効化することを特徴とする。   A failover processing method using a normal server and a standby server according to the present invention, wherein the normal server receives a first request and uses the first session information used in processing the first request. Is copied and stored in the storage device of the standby server, and when the normal server receives the second request, before starting the processing of the second request Further, the first session information stored in the storage device of the standby server is invalidated.

また、本発明は上記の課題を解決するために、正常系Web APサーバと待機系Web APサーバのメモリ上で二重化してあるセッション情報が古くなる場合には、古くなるデータを事前に無効化するようにする。   In addition, in order to solve the above-mentioned problem, the present invention invalidates the data to be aged in advance when the session information duplicated on the memory of the normal Web AP server and the standby Web AP server is outdated. To do.

具体的には、正常系Web APサーバでのリクエスト処理開始前に、待機系Web APサーバにこれから正常系Web APサーバで更新するセッション情報のバックアップを無効化するように要求を行い、それに従って待機系Web APサーバではセッション情報のバックアップを無効化することにする。これにより、正常系Web APサーバでのリクエスト処理を開始してから、リクエスト処理後に待機系Web APサーバにセッション情報を二重化するまでの間は、セッション情報は二重化されていないものの、正常系Web APサーバと待機系Web APサーバとで内容の異なるセッション情報が存在してしまうことがなくなる。これにより、上記第一の課題が解決される。   Specifically, before starting the request processing on the normal Web AP server, request the standby Web AP server to invalidate the backup of the session information to be updated on the normal Web AP server, and wait accordingly The backup of session information is invalidated on the Web AP server. As a result, the session information is not duplicated between the start of request processing on the normal Web AP server and the session information is duplicated on the standby Web AP server after request processing. Session information with different contents does not exist between the server and the standby Web AP server. Thereby, the first problem is solved.

また、正常系Web APサーバと待機系Web APサーバ間の通信に障害が発生した場合には、双方のサーバは障害を検知した時点で、データベースの特定のレコードに排他的なアクセスを行い、先にアクセスできた方のサーバが稼動を続け、後からアクセスした方のサーバは自発的に停止することにする。これにより、通信障害が起きた場合に確実にどちらか一方のサーバだけで稼動を続けることがソフトウェアだけで実現でき、上記第ニの課題が解決される。   In addition, when a failure occurs in communication between the normal Web AP server and the standby Web AP server, when both servers detect the failure, they perform exclusive access to a specific record in the database, The server that can access the server will continue to operate, and the server that accessed later will voluntarily stop. As a result, when a communication failure occurs, it is possible to ensure that only one of the servers continues to operate with only software, and the second problem is solved.

本発明によれば、Webアプリケーションサーバに障害が発生しても、処理を引き継ぐWebアプリケーションサーバが古いセッション情報を用いることなく、リクエスト処理を継続することが可能となる。また、セッション情報の二重化のためのWebアプリケーションサーバ間の通信に障害が起きても、古いセッション情報を用いることなく、リクエスト処理を継続することが可能となる。   According to the present invention, even if a failure occurs in the Web application server, it becomes possible for the Web application server that takes over the processing to continue the request processing without using old session information. Moreover, even if a failure occurs in communication between Web application servers for duplicating session information, request processing can be continued without using old session information.

以下に、本発明の一実施例を図面を用いて詳細に説明する。本発明の一つの目的は、正常系Web APサーバがリクエスト処理を行う毎に、リクエスト処理に使用したセッション情報を待機系Web APサーバに二重化して障害に備えるフェイルオーバ処理方法において、正常系Web APサーバの障害がどのタイミングで発生しても、待機系Web APサーバが古いセッション情報を参照しないように保証しつつ、可能な限りユーザの処理を継続することである。   Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. One object of the present invention is to provide a failover processing method in which the session information used for request processing is duplicated in the standby Web AP server to prepare for a failure each time the normal Web AP server performs request processing. Whatever timing the server failure occurs, the standby Web AP server ensures that the old session information is not referenced, and continues the user's processing as much as possible.

本発明の他の目的は、正常系Web APサーバと待機系Web APサーバ間の通信に障害が発生した場合に、正常系Web APサーバと待機系Web APサーバ間の系の不整合を生じさせないために、確実にどちらか片方のWeb APサーバだけが稼動を続ける方法をソフトウェアだけで実現することである。   Another object of the present invention is to prevent inconsistency between the normal Web AP server and the standby Web AP server when a failure occurs in communication between the normal Web AP server and the standby Web AP server. Therefore, to ensure that only one of the Web AP servers continues to operate, it is necessary to realize only with software.

本発明では、上記第一の目的を達成するために、正常系Web APサーバでリクエスト処理を行う前に、待機系Web APサーバにセッション情報無効化要求を送信し、これから正常系Web APサーバでリクエスト処理に使用するセッション情報に対応する待機系Web APサーバ上のセッション情報のバックアップをあらかじめ無効化しておく。これにより、正常系Web APサーバでリクエスト処理を行う間はセッション情報が二重化されていないことになるものの、待機系Web APサーバが古いセッション情報を参照してしまうことを未然に防止している。   In the present invention, in order to achieve the first object, before the request processing is performed by the normal Web AP server, a session information invalidation request is transmitted to the standby Web AP server. Disable the backup of session information on the standby Web AP server corresponding to the session information used for request processing in advance. This prevents the standby Web AP server from referring to old session information, although the session information is not duplicated while the normal Web AP server performs request processing.

また、上記第二の目的を達成するために、正常系Web APサーバと待機系Web APサーバ間で定期的に通信し合うことで互いが稼動していることを監視しておき、ペアとなるWeb APサーバからの通信が途絶えた場合には、あらかじめ用意しておいたリレーショナルデータベースのレコードに先にアクセスできた一方のWeb APサーバだけが稼動を続け、後からアクセスしたもう一方のWeb APサーバは自発的に停止することにしている。これにより、どちらか一方のWeb APサーバのみが稼動を続けることをソフトウェアだけで実現している。   In addition, in order to achieve the second purpose described above, the normal Web AP server and the standby Web AP server regularly communicate with each other to monitor that they are operating and become a pair. If communication from the Web AP server is interrupted, only one Web AP server that can access the relational database record prepared in advance will continue to operate, and the other Web AP server accessed later Decided to stop voluntarily. As a result, only one of the Web AP servers continues to operate with software alone.

以下ではまず、本発明を利用して、上記目的を達成するための本実施例のシステム構成および動作の概要について説明する。   Below, the outline | summary of the system configuration | structure and operation | movement of a present Example for achieving the said objective using this invention first is demonstrated.

図2・3には本実施例のシステム構成を示す。本実施例では、図2に示すようにホームページ閲覧者503が操作する端末装置とWebサイト500がネットワーク501を介して接続されている。端末装置502は汎用の計算機と汎用のHTTPクライアントプログラム(以下Webブラウザ504と呼ぶ)から構成され、ホームページ閲覧者503は、端末装置502上でWebブラウザ504を操作することにより、Webサイト500にアクセスする。   2 and 3 show the system configuration of this embodiment. In this embodiment, as shown in FIG. 2, a terminal device operated by a homepage viewer 503 and a web site 500 are connected via a network 501. The terminal device 502 includes a general-purpose computer and a general-purpose HTTP client program (hereinafter referred to as a Web browser 504), and a homepage viewer 503 accesses the Web site 500 by operating the Web browser 504 on the terminal device 502. To do.

図3にはWebサイト500内の構成を示す。Webサイト500は、Webサーバ用計算機510、正常系Web APサーバ用計算機511、待機系Web APサーバ用計算機512、DBMS用計算機513から構成され、それらはネットワークを介して接続されている。これらのWebサイトを構成する計算機はすべて、汎用の計算機で実現可能である。Webサイト管理者505は、Webサーバ用計算機510上ではHTTPサーバプログラム(以下、Webサーバプログラム100と呼ぶ)を、正常系Web APサーバ用計算機511上では正常系Web APサーバプログラム200を、待機系Web APサーバ用計算機512上では待機系Web APサーバプログラム300を、DBMS用計算機513上ではDBMSプログラム400を起動する。   FIG. 3 shows the configuration within the Web site 500. The Web site 500 includes a Web server computer 510, a normal Web AP server computer 511, a standby Web AP server computer 512, and a DBMS computer 513, which are connected via a network. All of the computers that make up these Web sites can be implemented with general-purpose computers. The Web site manager 505 transmits an HTTP server program (hereinafter referred to as Web server program 100) on the Web server computer 510, and a normal Web AP server program 200 on the standby Web AP server computer 511. The standby Web AP server program 300 is activated on the Web AP server computer 512 and the DBMS program 400 is activated on the DBMS computer 513.

正常系Web APサーバプログラム200は、正常時にリクエスト処理と待機系Web APサーバプログラム300へのセッション情報の二重化を行うWeb APサーバプログラムである。また、待機系Web APサーバプログラム300は正常時にはリクエスト処理は行わず、正常系Web APサーバプログラム200の障害時にリクエスト処理を引き継ぐWeb APサーバプログラムである。正常系Web APサーバプログラム200と待機系Web APサーバプログラム300はペアで起動する。   The normal Web AP server program 200 is a Web AP server program that duplicates request processing and session information to the standby Web AP server program 300 when normal. The standby Web AP server program 300 is a Web AP server program that does not perform request processing when normal, but takes over request processing when the normal Web AP server program 200 fails. The normal Web AP server program 200 and the standby Web AP server program 300 are started in pairs.

以降では正常系Web APサーバプログラム200と待機系Web APサーバプログラム300のペアをWeb APサーバペアと呼ぶ。DBMS用計算機513上の二次記憶装置401上には、DBMSプログラム400を介してアクセス可能な、Web APサーバペアの状態を管理するためのリレーショナルデータベースのテーブルであるサーバペア状態管理テーブル402を設け、Web APサーバペア毎に1つのサーバペア状態を格納する。   Hereinafter, a pair of the normal Web AP server program 200 and the standby Web AP server program 300 is referred to as a Web AP server pair. On the secondary storage device 401 on the DBMS computer 513, a server pair status management table 402, which is a relational database table that can be accessed via the DBMS program 400, is provided. One server pair status is stored for each Web AP server pair.

なお、本実施例では、Web APサーバペアを一組しか起動していないが、ペアとなる正常系と待機系のWeb APサーバプログラムを異なる計算機上で起動すれば、負荷分散のために複数のペアを起動しても構わない。また、本実施例では、本発明とは無関係のため、Webサーバプログラム100とDBMSプログラム400を冗長構成としていないが、Webサイト500全体の可用性を高めるために、Webサーバプログラム100やDBMSプログラム400を複数起動して冗長構成としても構わない。   In this embodiment, only one Web AP server pair is activated. However, if the normal and standby Web AP server programs to be paired are activated on different computers, a plurality of servers are distributed for load balancing. You may activate a pair. In this embodiment, the Web server program 100 and the DBMS program 400 are not redundantly configured because they are not related to the present invention. However, in order to increase the availability of the entire Web site 500, the Web server program 100 and the DBMS program 400 are Multiple configurations may be activated to provide a redundant configuration.

次に、本実施例の動作手順の概要について説明する。
図1を用いて動作手順を説明する。正常系および待機系Web APサーバプログラムの起動時、Web APサーバペアの正常稼動時、正常系Web APサーバプログラム200障害発生時、待機系Web APサーバプログラム300障害発生時、Web APサーバペア間の通信障害発生時、正常系および待機系Web APサーバプログラム単独稼動時、そして正常系および待機系Web APサーバプログラム再起動時についてそれぞれ説明する。
Next, an outline of the operation procedure of this embodiment will be described.
The operation procedure will be described with reference to FIG. When the normal and standby Web AP server programs are started, when the Web AP server pair is operating normally, when the normal Web AP server program 200 failure occurs, when the standby Web AP server program 300 failure occurs, between the Web AP server pairs A description will be given of when a communication failure occurs, when normal and standby Web AP server programs are operating independently, and when normal and standby Web AP server programs are restarted.

まず、正常系Web APサーバプログラム200と待機系Web APサーバプログラム300の起動時の動作手順を説明する。正常系Web APサーバプログラム200と待機系Web APサーバプログラム300を起動すると、正常系Web APサーバプログラム200は正常系初期化処理201を、待機系Web APサーバプログラム300は待機系初期化処理301を実行する。正常系Web APサーバプログラム200と待機系Web APサーバプログラム300はペアで機能するため、それぞれの初期化処理では、お互いにペアとなるWeb APサーバプログラムとのコネクションを確立し、互いの稼動が確認できるまでは初期化処理は終了しないようにしている。つまり、ペアとなるWeb APサーバプログラム間において、コネクションの確立をし、互いに稼動確認した後で初期化処理は終了する。   First, operation procedures when starting up the normal Web AP server program 200 and the standby Web AP server program 300 will be described. When the normal Web AP server program 200 and the standby Web AP server program 300 are started, the normal Web AP server program 200 performs normal system initialization processing 201, and the standby Web AP server program 300 performs standby system initialization processing 301. Execute. Since the normal Web AP server program 200 and the standby Web AP server program 300 function as a pair, each initialization process establishes a connection with the paired Web AP server program and confirms their operation. The initialization process is not finished until it is possible. In other words, after establishing a connection between the paired Web AP server programs and confirming their operation, the initialization process ends.

本実施例では、正常系Web APサーバプログラム200は、正常系初期化処理201の中で、待機系Web APサーバプログラム300とコネクションを確立するまで繰り返し待機系Web APサーバプログラム300に対してコネクション確立要求を出す処理を行う。また、待機系Web APサーバプログラム300は、待機系初期化処理301の中で、正常系Web APサーバプログラム200からのコネクション確立要求を受け付ける処理を行い、お互いにコネクションを確立するまでは初期化処理が終了しないようにしている。つまり、コネクションが確立した後で初期化処理を終了させる。   In this embodiment, the normal Web AP server program 200 repeatedly establishes a connection with the standby Web AP server program 300 until a connection with the standby Web AP server program 300 is established in the normal system initialization process 201. Process to issue a request. The standby Web AP server program 300 performs a process of accepting a connection establishment request from the normal Web AP server program 200 in the standby system initialization process 301, and initializes until a connection is established with each other. Does not end. That is, the initialization process is terminated after the connection is established.

そして、コネクションを確立した場合、正常系Web APサーバプログラム200は、正常系初期化処理201の中で、DBMSプログラム400に対してサーバペア状態更新SQL921を送信し、Web APサーバペアの状態管理に用いるサーバペア状態管理テーブル402のサーバペア状態を、Web APサーバペアが正常に稼動していることを意味する文字列である正常稼動とする。このサーバペア状態に記録されるサーバペアの状態は、Web APサーバプログラムが稼動する上で必要に応じて参照する必要がある。そこで、DBMSプログラム400へのアクセスを極力減らすために、正常系Web APサーバプログラム200と待機系Web APサーバプログラム300は、それぞれサーバペア状態の情報を格納するためのキャッシュをメモリ上に持つことにする。   When the connection is established, the normal Web AP server program 200 sends a server pair status update SQL921 to the DBMS program 400 during the normal initialization process 201 to manage the status of the Web AP server pair. The server pair status of the server pair status management table 402 to be used is set to normal operation, which is a character string indicating that the Web AP server pair is operating normally. The server pair status recorded in this server pair status must be referred to as necessary when the Web AP server program is running. Therefore, in order to reduce access to the DBMS program 400 as much as possible, the normal Web AP server program 200 and the standby Web AP server program 300 each have a cache for storing server pair status information in the memory. To do.

このキャッシュのことをサーバペア状態キャッシュ208と呼ぶ。サーバペア状態を正常稼動に更新した後、正常系Web APサーバプログラム200と待機系Web APサーバプログラム300は自身のサーバペア状態キャッシュ208を正常稼動とする。以降では、この初期化処理で確立したコネクションを用いて、正常時のセッション情報の二重化(セッション情報をコピーして他のサーバへ格納する処理)のための通信や、正常系Web APサーバプログラム200と待機系Web APサーバプログラム300間の稼動確認のための通信を行う。以上の初期化処理を終えた後、Web APサーバペアは正常に稼動を開始する。   This cache is called a server pair status cache 208. After updating the server pair status to normal operation, the normal Web AP server program 200 and the standby Web AP server program 300 set their own server pair status cache 208 to normal operation. Thereafter, using the connection established in this initialization process, communication for normal session information duplication (processing to copy the session information and store it in another server), and the normal Web AP server program 200 And communication for operation check between the server and the standby Web AP server program 300. After completing the above initialization process, the Web AP server pair starts operating normally.

次に、正常時の本実施例の動作手順をWebサーバプログラム100、正常系Web APサーバプログラム200、待機系Web APサーバプログラム300の順に説明する。   Next, the operation procedure of this embodiment at normal time will be described in the order of the Web server program 100, the normal Web AP server program 200, and the standby Web AP server program 300.

Webサーバプログラム100は、Webブラウザ504から到着するHTTPリクエスト901の宛先URLとリクエストに含まれるセッションIDからリクエストを転送すべきWeb APサーバペアを選択し、選択したペアのうち、正常系Web APサーバプログラム200にリクエストを転送する。まず、ホームページ閲覧者503がWebブラウザ504を操作してWebサイト500にアクセスすることによって、HTTPリクエスト901がWebサーバプログラム100に到着する。Webサーバプログラム100ではHTTPリクエスト901を受信した場合、そのHTTPリクエスト901を自身で処理すべきか、又はWeb APサーバペアに転送すべきかどうかを決定するために、リクエスト選択転送処理101を実行する。   The Web server program 100 selects a Web AP server pair to which the request should be transferred from the destination URL of the HTTP request 901 arriving from the Web browser 504 and the session ID included in the request, and among the selected pairs, the normal Web AP server Forward the request to program 200. First, when the home page viewer 503 operates the Web browser 504 to access the Web site 500, the HTTP request 901 arrives at the Web server program 100. When receiving the HTTP request 901, the Web server program 100 executes a request selection transfer process 101 to determine whether the HTTP request 901 should be processed by itself or transferred to the Web AP server pair.

リクエスト選択転送処理101では、リクエストの宛先URLから転送先Web APサーバペア群を求める転送先Web APサーバペア群決定テーブル102を用いて、受信したHTTPリクエスト901の宛先URLから、転送先のWeb APサーバペア群を決定する。ここで求まるWeb APサーバペア群は1つ又は複数のWeb APサーバペアである。本実施例では、HTTPリクエストの転送先となるWebサーバプログラムが管理するWeb APサーバペア群決定テーブル102は、Webサイト管理者504によって起動時にWebサーバプログラム100に与えられるものとする。つまり、Web APサーバペア群決定テーブル102は、Webサーバプログラムが稼動するコンピュータの記憶装置へ、管理者によって格納される。   In the request selection transfer process 101, the transfer destination Web AP server pair group is obtained from the request destination URL, and the transfer destination Web AP is determined from the destination URL of the received HTTP request 901 using the transfer destination Web AP server pair group determination table 102. Determine the server pair group. The Web AP server pair group obtained here is one or a plurality of Web AP server pairs. In this embodiment, it is assumed that the Web AP server pair group determination table 102 managed by the Web server program that is the transfer destination of the HTTP request is given to the Web server program 100 by the Web site manager 504 at the time of activation. That is, the Web AP server pair group determination table 102 is stored by the administrator in the storage device of the computer on which the Web server program runs.

転送先のWeb APサーバペア群が求まらなかった場合には、Webサーバプログラム100でこのリクエストを処理する。転送先Web APサーバペア群が求まった場合、次に、求まったWeb APサーバペア群の中からどのWeb APサーバペアにリクエストを転送するか決定する。この場合には、HTTPリクエスト901にセッションIDが含まれていれば、セッションIDに含まれるWeb APサーバペアIDから転送すべきWeb APサーバペアを決定し、セッションIDが含まれていない場合には、Web APサーバペア群の中からランダムにWeb APサーバペアを決定する。   When the transfer destination Web AP server pair group is not found, the Web server program 100 processes this request. When the transfer destination Web AP server pair group is obtained, it is next determined to which Web AP server pair the request is transferred from the obtained Web AP server pair group. In this case, if the HTTP request 901 includes a session ID, the Web AP server pair to be transferred is determined from the Web AP server pair ID included in the session ID. If the session ID is not included, The Web AP server pair is randomly determined from the Web AP server pair group.

そして、Web APサーバペアを決定した後、Web APサーバペア名から正常系Web APサーバプログラムのネットワークアドレスと、待機系Web APサーバプログラムのネットワークアドレスを求めるWeb APサーバペア定義テーブル103を用いて、決定したWeb APサーバペアの正常系Web APサーバプログラムのネットワークアドレスを求め、そこにリクエストを転送する。本実施例では、Web APサーバペア定義テーブル103はWebサイト管理者504によって起動時にWebサーバプログラム100に与えられるものとする。   Then, after determining the Web AP server pair, using the Web AP server pair definition table 103 for obtaining the network address of the normal Web AP server program and the network address of the standby Web AP server program from the Web AP server pair name, The network address of the normal Web AP server program of the determined Web AP server pair is obtained, and the request is transferred there. In this embodiment, it is assumed that the Web AP server pair definition table 103 is given to the Web server program 100 by the Web site manager 504 at startup.

次に、正常時にWebサーバプログラム100からHTTPリクエスト901を受信した正常系Web APサーバプログラム200の動作手順を説明する。正常系Web APサーバプログラム200はWebサーバプログラム100からHTTPリクエスト901を受信した場合、セッション情報無効化要求送信処理202とアプリケーション実行処理203とセッション情報二重化要求送信処理204を順に実行する。まず、セッション情報無効化要求送信処理202では、HTTPリクエスト901に含まれるセッションIDを取得して、セッションIDに対応するセッション情報が自身のメモリ上にあるかどうか確認する。セッション情報が存在すれば、セッションIDをセッション情報無効化要求912に含め、待機系Web APサーバプログラム300に送信する。   Next, an operation procedure of the normal Web AP server program 200 that has received the HTTP request 901 from the Web server program 100 at the normal time will be described. When the normal Web AP server program 200 receives the HTTP request 901 from the Web server program 100, the normal Web AP server program 200 sequentially executes the session information invalidation request transmission process 202, the application execution process 203, and the session information duplex request transmission process 204. First, in the session information invalidation request transmission process 202, the session ID included in the HTTP request 901 is acquired, and it is confirmed whether or not the session information corresponding to the session ID exists in its own memory. If session information exists, the session ID is included in the session information invalidation request 912 and transmitted to the standby Web AP server program 300.

セッション情報が存在しない場合は、セッションIDをセッション情報取得要求917に含め、待機系Web APサーバプログラム300に送信する。セッション情報が存在しない状況が発生するのは、典型的には、正常系Web APサーバプログラム200が障害により一旦停止した後、再起動し、後に述べる再接続処理により再び待機系Web APサーバプログラム300と接続を確立し、正常稼動を開始した直後である。この時、再起動した正常系Web APサーバプログラム200は、メモリ上にセッション情報を保持していないため、リクエスト処理に必要なセッション情報を待機系Web APサーバプログラム300から取得する必要がある。そのための取得要求が、セッション情報取得要求917である。   If session information does not exist, the session ID is included in the session information acquisition request 917 and transmitted to the standby Web AP server program 300. The situation where the session information does not exist typically occurs when the normal Web AP server program 200 is temporarily stopped due to a failure and then restarted, and then again by the reconnection process described later, the standby Web AP server program 300 And immediately after establishing a connection and starting normal operation. At this time, since the restarted normal Web AP server program 200 does not hold session information in the memory, it is necessary to acquire session information necessary for request processing from the standby Web AP server program 300. The acquisition request for this is a session information acquisition request 917.

そして、待機系Web APサーバプログラム300からセッション情報無効化応答913又が返信されてきた場合には、次にアプリケーション実行処理203を実行する。また、待機系Web APサーバプログラム300からセッション情報取得応答918が返信されてきた場合には、応答に含まれるセッション情報をメモリ上に保存してからアプリケーション実行処理203を実行する。アプリケーション実行処理203では、HTTPリクエスト901のURLに対応するアプリケーションプログラムを実行する。   When the session information invalidation response 913 or the reply is returned from the standby Web AP server program 300, the application execution process 203 is executed next. When a session information acquisition response 918 is returned from the standby Web AP server program 300, the application execution process 203 is executed after the session information included in the response is stored in the memory. In the application execution process 203, an application program corresponding to the URL of the HTTP request 901 is executed.

アプリケーションプログラムを実行することによって、正常系Web APサーバプログラム200のメモリ上のセッション情報は更新され、Webブラウザ504にはHTTPレスポンス902が返信される。アプリケーション実行処理203は汎用のWeb APサーバプログラムに備わっている機能なので詳細な説明は省略する。そしてアプリケーション実行処理203を実行した後、セッション情報二重化要求送信処理204を実行する。この処理では、アプリケーションの実行により更新されたセッション情報を待機系Web APサーバプログラム300に二重化するために、セッション情報二重化要求914にリクエスト処理に使用したセッション情報とセッションIDを含めて待機系Web APサーバプログラム300へ送信する。以上がリクエスト受信時の正常系Web APサーバプログラム200の処理である。   By executing the application program, the session information in the memory of the normal Web AP server program 200 is updated, and an HTTP response 902 is returned to the Web browser 504. Since the application execution process 203 is a function provided in a general-purpose Web AP server program, detailed description thereof is omitted. Then, after executing the application execution process 203, the session information duplex request transmission process 204 is executed. In this process, in order to duplicate the session information updated by executing the application to the standby Web AP server program 300, the standby Web AP includes the session information and session ID used for request processing in the session information duplex request 914. Send to server program 300. The above is the processing of the normal Web AP server program 200 when receiving a request.

また、上記のリクエスト受信時の処理とは別に、正常系Web APサーバプログラム200は、待機系Web APサーバプログラム300の状態を監視するために、稼動確認用メッセージ916を送受信する稼動状態監視処理205を一定時間毎に実行する。   In addition to the processing at the time of receiving the request, the normal Web AP server program 200 transmits / receives an operation confirmation message 916 to monitor the status of the standby Web AP server program 300. Is executed at regular intervals.

次に、待機系Web APサーバプログラム300の正常時の動作手順を説明する。正常時の待機系Web APサーバプログラム300は、セッション情報無効化要求912又はセッション情報取得要求917を正常系Web APサーバプログラム200から受信した場合にはセッション情報無効化処理302を実行する。セッション情報無効化処理302では、セッション情報無効化要求912又はセッション情報取得要求917に含まれるセッションIDを持つセッション情報を無効化する。ただし、セッション情報取得要求917を受信した場合には、無効化する前に、そのセッション情報をセッション情報取得応答918に含めて返信する。   Next, a normal operation procedure of the standby Web AP server program 300 will be described. When the normal standby Web AP server program 300 receives the session information invalidation request 912 or the session information acquisition request 917 from the normal Web AP server program 200, the normal standby Web AP server program 300 executes the session information invalidation processing 302. In the session information invalidation processing 302, session information having a session ID included in the session information invalidation request 912 or the session information acquisition request 917 is invalidated. However, when the session information acquisition request 917 is received, the session information is included in the session information acquisition response 918 and returned before being invalidated.

また、正常系Web APサーバプログラム200からセッション情報二重化要求914が送信されてきた場合には、待機系Web APサーバプログラム300は、要求に含まれて送信されてきたセッション情報をメモリ上にバックアップするセッション情報二重化処理304を実行する。また、待機系Web APサーバプログラム300は正常時にはリクエスト処理を行わない。正常系Web APサーバプログラム200の障害により待機系Web APサーバプログラム300が単独稼動している状態から、正常系Web APサーバプログラム200が再起動して正常時に復旧した直後は、Webサーバプログラム100から正常時に待機系Web APサーバプログラム300にHTTPリクエスト901が転送されてくる場合があるが、その場合にはまず、正常系Web APサーバプログラム200の稼動状態を確認するために、引き継ぎ判定処理307を実行する。   Further, when the session information duplex request 914 is transmitted from the normal Web AP server program 200, the standby Web AP server program 300 backs up the session information transmitted in the request in the memory. The session information duplex process 304 is executed. Further, the standby Web AP server program 300 does not perform request processing when it is normal. Immediately after the normal Web AP server program 200 is restarted from the state where the standby Web AP server program 300 is operating alone due to a failure of the normal Web AP server program 200, the Web server program 100 An HTTP request 901 may be transferred to the standby Web AP server program 300 during normal operation. In that case, the takeover determination process 307 is first performed in order to check the operating status of the normal Web AP server program 200. Execute.

この処理では、正常系Web APサーバプログラム200に稼動確認用メッセージ916を送信して、応答があるかどうか稼動状態を確認した上で、正常系Web APサーバプログラム200が稼動している判断した場合には、リクエスト処理は行わず、リクエストを転送してきたWebサーバプログラム100に対して処理辞退通知903を送信する。処理辞退通知903を受け取ったWebサーバプログラム100は、正常系Web APサーバプログラム200にHTTPリクエスト901を転送しなおすようになっている。また、正常系Web APサーバプログラム200と同様に、待機系Web APサーバプログラム300では、正常系Web APサーバプログラム200の状態を監視するために、稼動状態監視処理205を一定時間毎に実行する。
以上が正常時のWebサーバプログラム100、正常系Web APサーバプログラム200、待機系Web APサーバプログラム300の処理手順である。
In this process, when an operational confirmation message 916 is sent to the normal Web AP server program 200 to check if there is a response and then the normal Web AP server program 200 is determined to be operating In this case, the request processing is not performed, and a processing decline notice 903 is transmitted to the Web server program 100 that has transferred the request. The Web server program 100 that has received the processing decline notification 903 re-transfers the HTTP request 901 to the normal Web AP server program 200. Similarly to the normal Web AP server program 200, the standby Web AP server program 300 executes the operating state monitoring process 205 at regular intervals in order to monitor the state of the normal Web AP server program 200.
The above is the processing procedure of the normal Web server program 100, normal Web AP server program 200, and standby Web AP server program 300.

上記の処理手順により正常時には、必ず正常系Web APサーバプログラム200でリクエスト処理が実行されるようになっている。そして、リクエストを実行する正常系Web APサーバプログラム200では、アプリケーション実行処理203の前に、セッション情報無効化要求送信処理202を実行して、待機系Web APサーバプログラム300にあるセッション情報を無効化することにより、アプリケーション実行処理203の実行直後の正常系Web APサーバプログラム200と待機系Web APサーバプログラム300とでセッション情報のデータの不整合が起きる状態が生じることを未然に防いでいることが、本発明の特徴である。   According to the above processing procedure, the request processing is always executed by the normal Web AP server program 200 at the normal time. In the normal Web AP server program 200 that executes the request, the session information invalidation request transmission process 202 is executed before the application execution process 203 to invalidate the session information in the standby Web AP server program 300. By doing so, it is possible to prevent inconsistency of session information data between the normal Web AP server program 200 and the standby Web AP server program 300 immediately after the execution of the application execution process 203. This is a feature of the present invention.

このため、正常系Web APサーバプログラム200にいつ障害が起きても、待機系Web APサーバプログラム300で古いデータを用いてしまうことがないように保証している。
それでは次に、正常系Web APサーバプログラム200に障害が起きた場合のWebサーバプログラム100、待機系Web APサーバプログラム300の動作手順について説明する。
Therefore, it is ensured that the standby Web AP server program 300 does not use old data whenever a failure occurs in the normal Web AP server program 200.
Next, operation procedures of the Web server program 100 and the standby Web AP server program 300 when a failure occurs in the normal Web AP server program 200 will be described.

正常系Web APサーバプログラム200に障害が起きた場合、Webサーバプログラム100は正常系Web APサーバプログラム200と通信を行う時に、通信エラーにより障害を検知する。Webサーバプログラム100は正常系Web APサーバプログラム200の障害を検知した場合、その正常系Web APサーバプログラム200のペアとなっている待機系Web APサーバプログラム300にHTTPリクエスト901を転送し直す。 以上のWebサーバプログラム100の処理により、正常系Web APサーバプログラム200障害時には、待機系Web APサーバプログラム300にHTTPリクエスト901を転送するようになっている。   When a failure occurs in the normal Web AP server program 200, the Web server program 100 detects the failure due to a communication error when communicating with the normal Web AP server program 200. When the Web server program 100 detects a failure in the normal Web AP server program 200, the Web server program 100 transfers the HTTP request 901 again to the standby Web AP server program 300 paired with the normal Web AP server program 200. Through the processing of the Web server program 100 described above, the HTTP request 901 is transferred to the standby Web AP server program 300 when the normal Web AP server program 200 fails.

一方、待機系Web APサーバプログラム300は、以下の二つの方法で正常系Web APサーバプログラム200の障害を検知する。一つは、正常時に定期的に実行している稼動状態監視処理205における正常系Web APサーバプログラム200への稼動確認であり、もう一つは、Webサーバプログラム100からHTTPリクエスト901が転送されてきた際に実行する引き継ぎ判定処理307における正常系Web APサーバプログラム200への稼動確認である。上記のいずれの場合にも、待機系Web APサーバプログラム300が正常系Web APサーバプログラム200と通信が不可能となることにより正常系Web APサーバプログラム200の障害を検知する。   On the other hand, the standby Web AP server program 300 detects a failure of the normal Web AP server program 200 by the following two methods. One is an operation check to the normal Web AP server program 200 in the operation state monitoring processing 205 that is periodically executed at the normal time, and the other is an HTTP request 901 transferred from the Web server program 100. This is confirmation of the operation to the normal Web AP server program 200 in the takeover determination processing 307 executed at the time. In any of the above cases, the failure of the normal Web AP server program 200 is detected when the standby Web AP server program 300 becomes unable to communicate with the normal Web AP server program 200.

この検知方法では、正常系Web APサーバプログラム200の障害なのか、単に通信障害なのか判定できないため、通信障害の場合も考慮して、確実にどちらか一方だけがリクエスト処理を行うために、稼動を続けるWeb APサーバプログラムをどちらか一方に判定する稼動サーバ判定処理206を実行する。稼動サーバ判定処理206において正常系又は待機系Web APサーバプログラムは、データベースに設けられたサーバペア状態管理テーブル402のサーバペア状態を参照し、ペアとなるWeb APサーバプログラムよりも先に参照できた場合には、サーバペア状態を更新して稼動を続ける。   In this detection method, it is impossible to determine whether it is a failure of the normal Web AP server program 200 or simply a communication failure. Therefore, only one of them can be processed reliably in consideration of the communication failure. The active server determination process 206 is executed to determine which one of the Web AP server programs to continue. In the active server determination process 206, the normal or standby Web AP server program refers to the server pair status in the server pair status management table 402 provided in the database, and can be referenced before the paired Web AP server program. In this case, the server pair status is updated and the operation is continued.

通信が不可能になった根本の原因が正常系Web APサーバプログラム200の障害であれば、正常系Web APサーバプログラム200はサーバペア状態にアクセスできないため、待機系Web APサーバプログラム300のみがデータベースにアクセスし、待機系Web APサーバ300が稼動を続けることになる。   If the root cause of the communication failure is the failure of the normal Web AP server program 200, the normal Web AP server program 200 cannot access the server pair status, so only the standby Web AP server program 300 is the database. And the standby Web AP server 300 continues to operate.

この時、待機系Web APサーバプログラム300は、サーバペア状態管理テーブル402のサーバペア状態と自身のサーバペア状態キャッシュ208を、待機系だけでリクエスト処理を行っていることを意味する文字列である待機系単独稼動に更新し、引き継ぎ判定処理を終了し、リクエスト処理を実行する。   At this time, the standby Web AP server program 300 is a character string that means that the server pair status in the server pair status management table 402 and its own server pair status cache 208 are processed only by the standby system. Update to standby system single operation, end takeover determination processing, and execute request processing.

以上のように、正常系Web APサーバプログラム200の障害時には、待機系Web APサーバプログラム300がサーバペア状態管理テーブル402を待機系単独稼動とした後で、リクエスト処理を引き継ぐ。そして、正常時に正常系Web APサーバプログラム200が行うセッション情報無効化要求送信処理202により、待機系Web APサーバプログラム300に古いセッション情報が残らないことが保証されているため、古いセッション情報を用いて待機系Web APサーバプログラム300が処理を引き継ぐことが防止できる。   As described above, when a failure occurs in the normal Web AP server program 200, the standby Web AP server program 300 takes over the request processing after the server pair state management table 402 is set to stand alone operation. Since the session information invalidation request transmission processing 202 performed by the normal Web AP server program 200 during normal operation guarantees that no old session information remains in the standby Web AP server program 300, the old session information is used. Thus, the standby Web AP server program 300 can be prevented from taking over processing.

次に、待機系Web APサーバプログラム300に障害が起きた場合の、Webサーバプログラム100、正常系Web APサーバプログラム200の動作手順について説明する。   Next, operation procedures of the Web server program 100 and the normal Web AP server program 200 when a failure occurs in the standby Web AP server program 300 will be described.

Webサーバプログラム100は、正常系 Web APサーバプログラム200が稼動している限り、待機系Web APサーバプログラム300と通信を行う機会がないため、待機系Web APサーバプログラム300の障害を検知することはない。   As long as the normal Web AP server program 200 is running, the Web server program 100 has no opportunity to communicate with the standby Web AP server program 300. Absent.

正常系Web APサーバプログラム200は、正常時に定期的に実行する稼動状態監視処理205か、リクエスト処理時に実行するセッション情報無効化要求送信処理202か、又は、セッション情報二重化要求送信処理204における待機系Web APサーバプログラム300との通信でエラーが発生することにより、待機系Web APサーバプログラム300の障害を検知する。正常系Web APサーバプログラム200は待機系Web APサーバプログラム300の障害を検知した場合、稼動サーバ判定処理206を実行する。   The normal system Web AP server program 200 is an operating state monitoring process 205 periodically executed at normal time, a session information invalidation request transmission process 202 executed at the time of request processing, or a standby system in the session information duplex request transmission process 204 When an error occurs in communication with the Web AP server program 300, a failure of the standby Web AP server program 300 is detected. When the normal Web AP server program 200 detects a failure in the standby Web AP server program 300, the normal Web AP server program 200 executes an active server determination process 206.

待機系Web APサーバプログラム300はサーバペア状態管理テーブル402のサーバペア状態にアクセスできないため、正常系Web APサーバプログラム200はサーバペア状態管理テーブル402のサーバペア状態と自身のサーバペア状態キャッシュ208を、正常系Web APサーバプログラム単独でリクエスト処理を行っていることを意味する文字列である正常系単独稼動に更新して、単独で稼動を続ける。以降のリクエストでは、サーバペア状態キャッシュ208が正常系単独稼動となっている限り、待機系Web APサーバプログラム300と通信を行うことなく単独でリクエスト処理を実行する。   Since the standby Web AP server program 300 cannot access the server pair status in the server pair status management table 402, the normal Web AP server program 200 stores the server pair status in the server pair status management table 402 and its own server pair status cache 208. The normal Web AP server program is updated to normal single operation, which is a character string that means that request processing is performed alone, and continues to operate independently. In subsequent requests, as long as the server pair status cache 208 is operating normally alone, the request processing is executed independently without communicating with the standby Web AP server program 300.

以上のように、待機系Web APサーバプログラム300の障害時には、正常系Web APサーバプログラム200が単独でリクエスト処理を行う。   As described above, when the standby Web AP server program 300 fails, the normal Web AP server program 200 performs the request processing independently.

次に、正常系Web APサーバプログラム200と待機系Web APサーバプログラム300間の通信に障害が起きたときの、Webサーバプログラム100、 正常系Web APサーバプログラム200、待機系Web APサーバプログラム300の動作手順について説明する。   Next, when a failure occurs in communication between the normal Web AP server program 200 and the standby Web AP server program 300, the Web server program 100, the normal Web AP server program 200, and the standby Web AP server program 300 The operation procedure will be described.

この障害の場合、Webサーバプログラム100は障害を検知することができない。よって、正常時と同様に到着したリクエストを正常系Web APサーバプログラム200に転送する。   In the case of this failure, the Web server program 100 cannot detect the failure. Therefore, the request that arrived is transferred to the normal Web AP server program 200 in the same manner as in the normal state.

正常系Web APサーバプログラム200は、障害発生後、はじめて待機系Web APサーバプログラム300に通信を行うタイミングで障害を検知し、稼動サーバ判定処理206を実行する。   The normal Web AP server program 200 detects a failure at the timing of communication with the standby Web AP server program 300 for the first time after a failure occurs, and executes an active server determination process 206.

一方、待機系Web APサーバプログラム300は稼動状態監視処理205や、正常系Web APサーバプログラム200からの要求に対する応答時に、通信エラーが発生することにより障害を検知し、稼動サーバ判定処理206を実行する。そして、正常系Web APサーバプログラム200と待機系Web APサーバプログラム300のうち、サーバペア状態管理テーブル402のサーバペア状態を先に参照できた方のWeb APサーバプログラムが、サーバペア状態をそのWeb APサーバの単独稼動に更新し、稼動を続けることができる。   On the other hand, the standby Web AP server program 300 detects a failure due to a communication error when executing an operation status monitoring process 205 or a response to a request from the normal Web AP server program 200, and executes an active server determination process 206. To do. Then, of the normal Web AP server program 200 and the standby Web AP server program 300, the Web AP server program that can refer to the server pair status in the server pair status management table 402 first indicates the server pair status to the Web You can update the AP server to single operation and continue operation.

一方、後からサーバペア状態を参照した方のWeb APサーバプログラムは、サーバペア状態がペアとなるWeb APサーバプログラムの単独稼動となっているため、その場合には自発的に停止する。自発的に停止するまでの間に、Webサーバプログラム100からリクエストが到着した場合には、そのWebサーバプログラム100に対して、処理辞退通知903を返す。   On the other hand, the Web AP server program that refers to the server pair status later is the single operation of the Web AP server program whose server pair status is a pair, and in this case, stops spontaneously. If a request arrives from the Web server program 100 before it stops spontaneously, a processing decline notice 903 is returned to the Web server program 100.

以上のように、系間の通信障害時には、稼動サーバ判定処理206において、先にサーバペア状態を先に参照できた一方のWeb APサーバプログラムのみが稼動を続けることができるようにしてある。これにより、系間の通信障害時には、確実に一方のWeb APサーバプログラムのみが稼動することをソフトウェアのみで実現できており、本発明の第二の目的が実現できている。   As described above, at the time of communication failure between systems, in the active server determination process 206, only one Web AP server program that has previously been able to refer to the server pair status first can continue to operate. As a result, in the event of a communication failure between systems, it is possible to reliably realize that only one Web AP server program is operated by software alone, thereby realizing the second object of the present invention.

次に、Web APサーバプログラムの障害時や系間の通信障害によって、単独稼動になった正常系Web APサーバプログラム200や待機系Web APサーバプログラム300の動作手順について説明する。   Next, the operation procedure of the normal Web AP server program 200 and the standby Web AP server program 300 that have become independent due to a Web AP server program failure or a communication failure between systems will be described.

正常系Web APサーバプログラム200の単独稼動の場合、正常系Web APサーバプログラム200は、Webサーバプログラム100からHTTPリクエスト901を受信すると、アプリケーション実行処理203のみを実行する。単独稼動であるかどうかの判断はリクエスト処理毎に、サーバペア状態キャッシュ208を参照して行う。また、リクエスト受信時以外の処理として、再起動してくるであろう待機系Web APサーバプログラム300に対して、定期的にコネクション確立要求911を送信する正常系再接続処理207を実行する。   In the case where the normal Web AP server program 200 is operated independently, when the normal Web AP server program 200 receives the HTTP request 901 from the Web server program 100, it executes only the application execution process 203. The determination as to whether or not the server is operating independently is performed with reference to the server pair status cache 208 for each request processing. Further, as a process other than the time of receiving a request, a normal system reconnection process 207 for periodically transmitting a connection establishment request 911 is executed for the standby Web AP server program 300 that will be restarted.

待機系Web APサーバプログラム300の単独稼動の場合、待機系Web APサーバプログラム300はWebサーバプログラム100からリクエストを受信すると、アプリケーション実行処理203のみを実行する。単独稼動であるかどうかの判断はリクエスト処理毎に、サーバペア状態キャッシュ208を参照して行う。また、リクエスト受信時以外の処理として、再起動してくるであろう正常系Web APサーバプログラム200から送信されてくるコネクション確立要求911を受信する待機系再接続処理を定期的に実行する。   When the stand-by Web AP server program 300 is operated independently, when receiving a request from the Web server program 100, the stand-by Web AP server program 300 executes only the application execution process 203. The determination as to whether or not the server is operating independently is performed with reference to the server pair status cache 208 for each request processing. Further, as processing other than the time of receiving a request, standby reconnection processing for receiving the connection establishment request 911 transmitted from the normal Web AP server program 200 that will be restarted is periodically executed.

このように、単独稼動時にはセッション情報の二重化を行うことなく、Web APサーバプログラムは到着するリクエストを処理する。そして、再起動してくるであろうペアとのコネクションを再び確立するための処理を定期的に行う。   In this way, when operating alone, the Web AP server program processes incoming requests without duplicating session information. Then, processing for re-establishing a connection with a pair that will be restarted is periodically performed.

最後に、正常系Web APサーバプログラム200又は待機系Web APサーバプログラム300の再起動時の動作手順について説明する。   Finally, an operation procedure when the normal Web AP server program 200 or the standby Web AP server program 300 is restarted will be described.

正常系Web APサーバプログラム200の単独稼動の状態から、待機系Web APサーバプログラム300が再起動すると、正常系Web APサーバプログラム200が単独稼動時に行う正常系再接続処理207と、待機系Web APサーバプログラムの待機系初期化処理301により、再びコネクションを確立する。正常系Web APサーバプログラム200は、コネクションを確立すると正常系再接続処理207の中で、サーバペア状態管理テーブル402のサーバペア状態とサーバペア状態キャッシュ208を正常稼動に更新し、以降は正常時の動作を行う。待機系Web APサーバプログラム300は正常系Web APサーバプログラム200とのコネクションを確立すると待機系初期化処理301の中でサーバペア状態キャッシュ208を正常稼動にする。   When the standby Web AP server program 300 is restarted from the normal operation state of the normal Web AP server program 200, the normal Web reconnection processing 207 that is performed when the normal Web AP server program 200 operates independently, and the standby Web AP The connection is established again by the standby system initialization process 301 of the server program. When the normal Web AP server program 200 establishes the connection, it updates the server pair status and the server pair status cache 208 of the server pair status management table 402 to normal operation during the normal system reconnection processing 207. Perform the operation. When the standby Web AP server program 300 establishes a connection with the normal Web AP server program 200, the standby Web AP server program 300 makes the server pair status cache 208 operate normally in the standby initialization process 301.

この時点では、正常系Web APサーバプログラム200に存在するセッション情報は、待機系Web APサーバプログラム300のメモリ上に二重化されていないが、正常系Web APサーバプログラム200でリクエスト処理を行うたびに、リクエスト処理で使用したセッション情報に関しては徐々に待機系Web APサーバプログラム300に二重化されていく。しかし、完全にセッション情報が二重化されるまでに正常系Web APサーバプログラム200に障害が起きた場合、その時点で二重化されていないセッション情報は失われてしまう。   At this point, the session information existing in the normal Web AP server program 200 is not duplicated in the memory of the standby Web AP server program 300, but every time request processing is performed in the normal Web AP server program 200, The session information used in the request processing is gradually duplicated in the standby Web AP server program 300. However, if a failure occurs in the normal Web AP server program 200 before the session information is completely duplicated, the session information that has not been duplicated at that time is lost.

このような事態に備えて、再接続時の処理として、リクエスト処理が行われなくても、正常系Web APサーバプログラム200にのみ存在するセッション情報を、再起動してきた待機系Web APサーバプログラム300へまとめて送信する、セッション情報二重化復旧処理209を行ってもよい。   In preparation for such a situation, as a process at the time of reconnection, even if request processing is not performed, the session information existing only in the normal Web AP server program 200 is restarted, and the standby Web AP server program 300 that has been restarted. The session information duplex recovery processing 209 may be performed, which are transmitted collectively.

また、待機系Web APサーバプログラム300の単独稼動の状態から、正常系Web APサーバプログラム200が再起動する場合は、待機系Web APサーバプログラム300が単独稼動時に行っている待機系再接続処理308と正常系Web APサーバプログラムの正常系初期化処理201により、再びコネクションが確立される。コネクションが確立されると、正常系Web APサーバプログラムは正常系初期化処理の中でサーバペア状態管理テーブル402のサーバペア状態とサーバペア状態キャッシュ208を正常稼動とする。   In addition, when the normal Web AP server program 200 is restarted from the stand-alone Web AP server program 300 operating independently, the standby reconnect processing 308 that is performed when the standby Web AP server program 300 is operating independently. Then, the normal system initialization process 201 of the normal Web AP server program establishes the connection again. When the connection is established, the normal Web AP server program sets the server pair status and server pair status cache 208 of the server pair status management table 402 to normal operation during normal system initialization processing.

また、待機系Web APサーバプログラムは、コネクションを確立すると、待機系再接続処理の中でサーバペア状態キャッシュ208を正常稼動とする。以降に待機系Web APサーバプログラムに到着したリクエストに関しては、引き継ぎ判定処理307の結果、サーバペア状態キャッシュ208が正常稼動となっていることにより、待機系用Web APサーバプログラムはWebサーバプログラム100に処理辞退通知903を送信し、正常系Web APサーバプログラム200にリクエストが転送されることになる。   In addition, when the connection is established, the standby Web AP server program sets the server pair status cache 208 to normal operation during the standby reconnection process. For requests that subsequently arrive at the standby Web AP server program, as a result of the takeover determination processing 307, the server pair status cache 208 is operating normally. The processing decline notice 903 is transmitted, and the request is transferred to the normal Web AP server program 200.

この場合にも、再接続をしただけでは、待機系Web APサーバプログラム200に存在するセッション情報は、正常系Web APサーバプログラム300のメモリ上に二重化されていないが、正常系Web APサーバプログラム200でリクエスト処理を行うたびに、リクエスト処理で使用したセッション情報に関しては徐々に二重化されていく。しかし、完全にセッション情報が二重化されるまでに待機系Web APサーバプログラム300に障害が起きた場合、その時点で二重化されていないセッション情報は失われてしまう。   Even in this case, the session information existing in the standby Web AP server program 200 is not duplicated on the memory of the normal Web AP server program 300 only by reconnection, but the normal Web AP server program 200 Each time request processing is performed, the session information used in request processing is gradually duplicated. However, if a failure occurs in the standby Web AP server program 300 before the session information is completely duplicated, the session information that has not been duplicated at that time is lost.

このような事態に備えて、再接続時の処理として、リクエスト処理が行われなくても、待機系Web APサーバプログラム300にのみ存在するセッション情報を、再起動してきた正常系Web APサーバプログラム200へまとめて送信する、セッション情報二重化復旧処理209を行ってもよい。   In preparation for such a situation, as a process at the time of reconnection, even if request processing is not performed, session information that exists only in the standby Web AP server program 300 is restored to the normal Web AP server program 200 that has been restarted. The session information duplex recovery processing 209 may be performed, which are transmitted collectively.

以上のように、正常系又は待機系のWeb APサーバプログラムの単独稼動の状態から、もう一方のペアのWeb APサーバプログラムが再起動すれば、再び正常稼動に復旧することが可能である。   As described above, normal operation or standby system Web AP server program can be restored to normal operation again when the other pair of Web AP server programs is restarted.

以上の動作手順により、本発明の目的は達成でき、かつWeb APサーバが再起動することによって、正常時に復旧することができる。   With the above operation procedure, the object of the present invention can be achieved, and the Web AP server can be restored to a normal state by restarting.

次に、本実施例の構成とその動作について詳細に説明する。
図4には、Webサーバプログラム100がメモリ上に作成する転送先Web APサーバペア群決定テーブル102の構成を示す。転送先Web APサーバペア群決定テーブル102は、Webサーバプログラム100が受信したHTTPリクエスト901の宛先URLから転送先Web APサーバペア群を求めるためのテーブルであり、URLパターン110と転送先Web APサーバペア群111を有する。本テーブルは、リクエストのURLとテーブルのエントリにあるURLパターン110が適合するかどうか調べることによって、リクエストのURLに対応した、転送先Web APサーバペアのIDを1つ又は複数知ることができる。リクエストのURLとURLパターン110との適合を調べる方法は本発明と関係ないので説明を省略する。本テーブルは、典型的にはWebサーバプログラム100起動時にWebサイト管理者505から与えられる。
Next, the configuration and operation of this embodiment will be described in detail.
FIG. 4 shows a configuration of the transfer destination Web AP server pair group determination table 102 created on the memory by the Web server program 100. The transfer destination Web AP server pair group determination table 102 is a table for obtaining a transfer destination Web AP server pair group from the destination URL of the HTTP request 901 received by the Web server program 100. The URL pattern 110 and the transfer destination Web AP server A pair group 111 is included. In this table, it is possible to know one or a plurality of transfer destination Web AP server pair IDs corresponding to the URL of the request by checking whether the URL of the request matches the URL pattern 110 in the table entry. Since the method for checking the conformity between the URL of the request and the URL pattern 110 is not related to the present invention, the description is omitted. This table is typically given by the Web site manager 505 when the Web server program 100 is started.

図5には、Webサーバプログラム100がメモリ上に作成するWeb APサーバペア定義テーブル103の構成を示す。Web APサーバペア定義テーブル103はWeb APサーバペアID120、正常系Web APサーバと通信するためのネットワークアドレスである正常系ネットワークアドレス121、待機系Web APサーバと通信するためのネットワークアドレスである待機系ネットワークアドレス122と、ペアの中で最近リクエスト処理を行ったWeb APサーバを示すアクティブサーバ123を有する。アクティブサーバ123が取る値は、正常系という文字列か待機系という文字列のどちらかである。アクティブサーバ123の値は、Webサーバが、HTTPリクエストをWeb APサーバペアの正常系と待機系のどちらに先にリクエストを転送するか判断するために用いる。   FIG. 5 shows the configuration of the Web AP server pair definition table 103 that the Web server program 100 creates on the memory. The Web AP server pair definition table 103 includes a Web AP server pair ID 120, a normal network address 121 that is a network address for communicating with a normal Web AP server, and a standby system that is a network address for communicating with a standby Web AP server. It has a network address 122 and an active server 123 indicating a Web AP server that has recently processed a request in the pair. The value taken by the active server 123 is either a normal character string or a standby character string. The value of the active server 123 is used by the Web server to determine whether to transfer the HTTP request first to the normal system or the standby system of the Web AP server pair.

アクティブサーバ123は、Webサーバプログラム100がWeb APサーバプログラムとの通信時に障害を検知するか、又は、処理辞退通知をWeb APサーバプログラムから受け取ったときに、そのWeb APサーバプログラムのペアの系を示す文字列に更新される。これにより、Webサーバプログラム100が極力、リクエスト処理を行えないWeb APサーバプログラムと通信を行ってしまう回数を減らしている。本テーブルは、Web APサーバペアIDから、正常系ネットワークアドレス121、待機系ネットワークアドレス122とアクティブサーバ123を求めることができる。本テーブルのエントリは、典型的にはWebサーバプログラム100起動時にWebサイト505管理者から与えられる。   The active server 123 detects a failure when the Web server program 100 communicates with the Web AP server program or receives a processing decline notification from the Web AP server program. It is updated to the character string shown. This reduces the number of times that the Web server program 100 communicates with the Web AP server program that cannot perform request processing as much as possible. This table can obtain the normal network address 121, the standby network address 122, and the active server 123 from the Web AP server pair ID. The entry of this table is typically given by the Web site 505 administrator when the Web server program 100 is started.

図6には、DBMSプログラム400を介してDBMS用計算機513の二次記憶401上に作成されるサーバペア状態管理テーブル402の構造を示す。サーバペア状態管理テーブル402はDBMSプログラム400が管理するリレーショナルデータベースのテーブルであり、Web APサーバペアID410とサーバペア状態411を有する。正常系又は待機系のWeb APサーバプログラムは、Web APサーバペアID410をキーにして、サーバペア状態411を更新又は参照するSQLをDBMSに送信し、その結果、本テーブルの該当するエントリが操作される。このテーブルはWeb APサーバペア起動前に、Webサイト管理者505が作成しておく。サーバペア状態411に格納される値は、Web APサーバペアが正常に稼動していることを示す文字列である正常稼動、正常系Web APサーバプログラム200だけが稼動していることを示す文字列である正常系単独稼動、待機系Web APサーバプログラム300だけが稼動していることを示す文字列である待機系単独稼動のいずれかである。   FIG. 6 shows the structure of the server pair status management table 402 created on the secondary storage 401 of the DBMS computer 513 via the DBMS program 400. The server pair status management table 402 is a relational database table managed by the DBMS program 400, and has a Web AP server pair ID 410 and a server pair status 411. The normal or standby Web AP server program sends the SQL that updates or references the server pair status 411 to the DBMS using the Web AP server pair ID 410 as a key, and as a result, the corresponding entry in this table is manipulated. The This table is created by the Web site manager 505 before starting the Web AP server pair. The value stored in the server pair status 411 is a character string indicating that only the normal Web AP server program 200 is operating, which is a character string indicating that the Web AP server pair is operating normally. Is either a normal system independent operation or a standby system single operation that is a character string indicating that only the standby Web AP server program 300 is operating.

図16には、Web APサーバプログラムがWebブラウザ504に対して発行するセッションID930の構成を示す。セッションID930はWeb APサーバペア内でセッション情報を一意に識別するためのIDとWeb APサーバペアを一意に識別するためのWeb APサーバペアIDからなる。Webサーバプログラムでは、HTTPリクエストに含まれるセッションID930から、Web APサーバペアIDを取得し、そのリクエストを転送すべきWeb APサーバペアを決定する。   FIG. 16 shows a configuration of a session ID 930 issued to the Web browser 504 by the Web AP server program. The session ID 930 includes an ID for uniquely identifying session information within the Web AP server pair and a Web AP server pair ID for uniquely identifying the Web AP server pair. In the Web server program, the Web AP server pair ID is acquired from the session ID 930 included in the HTTP request, and the Web AP server pair to which the request is to be transferred is determined.

図7には、Webサーバプログラム100がリクエストを受信する度に実行する、リクエスト選択転送処理のPAD図を示す。この処理では、リクエストのURLに基づいて、リクエストの転送を行うか否か判断し、転送を行う場合には、転送先Web APサーバペアを決定して、決定したペアのうち、最近リクエスト処理を行ったWeb APサーバプログラムにリクエストを転送する。また、リクエスト転送時にエラーが発生した場合やWeb APサーバプログラムからのレスポンスとして、処理辞退通知を受け取った場合には、もう一方のペアのWeb APサーバプログラムにリクエストを転送する。   FIG. 7 shows a PAD diagram of request selection transfer processing that is executed each time the Web server program 100 receives a request. In this process, it is determined whether or not to transfer the request based on the URL of the request, and when performing the transfer, the transfer destination Web AP server pair is determined, and the latest request process is determined from the determined pair. Transfer the request to the Web AP server program that was executed. Also, when an error occurs during request transfer or when a processing decline notification is received as a response from the Web AP server program, the request is transferred to the other pair of Web AP server programs.

(ステップ130) Webサーバプログラム100はWebブラウザ504から受信したHTTPリクエスト901のURLを参照し、そのURLが転送先Web APサーバペア群決定テーブル102に登録されているエントリのURLパターン110に適合するかどうか調べる。適合するURLパターン110を持つエントリがある場合には、ステップ131を実行する。適合するURLパターン110を持つエントリがない場合にはステップ132を実行する。   (Step 130) The Web server program 100 refers to the URL of the HTTP request 901 received from the Web browser 504, and the URL matches the URL pattern 110 of the entry registered in the transfer destination Web AP server pair group determination table 102. Check to see if. If there is an entry having a matching URL pattern 110, step 131 is executed. If there is no entry having the matching URL pattern 110, step 132 is executed.

(ステップ131) Webサーバプログラム100は、リクエストのURLが適合したURLパターン110を持つエントリのWeb APサーバペア群のサーバペアIDを転送先Web APサーバペア群決定テーブル102から求め、ステップ133を実行する。   (Step 131) The Web server program 100 obtains the server pair ID of the Web AP server pair group of the entry having the URL pattern 110 matching the request URL from the transfer destination Web AP server pair group determination table 102, and executes Step 133. To do.

(ステップ132) Web サーバプログラム100は、Web APサーバペア群決定テーブル102から転送先Web APサーバペア群を求めることができなかったので、URLに対するHTMLファイルや画像ファイルをWebブラウザに返信する。この処理は汎用のWebサーバに備わっている処理なので、説明は省略する。   (Step 132) Since the Web server program 100 cannot determine the transfer destination Web AP server pair group from the Web AP server pair group determination table 102, the Web server program 100 returns an HTML file or an image file corresponding to the URL to the Web browser. Since this process is a process provided in a general-purpose Web server, a description thereof will be omitted.

(ステップ133) Webサーバプログラム100は、受信したHTTPリクエスト901にセッションID930が含まれているか判断する。セッションID930が含まれている場合には、ステップ134を実行する。セッションID930が含まれていない場合にはステップ136を実行する。   (Step 133) The Web server program 100 determines whether or not the received HTTP request 901 includes a session ID 930. If session ID 930 is included, step 134 is executed. If session ID 930 is not included, step 136 is executed.

(ステップ134) Webサーバプログラム100は、ステップ131で求めた1つ又は複数のWeb APサーバペアIDのいずれかと、ステップ133で求めたセッションID930に含まれるWeb APサーバペアIDが一致するかどうか判断する。一致する場合には、ステップ135を実行する。一致しない場合には、ステップ136を実行する。   (Step 134) The Web server program 100 determines whether one of the one or more Web AP server pair IDs obtained in Step 131 matches the Web AP server pair ID included in the session ID 930 obtained in Step 133. To do. If they match, step 135 is executed. If they do not match, step 136 is executed.

(ステップ135) Webサーバプログラム100は、ステップ134で一致したWeb APサーバペアIDを持つWeb APサーバペアを転送先Web APサーバペアに設定し、ステップ137を実行する。   (Step 135) The Web server program 100 sets the Web AP server pair having the Web AP server pair ID matched in Step 134 as the transfer destination Web AP server pair, and executes Step 137.

(ステップ136) Web APサーバプログラム100は、ステップ131で求めた1つ又は複数のWeb APサーバペアIDの中からランダムに1つ選択し、そのIDを持つWeb APサーバペアを転送先Web APサーバペアに設定する。   (Step 136) The Web AP server program 100 randomly selects one or more Web AP server pair IDs obtained in Step 131 and selects the Web AP server pair having that ID as the transfer destination Web AP server. Set as a pair.

(ステップ137) Webサーバプログラム100は、ステップ135又はステップ136で決定した転送先Web APサーバペアのIDがWebサーバペア定義テーブル103に登録されているエントリのWeb APサーバペアID120と一致するかどうか調べる。一致する場合には、ステップ138を実行する。一致しない場合には、ステップ139を実行する。   (Step 137) The Web server program 100 determines whether the ID of the transfer destination Web AP server pair determined in Step 135 or 136 matches the Web AP server pair ID 120 of the entry registered in the Web server pair definition table 103 Investigate. If they match, step 138 is executed. If they do not match, step 139 is executed.

(ステップ138) Webサーバプログラム100は、転送先Web APサーバペアのIDと一致するWeb APサーバペアID120を持つエントリのアクティブサーバ123をWeb APサーバペア定義テーブル103から求め、ステップ140を実行する。   (Step 138) The Web server program 100 obtains the active server 123 of the entry having the Web AP server pair ID 120 that matches the ID of the transfer destination Web AP server pair from the Web AP server pair definition table 103, and executes Step 140.

(ステップ139) Webサーバプログラム100は、転送先Web APサーバペアに対応するエントリがないため、リクエスト処理をエラーで終了する。   (Step 139) Since there is no entry corresponding to the transfer destination Web AP server pair, the Web server program 100 ends the request processing with an error.

(ステップ140) Webサーバプログラム100は、ステップ141からステップ147までの処理を、正常系Web APサーバプログラム200と待機系Web APサーバプログラム300の双方にリクエストを転送するまで繰り返す。ただし、このループを実行中に、リクエストの転送に成功した場合には、このループを抜けてステップ148を実行する。   (Step 140) The Web server program 100 repeats the processing from Step 141 to Step 147 until the request is transferred to both the normal Web AP server program 200 and the standby Web AP server program 300. However, if the request is successfully transferred during execution of this loop, the process exits from this loop and executes step 148.

(ステップ141)Webサーバプログラム100は、転送先Web APサーバペアのIDと一致するWeb APサーバペアID120を持つエントリのアクティブサーバ123を求める。そして、アクティブサーバの値が正常系であれば、一致したエントリの正常系ネットワークアドレスにリクエストを転送し、アクティブサーバの値が待機系であれば、一致したエントリの待機系ネットワークアドレスにリクエストを転送する。そして、リクエストを転送した後、ステップ142を実行する。   (Step 141) The Web server program 100 obtains the active server 123 of the entry having the Web AP server pair ID 120 that matches the ID of the transfer destination Web AP server pair. If the value of the active server is normal, the request is transferred to the normal network address of the matched entry. If the value of the active server is standby, the request is transferred to the standby network address of the matched entry. To do. Then, after transferring the request, step 142 is executed.

(ステップ142) Webサーバプログラム100は、リクエストの転送時にエラーが起きた場合には、ステップ143を実行する。エラーが起きなかった場合には、ステップ144を実行する。   (Step 142) If an error occurs during the transfer of the request, the Web server program 100 executes Step 143. If no error has occurred, step 144 is executed.

(ステップ143) Webサーバプログラム100は、ステップ138で求めたエントリのアクティブサーバが正常系であれば、そのエントリのアクティブサーバを待機系に設定し、ステップ138で求めたエントリのアクティブサーバが待機系であれば、そのエントリのアクティブサーバを正常系に設定し、ループの先頭に戻る。   (Step 143) If the active server of the entry obtained in Step 138 is a normal system, the Web server program 100 sets the active server of the entry as a standby system, and the active server of the entry obtained in Step 138 is the standby system. If so, the active server of the entry is set to the normal system and the process returns to the top of the loop.

(ステップ144)Webサーバプログラム100は、リクエストを転送したWeb APサーバプログラムからのレスポンスを受信待ちし、受信の時点でエラーが起きた場合には、ステップ145を実行する。また、Web APサーバプログラムからのレスポンスを受信した場合には、ステップ146を実行する。   (Step 144) The Web server program 100 waits to receive a response from the Web AP server program that has transferred the request, and executes Step 145 if an error occurs at the time of reception. If a response from the Web AP server program is received, step 146 is executed.

(ステップ145) Webサーバプログラム100は、先にリクエストを転送したWeb APサーバプログラムでリクエスト処理がされているかもしれないので、二重処理を避けるために、リクエスト処理をエラーで終了する。   (Step 145) Since the request processing may have been performed by the Web AP server program to which the request has been transferred first, the Web server program 100 ends the request processing with an error in order to avoid double processing.

(ステップ146) Webサーバプログラム100は、Web APサーバプログラムから受信したレスポンスが、処理辞退通知である場合、ステップ143を実行する。処理辞退通知でなければ、ステップ147を実行する。   (Step 146) If the response received from the Web AP server program is a processing decline notification, the Web server program 100 executes Step 143. If it is not a processing decline notification, step 147 is executed.

(ステップ147)Webサーバプログラム100は、Web APサーバプログラムから受信したHTTPレスポンス902をWebブラウザ504に返信して、ステップ140のループを抜けて、ステップ148を実行する。   (Step 147) The Web server program 100 returns the HTTP response 902 received from the Web AP server program to the Web browser 504, exits the loop of Step 140, and executes Step 148.

(ステップ148) Webサーバプログラム100は、この時点でWebブラウザにHTTPレスポンス902を返信していないならば、ステップ149を実行する。返信していれば、リクエスト選択転送処理101を終了する。   (Step 148) If the Web server program 100 does not return an HTTP response 902 to the Web browser at this time, it executes Step 149. If the reply has been made, the request selection transfer process 101 ends.

(ステップ149) Webサーバプログラム100は、Webブラウザ504にエラーを返信する。   (Step 149) The Web server program 100 returns an error to the Web browser 504.

図8には、正常系Web APサーバプログラム200が起動時に実行する正常系初期化処理201のPAD図を示す。この処理では、待機系Web APサーバプログラム300とのコネクションを確立するまで、待機系Web APサーバ300へのコネクション確立要求911の送信を繰り返し、コネクションを確立したら、サーバペア状態管理テーブル402のサーバペア状態411とサーバペア状態キャッシュ208の値を正常稼動に更新する。   FIG. 8 shows a PAD diagram of the normal system initialization process 201 executed when the normal Web AP server program 200 is started. In this process, until the connection with the standby Web AP server program 300 is established, transmission of the connection establishment request 911 to the standby Web AP server 300 is repeated, and once the connection is established, the server pair in the server pair status management table 402 The values of the status 411 and the server pair status cache 208 are updated to normal operation.

(ステップ210、211) 正常系Web APサーバプログラム200は、待機系Web APサーバプログラム300とコネクションを確立するまで、コネクション確立要求911を繰り返し送信する。コネクションを確立した場合には、ステップ212を実行する。   (Steps 210 and 211) The normal Web AP server program 200 repeatedly transmits a connection establishment request 911 until a connection with the standby Web AP server program 300 is established. If the connection is established, step 212 is executed.

(ステップ212)正常系Web APサーバプログラム200は、コネクションを確立すると、正常に稼動できると判断して、サーバペア状態管理テーブル402のサーバペア状態411を正常稼動に更新するためのサーバペア状態更新SQL921をDBMSプログラム400に送信して、ステップ213を実行する。   (Step 212) When the normal Web AP server program 200 establishes the connection, it determines that it can operate normally, and updates the server pair status 411 for updating the server pair status 411 of the server pair status management table 402 to normal operation. SQL921 is transmitted to the DBMS program 400 and step 213 is executed.

(ステップ213)正常系Web APサーバプログラム200は、DBMSプログラム400との通信でエラーが発生した場合、ステップ214を実行する。エラーが発生しなければステップ215を実行する。   (Step 213) When an error occurs in communication with the DBMS program 400, the normal Web AP server program 200 executes Step 214. If no error occurs, step 215 is executed.

(ステップ214)正常系Web APサーバプログラム200は、サーバペア状態管理テーブル402のサーバペア状態411を更新できなかったため、初期化処理に失敗して、エラー終了する。   (Step 214) Since the normal Web AP server program 200 could not update the server pair status 411 of the server pair status management table 402, the initialization processing fails and ends with an error.

(ステップ215)正常系Web APサーバプログラム200は、サーバペア状態管理テーブル402のサーバペア状態411のキャッシュであるサーバペア状態キャッシュ208の値を正常稼動に更新して、正常系初期化処理201を終了する。   (Step 215) The normal Web AP server program 200 updates the value of the server pair status cache 208, which is the cache of the server pair status 411 in the server pair status management table 402, to normal operation, and performs normal system initialization processing 201. finish.

図9には、待機系Web APサーバプログラム300が起動時に実行する待機系初期化処理301のPAD図を示す。この処理では、正常系Web APサーバプログラム200とのコネクションを確立するまで、コネクション確立要求911を受信待ちし、コネクションを確立したら、サーバペア状態キャッシュ208の値を正常稼動に更新する。
以上の正常系初期化処理201と待機系初期化処理301により、正常系Web APサーバプログラム200と待機系Web APサーバプログラム300間のコネクションが確立され、正常に稼動する準備が整う。
FIG. 9 shows a PAD diagram of the standby system initialization process 301 that is executed when the standby Web AP server program 300 is activated. In this process, until the connection with the normal Web AP server program 200 is established, reception of the connection establishment request 911 is awaited. When the connection is established, the value of the server pair status cache 208 is updated to normal operation.
Through the normal system initialization process 201 and the standby system initialization process 301 described above, a connection between the normal system Web AP server program 200 and the standby system Web AP server program 300 is established, and preparations for normal operation are made.

図17には、正常系Web APサーバプログラム200がHTTPリクエスト901を受信した時の処理のPAD図を示す。正常系Web APサーバプログラム200はHTTPリクエスト901をWebサーバプログラム100から受信すると、まず、セッション情報無効化要求送信処理202を実行し、その後、アプリケーション実行処理203、そして、セッション情報に重化要求送信処理204を実行する。   FIG. 17 shows a PAD diagram of processing when the normal Web AP server program 200 receives the HTTP request 901. When the normal Web AP server program 200 receives the HTTP request 901 from the Web server program 100, it first executes the session information invalidation request transmission process 202, and then executes the application execution process 203 and the duplicate request transmission to the session information. Processing 204 is executed.

図18には、待機系Web APサーバプログラム300がHTTPリクエスト901を受信した時の処理のPAD図を示す。待機系Web APサーバプログラム300はHTTPリクエスト901をWebサーバプログラム100から受信すると、まず、引き継ぎ判定処理307を実行し、その後、アプリケーション実行処理203を実行する。   FIG. 18 shows a PAD diagram of processing when the standby Web AP server program 300 receives the HTTP request 901. When the standby Web AP server program 300 receives the HTTP request 901 from the Web server program 100, the standby Web AP server program 300 first executes the takeover determination process 307 and then executes the application execution process 203.

図10には、正常系Web APサーバプログラム200がリクエストを受信後、はじめに実行するセッション情報無効化要求送信処理202のPAD図を示す。   FIG. 10 shows a PAD diagram of the session information invalidation request transmission process 202 that is executed first after the normal Web AP server program 200 receives a request.

(ステップ260)正常系Web APサーバプログラム200は、自身のサーバペア状態キャッシュ208を参照して、その値が正常系単独稼動であれば、ステップ261を実行する。そうでなければ、ステップ262を実行する。   (Step 260) The normal Web AP server program 200 refers to its own server pair status cache 208, and if the value is a normal single operation, executes the step 261. Otherwise, step 262 is executed.

(ステップ261)正常系Web APサーバプログラム200は、単独稼動状態であるため、待機系との通信を行う必要がない。よって、セッション情報無効化要求送信処理202を正常に終了する。   (Step 261) Since the normal Web AP server program 200 is in an independent operation state, there is no need to communicate with the standby system. Therefore, the session information invalidation request transmission process 202 ends normally.

(ステップ262)正常系Web APサーバプログラム200は、自身のサーバペア状態キャッシュ208を参照して、その値が待機系単独稼動であれば、ステップ263を実行する。そうでなければ、ステップ264を実行する。   (Step 262) The normal Web AP server program 200 refers to its own server pair status cache 208, and if the value is a stand-alone independent operation, executes the step 263. Otherwise, step 264 is executed.

(ステップ263)正常系Web APサーバプログラム200は、自身が停止しつつあり、リクエスト処理ができない状態であるため、Webサーバプログラム100に処理辞退通知903を送信し、リクエスト処理を中断する。   (Step 263) Since the normal Web AP server program 200 is being stopped and cannot process the request, the normal Web AP server program 200 transmits a processing decline notice 903 to the Web server program 100 and interrupts the request processing.

(ステップ264)正常系Web APサーバプログラム200は受信したHTTPリクエスト901にセッションID930が含まれているかどうか判断する。セッションID930が含まれている場合には、ステップ265を実行する。セッションID930が含まれていない場合にはステップ266を実行する。   (Step 264) The normal Web AP server program 200 determines whether or not the received HTTP request 901 includes a session ID 930. If session ID 930 is included, step 265 is executed. If session ID 930 is not included, step 266 is executed.

(ステップ265)正常系Web APサーバプログラム200は、HTTPリクエスト901に含まれているセッションID930を取得して、ステップ267を実行する。   (Step 265) The normal Web AP server program 200 acquires the session ID 930 included in the HTTP request 901, and executes Step 267.

(ステップ266)正常系Web APサーバプログラム200は、HTTPリクエスト901にセッションID930が含まれていなかったため、新しいセッションID930を発行し、セッション情報を新規作成して、セッション情報無効化要求送信処理202を終了する。   (Step 266) Since the normal Web AP server program 200 does not include the session ID 930 in the HTTP request 901, it issues a new session ID 930, creates new session information, and executes the session information invalidation request transmission processing 202. finish.

(ステップ267)正常系Web APサーバプログラム200は、ステップ265で取得したセッションID930に対応するセッション情報が正常系Web APサーバプログラムのメモリ上にあるかどうか判断する。メモリ上にある場合にはステップ268を実行し、ない場合にはステップ269を実行する。   (Step 267) The normal Web AP server program 200 determines whether the session information corresponding to the session ID 930 acquired in Step 265 is on the memory of the normal Web AP server program. If it is on the memory, step 268 is executed, and if not, step 269 is executed.

(ステップ268)正常系Web APサーバプログラム200は、ステップ265で取得したセッションID930をセッション情報無効化要求912に含めて、その要求を待機系Web APサーバプログラム300へ送信し、ステップ270を実行する。   (Step 268) The normal Web AP server program 200 includes the session ID 930 acquired in Step 265 in the session information invalidation request 912, transmits the request to the standby Web AP server program 300, and executes Step 270. .

(ステップ269)正常系Web APサーバプログラム200は、ステップ265で取得したセッションID930をセッション情報取得要求917に含めて、その要求を待機系Web APサーバプログラム300へ送信し、ステップ270を実行する。   (Step 269) The normal Web AP server program 200 includes the session ID 930 acquired in Step 265 in the session information acquisition request 917, transmits the request to the standby Web AP server program 300, and executes Step 270.

(ステップ270)正常系Web APサーバプログラム200は、セッション情報無効化要求912又はセッション情報取得要求917の送信に失敗した場合、稼動サーバ判定処理206を実行後、ステップ262を実行する。送信が成功した場合にはステップ271を実行する。   (Step 270) When the normal Web AP server program 200 fails to transmit the session information invalidation request 912 or the session information acquisition request 917, the normal Web AP server program 200 executes the active server determination processing 206 and then executes Step 262. If the transmission is successful, step 271 is executed.

(ステップ271)正常系Web APサーバプログラム200は、待機系Web APサーバプログラム300からの応答を受信する。受信時にエラーが起きた場合には、稼動サーバ判定処理206を実行後、ステップ262を実行する。受信に成功した場合、セッション情報無効化要求送信処理202を正常に終了する。   (Step 271) The normal Web AP server program 200 receives a response from the standby Web AP server program 300. If an error occurs during reception, step 262 is executed after the active server determination process 206 is executed. If the reception is successful, the session information invalidation request transmission process 202 ends normally.

(ステップ272)正常系Web APサーバプログラム200は、待機系Web APサーバプログラム300から受信した応答が、セッション情報取得応答918かどうか判断し、セッション情報取得応答918であればステップ273を実行する。セッション情報取得応答918でなければ、セッション情報無効化要求送信処理202を終了する。   (Step 272) The normal Web AP server program 200 determines whether the response received from the standby Web AP server program 300 is the session information acquisition response 918. If the response is the session information acquisition response 918, the normal Web AP server program 200 executes Step 273. If it is not the session information acquisition response 918, the session information invalidation request transmission process 202 is terminated.

(ステップ273)正常系Web APサーバプログラム200は、受信したセッション情報取得応答918に含まれるセッション上を取得し、メモリ上に保存する。そして、セッション情報無効化要求送信処理202を終了する。   (Step 273) The normal Web AP server program 200 acquires the session included in the received session information acquisition response 918 and stores it in the memory. Then, the session information invalidation request transmission process 202 ends.

図11には、待機系Web APサーバプログラム300が、正常系Web APサーバプログラム200からセッション情報無効化要求912又はセッション情報取得要求917を受け取った時に行う、セッション情報無効化処理302のPAD図を示す。   FIG. 11 shows a PAD diagram of the session information invalidation processing 302 that is performed when the standby Web AP server program 300 receives the session information invalidation request 912 or the session information acquisition request 917 from the normal web AP server program 200. Show.

(ステップ320)待機系Web APサーバプログラム300は、受信した要求がセッション情報無効化要求912であるかセッション情報取得要求917であるかを判断する。セッション情報無効化要求912であれば、ステップ321を実行し、セッション情報取得要求917でれば、ステップ325を実行する。   (Step 320) The standby Web AP server program 300 determines whether the received request is a session information invalidation request 912 or a session information acquisition request 917. If it is a session information invalidation request 912, step 321 is executed, and if it is a session information acquisition request 917, step 325 is executed.

(ステップ321)待機系Web APサーバプログラム300は、正常系Web APサーバプログラム200から受信したセッション情報無効化要求912に含まれるセッションID930を取得してステップ322を実行する。   (Step 321) The standby Web AP server program 300 acquires the session ID 930 included in the session information invalidation request 912 received from the normal Web AP server program 200, and executes Step 322.

(ステップ322)待機系Web APサーバプログラム300は、取得したセッションID930を持つセッション情報を検索し、そのセッション情報を削除して、ステップ323を実行する。セッション情報が見つからない場合には何もせずにステップ323を実行する。   (Step 322) The standby Web AP server program 300 searches for session information having the acquired session ID 930, deletes the session information, and executes Step 323. If the session information is not found, step 323 is executed without doing anything.

(ステップ323)待機系Web APサーバプログラム300は、セッション情報無効化応答913を正常系Web APサーバプログラム200に送信する。   (Step 323) The standby Web AP server program 300 transmits a session information invalidation response 913 to the normal Web AP server program 200.

(ステップ324)待機系Web APサーバプログラム300は、セッション情報無効化応答913の送信時にエラーが起きた場合には稼動サーバ判定処理206を実行する。   (Step 324) If an error occurs during transmission of the session information invalidation response 913, the standby Web AP server program 300 executes the active server determination process 206.

(ステップ325)待機系Web APサーバプログラム300は、正常系Web APサーバプログラム200から受信したセッション情報取得要求917に含まれるセッションID930を取得してステップ326を実行する。   (Step 325) The standby Web AP server program 300 acquires the session ID 930 included in the session information acquisition request 917 received from the normal Web AP server program 200, and executes Step 326.

(ステップ326)待機系Web APサーバプログラム300は、取得したセッションID930を持つセッション情報を検索し、そのセッション情報を取得して、ステップ327を実行する。   (Step 326) The standby Web AP server program 300 searches for session information having the acquired session ID 930, acquires the session information, and executes Step 327.

(ステップ327)待機系Web APサーバプログラム300は、ステップ326で取得したセッション情報をセッション情報取得応答918に含め、正常系Web APサーバプログラム200に送信し、ステップ328を実行する。   (Step 327) The standby Web AP server program 300 includes the session information acquired in Step 326 in the session information acquisition response 918, transmits it to the normal Web AP server program 200, and executes Step 328.

(ステップ328)待機系Web APサーバプログラム300は、セッション情報取得応答918の送信時にエラーが起きた場合には稼動サーバ判定処理206を実行し、ステップ329を実行する。エラーが起きなかった場合にはステップ329を実行する。   (Step 328) If an error occurs during transmission of the session information acquisition response 918, the standby Web AP server program 300 executes the active server determination process 206 and executes Step 329. If no error has occurred, step 329 is executed.

(ステップ329)待機系Web APサーバプログラム300は、ステップ326で取得したセッション情報を削除する。   (Step 329) The standby Web AP server program 300 deletes the session information acquired in Step 326.

正常系Web APサーバプログラム200はリクエスト受信後、セッション情報無効化要求送信処理202を行った後に、アプリケーション実行処理203を実行する。本処理は、汎用のWeb APサーバプログラムに備わっている処理なので詳細は省略する。   After receiving the request, the normal Web AP server program 200 executes the session information invalidation request transmission process 202, and then executes the application execution process 203. Since this process is a process included in the general-purpose Web AP server program, details are omitted.

図12には、正常系Web APサーバプログラム200が、アプリケーション実行処理後にアプリケーションがリクエスト処理で使用したセッション情報を二重化するためのセッション情報二重化要求送信処理204のPAD図を示す。   FIG. 12 shows a PAD diagram of the session information duplex request transmission process 204 for the normal Web AP server program 200 to duplex the session information used by the application in the request process after the application execution process.

(ステップ230)正常系Web APサーバプログラム200は、リクエスト処理に使用したセッション情報とセッションID930をセッション情報二重化要求914に含めて、待機系Web APサーバプログラム200に送信して、ステップ231を実行する。   (Step 230) The normal Web AP server program 200 includes the session information used for request processing and the session ID 930 in the session information duplex request 914 and transmits it to the standby Web AP server program 200, and executes Step 231. .

(ステップ231)正常系Web APサーバプログラム200は、セッション情報二重化要求914の送信でエラーが起きた場合には、稼動サーバ判定処理206を実行後、ステップ232を実行する。エラーが起きなければステップ234を実行する。   (Step 231) If an error occurs in the transmission of the session information duplex request 914, the normal Web AP server program 200 executes step 232 after executing the active server determination process 206. If no error occurs, step 234 is executed.

(ステップ232)正常系Web APサーバプログラム200は、自身のサーバペア状態キャッシュ208を参照して、その値が待機系単独稼動であれば、ステップ233を実行する。   (Step 232) The normal Web AP server program 200 refers to its own server pair status cache 208, and if the value is a stand-alone independent operation, executes the step 233.

(ステップ233)正常系Web APサーバプログラム200は、自身が停止しつつあり、リクエスト処理ができない状態であるため、Webサーバプログラム100に処理辞退通知903を送信し、リクエスト処理を中断する。   (Step 233) Since the normal system Web AP server program 200 is being stopped and cannot process the request, the normal Web AP server program 200 transmits a processing decline notice 903 to the Web server program 100 and interrupts the request processing.

(ステップ234)正常系Web APサーバプログラム200は、セッション情報二重化応答915を受信する。受信待ちの際にエラーが起きた場合には、稼動サーバ判定処理206を実行する。セッション情報二重化応答915を受信した後、セッション情報二重化要求送信処理204を正常に終了する。   (Step 234) The normal Web AP server program 200 receives the session information duplex response 915. If an error occurs while waiting for reception, an active server determination process 206 is executed. After receiving the session information duplexing response 915, the session information duplexing request transmission process 204 ends normally.

図13には、待機系Web APサーバプログラム300が、正常系Web APサーバプログラム200からセッション情報二重化要求914を受け取った時に行う、セッション情報二重化処理304のPAD図である。   FIG. 13 is a PAD diagram of the session information duplexing process 304 performed when the standby Web AP server program 300 receives the session information duplexing request 914 from the normal system Web AP server program 200.

(ステップ330)待機系Web APサーバプログラム300は、正常系Web APサーバプログラム200から受信したセッション情報二重化要求912に含まれるセッション情報とセッションID930を取得してステップ331を実行する。   (Step 330) The standby Web AP server program 300 acquires the session information and the session ID 930 included in the session information duplex request 912 received from the normal Web AP server program 200, and executes Step 331.

(ステップ331)待機系Web APサーバプログラム300は、ステップ330で取得したセッション情報を取得したセッションID930と対応つけて、メモリ上に保存する。   (Step 331) The standby Web AP server program 300 associates the session information acquired in Step 330 with the acquired session ID 930 and stores it in the memory.

(ステップ332)待機系Web APサーバプログラム300は、セッション情報二重化応答913を正常系Web APサーバプログラム200に送信する。   (Step 332) The standby Web AP server program 300 transmits a session information duplex response 913 to the normal Web AP server program 200.

(ステップ333)待機系Web APサーバプログラム300は、セッション情報二重化応答913の送信時にエラーが起きた場合には稼動サーバ判定処理206を実行する。
図14には、正常系Web APサーバプログラム200および待機系Web APサーバプログラム300が通信エラーを検知した場合に実行する稼動サーバ判定処理206のPAD図である。
(Step 333) If an error occurs during transmission of the session information duplex response 913, the standby Web AP server program 300 executes the active server determination process 206.
FIG. 14 is a PAD diagram of the active server determination process 206 that is executed when the normal Web AP server program 200 and the standby Web AP server program 300 detect a communication error.

(ステップ240)Web APサーバプログラムは、サーバペア状態411を取得するために、サーバペア状態参照SQL921をDBMSプログラム400へ送信する。   (Step 240) The Web AP server program transmits a server pair status reference SQL 921 to the DBMS program 400 in order to acquire the server pair status 411.

(ステップ241)Web APサーバプログラムは、サーバペア状態参照SQL922の送信時にエラーが起きた場合には、ステップ242を実行する。エラーが起きなかった場合には、ステップ243を実行する。   (Step 241) If an error occurs during transmission of the server pair status reference SQL 922, the Web AP server program executes Step 242. If no error has occurred, step 243 is executed.

(ステップ242)Web APサーバプログラムは、DBMSプログラム400との通信ができないため、自身のサーバペア状態キャッシュ208をペアとなるWeb APサーバプログラムの単独稼動として、サーバの稼動を停止する。   (Step 242) Since the Web AP server program cannot communicate with the DBMS program 400, the server operation is stopped as a single operation of the Web AP server program paired with its own server pair status cache 208.

(ステップ243)Web APサーバプログラムは、サーバペア状態411を受信する。
(ステップ244)Web APサーバプログラムは、サーバペア状態411の受信時にエラーが起きた場合、ステップ242を実行する。
(Step 243) The Web AP server program receives the server pair status 411.
(Step 244) If an error occurs when receiving the server pair status 411, the Web AP server program executes Step 242.

(ステップ245)Web APサーバプログラムは、受信したサーバペア状態411がペアとなるWeb APサーバプログラムの単独稼動の場合、ステップ246を実行する。それ以外ならステップ247を実行する。   (Step 245) The Web AP server program executes Step 246 if the Web AP server program in which the received server pair status 411 is paired is operating alone. Otherwise, execute step 247.

(ステップ246)Web APサーバプログラムは、ペアとなるWeb APサーバプログラムが先にサーバペア状態411にアクセスしたと判断し、自身のサーバペア状態キャッシュ208をペアとなるWeb APサーバプログラムの単独稼動として自身は稼動を停止する。   (Step 246) The Web AP server program determines that the paired Web AP server program has previously accessed the server pair state 411, and sets its own server pair state cache 208 as a single operation of the paired Web AP server program. It stops operating.

(ステップ247)Web APサーバプログラムは、サーバペア状態411を自身の単独稼動にするためのサーバペア更新SQL921をDBMSプログラム400に送信する。   (Step 247) The Web AP server program sends a server pair update SQL 921 for setting the server pair state 411 to its own independent operation to the DBMS program 400.

(ステップ248)Web APサーバプログラムは、サーバペア状態参照SQL921の送信時にエラーが起きた場合には、ステップ242を実行する。   (Step 248) If an error occurs during transmission of the server pair status reference SQL 921, the Web AP server program executes Step 242.

(ステップ249)Web APサーバプログラムは、自身のサーバペア状態キャッシュ208を自身の単独稼動に更新する。   (Step 249) The Web AP server program updates its own server pair status cache 208 to its own operation.

図15には、待機系でリクエスト受信時にはじめに実行する引き継ぎ判定処理307のPAD図である。   FIG. 15 is a PAD diagram of the handover determination process 307 that is executed first when a request is received in the standby system.

(ステップ340)待機系Web APサーバプログラム300は、自身のサーバペア状態キャッシュ208を参照して、その値が待機系単独稼動であれば、ステップ341を実行する。そうでなければステップ342を実行する。   (Step 340) The standby Web AP server program 300 refers to its own server pair status cache 208, and if the value is a stand-alone independent operation, executes Step 341. Otherwise, step 342 is executed.

(ステップ341)待機系Web APサーバプログラム300は、既にリクエスト処理を実行可能な状態であるため、引き継ぎ判定処理307を正常に終了する。   (Step 341) Since the standby Web AP server program 300 is already ready to execute the request processing, the takeover determination processing 307 is normally terminated.

(ステップ342)待機系Web APサーバプログラム300は、自身のサーバペア状態キャッシュ208を参照して、その値が正常系単独稼動であれば、ステップ343を実行する。そうでなければステップ344を実行する。   (Step 342) The standby Web AP server program 300 refers to its own server pair status cache 208, and if the value is normal normal operation, executes Step 343. Otherwise, step 344 is executed.

(ステップ343)待機系Web APサーバプログラム300は、自身が停止しつつあり、リクエスト処理ができない状態であるため、Webサーバプログラム100に処理辞退通知903を送信し、リクエスト処理を中断する。   (Step 343) Since the standby Web AP server program 300 is being stopped and cannot process the request, the standby Web AP server program 300 transmits a processing decline notice 903 to the Web server program 100 and interrupts the request processing.

(ステップ344)待機系Web APサーバプログラム300は、正常系Web APサーバプログラム200の稼動を確認するために、稼動確認用メッセージ916を正常系Web APサーバプログラム200に送信して、ステップ345を実行する。   (Step 344) The standby Web AP server program 300 transmits an operation confirmation message 916 to the normal Web AP server program 200 and executes Step 345 in order to confirm the operation of the normal Web AP server program 200. To do.

(ステップ345)待機系Web APサーバプログラム300は、稼動確認用メッセージ916の送信時にエラーが起きると、稼動サーバ判定処理206を実行後、ステップ346を実行する。エラーが起きなければ、ステップ347を実行する。   (Step 345) If an error occurs when the operation confirmation message 916 is transmitted, the standby Web AP server program 300 executes the operation server determination processing 206, and then executes Step 346. If no error occurs, step 347 is executed.

(ステップ346)待機系Web APサーバプログラム300は、自身のサーバペア状態キャッシュ208を参照して、その値が待機系単独稼動であれば、ステップ341を実行する。そうでなければステップ343を実行する。   (Step 346) The standby Web AP server program 300 refers to its own server pair status cache 208, and if the value is a stand-alone independent operation, executes Step 341. Otherwise, step 343 is executed.

(ステップ347)待機系Web APサーバプログラム300は、正常系Web APサーバプログラム200から送信される稼動確認用メッセージ916を受信して、ステップ348を実行する。   (Step 347) The standby Web AP server program 300 receives the operation confirmation message 916 transmitted from the normal Web AP server program 200, and executes Step 348.

(ステップ348)待機系Web APサーバプログラム300は、稼動確認用メッセージ916の受信時にエラーが起きると、稼動サーバ判定処理206を実行後、ステップ346を実行する。エラーが起きなければ、ステップ349を実行する。   (Step 348) If an error occurs when receiving the operation confirmation message 916, the standby Web AP server program 300 executes the operation server determination processing 206, and then executes step 346. If no error occurs, step 349 is executed.

(ステップ349)待機系Web APサーバプログラム300は、Web APサーバペアが正常稼動であることを確認したため、自身ではリクエスト処理を実行できないと判断する。そのため、Webサーバプログラム100に処理辞退通知903を送信し、リクエスト処理を中断する。   (Step 349) Since the standby Web AP server program 300 has confirmed that the Web AP server pair is operating normally, it determines that it cannot execute the request processing by itself. Therefore, a processing decline notice 903 is transmitted to the Web server program 100, and the request processing is interrupted.

また、正常系再接続処理207は正常系初期化処理201と同様の処理で実現可能であり、待機系再接続処理308は待機系初期化処理301と同様の処理で実現可能である。   The normal system reconnection process 207 can be realized by the same process as the normal system initialization process 201, and the standby system reconnection process 308 can be realized by the same process as the standby system initialization process 301.

以上説明した本実施例によれば、本発明が解決しようとする2つの課題が解決される。すなわち、正常系Web APサーバの障害がどのタイミングで発生しても、待機系Web APサーバが古いセッション情報を参照しないように保証しつつ、可能な限りユーザの処理を継続することができる。   According to the embodiment described above, two problems to be solved by the present invention are solved. That is, regardless of the timing of the failure of the normal Web AP server, the user's processing can be continued as much as possible while guaranteeing that the standby Web AP server does not refer to old session information.

正常系Web APサーバと待機系Web APサーバ間の通信に障害が発生した場合に、正常系Web APサーバと待機系Web APサーバ間の系の不整合を生じさせないために、確実にどちらか片方のWeb APサーバだけが稼動を続ける方法をソフトウェアだけで実現することができる。   If a failure occurs in communication between the normal Web AP server and the standby Web AP server, ensure that either one of the normal Web AP server and the standby Web AP server is not inconsistent. The method that only the Web AP server continues to operate can be realized by software alone.

本実施例では、正常系と待機系から成るサーバプログラムの冗長構成により、正常系サーバプログラムの障害時に待機系サーバプログラムが処理を引き継ぐフェイルオーバ処理方法を説明した。特に、正常時には正常系サーバプログラムのリクエスト処理毎に、リクエスト処理で使用したメモリ上のデータを待機系サーバプログラムのメモリ上に二重化しておき、いずれかのサーバに障害が起きた場合にも、古いデータを参照しないことを保証しつつ、可能な限り処理を引き継ぐフェイルオーバ処理方法が提供できる。   In the present embodiment, the failover processing method in which the standby server program takes over the processing in the event of a failure of the normal server program has been described with the redundant configuration of the server program including the normal system and the standby system. In particular, during normal operation, every time a normal server program request is processed, the data on the memory used in the request processing is duplicated on the memory of the standby server program, and if any server fails, It is possible to provide a failover processing method that takes over processing as much as possible while ensuring that old data is not referenced.

本実施例は課題を解決するために、正常系Web APサーバと待機系Web APサーバのメモリ上で二重化してあるセッション情報が古くなる場合には、古くなるデータを事前に無効化するようにする。尚、データの無効化する場合には、データを削除してもよいし、データが無効であることを示すフラグや識別子をデータに付与してもよいし、当該データへのアクセス制限をかけてもよいし、その他の方法でもよい。   In this embodiment, in order to solve the problem, when the session information duplicated on the memory of the normal Web AP server and the standby Web AP server becomes old, the old data is invalidated in advance. To do. When invalidating data, the data may be deleted, a flag or identifier indicating that the data is invalid may be added to the data, and access to the data may be restricted. Alternatively, other methods may be used.

具体的には、正常系Web APサーバでのリクエスト処理開始前に、待機系Web APサーバにこれから正常系Web APサーバで更新するセッション情報のバックアップを無効化するように要求を行い、それに従って待機系Web APサーバではセッション情報のバックアップを無効化することにする。これにより、正常系Web APサーバでのリクエスト処理を開始してから、リクエスト処理後に待機系Web APサーバにセッション情報を二重化するまでの間は、セッション情報は二重化されていないものの、正常系Web APサーバと待機系Web APサーバとで内容の異なるセッション情報が存在してしまうことがなくなる。   Specifically, before starting the request processing on the normal Web AP server, request the standby Web AP server to invalidate the backup of the session information to be updated on the normal Web AP server, and wait accordingly The backup of session information is invalidated on the Web AP server. As a result, the session information is not duplicated between the start of request processing on the normal Web AP server and the session information is duplicated on the standby Web AP server after request processing. Session information with different contents does not exist between the server and the standby Web AP server.

また、正常系Web APサーバと待機系Web APサーバ間の通信に障害が発生した場合には、双方のサーバは障害を検知した時点で、データベースの特定のレコードに排他的なアクセスを行い、先にアクセスできた方のサーバが稼動を続け、後からアクセスした方のサーバは自発的に停止することにする。これにより、通信障害が起きた場合に確実にどちらか一方のサーバだけで稼動を続けることがソフトウェアだけで実現できる。   In addition, when a failure occurs in communication between the normal Web AP server and the standby Web AP server, when both servers detect the failure, they perform exclusive access to a specific record in the database, The server that can access the server will continue to operate, and the server that accessed later will voluntarily stop. As a result, it is possible to ensure that only one of the servers can continue to operate with only software when a communication failure occurs.

また、本実施例においては、正常系サーバと待機系サーバとを用いたフェイルオーバ処理方法であって、正常系サーバが、第一のリクエストを受信し、当該第一のリクエストの処理で使用した第一のセッション情報を読み出し、待機系サーバの記憶装置へ第一のセッション情報をコピーして格納し、正常系サーバが、第二のリクエストを受信した場合に、第二のリクエストの処理を開始する前に、前記待機系サーバの記憶装置に格納された前記第一のセッション情報を無効化することが可能となる。   In this embodiment, the failover processing method uses a normal server and a standby server, and the normal server receives the first request and uses the first request to process the first request. Read the first session information, copy and store the first session information in the storage device of the standby server, and start the processing of the second request when the normal server receives the second request The first session information stored in the storage device of the standby server can be invalidated before.

本実施例によれば、Webアプリケーションサーバにどのタイミングで障害が発生しても、処理を引き継ぐWebアプリケーションサーバが古いセッション情報を用いることなく、リクエスト処理を継続することが可能となる。また、セッション情報の二重化のためのWebアプリケーションサーバ間の通信に障害が起きても、古いセッション情報を用いることなく、リクエスト処理を継続することが可能となる。   According to this embodiment, regardless of the timing at which a failure occurs in the Web application server, it becomes possible for the Web application server that takes over the processing to continue request processing without using old session information. Moreover, even if a failure occurs in communication between Web application servers for duplicating session information, request processing can be continued without using old session information.

本実施例のWebサイト500内のシステム構成の詳細図の例である。It is an example of the detailed figure of the system configuration in the Web site 500 of a present Example. 本実施例のシステム構成図の例である。It is an example of the system block diagram of a present Example. 本実施例のWebサイト500内のシステム構成の概要図の例であるIt is an example of a schematic diagram of a system configuration in the website 500 of the present embodiment Web APサーバペア群決定テーブル102の構成図の例である。5 is an example of a configuration diagram of a Web AP server pair group determination table 102. FIG. Web APサーバペア定義テーブル103の構成図の例である。5 is an example of a configuration diagram of a Web AP server pair definition table 103. FIG. サーバペア状態管理テーブル402の構成図の例である。5 is an example of a configuration diagram of a server pair status management table 402. FIG. リクエスト選択転送処理101のPAD図の例である。10 is an example of a PAD diagram of request selection transfer processing 101. FIG. 正常系初期化処理201のPAD図の例である。FIG. 11 is an example of a PAD diagram of normal system initialization processing 201. 待機系初期化処理301のPAD図の例である。FIG. 10 is an example of a PAD diagram of standby system initialization processing 301; セッション情報無効化要求送信処理202のPAD図の例である。10 is an example of a PAD diagram of session information invalidation request transmission processing 202. FIG. セッション情報無効化処理302のPAD図の例である。10 is an example of a PAD diagram of session information invalidation processing 302. FIG. セッション情報二重化要求送信処理204のPAD図の例である。FIG. 10 is an example of a PAD diagram of session information duplex request transmission processing 204; セッション情報二重化処理304のPAD図の例である。FIG. 11 is an example of a PAD diagram of session information duplex processing 304; 稼動サーバ判定処理206のPAD図の例である。FIG. 11 is an example of a PAD diagram of an active server determination process 206. 引き継ぎ判定処理307のPAD図の例である。FIG. 10 is an example of a PAD diagram of takeover determination processing 307; セッションID930の構成図の例である。It is an example of a block diagram of session ID930. 正常系Web APサーバプログラム200のリクエスト受信時の処理のPAD図の例である。It is an example of a PAD diagram of processing when a normal Web AP server program 200 receives a request. 待機系Web APサーバプログラム300のリクエスト受信時の処理のPAD図の例である。6 is an example of a PAD diagram of processing when a request is received by the standby Web AP server program 300. FIG.

符号の説明Explanation of symbols

100…Webサーバプログラム、101…リクエスト選択転送処理、102…転送先Web APサーバペア群決定テーブル、103…Web APサーバペア定義テーブル、200…正常系Web APサーバプログラム、201…正常系初期化処理、202…セッション情報無効化要求送信処理、203…アプリケーション実行処理、204…セッション情報二重化処理、205…稼動状態監視処理、206…稼動サーバ判定処理、207…正常系再接続処理、208…サーバペア状態キャッシュ、300…待機系Web APサーバプログラム、301…待機系初期化処理、302…セッション情報無効化処理、304…セッション情報二重化処理、307…引き継ぎ判定処理、308…待機系再接続処理、400…DBMSプログラム、401…二次記憶装置、402…サーバペア状態管理テーブル、500…Webサイト、501…ネットワーク、502…端末装置、503…ホームページ閲覧者、504…Webブラウザ、505…Webサイト管理者、510…Webサーバ用計算機、511…正常系Web APサーバ用計算機、512…待機系Web APサーバ用計算機、513…DBMS用計算機
100 ... Web server program, 101 ... Request selection transfer processing, 102 ... Transfer destination Web AP server pair group determination table, 103 ... Web AP server pair definition table, 200 ... Normal Web AP server program, 201 ... Normal initialization processing 202 ... Session information invalidation request transmission processing, 203 ... Application execution processing, 204 ... Session information duplication processing, 205 ... Operating state monitoring processing, 206 ... Active server determination processing, 207 ... Normal system reconnection processing, 208 ... Server pair State cache, 300 ... Standby Web AP server program, 301 ... Standby system initialization processing, 302 ... Session information invalidation processing, 304 ... Session information duplex processing, 307 ... Takeover determination processing, 308 ... Standby system reconnection processing, 400 ... DBMS program, 401 ... Secondary storage device, 402 ... Server pair status management table, 500 ... Web site, 501 ... Network, 502 ... Terminal device, 503 ... Homepage browsing 504 ... Web browser, 505 ... Web site administrator, 510 ... Web server computer, 511 ... Normal Web AP server computer, 512 ... Standby Web AP server computer, 513 ... DBMS computer

Claims (12)

正常系サーバと待機系サーバとを用いたフェイルオーバ処理方法であって、
前記正常系サーバが、第一のリクエストを受信し、当該第一のリクエストの処理で使用した第一のセッション情報を読み出し、前記待機系サーバの記憶装置へ前記第一のセッション情報をコピーして格納し、
前記正常系サーバが、第二のリクエストを受信した場合に、第二のリクエストの処理を開始する前に、前記待機系サーバの記憶装置に格納された前記第一のセッション情報を無効化することを特徴とするフェイルオーバ処理方法。
A failover processing method using a normal server and a standby server,
The normal server receives the first request, reads the first session information used in the processing of the first request, and copies the first session information to the storage device of the standby server. Store and
When the normal server receives the second request, the first session information stored in the storage device of the standby server is invalidated before starting the processing of the second request. A failover processing method characterized by the above.
WebサーバとWebアプリケーションサーバとデータベースから構成されるオンライン処理システムを、少なくとも一組の正常系Webアプリケーションサーバと待機系Webアプリケーションサーバを運用する冗長構成とし、正常系Web アプリケーションサーバでのリクエスト処理毎にリクエスト処理で使用したメモリ上のセッション情報を待機系Web アプリケーションサーバのメモリ上に二重化し、正常系Web アプリケーションサーバの障害時には待機系Web アプリケーションサーバが処理を引き継ぐフェイルオーバ処理方法であって、正常時の正常系Web アプリケーションサーバのリクエスト処理開始前に、リクエスト処理で使用するセッション情報に対応する待機系Web アプリケーションサーバのメモリ上のセッション情報を無効化することを特徴とする、フェイルオーバ処理方法。   The online processing system consisting of a web server, web application server, and database is configured to operate at least one pair of normal web application server and standby web application server, and each request processing in the normal web application server. This is a failover processing method in which session information in the memory used for request processing is duplicated in the memory of the standby Web application server, and the standby Web application server takes over the processing when a normal Web application server fails. Before starting the request processing of the normal web application server, the session information in the memory of the standby web application server corresponding to the session information used in the request processing is invalidated. Eiruoba processing method. 請求項2記載のフェイルオーバ処理方法において、前記正常系Webアプリケーションサーバは、リクエスト処理開始前にリクエスト処理で使用するセッション情報のセッションIDを指定して、前記待機系Webアプリケーションサーバにセッション情報無効化要求を送信するセッション情報無効化要求送信ステップを有し、前記待機系Webアプリケーションサーバは、該セッション情報無効化要求を受信した場合に、該セッション情報無効化要求で指定されたセッションIDを持つセッション情報を前記待機系Webアプリケーションサーバのメモリ上から無効化するセッション情報無効化ステップを有することを特徴とする、フェイルオーバ処理方法。   3. The failover processing method according to claim 2, wherein the normal Web application server specifies a session ID of session information used in request processing before the request processing starts, and requests the standby Web application server to invalidate session information. Session information invalidation request transmission step for transmitting session information, and when the standby Web application server receives the session information invalidation request, the session information having the session ID specified in the session information invalidation request A session information invalidation step for invalidating the session information from the memory of the standby Web application server. 請求項3記載のフェイルオーバ処理方法において、前記正常系Webアプリケーションサーバは、リクエスト処理開始前にリクエスト処理で使用するセッション情報がない場合、リクエスト処理に必要なセッションIDを指定して、前記待機系Webアプリケーションサーバにセッション情報取得要求を送信するセッション情報取得要求送信ステップを有し、前記待機系Webアプリケーションサーバは、該セッション情報取得要求を受信した場合に、該セッション情報取得要求で指定されたセッションIDを持つセッション情報を前記正常系Webアプリケーションサーバに送信した上で、前記待機系Webアプリケーションサーバのメモリ上から無効化するセッション情報回復ステップを有することを特徴とする、フェイルオーバ処理方法。   4. The failover processing method according to claim 3, wherein if there is no session information used for request processing before the request processing is started, the normal Web application server specifies a session ID required for request processing, and the standby Web application server. A session information acquisition request transmission step of transmitting a session information acquisition request to the application server, and when the standby Web application server receives the session information acquisition request, the session ID specified in the session information acquisition request A failover processing method comprising: a session information recovery step of invalidating from the memory of the standby Web application server after transmitting session information having a message to the normal Web application server. 請求項4記載のフェイルオーバ処理方法において、前記待機系Webアプリケーションサーバは、前記正常系Webアプリケーションサーバが稼動しているにも関わらず、前記Webサーバからリクエストが転送されてきた場合には、リクエスト処理を辞退することを通知する処理辞退通知を前記Webサーバに送信することを特徴とするフェイルオーバ処理方法。   5. The failover processing method according to claim 4, wherein the standby Web application server performs request processing when a request is transferred from the Web server even though the normal Web application server is operating. A failover processing method characterized by transmitting a processing decline notification to notify the web server to decline. 請求項5記載のフェイルオーバ処理方法において、前記Webサーバはクライアントから受信したリクエストの宛先に基づき、該リクエストを転送すべき一組の正常系Web アプリケーションサーバと待機系Webアプリケーションサーバを決定するリクエスト転送先ペア決定ステップと、該リクエスト転送先ペア決定ステップで決定した組の片方のWebアプリケーションサーバへリクエストを転送し、その転送が失敗した場合又は処理辞退通知が返信されてきた場合には、もう一方のWebアプリケーションサーバにリクエストを転送する転送先切り替えステップを有することを特徴とする、フェイルオーバ処理方法。   6. The failover processing method according to claim 5, wherein the Web server determines a pair of normal Web application server and standby Web application server to which the request should be transferred based on a destination of a request received from a client. When a request is transferred to one of the Web application servers of the pair determined in the pair determination step and the request transfer destination pair determination step, and the transfer fails or a processing decline notification is returned, the other A failover processing method comprising a transfer destination switching step of transferring a request to a Web application server. 請求項6記載のフェイルオーバ処理方法において、前記正常系Webアプリケーションサーバと前記待機系Webアプリケーションサーバが稼動している状態から、どちらか一方が停止した後、再起動した場合に、もう一方のWebアプリケーションサーバから再起動したWebアプリケーションサーバへ、二重化されていないセッション情報を全て送信するセッション情報二重化復旧ステップを前記正常系Webアプリケーションサーバと前記待機系Webアプリケーションサーバが有することを特徴とする、フェイルオーバ処理方法。   7. The failover processing method according to claim 6, wherein when one of the normal system web application server and the standby system web application server is operating and then restarted, the other web application is restarted. Failover processing method characterized in that the normal system web application server and the standby system web application server have a session information duplex recovery step for transmitting all non-duplexed session information from the server to the restarted web application server . WebサーバとWebアプリケーションサーバとデータベースから構成されるオンライン処理システムを、少なくとも一組の正常系Webアプリケーションサーバと待機系Webアプリケーションサーバを運用する冗長構成とし、正常系Web アプリケーションサーバでのリクエスト処理毎にリクエスト処理で使用したメモリ上のセッション情報を待機系Web アプリケーションサーバのメモリ上に二重化し、正常系Web アプリケーションサーバの障害時には待機系Web アプリケーションサーバが処理を引き継ぐフェイルオーバ処理方法であって、前記正常系Web アプリケーションサーバと前記待機系Web アプリケーションサーバ間のセッション情報の二重化のための通信に障害が起きた時に、前記正常系Web アプリケーションサーバと前記待機系Web アプリケーションサーバは、通信障害を検知した場合に前記データベースの特定のレコードに排他的なアクセスを行い、先に該レコードにアクセスできたWeb アプリケーションサーバが稼動を続け、後からアクセスしたWeb アプリケーションサーバが稼動を停止する稼動サーバ判定処理を実行することを特徴とする、フェイルオーバ処理方法。   The online processing system consisting of a web server, web application server, and database is configured to operate at least one pair of normal web application server and standby web application server, and each request processing in the normal web application server. This is a failover processing method in which the session information in the memory used for request processing is duplicated in the memory of the standby Web application server, and when the normal Web application server fails, the standby Web application server takes over the processing. When a failure occurs in communication for duplication of session information between the Web application server and the standby Web application server, the normal Web application server and the standby Web application server When a communication failure is detected, exclusive access is made to a specific record in the database, the web application server that can access the record first continues to run, and the web application server that accessed later stops running. A failover processing method characterized by executing an active server determination process. 請求項8記載のフェイルオーバ処理方法において、前記正常系Web アプリケーションサーバと前記待機系Web アプリケーションサーバは、前記稼動サーバ判定処理において、自身が停止することになった場合、停止するまでに前記Webサーバから転送されてきたリクエストに対してリクエスト処理を行わずに、リクエスト処理を辞退することを通知する処理辞退通知を前記Webサーバに送信することを特徴とするフェイルオーバ処理方法。   9. The failover processing method according to claim 8, wherein when the normal Web application server and the standby Web application server are to be stopped in the active server determination process, the Web server and the standby Web application server are A failover processing method characterized by transmitting a processing decline notification notifying that a request processing is declined to the Web server without performing the request processing on the transferred request. 請求項9記載のフェイルオーバ処理方法において、前記待機系Webアプリケーションサーバは、前記正常系Webアプリケーションサーバが稼動しているにも関わらず、前記Webサーバからリクエストが転送されてきた場合には、リクエスト処理を辞退することを通知する処理辞退通知を前記Webサーバに送信することを特徴とするフェイルオーバ処理方法。   10. The failover processing method according to claim 9, wherein the standby Web application server performs request processing when a request is transferred from the Web server even though the normal Web application server is operating. A failover processing method characterized by transmitting a processing decline notification to notify the web server to decline. 請求項10記載のフェイルオーバ処理方法において、前記Webサーバはクライアントから受信したリクエストの宛先に基づき、該リクエストを転送すべき正常系Web アプリケーションサーバと待機系Webアプリケーションサーバのペアを決定するリクエスト転送先ペア決定ステップと、該リクエスト転送先ペア決定ステップで決定したペアの片方のWebアプリケーションサーバへリクエストを転送し、その転送が失敗した場合又は処理辞退通知が返信されてきた場合には、もう一方のWebアプリケーションサーバにリクエストを転送する転送先切り替えステップを有することを特徴とするフェイルオーバ処理方法。   11. The failover processing method according to claim 10, wherein the Web server determines a pair of a normal Web application server and a standby Web application server to which the request should be transferred based on a request destination received from a client. When the request is transferred to one of the Web application servers of the pair determined in the determination step and the request transfer destination pair determination step and the transfer fails or a processing decline notice is returned, the other Web A failover processing method comprising a transfer destination switching step of transferring a request to an application server. 請求項11記載のフェイルオーバ処理方法において、前記正常系Webアプリケーションサーバと前記待機系Webアプリケーションサーバが稼動している状態から、どちらか一方が停止した後、再起動した場合に、もう一方のWebアプリケーションサーバから再起動したWebアプリケーションサーバへ、二重化されていないセッション情報を全て送信するセッション情報二重化復旧ステップを前記正常系Webアプリケーションサーバと前記待機系Webアプリケーションサーバが有することを特徴とする、フェイルオーバ処理方法。

12. The failover processing method according to claim 11, wherein when one of the normal system web application server and the standby system web application server is operating and then restarted, the other web application is restarted. Failover processing method characterized in that the normal system web application server and the standby system web application server have a session information duplex recovery step for transmitting all non-duplexed session information from the server to the restarted web application server .

JP2003369813A 2003-10-30 2003-10-30 Fail-over processing method Pending JP2005135125A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003369813A JP2005135125A (en) 2003-10-30 2003-10-30 Fail-over processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003369813A JP2005135125A (en) 2003-10-30 2003-10-30 Fail-over processing method

Publications (1)

Publication Number Publication Date
JP2005135125A true JP2005135125A (en) 2005-05-26

Family

ID=34647014

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003369813A Pending JP2005135125A (en) 2003-10-30 2003-10-30 Fail-over processing method

Country Status (1)

Country Link
JP (1) JP2005135125A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007156569A (en) * 2005-11-30 2007-06-21 Fujitsu Ltd Cluster system, load balancer, method of transferring node, and node transfer program
JP2009289103A (en) * 2008-05-30 2009-12-10 Fujitsu Ltd Information processing system, information processing apparatus, and computer program
JP2011159014A (en) * 2010-01-29 2011-08-18 Fujitsu Frontech Ltd Information processing system, information processing device, communication control program, and communication control method
JP2013061704A (en) * 2011-09-12 2013-04-04 Nec Corp Display control device, display control method, and display control program
JP2013516669A (en) * 2010-01-04 2013-05-13 アルカテル−ルーセント Individual restart of nodes in a peer-to-peer network

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007156569A (en) * 2005-11-30 2007-06-21 Fujitsu Ltd Cluster system, load balancer, method of transferring node, and node transfer program
JP4616159B2 (en) * 2005-11-30 2011-01-19 富士通株式会社 Cluster system, load balancer, node transfer method, and node transfer program
JP2009289103A (en) * 2008-05-30 2009-12-10 Fujitsu Ltd Information processing system, information processing apparatus, and computer program
JP2013516669A (en) * 2010-01-04 2013-05-13 アルカテル−ルーセント Individual restart of nodes in a peer-to-peer network
JP2011159014A (en) * 2010-01-29 2011-08-18 Fujitsu Frontech Ltd Information processing system, information processing device, communication control program, and communication control method
JP2013061704A (en) * 2011-09-12 2013-04-04 Nec Corp Display control device, display control method, and display control program

Similar Documents

Publication Publication Date Title
US7613751B2 (en) Well-known transactions in data replication
US7475204B2 (en) Automatically managing the state of replicated data of a computing environment
US6031978A (en) System, method and program for enabling a client to reconnect to a same server in a network of computer systems after the server has moved to a different network address
JP4668763B2 (en) Storage device restore method and storage device
JP4283576B2 (en) Transaction synchronization method, database system, and database apparatus
US6938031B1 (en) System and method for accessing information in a replicated database
JP5467625B2 (en) Production-substitution system including a production system that processes transactions and a substitution system that is a backup system of the production system
US20020064126A1 (en) Recovery following process or system failure
US20060129772A1 (en) Data processing method and system
JPH0962526A (en) Fault resistant rpc system and method therefor
US7899897B2 (en) System and program for dual agent processes and dual active server processes
JP2000105756A (en) Method and device for detecting fault of decentralized application in network and recovering the fault according to extent of specified replication
GB2484086A (en) Reliability and performance modes in a distributed storage system
US8533525B2 (en) Data management apparatus, monitoring apparatus, replica apparatus, cluster system, control method and computer-readable medium
WO2014076838A1 (en) Virtual machine synchronization system
JP5292351B2 (en) Message queue management system, lock server, message queue management method, and message queue management program
US7000016B1 (en) System and method for multi-site clustering in a network
JP4801196B2 (en) Method and apparatus for two-phase commit in data distribution to a web farm
JP4289056B2 (en) Data duplication control method between computer systems
KR20020036502A (en) Duplicated Database Management System for Main Memory Resident DBMS
JP2005135125A (en) Fail-over processing method
JP2013206072A (en) Data matching system, data matching method, and data matching program
CN114363350B (en) Service management system and method
CN111324632B (en) Transparent database session restoration with client-side caching
JP2001159985A (en) Duplex device