JP6639245B2 - Server system, method and program for controlling server system. - Google Patents

Server system, method and program for controlling server system. Download PDF

Info

Publication number
JP6639245B2
JP6639245B2 JP2016007428A JP2016007428A JP6639245B2 JP 6639245 B2 JP6639245 B2 JP 6639245B2 JP 2016007428 A JP2016007428 A JP 2016007428A JP 2016007428 A JP2016007428 A JP 2016007428A JP 6639245 B2 JP6639245 B2 JP 6639245B2
Authority
JP
Japan
Prior art keywords
health check
request
response
server
web application
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.)
Active
Application number
JP2016007428A
Other languages
Japanese (ja)
Other versions
JP2017129935A (en
Inventor
健太 矢部
健太 矢部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2016007428A priority Critical patent/JP6639245B2/en
Priority to US15/406,449 priority patent/US11005927B2/en
Publication of JP2017129935A publication Critical patent/JP2017129935A/en
Application granted granted Critical
Publication of JP6639245B2 publication Critical patent/JP6639245B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1029Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Description

本発明は、ロードバランサに接続され、仮想サーバを備えたサーバシステム、サーバシステムを制御する方法およびプログラムに関する。   The present invention relates to a server system connected to a load balancer and having a virtual server, a method for controlling the server system, and a program.

クライアントとサーバから構成されるクライアント・サーバシステムにおいて、クライアントの数が増加するにつれサーバの負荷が増大しシステム全体の処理能力が低下する。このため、複数のサーバを連結し、クライアントに対してはあたかも1台の大規模なサーバであるかのようにみせるための技術である負荷分散技術が提供されている。負荷分散を実現するためにはサーバの稼働状況を監視し、クライアントからのリクエストが特定のサーバに偏らないようにリクエストを各サーバに均等に振り分ける負荷分散装置が必要である。負荷分散装置は、ロードバランサと呼称することもある。   In a client-server system including a client and a server, as the number of clients increases, the load on the server increases and the processing capacity of the entire system decreases. For this reason, a load distribution technology is provided, which is a technology for connecting a plurality of servers and making a client appear as if it is one large-scale server. In order to achieve load distribution, a load distribution device that monitors the operation status of servers and distributes requests equally to each server so that requests from clients are not biased to a specific server is required. The load balancer may be called a load balancer.

従来のロードバランサにおいては、サーバのCPU利用率を取得して、CPU利用率の低いサーバに対してクライアントからのリクエストを転送することでシステム全体の負荷状況を均等にする技術がある(特許文献1参照)。また、ロードバランサは、サーバで稼働するアプリケーションプログラムを仮想的に動作させて、正常な応答が返ってくるかどうかを確認したうえでシステムの稼働状況を把握する技術がある(特許文献2参照)。システムの稼働状況を把握するために行う確認作業をヘルスチェックと呼ぶ。   In a conventional load balancer, there is a technique for obtaining the CPU utilization of a server and transferring a request from a client to a server having a low CPU utilization to equalize the load situation of the entire system (Patent Document 1) 1). In addition, there is a technology in which a load balancer virtually operates an application program running on a server to check whether a normal response is returned and then grasp the operating status of the system (see Patent Document 2). . The confirmation work performed to grasp the operation status of the system is called a health check.

特開2008−94718号公報JP 2008-94718 A 特開2012−185577号公報JP 2012-185577 A

特許文献1に記載の技術はサーバの稼働状況までしか判別できず、サーバ上で動作するアプリケーションが正常に動作するかどうかは判断できない。一方、特許文献2に記載の技術は、サーバ上で複数のアプリケーションが動作するような構成において、それぞれのアプリケーションがロードバランサからのヘルスチェックに対応する機能を実装する必要がある。   The technique described in Patent Literature 1 can determine only the operation status of a server, and cannot determine whether an application running on the server normally operates. On the other hand, in the technology described in Patent Document 2, in a configuration in which a plurality of applications operate on a server, it is necessary for each application to implement a function corresponding to a health check from a load balancer.

本発明では、サーバ上で複数のアプリケーションが動作する構成において、各アプリケーションにヘルスチェックに対応する機能を実装することなく、アプリケーションのヘルスチェックを行うことを目的の1つとする。   An object of the present invention is to perform a health check of an application in a configuration in which a plurality of applications operate on a server without implementing a function corresponding to the health check in each application.

本発明の一実施形態に係るサーバシステムは、クライアントのリクエストを分散して送信するロードバランサと通信可能であり、複数の仮想サーバを備えたサーバシステムであって、前記リクエストの送信対象とすることが可能な仮想サーバであるか否かを確認するため、前記ロードバランサから各仮想サーバに対し送信されるヘルスチェックを受信する受信手段と、前記受信手段によりヘルスチェックを受信したことに応じて、前記ヘルスチェックを受信した仮想サーバ内に配備される複数のWebアプリケーションに対し、予め決められた任意のリクエストを送信する送信手段と、前記送信手段により送信された任意のリクエストに対するレスポンスを各Webアプリケーションから受信し、受信した全てのレスポンスが正常にWebアプリケーションが稼働していることを示すレスポンスであることを確認したことに応じて、前記ロードバランサにヘルスチェック成功の旨を送信する制御手段と、を有することを特徴とする。   A server system according to an embodiment of the present invention is a server system that can communicate with a load balancer that transmits client requests in a distributed manner and includes a plurality of virtual servers, and is a transmission target of the requests. Receiving means for receiving a health check transmitted from the load balancer to each virtual server to confirm whether or not the virtual server is possible, in response to receiving the health check by the receiving means, A transmitting unit that transmits a predetermined arbitrary request to a plurality of Web applications deployed in the virtual server that has received the health check, and a response to the arbitrary request transmitted by the transmitting unit to each Web application And all the received responses are normally In response to confirming that the publication is a response indicating that it is running, and having a control means for transmitting the effect of the health check succeeds to the load balancer.

本発明では、サーバ上で複数のアプリケーションが動作する構成において、各アプリケーションにヘルスチェックに対応する機能を実装することなく、アプリケーションのヘルスチェックを行うことが可能となる。   According to the present invention, in a configuration in which a plurality of applications operate on a server, it is possible to perform a health check of an application without mounting a function corresponding to the health check in each application.

システム全体構成図Overall system configuration diagram コンピュータハードウェア構成図Computer hardware configuration diagram ロードバランサソフトウェア構成図Load balancer software configuration diagram サーバソフトウェア構成図Server software configuration diagram Webサーバソフトウェア構成図Web server software configuration diagram アプリケーションサーバソフトウェア構成図Application server software configuration diagram ロードバランサがサーバのヘルスチェックを行う一連の処理を示したフローチャートFlowchart showing a series of processes in which the load balancer performs a server health check Webサーバが実施するヘルスチェック処理を示したフローチャートFlow chart showing the health check process performed by the Web server アプリケーションサーバが実施するログ出力処理を示したフローチャートFlowchart showing log output processing performed by the application server

[実施例1]
以下、本発明を実施するための形態について図面を用いて説明する。図1は、本発明に係るWebアプリケーションシステムの全体構成を示すブロック図である。ネットワーク100は、図1に示すブロック図の各構成要素のうちクライアント装置101、ロードバランサ102、物理サーバ103、仮想サーバ104、105を接続する通信経路である。ネットワーク100は、各構成要素間で通信を行うための基盤であって、イントラネット、インターネットもしくはその他のネットワークシステムであっても構わない。クライアント装置101は、図1に示すブロック図の各構成要素のうち、ネットワーク100を介してロードバランサ102、物理サーバ103、仮想サーバ104、105と相互に通信可能である。
[Example 1]
Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the overall configuration of a Web application system according to the present invention. The network 100 is a communication path that connects the client device 101, the load balancer 102, the physical server 103, and the virtual servers 104 and 105 among the components in the block diagram shown in FIG. The network 100 is a base for performing communication between components, and may be an intranet, the Internet, or another network system. The client device 101 can mutually communicate with the load balancer 102, the physical server 103, and the virtual servers 104 and 105 via the network 100 among the components in the block diagram shown in FIG.

本実施例においては、クライアント装置101はPC(パーソナルコンピュータ。以降、PCと呼称する。)を前提に説明を進めるが、ネットワーク100を介した通信機能を有する端末であれば種別は問わない。ロードバランサ102は、Webアプリケーションシステムを構成するサーバ1台あたりの負荷を抑える装置である。ロードバランサ102は、ネットワーク100を介して、クライアント装置101から送信されるWebアプリケーションシステムへのリクエストを、物理サーバ103上の仮想サーバ104、に振り分ける。   In the present embodiment, the description will be given on the assumption that the client device 101 is a PC (personal computer; hereinafter, referred to as PC). However, any type of terminal may be used as long as the terminal has a communication function via the network 100. The load balancer 102 is a device that suppresses the load per server constituting the Web application system. The load balancer 102 distributes a request to the Web application system transmitted from the client device 101 via the network 100 to the virtual server 104 on the physical server 103.

本実施例におけるWebアプリケーションシステムは物理サーバ103で稼働する複数台の仮想サーバ104、105によって構成されるものとして説明する。物理サーバ103は、ネットワーク100を介してクライアント装置101にWebアプリケーションの利用させる物理サーバである。   The Web application system in this embodiment is described as being configured by a plurality of virtual servers 104 and 105 operating on the physical server 103. The physical server 103 is a physical server that allows the client device 101 to use a Web application via the network 100.

仮想サーバ104、105は、物理サーバ103上で稼働するアプリケーションソフトウェアによって実現される仮想サーバ装置である。物理サーバ103のハードウェアにて専用の仮想マシンソフトウェアを実行することによって複数の仮想的なサーバ装置を配備することが可能となる。Webアプリケーションシステムを構成するアプリケーションソフトウェアは仮想サーバ104、105に配備し、クライアント装置101からのリクエストは仮想サーバ104、105が実行する。仮想サーバ104、105の稼働状況は随時ロードバランサ102によって監視される。なお、図1では物理サーバ103のみを記載しているが、その台数を1台に限定するものではない。1台以上の複数台の物理サーバを用意し、夫々の物理サーバ内に複数の仮想サーバを稼働させ、夫々の仮想サーバがロードバランサ102により振り分けられるリクエストを処理する構成を想定している。無論、物理サーバ103が1台で、仮想サーバが1つのみ稼働している状況であっても良い。   The virtual servers 104 and 105 are virtual server devices realized by application software running on the physical server 103. By executing dedicated virtual machine software on the hardware of the physical server 103, a plurality of virtual server devices can be deployed. Application software configuring the Web application system is deployed on the virtual servers 104 and 105, and requests from the client device 101 are executed by the virtual servers 104 and 105. The operation status of the virtual servers 104 and 105 is monitored by the load balancer 102 as needed. Although FIG. 1 shows only the physical server 103, the number is not limited to one. It is assumed that one or more physical servers are prepared, a plurality of virtual servers are operated in each physical server, and each virtual server processes a request distributed by the load balancer 102. Of course, there may be a situation where there is one physical server 103 and only one virtual server is operating.

図2は、本発明に係るクライアント装置101、ロードバランサ102、物理サーバ103のハードウェア構成図の一例を示すブロック図である。システムバス200は、各ハードウェアを相互に接続するバスである。本実施例においては特に断らない限り、システムバス200はCPU203からの制御命令を、システムバスに接続された各ハードウェアに伝播させるものとする。ユーザインタフェース201は、ディスプレイ、キーボード、マウスなどによる情報の入出力を行うハードウェアである。これらのハードウェアを備えないコンピュータは、リモート接続などにより、他のコンピュータからネットワーク100を介して接続および操作することも可能である。   FIG. 2 is a block diagram illustrating an example of a hardware configuration diagram of the client device 101, the load balancer 102, and the physical server 103 according to the present invention. The system bus 200 is a bus that interconnects the hardware. In this embodiment, unless otherwise specified, the system bus 200 propagates a control command from the CPU 203 to each piece of hardware connected to the system bus. The user interface 201 is hardware that inputs and outputs information using a display, a keyboard, a mouse, and the like. A computer without these hardware can also be connected and operated from another computer via the network 100 by remote connection or the like.

ネットワークインターフェース202は、ネットワーク100などのネットワークに接続して、他のコンピュータやネットワーク機器との通信を行うハードウェアである。CPU203は、ROM204、RAM205、二次記憶装置206から読み込んだプログラムを実行し、各機能を実現する。システムバス200で接続される各構成要素を直接的、あるいは間接的に制御する。ROM204は、読み込み専用の記憶装置であり、BIOS等の組込済みプログラムおよびデータが記録されている。RAM205は、CPU203が動作するためのワーク領域として利用される一時メモリ領域である。二次記憶装置206は、基本ソフトウェアであるOSやその他ソフトウェアモジュールが記憶されているHDDに代表されるような外部記憶装置である。なお、仮想サーバ104、105においては、図2に示した各ハードウェア要素が仮想マシンソフトウェアによって仮想的に実現され、その挙動は物理サーバ103と同様の挙動をとるものとする。仮想サーバ104、105の夫々のハードウェア要素は、実際は物理サーバ103のハードウェアリソースの一部を利用し再現しているものである。仮想化の技術に関しては一般的な機能であるため詳細は割愛する。   The network interface 202 is hardware that connects to a network such as the network 100 and communicates with other computers and network devices. The CPU 203 executes programs read from the ROM 204, the RAM 205, and the secondary storage device 206 to realize each function. Each component connected by the system bus 200 is controlled directly or indirectly. The ROM 204 is a read-only storage device, and stores an installed program such as BIOS and data. The RAM 205 is a temporary memory area used as a work area for the CPU 203 to operate. The secondary storage device 206 is an external storage device typified by an HDD in which an OS as basic software and other software modules are stored. In the virtual servers 104 and 105, each hardware element shown in FIG. 2 is virtually realized by virtual machine software, and the behavior is the same as that of the physical server 103. The hardware components of the virtual servers 104 and 105 are actually reproduced by using a part of the hardware resources of the physical server 103. The details of the virtualization technology are omitted because it is a general function.

図3は、本発明に係るロードバランサ102のソフトウェアモジュールの構成図を示すブロック図である。これらのソフトウェアモジュールはロードバランサ102の二次記憶装置206で管理され、CPU203により実行され、各機能が実現する。なお、本実施例と直接関係のない処理については記載を省略する。   FIG. 3 is a block diagram showing a configuration diagram of a software module of the load balancer 102 according to the present invention. These software modules are managed by the secondary storage device 206 of the load balancer 102, executed by the CPU 203, and realize each function. Descriptions of processes not directly related to this embodiment are omitted.

制御部300は、ロードバランサ102の全体を制御し、ソフトウェアモジュールの各構成要素に対する指示および管理を行う。受信部301は、ネットワーク100を介して接続されるクライアント装置101から送信されるリクエストの受信処理を行う。受信部301がクライアント装置から受信するリクエストのデータ例をHTTPリクエストデータテーブルに示す。   The control unit 300 controls the entire load balancer 102, and instructs and manages each component of the software module. The receiving unit 301 performs a process of receiving a request transmitted from the client device 101 connected via the network 100. An example of data of a request received by the receiving unit 301 from the client device is shown in an HTTP request data table.


HTTPリクエストカラムには、リクエストの送信先URL、リクエストのHTTPメソッド、リクエストの送信プロトコルの値が格納される。表1に示した例の場合、送信URLは「http://webapp.com/app1/method1」、HTTPメソッドは「GET」、送信プロトコルは「HTTP/1.1」となる。HTTPヘッダカラムには、リクエストに関連するHTTPヘッダ情報が格納される。ロードバランサ102における挙動とは関係のないため、説明を省略する。HTTPボディカラムには、リクエストに関連するHTTPボディ情報が格納される。ロードバランサ102における挙動とは関係のないため、説明を省略する。

The HTTP request column stores the URL of the destination of the request, the HTTP method of the request, and the value of the transmission protocol of the request. In the case of the example shown in Table 1, the transmission URL is “http://webapp.com/app1/method1”, the HTTP method is “GET”, and the transmission protocol is “HTTP / 1.1”. The HTTP header column stores HTTP header information related to the request. Since it has nothing to do with the behavior in the load balancer 102, the description is omitted. The HTTP body column stores HTTP body information related to the request. Since it has nothing to do with the behavior in the load balancer 102, the description is omitted.

送信部302は、ネットワーク100を介して、仮想サーバ104、105にクライアント装置101から受信したリクエストを送信する。また、送信部302は、仮想サーバ104から受信したレスポンスをクライアント装置101に送信する。サーバ情報管理部303は、ロードバランサ102がクライアント装置101からのリクエストの振り分け対象となる仮想サーバの情報を管理する。受信部301がクライアント装置101からリクエストを受信した場合には、送信部302はサーバ情報管理部303で管理する情報に基づきリクエストの振り分け先となる仮想サーバを決定する。サーバ情報管理部303で管理される振り分け先の仮想サーバのサーバ情報のデータ例をサーバ情報テーブルに示す。   The transmission unit 302 transmits the request received from the client device 101 to the virtual servers 104 and 105 via the network 100. The transmitting unit 302 transmits the response received from the virtual server 104 to the client device 101. The server information management unit 303 manages information on a virtual server to which the load balancer 102 distributes a request from the client device 101. When the receiving unit 301 receives a request from the client device 101, the transmitting unit 302 determines a virtual server to which the request is to be distributed based on the information managed by the server information management unit 303. An example of data of server information of the distribution destination virtual server managed by the server information management unit 303 is shown in a server information table.


管理IDカラムは、ロードバランサ102がリクエストの振り分けを行うサーバの情報を一意に管理するために付与されたIDを格納するカラムである。振り分け先サーバURLカラムは、リクエストの振り分け先として候補となる仮想サーバのURLを格納するカラムである。ロードバランサ102は、本カラムに登録されているURLにクライアント装置101からのリクエストを転送する。稼働状況カラムは、リクエストの振り分け先として候補となる仮想サーバの稼働状況情報を格納するカラムである。稼働状況情報は後述するヘルスチェック実行部305によって取得される。 前回確認日時カラムは、前回のヘルスチェックが完了した日時を格納するカラムである。
ロードバランサ102によるリクエストの振り分けの方法については、本実施例の対象ではないため説明を省略する。一般的には、サーバ情報テーブルに登録された振り分け先を順番に振り分けていく方法や、特許文献2に示したようにサーバの負荷状況の軽いサーバに優先的に振り分ける方法など様々な方法がある。ヘルスチェック設定管理部304は、ロードバランサ102がクライアント装置101からのリクエストを振り分ける仮想サーバに対するヘルスチェックの設定情報を管理する。ヘルスチェック設定管理部304で管理されるヘルスチェックの設定情報のデータ例をヘルスチェック設定情報テーブルに示す。

The management ID column is a column for storing an ID assigned to uniquely manage information of a server to which the load balancer 102 distributes requests. The distribution destination server URL column is a column that stores the URL of a virtual server that is a candidate as a distribution destination of a request. The load balancer 102 transfers the request from the client device 101 to the URL registered in this column. The operation status column is a column for storing operation status information of a virtual server that is a candidate as a request distribution destination. The operation status information is acquired by a health check execution unit 305 described later. The previous confirmation date column is a column that stores the date and time when the previous health check was completed.
The method of distributing requests by the load balancer 102 is not the subject of this embodiment, and a description thereof will be omitted. In general, there are various methods such as a method of sequentially allocating the distribution destinations registered in the server information table, and a method of preferentially allocating to servers with a light load on the server as shown in Patent Document 2. . The health check setting management unit 304 manages health check setting information for a virtual server to which the load balancer 102 distributes requests from the client device 101. A data example of the health check setting information managed by the health check setting management unit 304 is shown in a health check setting information table.


ヘルスチェックURLカラムは、ヘルスチェックリスエストの送信先URLを格納するカラムである。ヘルスチェックURLは相対パスで記載される。タイムアウトカラムは、ロードバランサ102がヘルスチェックリクエストを送信してから応答を受信するまでのタイムアウト時間を格納するカラムである。本カラムに格納された時間以上経過してもヘルスチェックの応答が返ってこなかった場合にはロードバランサ102はヘルスチェック結果が非正常と判断する。ロードバランサ102は、非正常となった仮想サーバをリクエストの振り分け対象から外すことで、リクエストの処理が行われない状況を回避する。

The health check URL column is a column that stores a transmission destination URL of the health check request. The health check URL is described by a relative path. The timeout column is a column that stores a timeout period from when the load balancer 102 transmits a health check request to when a response is received. If a response to the health check is not returned even after the time stored in this column has elapsed, the load balancer 102 determines that the result of the health check is abnormal. The load balancer 102 avoids a situation where the request is not processed by excluding the abnormal virtual server from the request distribution target.

正常閾値カラムは、ロードバランサ102がヘルスチェックの結果を“正常”と判定するために、リクエストの正常応答を連続して受信する回数を格納するカラムである。ヘルスチェック実行部305は正常閾値カラムに格納された値の回数分だけ正常応答を受信すると、サーバ情報テーブル内のサーバの稼働状況カラムの値を“正常”に更新する。非正常閾値カラムは、ロードバランサ102がヘルスチェックの結果を“非正常”と判定するために、リクエストのエラー応答を連続して受信する回数を格納するカラムである。ヘルスチェック実行部305は非正常閾値カラムに格納された値の回数分だけエラー応答を受信すると、サーバ情報テーブルの該当するサーバの稼働状況カラムの値を“非正常”に更新する。   The normal threshold column is a column that stores the number of times a normal response to a request is continuously received in order for the load balancer 102 to determine that the result of the health check is “normal”. When the health check execution unit 305 receives the normal response by the number of times of the value stored in the normal threshold column, it updates the value of the server operation status column in the server information table to “normal”. The abnormal threshold column is a column that stores the number of times that the load balancer 102 continuously receives an error response to a request in order to determine that the result of the health check is “abnormal”. When receiving the error responses for the number of times stored in the abnormal threshold column, the health check execution unit 305 updates the value of the operation status column of the corresponding server in the server information table to “abnormal”.

また、ロードバランサ102のヘルスチェック実行部305は、サーバ情報テーブルの該当するレコードの前回確認日時カラムの値に、ヘルスチェックの応答を受信した日時を格納する。ヘルスチェック実行部305は、サーバ情報テーブルに登録されたそれぞれの仮想サーバに対してヘルスチェックリクエストを送信する。ヘルスチェックリクエストの設定についてはヘルスチェック設定情報テーブルに従って送信される。また、ヘルスチェック実行部305は、ヘルスチェックリクエストの応答を解析し、ヘルスチェックの結果が正常であったか非正常であったかを確認する。ヘルスチェックの結果が正常である仮想サーバはクライアントから送信されたリクエストの送信対象となる仮想サーバと見做される。   In addition, the health check execution unit 305 of the load balancer 102 stores the date and time when the health check response was received in the value of the previous confirmation date and time column of the corresponding record in the server information table. The health check execution unit 305 transmits a health check request to each virtual server registered in the server information table. The setting of the health check request is transmitted according to the health check setting information table. Further, the health check execution unit 305 analyzes the response of the health check request, and checks whether the result of the health check is normal or abnormal. A virtual server whose health check result is normal is regarded as a virtual server to which a request transmitted from a client is to be transmitted.

図4は、本発明に係る仮想サーバ104、105のソフトウェア構成図を示すブロック図である。Webサーバ401は、クライアント装置101からリクエストを受信するWebサーバソフトウェアである。Webサーバ401は、クライアント装置101から受信した処理を実行し、その結果からレスポンスを生成し、クライアント装置101に返す。また、Webサーバ401は、クライアント装置101から受信したリクエストをアプリケーションサーバ402に転送して、アプリケーションサーバ402での処理の実行結果をレスポンスとして、クライアント装置101に返すこともある。クライアント装置101からのリクエストの内容によって適宜何れかの処理がWebサーバ401によって実行される。   FIG. 4 is a block diagram showing a software configuration diagram of the virtual servers 104 and 105 according to the present invention. The Web server 401 is Web server software that receives a request from the client device 101. The Web server 401 executes the process received from the client device 101, generates a response from the result, and returns the response to the client device 101. Further, the Web server 401 may transfer the request received from the client device 101 to the application server 402, and return the execution result of the process in the application server 402 to the client device 101 as a response. Any process is appropriately executed by the Web server 401 depending on the content of the request from the client device 101.

アプリケーションサーバ402は、Webサーバ401から転送されたクライアント装置101のリクエストを処理するアプリケーションサーバソフトウェアである。アプリケーションサーバには1つ以上のアプリケーション403、404が配備されており、リクエストの内容に応じてアプリケーションサーバ403が実行するアプリケーションを決定する。即ち、1つの仮想サーバ内には複数のアプリケーションが配備されていることになる。アプリケーションサーバ402は、リクエストの実行結果をWebサーバ401に転送する。   The application server 402 is application server software that processes a request from the client device 101 transferred from the Web server 401. One or more applications 403 and 404 are deployed in the application server, and the application to be executed by the application server 403 is determined according to the content of the request. That is, a plurality of applications are deployed in one virtual server. The application server 402 transfers the request execution result to the Web server 401.

本実施例においては、Webサーバ401およびアプリケーションサーバ402が同一の仮想サーバ104、105上にそれぞれ存在する前提で説明を行う。Webサーバ401およびアプリケーションサーバ402の詳細な説明については後述する。また、本実施例においてはアプリケーションサーバ402に配備されているアプリケーションの数を2つとしているが、その数を限定する意図で記載しているわけではない。アプリケーションサーバ402に配備されるアプリケーションの数は1つ以上であればその数を限定するものではない。本実施例において、アプリケーション403、404の処理内容、それぞれ受信するリクエストの例を表8に示す。   In the present embodiment, description will be made on the assumption that the Web server 401 and the application server 402 exist on the same virtual servers 104 and 105, respectively. The detailed description of the Web server 401 and the application server 402 will be described later. Further, in the present embodiment, the number of applications deployed on the application server 402 is two, but this is not intended to limit the number. The number of applications deployed on the application server 402 is not limited as long as it is one or more. In this embodiment, Table 8 shows the processing contents of the applications 403 and 404 and examples of the respective requests received.


アプリケーションカラムは、仮想サーバ104、105で稼働するアプリケーションを識別する値を格納するカラムである。アプリケーションURLカラムは、アプリケーションへリクエストを送信する場合のURLの値を格納するカラムである。アプリケーション概要カラムは、アプリケーションが実現する具体的な内容を格納するカラムである。公開機能カラムは、アプリケーションがクライアント装置101に対して公開している機能名称を格納するカラムである。HTTPメソッドカラムは、公開機能カラムに示した機能をクライアント装置101が実行するためにリクエストを送信する際のHTTPメソッドを定義したカラムである。リクエストフォーマットカラムは、公開機能カラムに示した機能をクライアント装置101が実行するためにリクエストを送信する際のリクエストボディに格納するデータのフォーマットを定義したカラムである。この定義に反する値をリクエストボディに格納して、各アプリケーションにリクエストを送信した場合、アプリケーションは通常エラーを返す。例えば、アプリケーション403は製品情報を管理するアプリケーションであり、アプリケーション404はユーザ情報を管理するアプリケーションとする。

The application column is a column for storing a value for identifying an application running on the virtual servers 104 and 105. The application URL column is a column that stores a URL value when a request is transmitted to an application. The application outline column is a column for storing specific contents realized by the application. The public function column is a column for storing a function name that the application discloses to the client device 101. The HTTP method column is a column that defines an HTTP method used when the client device 101 transmits a request to execute the function shown in the public function column. The request format column is a column that defines the format of data stored in the request body when transmitting a request for the client device 101 to execute the function shown in the public function column. When a value contrary to this definition is stored in the request body and a request is sent to each application, the application usually returns an error. For example, the application 403 is an application for managing product information, and the application 404 is an application for managing user information.

図5は、本発明に係るWebサーバ401のソフトウェアモジュールの構成図を示すブロック図である。これらのソフトウェアは仮想サーバ104、105の二次記憶装置206で管理され、仮想サーバ104、105のCPU203により実行され、仮想サーバ上にて各機能が実現する。なお、本実施例と直接関係のない処理部については記載を省略する。   FIG. 5 is a block diagram showing a configuration diagram of a software module of the Web server 401 according to the present invention. These software are managed by the secondary storage device 206 of the virtual servers 104 and 105, and are executed by the CPU 203 of the virtual servers 104 and 105, and each function is realized on the virtual server. The description of the processing units not directly related to the present embodiment is omitted.

制御部500は、Webサーバ401の全体を制御し、ソフトウェアモジュールの各構成要素に対する指示および管理を行う。受信部501は、ネットワーク100を介して接続されるクライアント装置101、ロードバランサ102から送信されるリクエストの受信処理を行う。クライアント装置101からのリクエストは主にアプリケーションサーバ402に配備されたアプリケーションへの実行要求である。ロードバランサ102からのリクエストはサーバ103のヘルスチェックリクエストである。送信部502はネットワーク100を介して、クライアント装置101、ロードバランサ102にレスポンスを送信する。また、送信部502は、ネットワーク100を介してアプリケーションサーバ402に、受信したリクエストを転送する。ヘルスチェックスクリプト実行部503は、受信部501が受信したリクエストがロードバランサ102からのヘルスチェックリクエストであった場合に、ヘルスチェック処理を実行する。受信部501が受信するリクエストのデータ例をヘルスチェックリクエストテーブルに示す。   The control unit 500 controls the entire Web server 401, and instructs and manages each component of the software module. The receiving unit 501 performs a process of receiving a request transmitted from the client device 101 and the load balancer 102 connected via the network 100. The request from the client device 101 is mainly an execution request to an application deployed on the application server 402. The request from the load balancer 102 is a health check request of the server 103. The transmission unit 502 transmits a response to the client device 101 and the load balancer 102 via the network 100. Further, the transmission unit 502 transfers the received request to the application server 402 via the network 100. The health check script execution unit 503 executes a health check process when the request received by the reception unit 501 is a health check request from the load balancer 102. A data example of the request received by the receiving unit 501 is shown in the health check request table.


HTTPメソッドカラムは、リクエストのHTTPメソッド名を格納するカラムである。ヘルスチェックリクエストの場合には「GET」の値が格納される。リクエスト送信元URLカラムは、リクエストを送信した端末のURLが格納される。ヘルスチェックリクエストの場合には、ロードバランサ102のURLが格納される。Webサーバ401はヘルスチェックリクエストの実行結果を、リクエスト送信元URLカラムに格納されたURLに返す。リクエスト送信先URLカラムは、リクエストの送信先URLが格納される。ヘルスチェックリクエストの場合は、Webサーバ401のヘルスチェックスクリプト管理部505に格納されたヘルスチェックスクリプトのURLが格納される。

The HTTP method column is a column that stores the HTTP method name of the request. In the case of a health check request, a value of “GET” is stored. The request transmission source URL column stores the URL of the terminal that transmitted the request. In the case of a health check request, the URL of the load balancer 102 is stored. The Web server 401 returns the execution result of the health check request to the URL stored in the request transmission source URL column. The request transmission destination URL column stores the transmission destination URL of the request. In the case of a health check request, the URL of the health check script stored in the health check script management unit 505 of the Web server 401 is stored.

ヘルスチェックスクリプト実行部503は、ヘルスチェックリクエストに従って、ヘルスチェックリクエスト管理部505からヘルスチェックスクリプト、ヘルスチェックルール管理部504からヘルスチェックルールを取得して、ヘルスチェック処理を事項する。ヘルスチェックルール管理部504は、ヘルスチェックスクリプト実行部503が実行するヘルスチェックスクリプトに代入する各パラメータ値をヘルスチェックルールとして、まとめて管理する。ヘルスチェックルール管理部504が管理するヘルスチェックルールのデータ例をヘルスチェックルールテーブルに示す。ヘルスチェックルールは、Webアプリケーション毎にルールが定義されており、各Webアプリケーションには、対応するヘルスチェックリクエストが送信されることになる。   The health check script execution unit 503 acquires a health check script from the health check request management unit 505 and a health check rule from the health check rule management unit 504 according to the health check request, and performs a health check process. The health check rule management unit 504 collectively manages the parameter values assigned to the health check script executed by the health check script execution unit 503 as a health check rule. A data example of a health check rule managed by the health check rule management unit 504 is shown in a health check rule table. The health check rule is defined for each Web application, and a corresponding health check request is transmitted to each Web application.


ルール番号カラムは、ヘルスチェックスクリプト実行部503がアプリケーションサーバ402に送信するヘルスチェックリクエストのルールを一意に識別する番号を格納するカラムである。HTTPメソッドカラムは、ヘルスチェックスクリプト実行部503がアプリケーションサーバ402に送信するヘルスチェックリクエストのHTTPメソッドを格納する。HTTPメソッドカラムに格納するHTTPメソッドの値は、表8に示したアプリケーションに対応したHTTPメソッドの値が格納される。

The rule number column is a column for storing a number for uniquely identifying a rule of a health check request transmitted from the health check script execution unit 503 to the application server 402. The HTTP method column stores an HTTP method of a health check request transmitted from the health check script execution unit 503 to the application server 402. As the value of the HTTP method stored in the HTTP method column, the value of the HTTP method corresponding to the application shown in Table 8 is stored.

ヘルスチェックリクエスト送信先URLカラムは、ヘルスチェックスクリプト実行部503がアプリケーションサーバ402に送信するヘルスチェックリクエストの送信先URLを格納する。本カラムに格納される値はアプリケーションサーバ402で稼働するアプリケーション403、404に対応する。具体的には表8に示したアプリケーションURLカラムの値が格納される。ヘルスチェックリクエストボディカラムは、ヘルスチェックスクリプト実行部503がアプリケーションサーバ402に送信するヘルスチェックリクエストのリクエストボディ情報を格納するカラムである。本カラムに格納される値は、ヘルスチェックリクエスト送信先URLカラムの値に応じて異なる。具体的には表8に示したアプリケーションに対応したリクエストフォーマットカラムに定義された情報が格納される。   The health check request transmission destination URL column stores the transmission destination URL of the health check request transmitted from the health check script execution unit 503 to the application server 402. The values stored in this column correspond to the applications 403 and 404 running on the application server 402. Specifically, the value of the application URL column shown in Table 8 is stored. The health check request body column is a column for storing request body information of a health check request transmitted from the health check script execution unit 503 to the application server 402. The value stored in this column differs according to the value of the health check request transmission destination URL column. Specifically, information defined in the request format column corresponding to the application shown in Table 8 is stored.

例えば、ルール番号カラムの値が「1」のヘルスチェックルールの場合には、表5に示される定義に従い、アプリケーション403に対してHTTPメソッド「POST」で「ProductName」の値が「複合機TypeA」、「Name」の値が「MFPA001」のリクエストボディで、ヘルスチェックスクリプト実行部503がリクエストを送信することを意味している。   For example, when the value of the rule number column is a health check rule of “1”, the value of “ProductName” is “Multifunction machine TypeA” for the application 403 by the HTTP method “POST” according to the definition shown in Table 5. , “Name” is a request body of “MFPA001”, which means that the health check script execution unit 503 transmits a request.

ヘルスチェック成功判定応答コードカラムは、ヘルスチェックスクリプト実行部503がヘルスチェックルールに基づき送信したリクエストに対し、アプリケーションサーバ402から受信したヘルスチェックリクエストの応答で、アプリケーション403、404が正常に稼働していると判断するHTTPレスポンスコードを格納する値である。本カラムに格納する値は、一般的に正常応答を意味するHTTPレスポンスコード「200」以外の値を格納しても構わない。   The health check success determination response code column is a response of the health check request received from the application server 402 to the request transmitted by the health check script execution unit 503 based on the health check rule, and indicates that the applications 403 and 404 operate normally. This is a value that stores the HTTP response code that is determined to be present. The value stored in this column may generally store a value other than the HTTP response code “200” which means a normal response.

例えば、ルール番号カラムの値が「1」のヘルスチェックルールに基づいたリクエストをヘルスチェックスクリプト実行部503がアプリケーション403に送信した場合、リクエストボディカラムの「ProductName」の値に全角文字が含まれている。アプリケーション403は表8のリクエストフォーマットカラムの値が示すように、「ProductName」の値を「半角英数字」と定めているため、ヘルスチェックスクリプト実行部503が送信するリクエストはアプリケーション403にとっては、不正なリクエストと判断されることが予測される。そのためヘルスチェック成功判定応答コードカラムにはHTTPレスポンスコード「400」を格納することになる。   For example, when the health check script execution unit 503 transmits a request based on the health check rule whose rule number column value is “1” to the application 403, the value of “ProductName” in the request body column includes double-byte characters. I have. As indicated by the value of the request format column in Table 8, the application 403 sets the value of “ProductName” to “half-width alphanumeric characters”. Therefore, the request transmitted by the health check script execution unit 503 is invalid for the application 403. It is expected that the request will be determined to be a simple request. Therefore, the HTTP response code “400” is stored in the health check success determination response code column.

ヘルスチェックリクエストの目的はアプリケーションが稼働していることを確認することである。ルール番号カラムの値が「1」のヘルスチェックルールに基づいたリクエストはアプリケーション403によって不正なリクエストと判断される。しかし、そう判断されるということはアプリケーション403が正常に稼働し、不正なリクエスト値を正しく判断してエラー処理したことを意味している。   The purpose of the health check request is to confirm that the application is running. A request based on the health check rule whose value in the rule number column is “1” is determined by the application 403 to be an invalid request. However, the fact that the judgment is made means that the application 403 operates normally and an invalid request value is correctly judged and error processing is performed.

一方、アプリケーション403が正常に稼働していなければサーバはリクエストを正しく処理することができない。そのような場合、アプリケーションが稼働するアプリケーションサーバ402に異常が発生していることを示すHTTPレスポンスコードの500番の値がクライアント装置101に返される。そのためヘルスチェックルールテーブルには、ヘルスチェック成功判定応答コードカラムの値が500番台以外となるルールを登録することで、アプリケーションサーバ402の稼働状況をチェックすることができる。ヘルスチェックスクリプト管理部505は、ヘルスチェックスクリプト実行部503が実行するヘルスチェックスクリプトを管理する。チェックスクリプトが実行されることで各アプリケーションに対してヘルスチェックリクエストが送信される。   On the other hand, if the application 403 is not operating normally, the server cannot process the request correctly. In such a case, the 500th value of the HTTP response code indicating that an error has occurred in the application server 402 on which the application runs is returned to the client device 101. Therefore, the operating status of the application server 402 can be checked by registering a rule in which the value of the health check success determination response code column is other than the 500s in the health check rule table. The health check script management unit 505 manages a health check script executed by the health check script execution unit 503. A health check request is sent to each application by executing the check script.

図6は、本発明に係るアプリケーションサーバ402のソフトウェアモジュールの構成図を示すブロック図である。これらのソフトウェアは仮想サーバ104、105の二次記憶装置206で管理され、仮想サーバ104、105のCPU203により実行され、各機能が実現する。なお、本実施例と直接関係のない処理部については記載を省略する。   FIG. 6 is a block diagram showing a configuration diagram of a software module of the application server 402 according to the present invention. These software are managed by the secondary storage device 206 of the virtual servers 104 and 105, and are executed by the CPU 203 of the virtual servers 104 and 105 to realize each function. The description of the processing units not directly related to the present embodiment is omitted.

制御部600は、アプリケーションサーバ402全体を制御し、ソフトウェアモジュールの各構成要素に対する指示および管理を行う。受信部601は、ネットワーク100を介して接続されるクライアント装置101、ロードバランサ102から送信されるリクエストの受信処理を行う。送信部602はネットワーク100を介して、アプリケーション実行部603の実行結果のレスポンスをWebサーバ401に返す。アプリケーション実行部603は、受信部601が受信したリクエストに対応したアプリケーション403、404で実行する。ヘルスチェックリクエストを受信したWebサーバ401により送信される、アプリケーションが正常に稼働しているか否かを確認するためのリクエスト、即ちヘルスチェックルールに従って送信されるリクエストもアプリケーション実行部603により実行される。そのようなリクエストはヘルスチェックを確認するためのリクエストではあるが、アプリケーション403、404にとってはヘルスチェックリクエストとは異なる通常のリクエストの内容と何ら変わりはない。上述した構成を仮想サーバで実現することで、各アプリケーションがヘルスチェックリクエストに対応する機能を搭載しておらずとも、アプリケーションのヘルスチェックが可能になるのが本発明のポイントの1つである。   The control unit 600 controls the entire application server 402, and instructs and manages each component of the software module. The receiving unit 601 performs a process of receiving a request transmitted from the client device 101 and the load balancer 102 connected via the network 100. The transmission unit 602 returns a response of the execution result of the application execution unit 603 to the Web server 401 via the network 100. The application execution unit 603 is executed by the applications 403 and 404 corresponding to the request received by the reception unit 601. The application execution unit 603 also executes a request transmitted by the Web server 401 that has received the health check request to confirm whether the application is operating normally, that is, a request transmitted according to the health check rule. Such a request is a request for confirming the health check, but is not different from the contents of a normal request different from the health check request for the applications 403 and 404. One of the points of the present invention is that by realizing the above-described configuration by the virtual server, the health check of the application can be performed even if each application does not have a function corresponding to the health check request.

図7は本発明に係る、ロードバランサ102がサーバ103およびサーバ103上で稼働する仮想サーバ104、105に対してヘルスチェックを行う一連の処理を示したフローチャートである。ステップS701において、ロードバランサ102のヘルスチェック実行部305は、サーバ情報管理部303で管理されるサーバ情報テーブルにレコードが登録されていることを確認する。そしてヘルスチェック実行部305は、前述したレコードの前回確認日時カラムの値と現在時刻を比較して、ヘルスチェックが未実施のサーバがあるか否かを確認する。具体的には、ロードバランサ102が管理する現在時刻が、前回確認日時カラムの時刻からヘルスチェック設定情報テーブルの間隔カラムの値以上時刻が経過しているかどうかを確認する。間隔カラムの値以上、前回ヘルスチェックを行ってから時刻が経過している仮想サーバが存在していた場合にはステップS702に進む。間隔カラムの値以上、前回ヘルスチェックを行ってから時刻が経過している仮想サーバが存在していない場合には、ロードバランサ102は一旦処理を終了し、一定時刻経過後再度ステップS701を行う。   FIG. 7 is a flowchart showing a series of processing in which the load balancer 102 performs a health check on the server 103 and the virtual servers 104 and 105 running on the server 103 according to the present invention. In step S701, the health check execution unit 305 of the load balancer 102 confirms that a record is registered in the server information table managed by the server information management unit 303. Then, the health check execution unit 305 compares the value of the previous confirmation date / time column of the record with the current time to confirm whether there is a server for which the health check has not been performed. Specifically, it is checked whether the current time managed by the load balancer 102 has passed from the time in the previous confirmation date and time column by the value in the interval column of the health check setting information table. If there is a virtual server whose time has passed since the last time the health check was performed, the process proceeds to step S702. If there is no virtual server whose time has passed since the last time the health check was performed, the load balancer 102 terminates the processing once, and performs step S701 again after a certain time has passed.

ステップS702において、ヘルスチェック実行部305は、ヘルスチェックリクエストを作成する。具体的には、ヘルスチェック実行部305は、ヘルスチェックリクエストレコードのリクエスト送信元URLに自身が保持するURLを格納する。ヘルスチェック実行部305は、ヘルスチェックリクエストレコードのリクエスト送信先URLカラムにサーバ情報テーブルの振り分け先サーバURLカラムの値とヘルスチェック設定情報テーブルのヘルスチェックURLカラムの値を連結したURLを格納する。   In step S702, the health check execution unit 305 creates a health check request. Specifically, the health check execution unit 305 stores the URL held by itself in the request transmission source URL of the health check request record. The health check execution unit 305 stores, in the request transmission destination URL column of the health check request record, a URL in which the value of the distribution destination server URL column of the server information table and the value of the health check URL column of the health check setting information table are linked.

ステップS703において、送信部302は、仮想サーバ104、105に対してヘルスチェックリクエストを送信する。ステップS704において、仮想サーバ104、105で稼働するWebサーバ401の受信部501はロードバランサ102からヘルスチェックリクエストを受信して、ヘルスチェック処理を実行する。ヘルスチェック処理の詳細なフローについては、図8で説明する。ステップS705において、ロードバランサ102の受信部301は仮想サーバ104、105からヘルスチェックレスポンスを受信する。受信部301が受信するヘルスチェックレスポンスのデータ例をヘルスチェックレスポンステーブルに示す。   In step S703, the transmission unit 302 transmits a health check request to the virtual servers 104 and 105. In step S704, the receiving unit 501 of the Web server 401 running on the virtual servers 104 and 105 receives the health check request from the load balancer 102 and executes a health check process. The detailed flow of the health check process will be described with reference to FIG. In step S705, the receiving unit 301 of the load balancer 102 receives a health check response from the virtual servers 104 and 105. A data example of a health check response received by the receiving unit 301 is shown in a health check response table.

HTTPステータスコードカラムは、ヘルスチェックリクエストに対する仮想サーバ104、105からのレスポンスの意味を表すHTTPステータスコードを格納するカラムである。本実施例においては、ヘルスチェックリクエストを実行して、仮想サーバの稼働確認に成功した場合には、HTTPステータスコードの値を200として返すものとする。また、仮想サーバの稼働確認に失敗した場合には、HTTPステータスコードの値を503として返すものとする。レスポンスボディカラムは、ヘルスチェックリクエストに対する仮想サーバ104、105からのレスポンスの詳細な内容の値を格納するカラムである。詳細は後述するが、仮想サーバ104、105は夫々に配備された全てのアプリケーションが正常に稼働していることを確認し、1つでも正常に稼働していないアプリケーションがあればその時点でヘルスチェックエラーレスポンスをロードバランサ102へ返す。即ち、1つでも正常に稼働していないアプリケーションがあれば仮想サーバとしては機能できないサーバであることをロードバランサ102へ伝えるのである。これにより、クライアントからのリクエストが、サーバの不正稼働によって処理できない状況を回避できる。 The HTTP status code column is a column that stores an HTTP status code representing the meaning of the response from the virtual servers 104 and 105 to the health check request. In the present embodiment, when the health check request is executed and the operation check of the virtual server succeeds, the value of the HTTP status code is returned as 200. If the operation check of the virtual server fails, the value of the HTTP status code is returned as 503. The response body column is a column that stores the value of the detailed content of the response from the virtual servers 104 and 105 to the health check request. Although details will be described later, the virtual servers 104 and 105 confirm that all the deployed applications are operating normally, and if any of the applications is not operating normally, a health check is performed at that time. An error response is returned to the load balancer 102. That is, if there is even one application that does not operate normally, the server is notified to the load balancer 102 that the server cannot function as a virtual server. As a result, it is possible to avoid a situation where a request from a client cannot be processed due to improper operation of the server.

ステップS706において、ロードバランサ102のヘルスチェック実行部305は、ステップS705で受信したヘルスチェックレスポンスレコードの内容を確認する。HTTPステータスコードカラムの値が「200」であった場合にはヘルスチェックに成功したものと判断し、サーバ情報テーブルの前回確認日時カラムの値に現在時刻を格納する。加えてヘルスチェック設定情報テーブルの正常閾値カラムに格納された値の回数分連続してヘルスチェックに成功した場合、ヘルスチェック実行部305は、サーバ情報テーブルの稼働状況カラムの値を「正常」に変更する。また、HTTPステータスコードカラムの値が「200」以外であった場合には、ヘルスチェックに失敗したものと判断し、サーバ情報テーブルの前回確認日時カラムの値に現在時刻を格納する。ヘルスチェック設定情報テーブルの非正常閾値カラムに格納された値の回数分連続してヘルスチェックに失敗した場合には、ヘルスチェック実行部305は、サーバ情報テーブルの稼働状況カラムの値を「非正常」に変更する。   In step S706, the health check execution unit 305 of the load balancer 102 checks the contents of the health check response record received in step S705. If the value of the HTTP status code column is “200”, it is determined that the health check has succeeded, and the current time is stored in the value of the previous confirmation date and time column of the server information table. In addition, if the health check succeeds the same number of times as the value stored in the normal threshold column of the health check setting information table, the health check execution unit 305 sets the value of the operation status column of the server information table to “normal”. change. If the value of the HTTP status code column is other than “200”, it is determined that the health check has failed, and the current time is stored in the value of the previous confirmation date and time column of the server information table. If the health check fails consecutively for the number of times stored in the abnormal threshold column of the health check setting information table, the health check execution unit 305 changes the value of the operation status column of the server information table to “abnormal”. To "."

ステップS707において、ロードバランサ102の制御部300は、ステップS706の結果、サーバ情報テーブルの稼働状況カラムの値を「非正常」となった仮想サーバの有無を確認する。「非正常」となった仮想サーバが存在する場合にはステップS708に進む。「非正常」となった仮想サーバが存在しない場合にはステップS701に進む。   In step S707, the control unit 300 of the load balancer 102 checks whether or not there is a virtual server in which the value of the operation status column of the server information table has become “abnormal” as a result of step S706. If there is a virtual server that has become “abnormal”, the process proceeds to step S708. If there is no “normal” virtual server, the process proceeds to step S701.

ステップS708において、ロードバランサ102の制御部300は、ステップS707で認識した仮想サーバをロードバランサ102の監視対象から外し、該当する仮想サーバを破棄する処理を行う。具体的には仮想サーバのデータを削除し、仮想サーバを構成するリソースを解放するとともにサーバ情報テーブルから該当のレコードを削除する。ステップS709において、ロードバランサ102の制御部300は、新たに仮想サーバを作成して監視対象に登録する。具体的には仮想サーバのデータを新規作成するとともにサーバ情報テーブルに該当のレコードを登録する。   In step S708, the control unit 300 of the load balancer 102 removes the virtual server recognized in step S707 from the monitoring targets of the load balancer 102, and performs a process of discarding the corresponding virtual server. Specifically, the data of the virtual server is deleted, the resources constituting the virtual server are released, and the corresponding record is deleted from the server information table. In step S709, the control unit 300 of the load balancer 102 creates a new virtual server and registers it as a monitoring target. Specifically, the data of the virtual server is newly created, and the corresponding record is registered in the server information table.

図8は、ステップS704において、Webサーバ401が実施するヘルスチェック処理の詳細を示したフローチャートである。ステップS801において、Webサーバ401の受信部501は、ロードバランサ102の送信部302からリクエストを受信する。ステップS802において、受信部501は、受信したリクエストがヘルスチェックリクエストかどうかを確認する。具体的にはリクエストレコードのHTTPメソッドカラムの値が「GET」、リクエスト送信元URLカラムの値がロードバランサ102のURL、リクエスト送信先URLカラムの値がヘルスチェック設定情報のヘルスチェックURLカラムの値と一致していた場合、受信部501は、受信したリクエストがヘルスチェックリクエストと判断し、ステップS803へ進む。ヘルスチェックリクエストと異なる通常のリクエストの場合は、受信部501は、アプリケーション403,404への通常のリクエストと判断し、ステップS815に進む。ステップS803において、受信部501は、ヘルスチェックリクエスト実行部503にヘルスチェックリクエストを渡す。   FIG. 8 is a flowchart showing details of the health check process performed by the Web server 401 in step S704. In step S801, the receiving unit 501 of the Web server 401 receives a request from the transmitting unit 302 of the load balancer 102. In step S802, the receiving unit 501 checks whether the received request is a health check request. Specifically, the value of the HTTP method column of the request record is “GET”, the value of the request source URL column is the URL of the load balancer 102, and the value of the request destination URL column is the value of the health check URL column of the health check setting information. If they match, the receiving unit 501 determines that the received request is a health check request, and proceeds to step S803. If the request is a normal request different from the health check request, the receiving unit 501 determines that the request is a normal request to the applications 403 and 404, and proceeds to step S815. In step S803, the receiving unit 501 passes a health check request to the health check request execution unit 503.

ステップS804において、ヘルスチェックスクリプト実行部503は、ヘルスチェックルール管理部504が管理するヘルスチェックルールテーブルからヘルスチェックルールレコードを一件取得する。ステップS805において、ヘルスチェックスクリプト実行部503は、未実行のヘルスチェックレコードの取得に成功したかどうかを確認する。未実行のヘルスチェックレコードを取得に成功した場合にはステップS806に進む。ヘルスチェックルールテーブルにヘルスチェックレコードが存在していない場合、あるいは全てのヘルスチェックレコードを取得してヘルスチェック処理を全て実行した場合にはステップS814に進む。ステップS806において、ヘルスチェックスクリプト実行部503は、ヘルスチェックスクリプト管理部505からヘルスチェックスクリプトを取得する。ステップS807において、ヘルスチェックスクリプト実行部503は、ステップS804で取得したヘルスチェックルールレコードの各カラムの値に基づき、リクエストを作成して、送信部502を介してアプリケーションサーバ402に送信する。例えば本実施例においては、表5に基づきアプリケーション403のURL「/app1/Product」にHTTPメソッド「POST」のリクエストと、アプリケーション404のURL「/app2/User」にHTTPメソッド「PUT」のリクエストを送信する。   In step S804, the health check script execution unit 503 acquires one health check rule record from the health check rule table managed by the health check rule management unit 504. In step S805, the health check script execution unit 503 checks whether acquisition of an unexecuted health check record has succeeded. If an unexecuted health check record has been successfully acquired, the process advances to step S806. If there is no health check record in the health check rule table, or if all the health check records have been acquired and all the health check processing has been performed, the process proceeds to step S814. In step S806, the health check script execution unit 503 acquires a health check script from the health check script management unit 505. In step S807, the health check script execution unit 503 creates a request based on the value of each column of the health check rule record acquired in step S804, and transmits the request to the application server 402 via the transmission unit 502. For example, in the present embodiment, based on Table 5, a request for the HTTP method “POST” is sent to the URL “/ app1 / Product” of the application 403, and a request for the HTTP method “PUT” is sent to the URL “/ app2 / User” of the application 404. Send.

ステップS808において、アプリケーションサーバ402の受信部601は、Webサーバ401の送信部502からリクエストを受信する。ステップS809において、アプリケーション実行部603は、ステップS808において受信したリクエストのHTTPリクエストカラムの値を参照する。そして、アプリケーションサーバ402で稼働するアプリケーション403、404のうち該当するアプリケーションを選択する。そして、アプリケーション実行部603は該当するアプリケーションにHTTPリクエストを転送して、アプリケーションを実行する。例えば本実施例においては、アプリケーション403にはHTTPメソッド「POST」で「ProductName」の値が「複合機TypeA」、「Name」の値が「MFPA001」のリクエストボディのリクエストがアプリケーション実行部603から転送されてくる。表8のリクエストフォーマットカラムに定義されたデータフォーマットルールに従って、アプリケーション403はリクエストボディの値のフォーマットチェックをまず行う。「ProductName」の値に全角文字が含まれているため、アプリケーション403は受信したリクエストを不正なリクエストと判断し、HTTPレスポンスコード「400」を発行する。   In step S808, the receiving unit 601 of the application server 402 receives the request from the transmitting unit 502 of the Web server 401. In step S809, the application execution unit 603 refers to the value of the HTTP request column of the request received in step S808. Then, a corresponding application is selected from the applications 403 and 404 running on the application server 402. Then, the application execution unit 603 transfers the HTTP request to the corresponding application and executes the application. For example, in the present embodiment, the request of the request body with the value of “ProductName” of “Multifunction machine TypeA” and the value of “Name” of “MFPA001” is transferred from the application execution unit 603 to the application 403 by the HTTP method “POST” Will be. In accordance with the data format rules defined in the request format column of Table 8, the application 403 first checks the format of the value of the request body. Since the value of “ProductName” includes double-byte characters, the application 403 determines that the received request is an invalid request and issues an HTTP response code “400”.

また、本実施例においては、アプリケーション404にはHTTPメソッド「PUT」で「UserID」の値が「99999」、「Name」の値が「HealthCheckUser」のリクエストボディのリクエストがアプリケーション実行部603から転送されてくる。表8のリクエストフォーマットカラムに定義されたデータフォーマットルールに従って、アプリケーション404はリクエストボディの値のフォーマットチェックをまず行う。フォーマットチェック正常なリクエストとアプリケーション404が判断すると、アプリケーション404は「UserID」の値に該当するユーザ情報が存在するかどうかを確認する。この時、仮に「UserID」の値が「99999」のユーザ情報が存在しない場合には、データ未検出を意味するHTTPレスポンスコード「404」を発行する。   In the present embodiment, a request of a request body having a value of “99999” and a value of “HealthCheckUser” of “Name” in the HTTP method “PUT” is transferred from the application execution unit 603 to the application 404. Come. According to the data format rules defined in the request format column of Table 8, the application 404 first checks the format of the value of the request body. When the application 404 determines that the request is a normal format check, the application 404 checks whether there is user information corresponding to the value of “UserID”. At this time, if there is no user information whose “UserID” value is “99999”, an HTTP response code “404” indicating that data has not been detected is issued.

ステップS810において、アプリケーション実行部603はステップS810の実行結果からヘルスチェックレスポンスを作成して、送信部602を介してWebサーバ401の受信部501に送信する。ステップS811において、ヘルスチェックスクリプト実行部503は、ステップS810で受信したヘルスチェックレスポンスのHTTPステータスコードカラムの値を取得する。ステップS812において、ヘルスチェックスクリプト実行部503はステップS811で取得したHTTPステータスコードカラムの値とステップS805で取得したヘルスチェックレコードのヘルスチェック成功判定応答コードの値とを比較する。値が一致していた場合には、ステップS804に進み、再びヘルスチェックレコードに基づくヘルスチェック処理を継続する。   In step S810, the application execution unit 603 creates a health check response from the execution result of step S810, and transmits the health check response to the reception unit 501 of the Web server 401 via the transmission unit 602. In step S811, the health check script execution unit 503 acquires the value of the HTTP status code column of the health check response received in step S810. In step S812, the health check script execution unit 503 compares the value of the HTTP status code column acquired in step S811 with the value of the health check success determination response code of the health check record acquired in step S805. If the values match, the process proceeds to step S804, and the health check processing based on the health check record is continued again.

ヘルスチェックスクリプト実行部503において、繰り返し実行されるヘルスチェック処理の結果として、一回でもステップS811で取得したHTTPステータスコードカラムの値とステップS805で取得したヘルスチェックレコードのヘルスチェック成功判定応答コードの値が一致しなかった場合には、ステップS813に進む。例えば本実施例においては、ステップS809においてアプリケーション403とアプリケーション404からそれぞれHHTPステータスコード「400」と「404」のレスポンスを受信することになり、ヘルスチェックレコードのヘルスチェック成功判定応答コードの値が一致する。そのため、アプリケーションサーバ402は正常に稼働していると判断され、ステップS814に進む。仮に、いずれかのアプリケーションの実行時に、アプリケーションサーバが稼働していなかった場合、HTTPステータスコード「500」が返却されてヘルスチェックレコードのヘルスチェック成功判定応答コードの値が一致しなくなる。その結果、ステップS813に進むことになる。本実施例では、全てのアプリケーションからのHTTPステータスコードが返されずとも、1つでもアプリケーションが正常に稼働していないと判断した時点でロードバランサ102にヘルスチェックエラーの旨を送信することを想定している。しかし、全てのアプリケーションからのHTTPステータスコードが返された時点で、ヘルスチェックエラーの旨を送信する形態であっても良い。   In the health check script execution unit 503, as a result of the health check process repeatedly executed, the value of the HTTP status code column acquired in step S811 and the health check success determination response code of the health check record acquired in step S805 at least once. If the values do not match, the process proceeds to step S813. For example, in the present embodiment, in step S809, responses of the HTTP status codes “400” and “404” are received from the application 403 and the application 404, respectively, and the values of the health check success determination response codes in the health check records match. I do. Therefore, it is determined that the application server 402 is operating normally, and the process proceeds to step S814. If the application server is not running when any application is executed, the HTTP status code "500" is returned, and the value of the health check success determination response code in the health check record does not match. As a result, the process proceeds to step S813. In the present embodiment, it is assumed that even if no HTTP status code is returned from all applications, a health check error is transmitted to the load balancer 102 when it is determined that at least one application is not operating normally. are doing. However, the configuration may be such that a health check error is transmitted when the HTTP status code is returned from all applications.

ステップS813、818において、ヘルスチェックスクリプト実行部503は、ヘルスチェックの失敗を示すヘルスチェックエラーレスポンスを作成して、送信部502を介してロードバランサ102にレスポンスを送信する。ステップS814、818において、ヘルスチェックスクリプト実行部503は、ヘルスチェックルールテーブルに登録された全てのヘルスチェックルールに基づくヘルスチェック処理に成功したと判定する。そして、ヘルスチェック成功レスポンスを作成して、送信部502を介してロードバランサ102にレスポンスを送信する。ステップS815において、アプリケーションサーバ402の受信部601は、Webサーバ401の送信部502からリクエストを受信する。ステップS816、817、818において、アプリケーション実行部603は、ステップS801において受信したリクエストに応じたアプリケーションアプリケーションを実行して、その結果からレスポンスを作成し、ロードバランサ102に送信する。   In steps S813 and S818, the health check script execution unit 503 creates a health check error response indicating a failure of the health check, and transmits the response to the load balancer 102 via the transmission unit 502. In steps S814 and 818, the health check script execution unit 503 determines that the health check process based on all the health check rules registered in the health check rule table has succeeded. Then, a health check success response is created, and the response is transmitted to the load balancer 102 via the transmission unit 502. In step S815, the receiving unit 601 of the application server 402 receives the request from the transmitting unit 502 of the Web server 401. In steps S816, 817, and 818, the application execution unit 603 executes the application corresponding to the request received in step S801, creates a response from the result, and transmits the response to the load balancer 102.

以上、図7および図8に示したフローチャートによって、サーバ上で動作するアプリケーションの稼働状況を加味したうえでサーバの稼働状況を把握することができる。また、ヘルスチェックルールテーブルに登録するレコードに従ってアプリケーションの稼働状況を把握することで、アプリケーションに新たにヘルスチェック用の機能をつくることなく、既存の機能を流用してヘルスチェックを行うことが可能になる。
[実施例2]
実施例1の構成では、ヘルスチェックを達成することが目的であるとはいえ、ヘルスチェックスクリプトが意図的にエラーレスポンスを発生させるリクエストを定期的にアプリケーションに送信することになる。そのため、実際にユーザクライアントからのリクエストに対してエラーレスポンスをアプリケーションが送信した場合と、ヘルスチェック目的でエラーレスポンスをアプリケーションが送信した場合の判別が困難となってしまう。具体的にはアプリケーションが出力するログファイルに記録されるエラーログが大量になり、ユーザクライアントからのリクエストによって生じたエラーの原因究明が困難となることが考えられる。本実施例においては、ヘルスチェックスクリプトからのリクエストによって生じたエラーと、実際のユーザクライアントからのリクエストによって生じたエラーとが判別しやすいようにログの出力を抑制する方法を、図9を用いて示す。その他、本実施例で説明しない箇所については実施例1と同様である。
As described above, according to the flowcharts shown in FIGS. 7 and 8, the operating status of the server can be grasped in consideration of the operating status of the application operating on the server. In addition, by grasping the operation status of the application according to the records registered in the health check rule table, it is possible to divert the health check using the existing function without creating a new health check function in the application Become.
[Example 2]
In the configuration of the first embodiment, although the purpose is to achieve a health check, the health check script intentionally sends a request for intentionally generating an error response to the application. Therefore, it is difficult to determine whether the application actually transmits an error response to a request from the user client or when the application transmits an error response for the purpose of health check. Specifically, an error log recorded in a log file output by an application becomes large, and it may be difficult to determine the cause of an error caused by a request from a user client. In this embodiment, a method of suppressing log output so that an error generated by a request from a health check script and an error generated by a request from an actual user client can be easily distinguished is described with reference to FIG. Show. Other parts that are not described in this embodiment are the same as those in the first embodiment.

図9は、アプリケーションサーバ402の受信部601が受信したリクエストに基づき、対応するアプリケーションを実行する際のログ出力処理の詳細を示したフローチャートである。本フローチャートに示す処理は、実施例1に記載の図8におけるステップS808からステップS810、およびステップS815からステップS817に置き換わる処理となる。   FIG. 9 is a flowchart showing details of the log output process when executing the corresponding application based on the request received by the receiving unit 601 of the application server 402. The process shown in this flowchart is a process that replaces steps S808 to S810 and steps S815 to S817 in FIG. 8 described in the first embodiment.

ステップS901において、アプリケーションサーバ402の受信部601は、Webサーバ401の送信部502からリクエストを受信する。ステップS902において、受信部601はリクエストのHTTPリクエストカラムから送信元のURL情報を取得する。このとき、リクエストの送信元がWebサーバ401のヘルスチェックスクリプト実行部503である場合には、Webサーバ401とアプリケーションサーバ402は同一のサーバ上で稼働している。そのためHTTPリクエストカラムには「localhost」の値が格納されていることになる。また、リクエストの送信元が任意のクライアント装置101であった場合には、「localhost」以外の値が格納されていることになる。   In step S901, the receiving unit 601 of the application server 402 receives a request from the transmitting unit 502 of the Web server 401. In step S902, the receiving unit 601 acquires the URL information of the transmission source from the HTTP request column of the request. At this time, when the request transmission source is the health check script execution unit 503 of the Web server 401, the Web server 401 and the application server 402 are operating on the same server. Therefore, the value of “localhost” is stored in the HTTP request column. If the request transmission source is an arbitrary client device 101, a value other than “localhost” is stored.

ステップS903において、アプリケーション実行部603は、ステップS901で受信したリクエストに該当するアプリケーションにHTTPリクエストを転送して、アプリケーションを実行する。ステップS904において、アプリケーション実行部603は、受信したリクエストが自らのサーバ103から送信されたリクエストであるかどうかを確認する。具体的にはステップS902で取得したURLの値を確認し、「localhost」となっていた場合には、自らのサーバ103から送信されたヘルスチェックリクエストと判断し、ステップS906に進む。「localhost」以外の値であった場合にはクライアント装置101から送信されたリクエストと判断し、ステップS905に進む。   In step S903, the application execution unit 603 transfers the HTTP request to the application corresponding to the request received in step S901, and executes the application. In step S904, the application execution unit 603 checks whether the received request is a request transmitted from its own server 103. Specifically, the value of the URL acquired in step S902 is confirmed, and if it is “localhost”, it is determined that the request is a health check request transmitted from the server 103, and the process proceeds to step S906. If the value is other than “localhost”, it is determined that the request is transmitted from the client device 101, and the process proceeds to step S905.

ステップS905において、アプリケーション実行部603は、アプリケーションの実行の際生じたログデータをサーバの二次記憶装置206に保存する。   In step S905, the application execution unit 603 stores the log data generated during the execution of the application in the secondary storage device 206 of the server.

ステップS906において、アプリケーション実行部603はステップS903の実行結果からレスポンスを作成する。ステップS907において、アプリケーション実行部603は送信部602を介してWebサーバ401の受信部501にレスポンスを送信する。以上、図9に示したフローチャートによって、ヘルスチェックリクエストにより生じたアプリケーションの実行ログ情報を除外し、クライアント装置101からのリクエストにより生じたアプリケーションの実行ログ情報のみを残すことが可能となる。
[その他の実施例]
本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施例の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
In step S906, the application execution unit 603 creates a response from the execution result of step S903. In step S907, the application execution unit 603 transmits a response to the reception unit 501 of the Web server 401 via the transmission unit 602. As described above, according to the flowchart illustrated in FIG. 9, it is possible to exclude the execution log information of the application generated by the health check request and leave only the execution log information of the application generated by the request from the client device 101.
[Other Examples]
The present invention is also realized by executing the following processing. That is, software (program) for realizing the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program and reads the program. This is the process to be performed.

100 ネットワーク
101 クライアント装置
102 ロードバランサ
103 物理サーバ
104、105 仮想サーバ
DESCRIPTION OF SYMBOLS 100 Network 101 Client device 102 Load balancer 103 Physical server 104, 105 Virtual server

Claims (13)

クライアントのリクエストを分散して送信するロードバランサと通信可能であり、複数の仮想サーバを備えたサーバシステムであって、
前記リクエストの送信対象とすることが可能な仮想サーバであるか否かを確認するため、前記ロードバランサから各仮想サーバに対し送信されるヘルスチェックを受信する受信手段と、
前記受信手段によりヘルスチェックを受信したことに応じて、前記ヘルスチェックを受信した仮想サーバ内に配備される複数のWebアプリケーションに対し、予め決められた任意のリクエストを送信する送信手段と、
前記送信手段により送信された任意のリクエストに対するレスポンスを各Webアプリケーションから受信し、受信した全てのレスポンスが正常にWebアプリケーションが稼働していることを示すレスポンスであることを確認したことに応じて、前記ロードバランサにヘルスチェック成功の旨を送信する制御手段と、を有するサーバシステム。
A server system that can communicate with a load balancer that transmits client requests in a distributed manner and includes a plurality of virtual servers,
Receiving means for receiving a health check transmitted from the load balancer to each virtual server to confirm whether or not the virtual server can be the transmission target of the request,
A transmitting unit that transmits a predetermined request to a plurality of Web applications deployed in the virtual server that has received the health check in response to receiving the health check by the receiving unit;
In response to receiving a response to the arbitrary request transmitted by the transmission unit from each Web application and confirming that all the received responses are responses indicating that the Web application is operating normally, A control unit for transmitting to the load balancer a message indicating that the health check has succeeded.
前記制御手段は、受信するレスポンスの内の少なくとも1つのレスポンスが正常にWebアプリケーションが稼働していないことを示すレスポンスである場合は、前記ロードバランサにヘルスチェックエラーの旨を送信することを特徴とする請求項1に記載のサーバシステム。   When at least one of the received responses is a response indicating that the Web application is not operating normally, the control unit transmits a health check error to the load balancer. The server system according to claim 1, wherein: 前記制御手段は、前記複数のWebアプリケーションの内の1のWebアプリケーションから受信したレスポンスが正常にWebアプリケーションが稼働していないことを示すレスポンスであることを確認したことに応じて、残りのWebアプリケーションからのレスポンスの受信を待つことなく、前記ロードバランサにヘルスチェックエラーの旨を送信することを特徴とする請求項1または2に記載のサーバシステム。   The control unit confirms that a response received from one of the plurality of Web applications is a response indicating that the Web application is not operating normally, and responds to the remaining Web applications. 3. The server system according to claim 1, wherein a health check error is transmitted to the load balancer without waiting for reception of a response from the server. 正常にWebアプリケーションが稼働していることを示す前記レスポンスとは、正常応答を示すレスポンスコードおよび不正なリクエストに対する応答を示すレスポンスコードを含み、Webアプリケーションに異常が発生していることを示すレスポンスコードは含まないことを特徴とする請求項1乃至3の何れか1項に記載のサーバシステム。   The response indicating that the Web application is operating normally includes a response code indicating a normal response and a response code indicating a response to an invalid request, and a response code indicating that an abnormality has occurred in the Web application. The server system according to claim 1, wherein the server system does not include the server. ヘルスチェックを受信した前記仮想サーバが複数のWebアプリケーションに対し送信する任意のリクエストを、前記仮想サーバ内のWebアプリケーション毎に定義したヘルスチェックルールを保存する保存手段を更に有し、
前記送信手段は、前記保存手段により保存されたヘルスチェックルールを確認し、Webアプリケーションに対応した任意のリクエストを確認し、予め決められた任意のリクエストを送信することを特徴とする請求項1乃至4の何れか1項に記載のサーバシステム。
The virtual server that has received the health check further includes a storage unit that stores any request to be transmitted to a plurality of Web applications, a health check rule defined for each Web application in the virtual server,
4. The apparatus according to claim 1, wherein the transmission unit checks a health check rule stored by the storage unit, checks an arbitrary request corresponding to a Web application, and transmits a predetermined request. 5. The server system according to any one of 4.
前記送信手段は、ヘルスチェックに関連する前記任意のリクエストの他に、前記ロードバランサから受信した前記クライアントのリクエストを送信することが可能であり、
前記Webアプリケーションは、前記クライアントのリクエストを受信した場合には、前記クライアントのリクエストの処理に伴いログデータを出力し、ヘルスチェックに関連する前記任意のリクエストを受信した場合、前記任意のリクエストの処理を行いログデータを出力しないことを特徴とする請求項1乃至5の何れか1項に記載のサーバシステム。
The transmission unit, in addition to the arbitrary request related to the health check, it is possible to transmit the client request received from the load balancer,
When the Web application receives the client request, the Web application outputs log data in accordance with the processing of the client request. When the Web application receives the arbitrary request related to the health check, the Web application processes the arbitrary request. The server system according to any one of claims 1 to 5, wherein the server system does not output log data.
クライアントのリクエストを分散して送信するロードバランサと通信可能であり、複数の仮想サーバを備えたサーバシステムを制御する方法であって、
受信手段は、前記リクエストの送信対象とすることが可能な仮想サーバであるか否かを確認するため、前記ロードバランサから各仮想サーバに対し送信されるヘルスチェックを受信し、
送信手段は、前記受信手段によりヘルスチェックを受信したことに応じて、前記ヘルスチェックを受信した仮想サーバ内に配備される複数のWebアプリケーションに対し、予め決められた任意のリクエストを送信し、
制御手段は、前記送信手段により送信された任意のリクエストに対するレスポンスを各Webアプリケーションから受信し、受信した全てのレスポンスが正常にWebアプリケーションが稼働していることを示すレスポンスであることを確認したことに応じて、前記ロードバランサにヘルスチェック成功の旨を送信することを特徴とする方法。
A method for controlling a server system including a plurality of virtual servers, which is capable of communicating with a load balancer that transmits client requests in a distributed manner,
Receiving means receives a health check transmitted from the load balancer to each virtual server to confirm whether the virtual server can be a transmission target of the request,
The transmitting unit transmits a predetermined request to a plurality of Web applications deployed in the virtual server that has received the health check, in response to receiving the health check by the receiving unit,
The control unit receives a response to the arbitrary request transmitted by the transmission unit from each Web application, and confirms that all the received responses are responses indicating that the Web application is operating normally. Transmitting a health check success to the load balancer in response to the request.
前記制御手段は、受信するレスポンスの内の少なくとも1つのレスポンスが正常にWebアプリケーションが稼働していないことを示すレスポンスである場合は、前記ロードバランサにヘルスチェックエラーの旨を送信することを特徴とする請求項7に記載の方法。   When at least one of the received responses is a response indicating that the Web application is not operating normally, the control unit transmits a health check error to the load balancer. The method of claim 7, wherein 前記制御手段は、前記複数のWebアプリケーションの内の1のWebアプリケーションから受信したレスポンスが正常にWebアプリケーションが稼働していないことを示すレスポンスであることを確認したことに応じて、残りのWebアプリケーションからのレスポンスの受信を待つことなく、前記ロードバランサにヘルスチェックエラーの旨を送信することを特徴とする請求項7または8に記載の方法。   The control unit confirms that a response received from one of the plurality of Web applications is a response indicating that the Web application is not operating normally, and responds to the remaining Web applications. The method according to claim 7, wherein a notification of a health check error is transmitted to the load balancer without waiting for reception of a response from the load balancer. 正常にWebアプリケーションが稼働していることを示す前記レスポンスとは、正常応答を示すレスポンスコードおよび不正なリクエストに対する応答を示すレスポンスコードを含み、Webアプリケーションに異常が発生していることを示すレスポンスコードは含まないことを特徴とする請求項7乃至9の何れか1項に記載の方法。   The response indicating that the Web application is operating normally includes a response code indicating a normal response and a response code indicating a response to an invalid request, and a response code indicating that an abnormality has occurred in the Web application. 10. The method according to any one of claims 7 to 9, wherein is not included. 保存手段は、ヘルスチェックを受信した前記仮想サーバが複数のWebアプリケーションに対し送信する任意のリクエストを、前記仮想サーバ内のWebアプリケーション毎に定義したヘルスチェックルールを保存し、
前記送信手段は、前記保存手段により保存されたヘルスチェックルールを確認し、Webアプリケーションに対応した任意のリクエストを確認し、予め決められた任意のリクエストを送信することを特徴とする請求項7乃至10の何れか1項に記載の方法。
The storage unit stores an arbitrary request transmitted by the virtual server to the plurality of Web applications that has received the health check, as a health check rule defined for each Web application in the virtual server,
The said transmission means confirms the health check rule saved by the said storage means, confirms any request corresponding to a Web application, and transmits a predetermined arbitrary request. The method according to any one of claims 10 to 13.
前記送信手段は、ヘルスチェックに関連する前記任意のリクエストの他に、前記ロードバランサから受信した前記クライアントのリクエストを送信することが可能であり、
前記Webアプリケーションは、前記クライアントのリクエストを受信した場合には、前記クライアントのリクエストの処理に伴いログデータを出力し、ヘルスチェックに関連する前記任意のリクエストを受信した場合、前記任意のリクエストの処理を行いログデータを出力しないことを特徴とする請求項7乃至11の何れか1項に記載の方法。
The transmission unit, in addition to the arbitrary request related to the health check, it is possible to transmit the client request received from the load balancer,
When the Web application receives the client request, the Web application outputs log data in accordance with the processing of the client request. When the Web application receives the arbitrary request related to the health check, the Web application processes the arbitrary request. 12. The method according to claim 7, wherein the log data is not output.
クライアントのリクエストを分散して送信するロードバランサと通信可能であり、複数の仮想サーバを備えたサーバシステムを制御するプログラムであって、
前記リクエストの送信対象とすることが可能な仮想サーバであるか否かを確認するため、前記ロードバランサから各仮想サーバに対し送信されるヘルスチェックを受信する受信ステップと、
前記受信ステップにおいてヘルスチェックを受信したことに応じて、前記ヘルスチェックを受信した仮想サーバ内に配備される複数のWebアプリケーションに対し、予め決められた任意のリクエストを送信する送信ステップと、
前記送信ステップにおいて送信された任意のリクエストに対するレスポンスを各Webアプリケーションから受信し、受信した全てのレスポンスが正常にWebアプリケーションが稼働していることを示すレスポンスであることを確認したことに応じて、前記ロードバランサにヘルスチェック成功の旨を送信する制御ステップと、を含むプログラム。
A program that can communicate with a load balancer that distributes and sends client requests and controls a server system including a plurality of virtual servers,
A receiving step of receiving a health check transmitted from the load balancer to each virtual server to check whether or not the virtual server can be the transmission target of the request;
Transmitting a predetermined request to a plurality of Web applications deployed in the virtual server that has received the health check in response to receiving the health check in the receiving step;
In response to receiving a response to the arbitrary request transmitted in the transmitting step from each Web application and confirming that all the received responses are responses indicating that the Web application is operating normally, A control step of transmitting a success of health check to the load balancer.
JP2016007428A 2016-01-18 2016-01-18 Server system, method and program for controlling server system. Active JP6639245B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2016007428A JP6639245B2 (en) 2016-01-18 2016-01-18 Server system, method and program for controlling server system.
US15/406,449 US11005927B2 (en) 2016-01-18 2017-01-13 Server system, method for controlling server system, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016007428A JP6639245B2 (en) 2016-01-18 2016-01-18 Server system, method and program for controlling server system.

Publications (2)

Publication Number Publication Date
JP2017129935A JP2017129935A (en) 2017-07-27
JP6639245B2 true JP6639245B2 (en) 2020-02-05

Family

ID=59315320

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016007428A Active JP6639245B2 (en) 2016-01-18 2016-01-18 Server system, method and program for controlling server system.

Country Status (2)

Country Link
US (1) US11005927B2 (en)
JP (1) JP6639245B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108200125A (en) * 2017-12-15 2018-06-22 浪潮软件集团有限公司 Cloud message service platform and installation method, device and system thereof
US11032358B2 (en) * 2018-01-31 2021-06-08 Hewlett-Packard Development Company, L.P. Monitoring web applications including microservices
WO2019171704A1 (en) * 2018-03-06 2019-09-12 日本電気株式会社 Management server, cluster system, cluster system control method, and non-transitory computer-readable medium for storing program
JP7006408B2 (en) * 2018-03-16 2022-01-24 富士通株式会社 Usage fee determination program, usage fee determination method, and information processing equipment
CN110427429B (en) * 2019-08-06 2023-03-14 上海浦东发展银行股份有限公司信用卡中心 Transaction load balancing implementation method based on fabric-sdk-java
CN112311896B (en) * 2020-11-16 2023-03-24 杭州迪普科技股份有限公司 Health examination method, device, equipment and computer readable storage medium
CN114938377A (en) * 2022-04-20 2022-08-23 京东科技信息技术有限公司 Back-end server management method and device, readable medium and electronic equipment

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7945909B2 (en) * 2003-05-09 2011-05-17 Sap Aktiengesellschaft Initiating recovery of an executing task using historical information and task information
US8776050B2 (en) * 2003-08-20 2014-07-08 Oracle International Corporation Distributed virtual machine monitor for managing multiple virtual resources across multiple physical nodes
US7720954B2 (en) * 2006-08-03 2010-05-18 Citrix Systems, Inc. Method and appliance for using a dynamic response time to determine responsiveness of network services
JP2008108163A (en) * 2006-10-27 2008-05-08 Hitachi Ltd Server device, request processing control method, and program thereof
JP2009157662A (en) * 2007-12-26 2009-07-16 Nec Corp Database management apparatus, database management method, and database management program
KR100974621B1 (en) * 2008-02-20 2010-08-06 부산대학교 산학협력단 Radio frequency identification business-aware framework
JP2010066801A (en) * 2008-09-08 2010-03-25 Nec Corp Log recording system, module monitoring means, trace log managing means, recording method, program, and storage medium
JP2011138202A (en) * 2009-12-25 2011-07-14 Fujitsu Ltd Server device, server load distribution device, server load distribution method, and program
US8635319B1 (en) * 2010-03-08 2014-01-21 Amazon Technologies, Inc. Operational status of network nodes
US8812586B1 (en) * 2011-02-15 2014-08-19 Google Inc. Correlating status information generated in a computer network
JP5380480B2 (en) 2011-03-03 2014-01-08 東芝テック株式会社 Application server and its monitoring program
US9733983B2 (en) * 2011-09-27 2017-08-15 Oracle International Corporation System and method for surge protection and rate acceleration in a traffic director environment
US9459898B2 (en) * 2011-10-06 2016-10-04 Hitachi, Ltd. Virtual server processing control method, system, and virtual server processing control management server
JP6099323B2 (en) * 2012-06-13 2017-03-22 株式会社富士通マーケティング Server control apparatus and server control program
US8762725B2 (en) * 2012-10-19 2014-06-24 Caterpillar Inc. Secure machine-to-machine communication protocol
US8539080B1 (en) * 2012-12-18 2013-09-17 Microsoft Corporation Application intelligent request management based on server health and client information
US20140324862A1 (en) * 2013-04-30 2014-10-30 Splunk Inc. Correlation for user-selected time ranges of values for performance metrics of components in an information-technology environment with log data from that information-technology environment
US9148440B2 (en) * 2013-11-25 2015-09-29 Imperva, Inc. Coordinated detection and differentiation of denial of service attacks
KR101706138B1 (en) * 2014-02-05 2017-02-13 애플 인크. Uniform communication protocols for communication between controllers and accessories
JP5778815B1 (en) * 2014-03-24 2015-09-16 株式会社野村総合研究所 Infrastructure operation management system and infrastructure operation management method
KR101453372B1 (en) * 2014-04-15 2014-10-22 주식회사 스마티랩 SYSTEM FOR MEDIATE HETEROGENEOUS DATA EXCHANGE OF IoT DEVICES IN INTERNET OF THINGS
KR101555315B1 (en) * 2014-06-24 2015-09-24 이화여자대학교 산학협력단 Method for propagating network management data for energy-efficient iot network management and energy-efficient iot node apparatus
US10511694B2 (en) * 2014-07-23 2019-12-17 Citrix Systems, Inc. Systems and methods for application specific load balancing

Also Published As

Publication number Publication date
US11005927B2 (en) 2021-05-11
JP2017129935A (en) 2017-07-27
US20170208122A1 (en) 2017-07-20

Similar Documents

Publication Publication Date Title
JP6639245B2 (en) Server system, method and program for controlling server system.
CN114787781B (en) System and method for enabling high availability managed failover services
CN105357038B (en) Monitor the method and system of cluster virtual machine
JP5624655B2 (en) Message to transfer backup manager in distributed server system
US8522231B2 (en) Updating a plurality of computers
CN108681777B (en) Method and device for running machine learning program based on distributed system
JP2015511421A (en) Remote network management system and operation method thereof
JP2002532777A (en) Timeout object for object-oriented real-time process control system and method of operation thereof
US9935867B2 (en) Diagnostic service for devices that employ a device agent
JP6525761B2 (en) Web server, management system, and control method thereof
US9317355B2 (en) Dynamically determining an external systems management application to report system errors
EP2942711B1 (en) Dynamic generation of proxy connections
US20160004584A1 (en) Method and computer system to allocate actual memory area from storage pool to virtual volume
WO2018031366A1 (en) Systems and methods for hosting web applications within remote management hardware and/or firmware
US9880855B2 (en) Start-up control program, device, and method
JP6394620B2 (en) Server management system, server, server management method, and service processor
JP6812732B2 (en) Information processing systems, information processing equipment and programs
JP6226769B2 (en) Cooperation system, management server, cooperation method, and cooperation program
JP6324304B2 (en) Client apparatus, communication system, data processing method, and program
JP4367141B2 (en) Instruction description content changing device and instruction description content changing program
JP5732755B2 (en) Distribution system, distribution apparatus, distribution method, and program
JP5262492B2 (en) Cluster system and command conflict control method
JP7005447B2 (en) Server equipment, methods and programs
JP6383338B2 (en) Server, data list creation method, and data list creation program
JP6465926B2 (en) Information processing apparatus, management system, control method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191015

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20191126

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191224

R151 Written notification of patent or utility model registration

Ref document number: 6639245

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151