JP5082111B2 - Computer system, service utilization apparatus, control method, and program - Google Patents

Computer system, service utilization apparatus, control method, and program Download PDF

Info

Publication number
JP5082111B2
JP5082111B2 JP2008021800A JP2008021800A JP5082111B2 JP 5082111 B2 JP5082111 B2 JP 5082111B2 JP 2008021800 A JP2008021800 A JP 2008021800A JP 2008021800 A JP2008021800 A JP 2008021800A JP 5082111 B2 JP5082111 B2 JP 5082111B2
Authority
JP
Japan
Prior art keywords
service
unit
connections
connection
load
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008021800A
Other languages
Japanese (ja)
Other versions
JP2009181481A (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.)
Techfirm Inc
Original Assignee
Techfirm 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 Techfirm Inc filed Critical Techfirm Inc
Priority to JP2008021800A priority Critical patent/JP5082111B2/en
Publication of JP2009181481A publication Critical patent/JP2009181481A/en
Application granted granted Critical
Publication of JP5082111B2 publication Critical patent/JP5082111B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、コンピュータシステム、サービス提供装置、サービス利用装置、制御方法、及びプログラムに関する。特に本発明は、サービスを提供及び利用するコンピュータシステム、サービスを提供するサービス提供装置、提供されるサービスを利用するサービス利用装置、コンピュータシステム、サービス提供装置、及びサービス利用装置を制御する制御方法、並びに当該コンピュータシステム、サービス提供装置、及びサービス利用装置用のプログラムに関する。   The present invention relates to a computer system, a service providing apparatus, a service using apparatus, a control method, and a program. In particular, the present invention relates to a computer system that provides and uses a service, a service providing device that provides a service, a service using device that uses a provided service, a computer system, a service providing device, and a control method for controlling the service using device, The present invention also relates to a program for the computer system, the service providing apparatus, and the service using apparatus.

クライアント端末に搭載されたアプリケーションとデータベースとを接続するコネクションを蓄積し、蓄積したコネクションの中から正常に動作するコネクションを取得してアプリケーションとデータベースとを接続するコネクション蓄積部を備えたデータ共有システムが知られている(例えば、特許文献1参照。)。このシステムでは、アプリケーションサーバは、コネクションプールに蓄積されたコネクションを利用して、データベースサーバにアクセスする。このとき、アプリケーションサーバは、正常に動作しないコネクションを破棄して新たにコネクションを生成する。
特開2003−216477号公報
A data sharing system that stores a connection that connects an application installed in a client terminal and a database, acquires a normally operating connection from the stored connections, and has a connection storage unit that connects the application and the database. It is known (for example, refer to Patent Document 1). In this system, the application server accesses the database server using connections stored in the connection pool. At this time, the application server discards the connection that does not operate normally and creates a new connection.
JP 2003-216477 A

特許文献1に記載のデータ共有システムによると、正常に動作しないコネクションを破棄して新たにコネクションを生成する。しかしながら、データベースサーバの負荷が高まった時に、蓄積しているコネクションを通じてアプリケーションサーバからさらに処理要求が送られてきた場合には、データベースサーバの負荷がその処理能力を超えてしまう虞がある。また、データベースサーバがアプリケーションサーバとコネクションを確立する処理はデータベースサーバにとって処理コストが高い処理であるので、データベースの負荷が高まっている状態でアプリケーションサーバがコネクションを新たに生成しようとすると、データベースサーバの負荷がさらに高まってしまう。   According to the data sharing system described in Patent Document 1, a connection that does not operate normally is discarded and a new connection is generated. However, when the processing load is further sent from the application server through the accumulated connection when the load on the database server increases, the load on the database server may exceed its processing capability. In addition, since the process of establishing a connection with the application server by the database server is a process with a high processing cost for the database server, if the application server tries to create a new connection while the load on the database is increasing, the database server The load is further increased.

上記課題を解決するために、本発明の第1の形態によると、コンピュータシステムであって、サービスを提供するサービス提供部と、サービス提供部が提供するサービスを利用するサービス利用部と、サービス利用部がサービス提供部と通信するための複数のコネクションを予め確立するコネクション確立部と、サービス提供部として動作するコンピュータの負荷値を検出する負荷検出部と、負荷検出部が検出した負荷値が増加した場合に、コネクション確立部によって確立されているコネクションのうち、サービス利用部が使用することができるコネクションの数を減少させるコネクション制御部とを備える。   In order to solve the above problem, according to a first aspect of the present invention, there is provided a computer system, a service providing unit that provides a service, a service using unit that uses a service provided by the service providing unit, and a service use A connection establishment unit that establishes in advance a plurality of connections for communication with the service providing unit, a load detection unit that detects a load value of a computer operating as the service providing unit, and a load value detected by the load detection unit increases A connection control unit that reduces the number of connections that can be used by the service utilization unit among the connections established by the connection establishment unit.

コネクション制御部は、負荷検出部が検出した負荷値が予め定められた接続数減少負荷値より大きくなった場合に、使用することができるコネクションの数を減少させてよい。また、負荷検出部が検出する負荷値は、コンピュータが有するリソースの使用量又はサービス提供部が外部に応答するのに要する時間長さの少なくとも一方を含んでよい。リソースの使用量は、コンピュータが有するCPUの使用率を含んでよい。   The connection control unit may reduce the number of connections that can be used when the load value detected by the load detection unit becomes greater than a predetermined connection number reduction load value. In addition, the load value detected by the load detection unit may include at least one of a resource usage amount of the computer or a time length required for the service providing unit to respond to the outside. The usage amount of the resource may include a usage rate of a CPU included in the computer.

コネクション制御部は、負荷検出部が検出した負荷値が予め定められた接続数減少負荷値より大きくなった場合に、コネクション確立部によって確立されているコネクションを切断することによって、使用することができるコネクションの数を減少させてよい。   The connection control unit can be used by disconnecting the connection established by the connection establishment unit when the load value detected by the load detection unit becomes larger than a predetermined connection number reduction load value. The number of connections may be reduced.

より大きい負荷値に対応づけて、より少ない使用することができるコネクションの数を格納するコネクション数格納部をさらに備え、コネクション制御部は、使用することができるコネクションの数を、負荷検出部が検出した負荷値に対応づけてコネクション数格納部が格納しているコネクションの数に制御してよい。   The connection control unit further includes a connection number storage unit that stores a smaller number of connections that can be used in association with a larger load value, and the load control unit detects the number of connections that can be used. The number of connections stored in the connection number storage unit may be controlled in association with the load value.

コネクション制御部は、使用することができるコネクション数を減少させた後に、負荷検出部が検出した負荷値が予め定められた接続数増加負荷値以下になった場合に、使用することができるコネクション数を増加させてよい。   After reducing the number of connections that can be used, the connection control unit can use the number of connections that can be used when the load value detected by the load detection unit falls below a predetermined connection number increase load value. May be increased.

サービス提供部は、データを格納して外部にデータを提供するデータベースサーバに設けられ、サービス利用部は、データベースサーバが提供するデータを利用してよい。サービス利用部は、データベースサーバが提供するデータを利用して外部にサービスを提供する、データベースサーバと異なるアプリケーションサーバに設けられてよい。   The service providing unit may be provided in a database server that stores data and provides the data to the outside, and the service using unit may use data provided by the database server. The service using unit may be provided in an application server different from the database server that provides services to the outside using data provided by the database server.

アプリケーションサーバは複数設けられ、負荷取得部及びコネクション制御部は複数のアプリケーションサーバのそれぞれに設けられ、複数のアプリケーションサーバのそれぞれに設けられたコネクション制御部は、負荷取得部が取得した負荷値が接続数減少負荷値より大きくなった場合に、複数のアプリケーションサーバのそれぞれに設けられたサービス利用部のそれぞれが使用することができるコネクションの数をそれぞれ減少させてよい。   A plurality of application servers are provided, a load acquisition unit and a connection control unit are provided in each of the plurality of application servers, and a connection control unit provided in each of the plurality of application servers is connected to the load value acquired by the load acquisition unit. When the load value is larger than the number reduction load value, the number of connections that can be used by each of the service using units provided in each of the plurality of application servers may be reduced.

本発明の第2の形態によると、サービスを提供するサービス提供部が提供するサービスを利用するサービス利用部を備えるコンピュータシステムを制御する制御方法であって、サービス利用部がサービス提供部と通信するための複数のコネクションを予め確立するコネクション確立段階と、サービス提供部として動作するコンピュータの負荷値を検出する負荷検出段階と、負荷検出段階において検出された負荷値が増加した場合に、コネクション確立段階において確立されたコネクションのうち、サービス利用部が使用することができるコネクションの数を減少させるコネクション制御段階とを備える。   According to a second aspect of the present invention, there is provided a control method for controlling a computer system including a service using unit that uses a service provided by a service providing unit that provides a service, wherein the service using unit communicates with the service providing unit. A connection establishment stage for establishing a plurality of connections in advance, a load detection stage for detecting a load value of a computer operating as a service providing unit, and a connection establishment stage when the load value detected in the load detection stage increases A connection control step for reducing the number of connections that can be used by the service using unit among the connections established in step (b).

本発明の第3の形態によると、コンピュータシステム用のプログラムであって、コンピュータシステムを、サービスを提供するサービス提供部、サービス提供部が提供するサービスを利用するサービス利用部、サービス利用部がサービス提供部と通信するための複数のコネクションを予め確立するコネクション確立部、サービス提供部として動作するコンピュータの負荷値を検出する負荷検出部、負荷検出部が検出した負荷値が増加した場合に、コネクション確立部によって確立されているコネクションのうち、サービス利用部が使用することができるコネクションの数を減少させるコネクション制御部として機能させる。   According to the third aspect of the present invention, there is provided a program for a computer system, the service providing unit providing the service, the service using unit using the service provided by the service providing unit, and the service using unit providing the service. A connection establishment unit that establishes a plurality of connections for communication with the providing unit in advance, a load detection unit that detects a load value of a computer that operates as a service providing unit, and a connection when the load value detected by the load detection unit increases Of the connections established by the establishment unit, the service utilization unit functions as a connection control unit that reduces the number of connections that can be used.

本発明の第4の形態によると、サービスを提供するサービス提供装置であって、サービス提供装置が提供するサービスを利用するサービス利用装置に予め設定された、サービス利用装置が利用可能な複数のコネクションを、サービス利用装置との間で予め確立するコネクション確立部と、サービス提供装置の負荷値を検出する負荷検出部と、負荷検出部が検出した負荷値が増加した場合に、コネクション確立部によって確立されているコネクションのうち、サービス利用装置が使用することができるコネクションの数を減少させるコネクション制御部とを備える。   According to the fourth aspect of the present invention, there are a plurality of connections that can be used by the service using device, which are preset in the service using device that provides the service and that uses the service provided by the service providing device. Are established by the connection establishment unit when the load value detected by the load detection unit increases, when the load value detected by the load detection unit increases. A connection control unit that reduces the number of connections that can be used by the service using device among the connections being used.

本発明の第5の形態によると、サービスを提供するサービス提供装置を制御する制御方法であって、サービス提供装置が提供するサービスを利用するサービス利用装置に予め設定された、サービス利用装置が利用可能な複数のコネクションを、サービス利用装置との間で予め確立するコネクション確立段階と、サービス提供装置の負荷値を検出する負荷検出段階と、負荷検出段階において検出された負荷値が増加した場合に、コネクション確立段階において確立されたコネクションのうち、サービス利用装置が使用することができるコネクションの数を減少させるコネクション制御段階とを備える。   According to the fifth aspect of the present invention, there is provided a control method for controlling a service providing apparatus that provides a service, wherein the service using apparatus preset in the service using apparatus that uses the service provided by the service providing apparatus is used. A connection establishment stage that establishes a plurality of possible connections with a service using apparatus in advance, a load detection stage that detects a load value of a service providing apparatus, and a load value detected in the load detection stage increases. A connection control stage for reducing the number of connections that can be used by the service using apparatus among the connections established in the connection establishment stage.

本発明の第6の形態によると、サービスを提供するサービス提供装置用のプログラムであって、サービス提供装置を、サービス提供装置が提供するサービスを利用するサービス利用装置に予め設定された、サービス利用装置が利用可能な複数のコネクションを、サービス利用装置との間で予め確立するコネクション確立部、サービス提供装置の負荷値を検出する負荷検出部、負荷検出部が検出した負荷値が増加した場合に、コネクション確立部によって確立されているコネクションのうち、サービス利用装置が使用することができるコネクションの数を減少させるコネクション制御部として機能させる。   According to the sixth aspect of the present invention, there is provided a program for a service providing apparatus that provides a service, wherein the service providing apparatus is preset in a service using apparatus that uses a service provided by the service providing apparatus. A connection establishment unit that establishes a plurality of connections that a device can use in advance with a service using device, a load detection unit that detects a load value of a service providing device, and a load value detected by the load detection unit increases The connection control unit functions as a connection control unit that reduces the number of connections that can be used by the service using apparatus among the connections established by the connection establishment unit.

本発明の第7の形態によると、サービス提供装置が提供するサービスを利用するサービス利用装置であって、サービス利用装置がサービス提供装置と通信するための複数のコネクションを予め確立するコネクション確立部と、サービス提供装置の負荷値を取得する負荷取得部と、負荷取得部が取得した負荷値が増加した場合に、コネクション確立部によって確立されているコネクションのうち、サービス利用装置が使用することができるコネクションの数を減少させるコネクション制御部とを備える。   According to a seventh aspect of the present invention, there is provided a service using device that uses a service provided by a service providing device, wherein the service using device establishes in advance a plurality of connections for communicating with the service providing device; A load acquisition unit that acquires a load value of a service providing device, and when the load value acquired by the load acquisition unit increases, the service using device can use the connection established by the connection establishment unit A connection control unit for reducing the number of connections.

本発明の第8の形態によると、サービス提供装置が提供するサービスを利用するサービス利用装置を制御する制御方法であって、サービス利用装置がサービス提供装置と通信するための複数のコネクションを予め確立するコネクション確立段階と、サービス提供装置の負荷値を取得する負荷取得段階と、負荷取得段階において取得された負荷値が増加した場合に、コネクション確立段階において確立されたコネクションのうち、サービス利用装置が使用することができるコネクションの数を減少させるコネクション制御段階とを備える。   According to an eighth aspect of the present invention, there is provided a control method for controlling a service using apparatus that uses a service provided by a service providing apparatus, wherein the service using apparatus establishes a plurality of connections for communicating with the service providing apparatus in advance. A connection establishment stage, a load acquisition stage for acquiring a load value of the service providing apparatus, and when the load value acquired in the load acquisition stage increases, the service using apparatus among the connections established in the connection establishment stage A connection control step for reducing the number of connections that can be used.

本発明の第9の形態によると、サービス提供装置が提供するサービスを利用するサービス利用装置用のプログラムであって、サービス利用装置を、サービス利用装置がサービス提供装置と通信するための複数のコネクションを予め確立するコネクション確立部、サービス提供装置の負荷値を取得する負荷取得部、負荷取得部が取得した負荷値が増加した場合に、コネクション確立部によって確立されているコネクションのうち、サービス利用装置が使用することができるコネクションの数を減少させるコネクション制御部として機能させる。   According to a ninth aspect of the present invention, there is provided a program for a service using device that uses a service provided by a service providing device, wherein the service using device communicates with the service providing device by a plurality of connections. A connection establishment unit that establishes in advance, a load acquisition unit that acquires a load value of a service providing device, and a service utilization device among the connections established by the connection establishment unit when the load value acquired by the load acquisition unit increases It functions as a connection control unit that reduces the number of connections that can be used.

なお、上記の発明の概要は、本発明の必要な特徴の全てを列挙したものではなく、これらの特徴群のサブコンビネーションもまた、発明となりうる。   The above summary of the invention does not enumerate all the necessary features of the present invention, and sub-combinations of these feature groups can also be the invention.

以上の説明から明らかなように、この発明によれば、サービス提供装置の負荷値に応じてサービス利用装置とサービス提供装置との間のコネクション数を適切に制御することができる。   As apparent from the above description, according to the present invention, the number of connections between the service using device and the service providing device can be appropriately controlled according to the load value of the service providing device.

以下、発明の実施の形態を通じて本発明を説明するが、以下の実施形態は特許請求の範囲にかかる発明を限定するものではなく、また実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。   Hereinafter, the present invention will be described through embodiments of the invention. However, the following embodiments do not limit the invention according to the scope of claims, and all combinations of features described in the embodiments are included. It is not necessarily essential for the solution of the invention.

図1は、一実施形態に係るコンピュータシステム100の利用環境の一例を示す。コンピュータシステム100は、複数のアプリケーションサーバ120a、b、c、・・・(以下、アプリケーションサーバ120と総称する。)、データベースサーバ110、複数のWEBサーバ130a、b、c・・・(以下、WEBサーバ130と総称する。)、ロードバランサ140、及び複数のクライアント端末160a、b、c、・・・(以下、クライアント端末160と総称する。)、及び通信回線150を備える。   FIG. 1 shows an example of a usage environment of a computer system 100 according to an embodiment. The computer system 100 includes a plurality of application servers 120a, b, c,... (Hereinafter collectively referred to as application servers 120), a database server 110, a plurality of WEB servers 130a, b, c,. (Referred to collectively as a server 130), a load balancer 140, a plurality of client terminals 160a, b, c,... (Hereinafter collectively referred to as a client terminal 160), and a communication line 150.

なお、通信回線150は、インターネット等のコンピュータネットワーク、通信事業者のコアネットワーク、及び種々のローカルネットワークを含む。クライアント端末160は、携帯電話機、PDA等の携帯情報端末、及びパーソナルコンピュータを含む。   Note that the communication line 150 includes a computer network such as the Internet, a core network of a communication carrier, and various local networks. The client terminal 160 includes a mobile phone, a personal digital assistant such as a PDA, and a personal computer.

クライアント端末160は、通信回線150を通じてWEBサーバ130のうちのいずれかにHTTPリクエスト等のリクエストを送信する。具体的には、クライアント端末160はロードバランサ140にリクエストを送信する。ロードバランサ140は、クライアント端末160からリクエストを受信すると、所定の負荷分散アルゴリズムに従って、リクエストを送信すべきWEBサーバ130を複数のWEBサーバ130の中から選択して、選択したWEBサーバ130にリクエストを送信する。WEBサーバ130は受信したリクエストに応じた処理を実行し、処理結果をロードバランサ140を通じてクライアント端末160に送信する。   The client terminal 160 transmits a request such as an HTTP request to any of the WEB servers 130 through the communication line 150. Specifically, the client terminal 160 transmits a request to the load balancer 140. When receiving a request from the client terminal 160, the load balancer 140 selects a WEB server 130 to which the request is to be transmitted from a plurality of WEB servers 130 according to a predetermined load distribution algorithm, and sends the request to the selected WEB server 130. Send. The WEB server 130 executes processing according to the received request, and transmits the processing result to the client terminal 160 through the load balancer 140.

WEBサーバ130は、受信したリクエストの内容に基づいて、アプリケーションサーバ120の少なくとも1つに処理を依頼する。アプリケーションサーバ120は、依頼された内容の処理を進めて、処理結果をWEBサーバ130に送信する。このとき、アプリケーションサーバ120は、依頼された処理を実行する場合に、必要に応じてデータベースサーバ110にアクセスする。具体的には、アプリケーションサーバ120は、データベースサーバ110からデータを読み出して、読み出したデータを加工してWEBサーバ130に送信したり、データベースサーバ110にデータを追加したり、データベースサーバ110が格納しているデータを更新したり、データベースサーバ110が格納しているデータを削除したりする。このように、データベースサーバ110は、データを格納して、格納しているデータを外部にデータを提供する。そして、アプリケーションサーバ120は、データベースサーバ110が提供するデータを利用して外部にサービスを提供する。   The WEB server 130 requests processing from at least one of the application servers 120 based on the content of the received request. The application server 120 advances the processing of the requested content and transmits the processing result to the WEB server 130. At this time, the application server 120 accesses the database server 110 as necessary when executing the requested processing. Specifically, the application server 120 reads data from the database server 110, processes the read data and transmits it to the WEB server 130, adds data to the database server 110, and stores the data in the database server 110. Update the stored data or delete the data stored in the database server 110. In this way, the database server 110 stores data and provides the stored data to the outside. The application server 120 uses the data provided by the database server 110 to provide a service to the outside.

なお、アプリケーションサーバ120のそれぞれは、起動時にデータベースサーバ110との間に予め定められた1以上のコネクションを確立しておく。そして、アプリケーションサーバ120は、データベースサーバ110にアクセスする場合には、予め確立されているコネクションを利用してデータベースサーバ110にアクセスする。アプリケーションサーバ120は、データベースサーバ110へのアクセスを終了した後も、コネクションを保持しており、後にデータベースサーバ110に接続する時に、保持しているコネクションを使用する。なお、アプリケーションサーバ120は、複数のコネクションを予め確立して保持するとともに、保持している複数のコネクションを使用してデータベースサーバ110に同時にアクセスすることができる。このように、アプリケーションサーバ120がコネクションを予め確立して、確立したコネクションをセッション終了後も保持しておくことによって、データベースサーバ110にとって処理コストが高いコネクション生成処理が頻繁に生じてしまうことを未然に防ぐことができる場合がある。   Each application server 120 establishes one or more predetermined connections with the database server 110 at the time of activation. Then, when accessing the database server 110, the application server 120 accesses the database server 110 using a connection established in advance. The application server 120 holds the connection even after the access to the database server 110 is finished, and uses the held connection when connecting to the database server 110 later. The application server 120 can establish and hold a plurality of connections in advance, and can simultaneously access the database server 110 using the plurality of held connections. As described above, the application server 120 establishes a connection in advance and holds the established connection even after the session ends, so that connection generation processing with high processing cost for the database server 110 frequently occurs. May be able to prevent.

なお、アプリケーションサーバ120は、データベースサーバ110が有する中央演算処理装置(CPU)の使用率(以下、CPU使用率という。)をデータベースサーバ110から取得する。そして、アプリケーションサーバ120は、CPU使用率が予め定められた値より大きくなると、アプリケーションサーバ120が使用することができるコネクションの数(以後、使用可能コネクション数という場合がある。)を減少させる。このとき、アプリケーションサーバ120は、データベースサーバ110との間のコネクションを保持したまま、CPU使用率に応じた所定数のコネクションを使用することを禁止してもよいし、所定数のコネクションを実際に切断してもよい。   The application server 120 acquires the usage rate (hereinafter referred to as CPU usage rate) of the central processing unit (CPU) included in the database server 110 from the database server 110. Then, when the CPU usage rate becomes larger than a predetermined value, the application server 120 reduces the number of connections that can be used by the application server 120 (hereinafter may be referred to as the number of usable connections). At this time, the application server 120 may prohibit the use of a predetermined number of connections according to the CPU usage rate while holding the connection with the database server 110, or may actually use the predetermined number of connections. It may be cut.

そして、アプリケーションサーバ120は、CPU使用率が予め定められた値より小さくなると、アプリケーションサーバ120の使用可能コネクション数を増加させる。このとき、アプリケーションサーバ120は、データベースサーバ110との間のコネクションを保持したまま使用を禁止していた所定数のコネクションのうちの少なくとも一部を使用することを許可してもよいし、コネクションを切断した場合にはデータベースサーバ110との間で所定数のコネクションを新たに確立してもよい。   Then, when the CPU usage rate becomes smaller than a predetermined value, the application server 120 increases the number of usable connections of the application server 120. At this time, the application server 120 may permit the use of at least a part of the predetermined number of connections that have been prohibited from being used while maintaining the connection with the database server 110, or When disconnected, a predetermined number of connections with the database server 110 may be newly established.

このように、アプリケーションサーバ120は、データベースサーバ110の負荷値に応じて、データベースサーバ110にアプリケーションサーバ120が同時にアクセスすることができるコネクションの数を制御するので、データベースサーバ110が過負荷に陥ってしまう確率を低減することができ、データベースサーバ110がサービスを継続的に提供することができる場合がある。   As described above, the application server 120 controls the number of connections that the application server 120 can access to the database server 110 at the same time according to the load value of the database server 110, so that the database server 110 is overloaded. In some cases, the database server 110 can continuously provide services.

なお、本実施形態では、説明が煩雑になることを防ぐことを目的として、コンピュータシステム100が一のデータベースサーバ110を備える構成について説明したが、コンピュータシステム100は複数のデータベースサーバ110を備えてよい。また、本実施形態のコンピュータシステム100は、上記のようにデータベースシステムとして機能することができる。   In the present embodiment, the configuration in which the computer system 100 includes one database server 110 has been described for the purpose of preventing the description from becoming complicated. However, the computer system 100 may include a plurality of database servers 110. . Further, the computer system 100 of the present embodiment can function as a database system as described above.

図2は、データベースサーバ110及びアプリケーションサーバ120のブロック構成の一例を示す。アプリケーションサーバ120aは、コネクション確立部200a、負荷取得部210a、コネクション制御部220a、コネクション数格納部230a、コネクション情報格納部240a、サービス利用部250a、及び通信制御部290aを有する。データベースサーバ110は、コネクション確立部200A、負荷検出部215A、コネクション制御部220A、コネクション数格納部230A、コネクション情報格納部240A、及び通信制御部290Aを有する。なお、データベースサーバ110はこの発明におけるサービス提供装置の一例であり、アプリケーションサーバ120はこの発明におけるサービス利用装置の一例であってよい。   FIG. 2 shows an example of a block configuration of the database server 110 and the application server 120. The application server 120a includes a connection establishment unit 200a, a load acquisition unit 210a, a connection control unit 220a, a connection number storage unit 230a, a connection information storage unit 240a, a service use unit 250a, and a communication control unit 290a. The database server 110 includes a connection establishment unit 200A, a load detection unit 215A, a connection control unit 220A, a connection number storage unit 230A, a connection information storage unit 240A, and a communication control unit 290A. The database server 110 may be an example of a service providing apparatus according to the present invention, and the application server 120 may be an example of a service using apparatus according to the present invention.

なお、アプリケーションサーバ120a以外のアプリケーションサーバ120b、c、・・・も、アプリケーションサーバ120aが有する構成要素と同じ構成要素を有する。以後の説明では、アプリケーションサーバ120が有する構成要素がいずれのアプリケーションサーバ120の構成要素であるかを区別する場合には、各構成要素を有するアプリケーションサーバ120と同じ添え字(a、b、c)を各構成要素の末尾に付して区別する。例えば、コネクション確立部200a、コネクション確立部200b、及びコネクション確立部200cは、それぞれアプリケーションサーバ120a、アプリケーションサーバ120b、及びアプリケーションサーバ120cの構成要素であることを示す。   Note that the application servers 120b, c,... Other than the application server 120a also have the same components as the components of the application server 120a. In the following description, when distinguishing which component of the application server 120 the component of the application server 120 is, the same subscript (a, b, c) as that of the application server 120 having each component Is added to the end of each component to distinguish them. For example, the connection establishment unit 200a, the connection establishment unit 200b, and the connection establishment unit 200c indicate that they are components of the application server 120a, the application server 120b, and the application server 120c, respectively.

また、以後の説明において、添え字が付されていない構成要素の機能及び動作は、同じ符号が付されたいずれの構成要素の機能及び動作を示す。例えば、コネクション確立部200で説明された機能及び動作は、コネクション確立部200a、コネクション確立部200b、コネクション確立部200c、・・・の機能及び動作を示す。また、データベースサーバ110及びアプリケーションサーバ120の構成要素のうち、同じ符号を付している同名の構成要素は同様の機能及び動作を示すので、添え字が付されていない構成要素の機能及び動作は、データベースサーバ110及びアプリケーションサーバ120が有する構成要素の機能及び動作を示す。したがって、例えばコネクション制御部220の機能及び動作は、コネクション制御部220A、コネクション制御部220a、コネクション制御部220b、コネクション制御部220cの機能及び動作を示す。   Further, in the following description, the function and operation of a component that is not given a subscript indicates the function and operation of any component that is assigned the same reference numeral. For example, the functions and operations described in connection establishment unit 200 indicate the functions and operations of connection establishment unit 200a, connection establishment unit 200b, connection establishment unit 200c,. In addition, among the components of the database server 110 and the application server 120, components having the same name and having the same reference numerals indicate similar functions and operations, and therefore, functions and operations of components without subscripts are 2 shows functions and operations of components included in the database server 110 and the application server 120. Therefore, for example, the functions and operations of the connection control unit 220 indicate the functions and operations of the connection control unit 220A, the connection control unit 220a, the connection control unit 220b, and the connection control unit 220c.

以下に、各構成要素の機能及び動作を説明する。サービス提供部255Aは、サービスを提供する。ここでいうサービスとは、本実施形態でサービスの一例として説明する、データベース機能によるデータ提供サービスだけでなく、Webサービス、電子メールサービス、ファイルサービス、及び印刷サービス等、種々のサービスを含む。本実施形態では、サービス提供部255Aは、ハードディスク、半導体メモリ等の記録媒体に記憶されたデータを外部に提供するデータベースとして機能する。なお、当該記録媒体は不揮発性であってもよいし、揮発性であってもよい。   The function and operation of each component will be described below. The service providing unit 255A provides a service. The service here includes not only a data providing service using a database function, which is described as an example of a service in this embodiment, but also various services such as a Web service, an e-mail service, a file service, and a printing service. In the present embodiment, the service providing unit 255A functions as a database that provides data stored in a recording medium such as a hard disk or a semiconductor memory to the outside. Note that the recording medium may be non-volatile or volatile.

サービス利用部250は、サービス提供部255Aが提供するサービスを利用する。具体的には、サービス利用部250は、データベースサーバ110が提供するデータを利用して種々の処理を行う。コネクション確立部200は、サービス利用部250がサービス提供部255Aと通信するための複数のコネクションを予め確立する。具体的には、コネクション確立部200Aは、アプリケーションサーバ120に予め設定された、アプリケーションサーバ120が利用可能な複数のコネクションを、アプリケーションサーバ120との間で予め確立する。例えば、コネクション確立部200Aは、コネクション確立部200aからのコネクション確立要求に応じて、コネクションを確立する。このようにして、コネクション確立部200aは、アプリケーションサーバ120がデータベースサーバ110と通信するための複数のコネクションを予め確立する。コネクション情報格納部240は、コネクション確立部200によって確立されたコネクションを使用するために使用されるコネクション情報を格納する。   The service using unit 250 uses a service provided by the service providing unit 255A. Specifically, the service using unit 250 performs various processes using data provided by the database server 110. The connection establishing unit 200 establishes in advance a plurality of connections for the service using unit 250 to communicate with the service providing unit 255A. Specifically, the connection establishment unit 200 </ b> A establishes in advance with the application server 120 a plurality of connections that can be used by the application server 120 that are set in advance in the application server 120. For example, the connection establishment unit 200A establishes a connection in response to a connection establishment request from the connection establishment unit 200a. In this way, the connection establishment unit 200a establishes in advance a plurality of connections for the application server 120 to communicate with the database server 110. The connection information storage unit 240 stores connection information used for using the connection established by the connection establishment unit 200.

負荷検出部215Aは、サービス提供部255Aとして動作するコンピュータの負荷値を検出する。具体的には、負荷検出部215Aは、データベースサーバ110の負荷値を検出する。負荷検出部215Aが検出する負荷値は、コンピュータが有するリソースの使用量又はサービス提供部255Aが外部に応答するのに要する時間長さの少なくとも一方を含む。なお、リソースの使用量は、コンピュータが有するCPUの使用率を含む。また、負荷取得部210は、負荷検出部215Aが検出した負荷値をデータベースサーバ110から取得する。このように、負荷取得部210は、データベースサーバ110の負荷値を取得する。   The load detection unit 215A detects the load value of the computer that operates as the service providing unit 255A. Specifically, the load detection unit 215A detects the load value of the database server 110. The load value detected by the load detection unit 215A includes at least one of the amount of resource used by the computer or the time required for the service providing unit 255A to respond to the outside. The resource usage includes the CPU usage rate of the computer. The load acquisition unit 210 acquires the load value detected by the load detection unit 215A from the database server 110. As described above, the load acquisition unit 210 acquires the load value of the database server 110.

コネクション制御部220は、負荷検出部215Aが検出した負荷値が増加した場合に、コネクション確立部200によって確立されているコネクションのうち、サービス利用部250が使用することができるコネクションの数を減少させる。具体的には、コネクション制御部220は、負荷取得部210が取得した負荷値が接続数減少負荷値より大きくなった場合に、使用することができるコネクションの数を減少させる。より具体的には、コネクション制御部220は、負荷検出部215Aが検出した負荷値が予め定められた接続数減少負荷値より大きくなった場合に、使用することができるコネクションの数を減少させる。なお、コネクション制御部220は、負荷検出部215Aが検出した負荷値が予め定められた接続数減少負荷値より大きくなった場合に、コネクション確立部200によって確立されているコネクションを切断することによって、使用することができるコネクションの数を減少させてよい。このように、コネクション制御部220は、負荷検出部215Aが検出した負荷値が増加した場合に、コネクション確立部200によって確立されているコネクションのうち、データベースサーバ110が使用することができるコネクションの数を減少させる。   The connection control unit 220 reduces the number of connections that can be used by the service using unit 250 among the connections established by the connection establishment unit 200 when the load value detected by the load detection unit 215A increases. . Specifically, the connection control unit 220 reduces the number of connections that can be used when the load value acquired by the load acquisition unit 210 is greater than the connection number reduction load value. More specifically, the connection control unit 220 reduces the number of connections that can be used when the load value detected by the load detection unit 215A is greater than a predetermined connection number reduction load value. Note that the connection control unit 220 disconnects the connection established by the connection establishment unit 200 when the load value detected by the load detection unit 215A is greater than a predetermined connection number reduction load value, The number of connections that can be used may be reduced. In this way, the connection control unit 220 determines the number of connections that can be used by the database server 110 among the connections established by the connection establishment unit 200 when the load value detected by the load detection unit 215A increases. Decrease.

より具体的には、コネクション数格納部230は、より大きい負荷値に対応づけて、より少ない使用することができるコネクションの数を格納する。そして、コネクション制御部220は、使用することができるコネクションの数を、負荷検出部215Aが検出した負荷値に対応づけてコネクション数格納部230が格納しているコネクションの数に制御する。なお、コネクション制御部220は、使用することができるコネクション数を減少させた後に、負荷検出部215Aが検出した負荷値が予め定められた接続数増加負荷値以下になった場合に、使用することができるコネクション数を増加させる。なお、接続数増加負荷値は、接続数減少負荷値以下の値であってよい。   More specifically, the connection number storage unit 230 stores a smaller number of connections that can be used in association with a larger load value. Then, the connection control unit 220 controls the number of connections that can be used to the number of connections stored in the connection number storage unit 230 in association with the load value detected by the load detection unit 215A. Note that the connection control unit 220 is used when the load value detected by the load detection unit 215A falls below a predetermined connection number increase load value after reducing the number of connections that can be used. Increase the number of connections that can be The connection number increasing load value may be a value equal to or less than the connection number decreasing load value.

なお、サービス利用部250は複数設けられてよい。具体的には、複数のアプリケーションサーバ120のそれぞれが、サービス利用部250を有してよい。そして、コネクション確立部200は、複数のサービス利用部250のそれぞれとサービス提供部255Aとの間で、複数のコネクションをそれぞれ確立する。そして、コネクション制御部220は、負荷検出部215Aが検出した負荷値が接続数減少負荷値より大きくなった場合に、複数のサービス利用部250のそれぞれが使用することができるコネクションの数をそれぞれ減少させる。   A plurality of service utilization units 250 may be provided. Specifically, each of the plurality of application servers 120 may include a service usage unit 250. Then, the connection establishing unit 200 establishes a plurality of connections between each of the plurality of service using units 250 and the service providing unit 255A. Then, the connection control unit 220 reduces the number of connections that each of the plurality of service using units 250 can use when the load value detected by the load detection unit 215A becomes larger than the connection number reduction load value. Let

なお、コネクション確立部200は、複数のサービス利用部250のそれぞれに対して設けられる。具体的には、複数のアプリケーションサーバ120のそれぞれがコネクション確立部200を有する。そして、複数のサービス利用部250のそれぞれに対して設けられたコネクション確立部200が、複数のサービス利用部250のそれぞれとサービス提供部255Aとの間で、複数のコネクションをそれぞれ確立する。また、コネクション制御部220は、複数のサービス利用部250のそれぞれに対して設けられる。具体的には、複数のアプリケーションサーバ120のそれぞれがコネクション制御部220を有する。そして、複数のサービス利用部250のそれぞれに対して設けられたコネクション制御部220が、負荷検出部215Aが検出した負荷値が接続数減少負荷値より大きくなった場合に、複数のサービス利用部250のそれぞれが使用することができるコネクションの数をそれぞれ減少させる。   The connection establishing unit 200 is provided for each of the plurality of service using units 250. Specifically, each of the plurality of application servers 120 has a connection establishment unit 200. Then, the connection establishment unit 200 provided for each of the plurality of service use units 250 establishes a plurality of connections between each of the plurality of service use units 250 and the service providing unit 255A. The connection control unit 220 is provided for each of the plurality of service using units 250. Specifically, each of the plurality of application servers 120 includes a connection control unit 220. Then, when the load value detected by the load detection unit 215A is greater than the connection number reduction load value, the connection control unit 220 provided for each of the plurality of service use units 250 has a plurality of service use units 250. Reduce the number of connections each can use.

コネクション使用数検出部280Aは、複数のサービス利用部250のそれぞれが使用することができるコネクションのうち、複数のサービス利用部250のそれぞれが現在使用しているコネクションの数を検出する。そして、コネクション制御部220Aは、負荷検出部215Aが検出した負荷値が接続数減少負荷値より大きくなった場合に、コネクション使用数検出部280Aが検出したコネクションの数及び複数のサービス利用部250のそれぞれが使用することができるコネクションの数に基づいて、サービス利用部250が使用することができるコネクションの数に対するサービス利用部250が使用しているコネクションの数の比が、複数のサービス利用部250の間で等しくなる方向に、複数のサービス利用部250の少なくとも1つが使用することができるコネクションの数を減少させる。   The connection usage number detecting unit 280A detects the number of connections currently used by each of the plurality of service using units 250 among the connections that can be used by each of the plurality of service using units 250. Then, when the load value detected by the load detection unit 215A is greater than the connection number decreasing load value, the connection control unit 220A determines the number of connections detected by the connection usage number detection unit 280A and the number of service usage units 250. Based on the number of connections that each can use, the ratio of the number of connections used by the service using unit 250 to the number of connections that can be used by the service using unit 250 is a plurality of service using units 250. The number of connections that can be used by at least one of the plurality of service using units 250 is reduced in the same direction.

また、コネクション制御部220Aは、使用することができるコネクション数を減少させた後に、負荷検出部215Aが検出した負荷値が予め定められた接続数増加負荷値より小さくなった場合に、コネクション使用数検出部280Aが検出したコネクションの数及び複数のサービス利用部250のそれぞれが使用することができるコネクションの数に基づいて、サービス利用部250が使用することができるコネクションの数に対するサービス利用部250が使用しているコネクションの数の比が、複数のサービス利用部250の間で等しくなる方向に、複数のサービス利用部250の少なくとも1つが使用することができるコネクションの数を増加させてよい。   In addition, the connection control unit 220A reduces the number of connections that can be used, and the connection usage number when the load value detected by the load detection unit 215A becomes smaller than a predetermined connection number increase load value. Based on the number of connections detected by the detecting unit 280A and the number of connections that each of the plurality of service using units 250 can use, the service using unit 250 for the number of connections that the service using unit 250 can use is used. The number of connections that can be used by at least one of the plurality of service using units 250 may be increased in a direction in which the ratio of the number of connections used is equal among the plurality of service using units 250.

なお、複数のアプリケーションサーバ120のそれぞれに設けられたコネクション制御部220は、負荷取得部210が取得した負荷値が接続数減少負荷値より大きくなった場合に、複数のアプリケーションサーバ120のそれぞれに設けられたサービス利用部250のそれぞれが使用することができるコネクションの数をそれぞれ減少させる。なお、コネクション制御部220Aは、負荷検出部215Aが検出した負荷値が予め定められた接続数減少負荷値より大きくなった場合に、使用することができるコネクションの数を減少させる命令を、アプリケーションサーバ120に送信してもよい。また、コネクション制御部220は、負荷検出部215Aが検出した負荷値が接続数減少負荷値より大きい予め定められた切断負荷値より大きくなった場合に、コネクション確立部200によって確立されているコネクションを切断することによって、使用することができるコネクションの数を減少させてよい。   Note that the connection control unit 220 provided in each of the plurality of application servers 120 is provided in each of the plurality of application servers 120 when the load value acquired by the load acquisition unit 210 is greater than the load number reduction load value. The number of connections that can be used by each of the service use units 250 is reduced. Note that the connection control unit 220A issues a command to reduce the number of connections that can be used when the load value detected by the load detection unit 215A is greater than a predetermined connection number reduction load value. 120 may be transmitted. In addition, the connection control unit 220 determines the connection established by the connection establishment unit 200 when the load value detected by the load detection unit 215A is greater than a predetermined disconnection load value that is greater than the connection number reduction load value. By disconnecting, the number of connections that can be used may be reduced.

図3は、WEBサーバ130、アプリケーションサーバ120、及びデータベースサーバ110の動作シーケンスの一例を示す。アプリケーションサーバ120が起動すると(S302)、負荷取得部210aは、負荷検出部215Aにデータベースサーバ110の負荷値を要求する(S304)。負荷検出部215Aは、データベースサーバ110の負荷値を検出して、負荷取得部210aに送信する(S306)。   FIG. 3 shows an example of an operation sequence of the WEB server 130, the application server 120, and the database server 110. When the application server 120 is activated (S302), the load acquisition unit 210a requests the load value of the database server 110 from the load detection unit 215A (S304). The load detection unit 215A detects the load value of the database server 110 and transmits it to the load acquisition unit 210a (S306).

コネクション確立部200aは、負荷取得部210aが取得した負荷値に応じて、コネクション数格納部230aが格納している情報に基づいて、使用可能コネクション数を設定する(S308)。そして、コネクション確立部200a及びコネクション確立部200Aはコネクションを確立する(S312a、S312b)。このとき、コネクション確立部200a及びコネクション確立部200Aは、アプリケーションサーバ120aに許容された予め定められた1以上の数(例えば、20個)のコネクションを生成する。なお、ここでコネクションを確立する数は、アプリケーションサーバ120毎に、設定値として予め定められてよい。   The connection establishment unit 200a sets the number of usable connections based on the information stored in the connection number storage unit 230a according to the load value acquired by the load acquisition unit 210a (S308). Then, the connection establishment unit 200a and the connection establishment unit 200A establish a connection (S312a, S312b). At this time, the connection establishment unit 200a and the connection establishment unit 200A generate one or more predetermined numbers (for example, 20) of connections permitted by the application server 120a. Note that the number of connections established here may be predetermined as a set value for each application server 120.

そして、サービス利用部250aは、WEBサーバ130から処理要求を受信する(S322)。サービス利用部250aは、受信した処理要求等に基づいて、プログラムによって定められた所定のロジックに従って処理を進める。このとき、サービス利用部250aは、データベースサーバ110に実行させるクエリを生成する(S324)。そして、サービス利用部250aは、既に確立しているコネクションの中から使用されていないコネクションを選択して(S326)、選択したコネクションを使用してクエリをデータベースサーバ110に送信する(S328)。   Then, the service using unit 250a receives a processing request from the WEB server 130 (S322). The service using unit 250a proceeds with processing according to a predetermined logic defined by the program based on the received processing request or the like. At this time, the service using unit 250a generates a query to be executed by the database server 110 (S324). Then, the service using unit 250a selects an unused connection from the established connections (S326), and transmits a query to the database server 110 using the selected connection (S328).

サービス提供部255Aは、受信したクエリを実行して(S330)、クエリを実行した実行結果をアプリケーションサーバ120に送信する(S322)。このとき、通信制御部290Aは、アプリケーションサーバ120との間で確立されているコネクションを使用して実行結果を送信する。そして、サービス利用部250aは、受信した実行結果を利用して処理結果を生成して(S334)、生成した処理結果をWEBサーバ130に送信する(S336)。また、負荷検出部215Aが切断負荷値を超える負荷値を検出すると(S342)、コネクション制御部220Aは負荷値に応じた数のコネクションを切断する(S344)。   The service providing unit 255A executes the received query (S330), and transmits the execution result of executing the query to the application server 120 (S322). At this time, the communication control unit 290A transmits the execution result using the connection established with the application server 120. Then, the service using unit 250a generates a processing result using the received execution result (S334), and transmits the generated processing result to the WEB server 130 (S336). When the load detection unit 215A detects a load value that exceeds the disconnection load value (S342), the connection control unit 220A disconnects the number of connections corresponding to the load value (S344).

なお、サービス利用部250aは、サービス提供部255Aとの間で一連のセッションが終了した場合でも、コネクションを切断せずに保持しておく。そして、サービス利用部250aは、後にサービス提供部255Aと通信する場合に、S326のように、保持しているコネクションの中から使用することができるコネクションを選択して使用する。   The service using unit 250a holds the connection without disconnecting the connection even when a series of sessions with the service providing unit 255A is completed. Then, when communicating with the service providing unit 255A later, the service using unit 250a selects and uses a connection that can be used from the held connections as in S326.

なお、本シーケンスでは、負荷値に応じて使用可能コネクション数を制御する制御方法の一例として、S304からS312までの処理のように、アプリケーションサーバ120aがデータベースサーバ110に負荷値を問い合わせて、問い合わせに応じて得られた負荷値に応じて使用可能コネクション数を制御する方法と、データベースサーバ110が自身の負荷値を検出して、検出した負荷値に応じて既に確立されているコネクションを切断する制御方法について説明した。   In this sequence, as an example of a control method for controlling the number of usable connections in accordance with the load value, the application server 120a inquires of the database server 110 about the load value, as in the processing from S304 to S312. A method of controlling the number of usable connections according to the obtained load value, and a control in which the database server 110 detects its own load value and disconnects the already established connection according to the detected load value The method was explained.

その他にも、負荷検出部215Aは定期的にデータベースサーバ110の負荷値を検出して、検出した負荷値を通信制御部290Aを通じて定期的にアプリケーションサーバ120aに送信してもよい。そして、負荷取得部210aは、通信制御部290aを通じて負荷値が通知されたことを検出すると、通知された負荷値に応じた使用可能コネクション数を設定してよい。なお、通信制御部290Aは、例えばブロードキャストの形で複数のアプリケーションサーバ120に略同時に負荷値を送信してよいし、アプリケーションサーバ120に順次負荷値を送信してもよい。   In addition, the load detection unit 215A may periodically detect the load value of the database server 110 and periodically transmit the detected load value to the application server 120a through the communication control unit 290A. Then, when detecting that the load value has been notified through the communication control unit 290a, the load acquisition unit 210a may set the number of usable connections according to the notified load value. Note that the communication control unit 290A may transmit the load value to the plurality of application servers 120 substantially simultaneously, for example, in the form of broadcast, or may sequentially transmit the load value to the application server 120.

その他にも、負荷取得部210aは、応答を要求する信号をデータベースサーバ110に送信して、当該信号を送信してからデータベースサーバ110から応答を受信するまでの時間長さに基づいてデータベースサーバ110の負荷値を特定することによって、データベースサーバ110の負荷値を取得してもよい。例えば負荷取得部210aは、当該時間長さが長いほどより大きい負荷値を特定してよい。なお、負荷取得部210aは、データベースサーバ110の負荷値を任意のタイミングで取得してよい。例えば、負荷取得部210aは、S322からS336のような、データベースサーバ110にアクセスしている期間に含まれるタイミングを含む任意のタイミングで、データベースサーバ110の負荷値を取得してよい。そして、コネクション制御部220aは、任意のタイミングで使用可能コネクション数を制御してよい。   In addition, the load acquisition unit 210a transmits a signal requesting a response to the database server 110, and the database server 110 is based on the time length from when the signal is transmitted until the response is received from the database server 110. The load value of the database server 110 may be acquired by specifying the load value. For example, the load acquisition unit 210a may specify a larger load value as the time length is longer. Note that the load acquisition unit 210a may acquire the load value of the database server 110 at an arbitrary timing. For example, the load acquisition unit 210a may acquire the load value of the database server 110 at any timing including the timing included in the period of accessing the database server 110, such as S322 to S336. Then, the connection control unit 220a may control the number of usable connections at an arbitrary timing.

図4は、コネクション数格納部230が格納しているデータの一例をテーブル形式で示す。コネクション数格納部230は、CPU使用率、メモリ使用率、データアクセス率、ネットワーク帯域使用率、及びコネクション使用可能率を対応づけて格納している。なお、CPU使用率、メモリ使用率、データアクセス率、ネットワーク帯域使用率は、この発明におけるコンピュータの負荷値の一例である。   FIG. 4 shows an example of data stored in the connection number storage unit 230 in a table format. The connection number storage unit 230 stores a CPU usage rate, a memory usage rate, a data access rate, a network bandwidth usage rate, and a connection availability rate in association with each other. The CPU usage rate, memory usage rate, data access rate, and network bandwidth usage rate are examples of the load value of the computer in the present invention.

CPU使用率は、CPUの負荷値を示し、CPUの実行時間の、総時間に対する比率であってよい。なお、CPUの実行時間は、CPUが実行する全命令を実行した時間であってよいし、データベース機能を提供する命令のみをCPUが実行した実行時間であってもよい。このように、CPUの実行時間は、データベース機能以外の機能を提供する命令をCPUが実行した実行時間を含まなくてもよい。   The CPU usage rate indicates a load value of the CPU, and may be a ratio of the CPU execution time to the total time. The execution time of the CPU may be the time when all the instructions executed by the CPU are executed, or may be the execution time when the CPU executes only the instructions that provide the database function. As described above, the execution time of the CPU may not include the execution time when the CPU executes a command that provides a function other than the database function.

メモリ使用率は、例えばCPUから直接アクセスすることができる主記憶装置(メインメモリ)の使用量であってよい。メモリ使用率は、主記憶装置の総容量に対する使用されている容量の比率であってよい。なお、主記憶装置は揮発性であってよいし、不揮発性であってもよい。   The memory usage rate may be, for example, a usage amount of a main storage device (main memory) that can be directly accessed from the CPU. The memory usage rate may be a ratio of the used capacity to the total capacity of the main storage device. Note that the main storage device may be volatile or non-volatile.

データアクセス率は、補助記憶装置(又は二次記憶装置)へのアクセス量であってよい。具体的には、データアクセス率は、データアクセス率であってよい。より具体的には、データアクセス率は、補助記憶装置から読み出された、或いは補助記憶装置に書き込まれた、単位時間当たりのデータ量を示す転送速度を指標とするものであってよい。例えば、データアクセス率は、最大転送速度に対する転送速度の比率であってよい。補助記憶装置は、例えばハードディスク等の磁気ディスク、半導体メモリ等であってよい。   The data access rate may be an access amount to the auxiliary storage device (or secondary storage device). Specifically, the data access rate may be a data access rate. More specifically, the data access rate may be based on a transfer rate indicating the amount of data per unit time read from or written to the auxiliary storage device. For example, the data access rate may be a ratio of the transfer rate to the maximum transfer rate. The auxiliary storage device may be, for example, a magnetic disk such as a hard disk, a semiconductor memory, or the like.

なお、データアクセス率は、特定のディスクボリュームに対するアクセス量であってよい。ここでいう特定のディスクボリュームとは、データベースとして格納されるデータ自身が格納されるファイルが記録されているディスクボリュームであってよいし、データベースとして動作するために使用されるファイル、例えばトランザクション情報を記録するファイル等が記録されているディスクボリュームであってよい。なお、ディスクボリュームは、パーティション及びスライスを含み、物理的ボリューム及び論理的ボリュームを含む。   The data access rate may be an access amount for a specific disk volume. The specific disk volume here may be a disk volume in which a file storing data stored as a database is recorded, or a file used for operating as a database, for example, transaction information. It may be a disk volume in which files to be recorded are recorded. A disk volume includes a partition and a slice, and includes a physical volume and a logical volume.

ネットワーク使用率は、ネットワークを通じて外部から受信した受信データ量又は単位時間当たりに送信した送信データ量、或いは受信データ量及び送信データ量の合計値を示す送受信データ量を指標値とするものであってよい。例えば、ネットワーク使用率とは、ネットワークデバイスが送受信することができる最大のデータ量に対する、受信データ量、送信データ量、又は送受信データ量の比率であってよい。   The network usage rate uses as an index value the amount of received data received from the outside through the network, the amount of transmitted data transmitted per unit time, or the amount of transmitted / received data indicating the total value of the received data amount and the transmitted data amount. Good. For example, the network usage rate may be a ratio of the received data amount, the transmitted data amount, or the transmitted / received data amount to the maximum data amount that can be transmitted / received by the network device.

コネクション使用可能率は、アプリケーションサーバ120が生成することができるコネクション数の最大値に対する、アプリケーションサーバ120の現在の使用可能コネクション数の比率であってよい。アプリケーションサーバ120が生成することができるコネクション数の最大値は、アプリケーションサーバ120毎に予め設定されていてよい。   The connection availability rate may be a ratio of the number of currently available connections of the application server 120 to the maximum value of the number of connections that can be generated by the application server 120. The maximum value of the number of connections that can be generated by the application server 120 may be set in advance for each application server 120.

なお、アプリケーションサーバ120の現在の使用可能コネクション数とは、必ずしも現在生成しているコネクションの数でなくてよい。例えば、アプリケーションサーバ120は、予め定められた数のコネクションを保持したまま、当該予め定められた数より小さい数のコネクションだけ同時に使用するよう制御してよい。例えば、アプリケーションサーバ120は、20個のコネクションを保持したまま、8個のコネクションだけ同時に使用することができるよう、コネクションの利用を制限してよい。この場合、コネクション使用可能率は40%となる。なお、アプリケーションサーバ120は、使用可能コネクション数を、コネクションを切断することによって制御することもできる。このようにコネクションを切断することによって使用可能コネクション数を制御する場合、生成することができるコネクション数の最大値に対する、現在生成しているコネクションの数の比率が、コネクション使用可能率となる。   Note that the current number of available connections of the application server 120 is not necessarily the number of connections currently generated. For example, the application server 120 may control to use only a smaller number of connections at the same time while holding a predetermined number of connections. For example, the application server 120 may limit the use of connections so that only 8 connections can be used simultaneously while holding 20 connections. In this case, the connection availability rate is 40%. Note that the application server 120 can also control the number of usable connections by disconnecting the connection. When the number of usable connections is controlled by disconnecting the connection in this way, the ratio of the number of connections currently generated to the maximum value of the number of connections that can be generated is the connection usable rate.

なお、この発明におけるリソース使用量は、本図に関連して説明したCPU使用率、メモリ使用率、データアクセス率、及びネットワーク帯域使用率以外にも、ハードディスク等の記録媒体にスワップしているメモリ量又は記録媒体から読み出したメモリ量を示すスワップ量等、様々なリソース使用量を含む。このように、コネクション数格納部230はリソース使用量に対応づけてコネクション使用可能率を格納している。なお、生成することができるコネクション数の最大値にコネクション使用可能率を乗じた値が、使用可能コネクション数であるので、コネクション制御部220は、負荷検出部215Aが検出したリソース使用量に対応づけてコネクション数格納部230が格納しているコネクション使用可能率に、アプリケーションサーバ120が生成することができるコネクション数の最大値を乗じた値に、アプリケーションサーバ120の使用可能コネクション数を制御することによって、リソース使用量に応じて使用可能コネクション数を動的に制御する。   Note that the resource usage in the present invention is the memory swapped to a recording medium such as a hard disk in addition to the CPU usage rate, memory usage rate, data access rate, and network bandwidth usage rate described with reference to FIG. It includes various resource usage such as the amount or swap amount indicating the amount of memory read from the recording medium. As described above, the connection number storage unit 230 stores the connection availability rate in association with the resource usage. Since the value obtained by multiplying the maximum number of connections that can be generated by the connection availability rate is the number of available connections, the connection control unit 220 associates the resource usage detected by the load detection unit 215A. By controlling the number of usable connections of the application server 120 by multiplying the connection usable rate stored in the connection number storage unit 230 by the maximum number of connections that can be generated by the application server 120 The number of usable connections is dynamically controlled according to the resource usage.

図5は、CPU使用率の時間発展及び使用可能コネクション数の時間発展510の一例を示す。データベースサーバ110のCPU使用率500は時刻t1までの間は30%以下であり、したがってコネクション使用可能率は100%である。したがって、アプリケーションサーバ120が20個のコネクションを確立することが許容されている場合には、コネクション制御部220はコネクション使用可能数を20個にする。   FIG. 5 shows an example of the time evolution 510 of the CPU usage rate and the time evolution 510 of the number of usable connections. The CPU usage rate 500 of the database server 110 is 30% or less until the time t1, and therefore the connection availability rate is 100%. Therefore, when the application server 120 is allowed to establish 20 connections, the connection control unit 220 sets the number of usable connections to 20.

時刻t1において、負荷検出部215Aが検出したCPU使用率が第1閾値30%を超えた場合には、データベースサーバ110は通信制御部290Aを通じてCPU使用率をアプリケーションサーバ120に送信する。負荷取得部210は、通信制御部290を通じてデータベースサーバ110のCPU使用率を取得して、コネクション制御部220に供給する。時刻t2まではCPU使用率が30%より大きく50%以下であることから、コネクション制御部220はコネクション数格納部230を参照して、コネクション使用可能率を40%にすべきことを判断する。そこでコネクション制御部220は、コネクション使用可能数を12個減少させて、8個にする。   When the CPU usage rate detected by the load detection unit 215A exceeds the first threshold 30% at time t1, the database server 110 transmits the CPU usage rate to the application server 120 through the communication control unit 290A. The load acquisition unit 210 acquires the CPU usage rate of the database server 110 through the communication control unit 290 and supplies the CPU usage rate to the connection control unit 220. Since the CPU usage rate is greater than 30% and 50% or less until time t2, the connection control unit 220 refers to the connection number storage unit 230 and determines that the connection availability rate should be 40%. Therefore, the connection control unit 220 reduces the usable number of connections by 12 to 8 pieces.

そして、時刻t2において負荷検出部215Aが検出したCPU使用率が第1閾値より大きい第2閾値50%を超えた場合には、データベースサーバ110は通信制御部290Aを通じてCPU使用率をアプリケーションサーバ120に送信する。負荷取得部210がデータベースサーバ110からのCPU使用率を取得すると、コネクション制御部220は、上記制御と同様にコネクション数格納部230が格納しているデータを参照して、コネクション使用可能数をさらに6個減少させて2個にする。   When the CPU usage rate detected by the load detection unit 215A at time t2 exceeds the second threshold value 50%, which is larger than the first threshold value, the database server 110 sends the CPU usage rate to the application server 120 through the communication control unit 290A. Send. When the load acquisition unit 210 acquires the CPU usage rate from the database server 110, the connection control unit 220 refers to the data stored in the connection number storage unit 230 in the same manner as in the above control, and further determines the connection usable number. Reduce 6 to 2

その後、CPU使用率が第2閾値より大きく第3閾値80%以下で推移して、時刻t3においてCPU使用率が第2閾値以下になったことを検出すると、データベースサーバ110は通信制御部290Aを通じてCPU使用率をアプリケーションサーバ120に送信する。負荷取得部210がCPU使用率を取得すると、コネクション制御部220は、上記制御と同様にコネクション数格納部230が格納しているデータを参照して、負荷取得部210が取得したCPU使用率に応じたコネクション使用可能数を算出する。具体的には、コネクション制御部220は、コネクション使用可能数を6個増加させて8個にする。時刻t4において、負荷検出部215Aが検出したCPU使用率が第1閾値以下になった場合には、データベースサーバ110はCPU使用率をアプリケーションサーバ120に送信する。そして、コネクション制御部220は、上記制御と同様にコネクション数格納部230が格納しているデータを参照して、負荷取得部210が取得したCPU使用率に応じたコネクション使用可能数として20個を算出して、使用可能コネクション数を20個に設定する。   After that, when the CPU usage rate is larger than the second threshold value and transitions below the third threshold value 80% and it is detected that the CPU usage rate becomes equal to or lower than the second threshold value at time t3, the database server 110 passes the communication control unit 290A. The CPU usage rate is transmitted to the application server 120. When the load acquisition unit 210 acquires the CPU usage rate, the connection control unit 220 refers to the data stored in the connection number storage unit 230 in the same manner as the above control, and sets the CPU usage rate acquired by the load acquisition unit 210. Calculate the number of available connections. Specifically, the connection control unit 220 increases the usable number of connections by six to eight. When the CPU usage rate detected by the load detection unit 215A becomes equal to or less than the first threshold at time t4, the database server 110 transmits the CPU usage rate to the application server 120. Then, the connection control unit 220 refers to the data stored in the connection number storage unit 230 in the same manner as in the above control, and sets 20 as the number of usable connections according to the CPU usage rate acquired by the load acquisition unit 210. Calculate and set the number of usable connections to 20.

なお、本図の例では、説明が複雑になることを防ぐことを目的として、負荷値の一例であるCPU使用率に応じた使用可能コネクション数の時間発展の一例を示したが、コネクション制御部220は、メモリ使用率、データアクセス率、及びネットワーク帯域使用率等、CPU使用率以外の負荷値に応じて使用可能コネクション数を制御してもよいことは言うまでもない。例えば、コネクション制御部220は、各リソース使用量に対応してコネクション数格納部230が格納しているコネクション使用可能率を、リソース使用量毎に予め定められた重みで重み付け平均した値を、コネクション使用可能率としてもよい。   In the example of this figure, for the purpose of preventing the description from becoming complicated, an example of the time evolution of the number of usable connections according to the CPU usage rate which is an example of the load value is shown. It goes without saying that 220 may control the number of usable connections in accordance with a load value other than the CPU usage rate, such as a memory usage rate, a data access rate, and a network bandwidth usage rate. For example, the connection control unit 220 calculates a connection average value obtained by weighting the connection availability rate stored in the connection number storage unit 230 corresponding to each resource usage amount with a predetermined weight for each resource usage amount. It may be a usable rate.

なお、上記の例で説明したように、データベースサーバ110は、コネクション数格納部230が格納している閾値を超えた負荷値を負荷検出部215Aが検出したことを条件として、データベースサーバ110の負荷値をアプリケーションサーバ120に送信してよい。なお、上記で説明したように、第1閾値、第2閾値、及び第3閾値は、この発明における接続数減少負荷値の一例である。また、第1閾値、第2閾値、及び第3閾値は、この発明における接続数増加負荷値としても機能する。また、第1閾値及び第2閾値がこの発明における接続数減少負荷値であり、第3閾値がこの発明における切断負荷値であってよい。   As described in the above example, the database server 110 loads the database server 110 on the condition that the load detection unit 215A detects a load value exceeding the threshold stored in the connection number storage unit 230. The value may be sent to the application server 120. As described above, the first threshold value, the second threshold value, and the third threshold value are examples of the connection number decreasing load value in the present invention. Further, the first threshold value, the second threshold value, and the third threshold value also function as the connection number increasing load value in the present invention. The first threshold value and the second threshold value may be the connection number decreasing load value in the present invention, and the third threshold value may be the disconnection load value in the present invention.

図6は、コネクション制御部220の制御による使用可能コネクション数の増減量の一例を示す。本図の制御方法は、他のアプリケーションサーバ120との間で、使用可能コネクション数(又はコネクション使用可能率)の増減量を調整する制御方法の一例である。この場合、データベースサーバ110が有するコネクション制御部220Aが、複数のアプリケーションサーバ120の使用可能コネクション数(又はコネクション使用可能率)を制御する。   FIG. 6 shows an example of the increase / decrease amount of the number of usable connections under the control of the connection control unit 220. The control method of this figure is an example of a control method for adjusting the amount of increase / decrease in the number of available connections (or connection availability rate) with other application servers 120. In this case, the connection control unit 220A included in the database server 110 controls the number of available connections (or connection availability rate) of the plurality of application servers 120.

図6に示すように、アプリケーションサーバ120a、b、及びcにおいて、使用可能コネクション数がそれぞれ8個、8個、及び4個であり、現在使用しているコネクション数がそれぞれ4個、5個、及び2個であるとする。ここで、現在使用しているコネクション数とは、現在において同時に使用されているコネクション数であってよいし、現在から予め定められた時間幅だけ前の時点から現在までの間において同時に使用されたコネクションの最大数であってよい。なお、コネクション使用数検出部280Aは、アプリケーションサーバ120との通信に使用されたコネクションを特定することによって、現在使用しているコネクションの数を算出することができる。   As shown in FIG. 6, in the application servers 120a, b, and c, the number of usable connections is 8, 8, and 4, respectively, and the number of currently used connections is 4, 5, And two. Here, the number of connections currently in use may be the number of connections that are currently used at the same time, or the number of connections that have been used at the same time from the previous time to the present by a predetermined time width from now. It may be the maximum number of connections. The connection usage number detection unit 280A can calculate the number of currently used connections by specifying the connection used for communication with the application server 120.

なお、図6には、使用可能コネクション数及び現在使用しているコネクション数が図6に図示した値である場合において、コネクション制御部220Aがコネクション数を全体として3個増加させる場合の、アプリケーションサーバ120のそれぞれの増加量の一例が示されている。コネクション数を増加させる場合には、コネクション制御部220Aは、アプリケーションサーバ120毎に、使用可能コネクションの数に対する現在使用しているコネクションの数の比(以下、コネクション使用比率とする。)を算出する。そして、コネクション制御部220Aは、複数のアプリケーションサーバ120の間でコネクション使用比率が等しくなる方向に、使用可能コネクション数を増加させる。図6の例では、コネクション制御部220Aは、アプリケーションサーバ120a及びbの使用可能コネクション数をそれぞれ1個及び2個増加させ、アプリケーションサーバ120cの使用可能コネクション数を変更しない。   FIG. 6 shows an application server when the connection control unit 220A increases the total number of connections by 3 when the number of usable connections and the number of currently used connections are the values shown in FIG. An example of each increase amount of 120 is shown. When increasing the number of connections, the connection control unit 220A calculates, for each application server 120, a ratio of the number of currently used connections to the number of available connections (hereinafter referred to as a connection usage ratio). . Then, the connection control unit 220A increases the number of usable connections in a direction in which the connection usage ratio becomes equal among the plurality of application servers 120. In the example of FIG. 6, the connection control unit 220A increases the number of usable connections of the application servers 120a and 120b by 1 and 2, respectively, and does not change the number of usable connections of the application server 120c.

一方、使用可能コネクション数を全体として3個減少させる場合には、使用可能コネクション数を増加させる場合と同様に、複数のアプリケーションサーバ120の間でコネクション使用比率が等しくなる方向に、使用可能コネクション数を減少させる。図6の例では、アプリケーションサーバ120a及びcの使用可能コネクション数をそれぞれ2個及び1個減少させ、アプリケーションサーバ120bの使用可能コネクション数を変更しない。このように、コネクション制御部220Aは、アプリケーションサーバ120の使用可能コネクション数の増減量を制御して、コネクション使用比率の差を複数のアプリケーションサーバ120の間で小さくする。   On the other hand, when the total number of usable connections is decreased by three, the number of usable connections in the direction in which the connection usage ratio becomes equal among the plurality of application servers 120, as in the case of increasing the number of usable connections. Decrease. In the example of FIG. 6, the number of usable connections of the application servers 120a and 120c is decreased by 2 and 1, respectively, and the number of usable connections of the application server 120b is not changed. In this way, the connection control unit 220A controls the increase / decrease amount of the number of usable connections of the application server 120 to reduce the difference in connection usage ratio among the plurality of application servers 120.

このように、コネクション制御部220Aは、複数のアプリケーションサーバ120の間でコネクション使用比率が等しくなるよう、複数のアプリケーションサーバ120のそれぞれの使用可能コネクション数を調整する。このような制御方法によると、アプリケーションサーバ120のコネクション使用比率が100%になる確率を低減することができ、WEBサーバ130の処理に遅延が生じたりタイムアウトが生じたりする確率を低減することができる場合がある。   In this way, the connection control unit 220A adjusts the number of usable connections of each of the plurality of application servers 120 so that the connection usage ratio is equal among the plurality of application servers 120. According to such a control method, it is possible to reduce the probability that the connection usage ratio of the application server 120 becomes 100%, and it is possible to reduce the probability that the processing of the WEB server 130 is delayed or a timeout occurs. There is a case.

なお、上記の例のようなコネクション使用比率に基づいて使用可能コネクション数を調整する方法の他にも、コネクション制御部220Aは、使用可能コクション数と現在使用しているコネクションの数との間の差がより小さいアプリケーションサーバ120の使用可能コクション数を、より多く増加させてもよい。   In addition to the method of adjusting the number of available connections based on the connection usage ratio as in the above example, the connection control unit 220A can determine whether the number of available connections and the number of currently used connections are between The number of usable commissions of the application server 120 having a smaller difference may be increased more.

また、コネクション制御部220Aが使用可能コネクション数を減少させる場合には、コネクション使用比率がより大きいアプリケーションサーバ120、又は使用可能コクション数と使用しているコネクションの数との間の差がより小さいアプリケーションサーバ120の使用可能コネクション数を、より優先して減少させてもよい。このような制御方法によると、アプリケーションサーバ120は、例えばコネクション使用比率が大きいほどコネクション数を増加されにくくなる。このため、複数のアプリケーションサーバ120の間でコネクション使用比率のバランスをとることができたり、データベースサーバ110の負荷値を効果的に減少させることができる場合がある。   Further, when the connection control unit 220A decreases the number of usable connections, the application server 120 having a larger connection usage ratio or an application having a smaller difference between the number of usable connections and the number of used connections. The number of usable connections of the server 120 may be reduced more preferentially. According to such a control method, for example, the application server 120 is less likely to increase the number of connections as the connection usage ratio increases. For this reason, it may be possible to balance the connection usage ratio among the plurality of application servers 120 or to effectively reduce the load value of the database server 110.

図7は、コネクション制御部220が記憶しているデータの一例を示す。コネクション制御部220は、使用可能コネクション数を減少又は増加させた時刻と、減少又は増加させた使用可能コネクション数とを対応づけてコネクション制御履歴情報として記憶する。そして、コネクション制御部220は、記憶しているコネクション制御履歴情報に基づいて、データベースサーバ110の負荷値を効果的に制御することができるよう、コネクション数格納部230が格納しているコネクション使用率を動的に更新する。   FIG. 7 shows an example of data stored in the connection control unit 220. The connection control unit 220 associates the time when the number of usable connections is decreased or increased with the number of usable connections that are decreased or increased, and stores them as connection control history information. The connection control unit 220 stores the connection usage rate stored in the connection number storage unit 230 so that the load value of the database server 110 can be effectively controlled based on the stored connection control history information. Update dynamically.

具体的には、図7に示すコネクション制御履歴情報は、第1時刻(10時30分15秒)に使用可能コネクション数を12個減少させ、その後の第2時刻(10時30分50秒)に使用可能コネクション数を12個増加させたことを示している。したがって、コネクション制御部220は、使用可能コネクション数を12個減少させることによってデータベースサーバ110の負荷値が低減されて、使用可能コネクション数を回復することができる負荷値(例えば、CPU使用率が30%以下)までデータベースサーバ110の負荷値が低下するのに35秒かかったことを特定することができる。このように、コネクション制御部220は、コネクション制御履歴情報に基づいて、データベースサーバ110の負荷値の制御速度の実績値を得ることができる。   Specifically, the connection control history information shown in FIG. 7 decreases the number of available connections by 12 at the first time (10:30:15), and then the second time (10:30:50). Indicates that the number of usable connections is increased by 12. Accordingly, the connection control unit 220 reduces the load value of the database server 110 by reducing the number of usable connections by 12, and can restore the number of usable connections (for example, the CPU usage rate is 30). %), It can be determined that it took 35 seconds for the load value of the database server 110 to decrease. As described above, the connection control unit 220 can obtain the actual value of the control speed of the load value of the database server 110 based on the connection control history information.

そこで、コネクション制御部220は、コネクション制御履歴が示す負荷値の制御速度に基づいて、データベースサーバ110の負荷値をより速く低減する必要があるか否かを判断する。コネクション制御部220は、負荷値をより速く低減する必要がある旨を判断した場合には、コネクション数格納部230により小さいコネクション使用可能率を格納させる。例えば、コネクション制御部220は、30%より大きく50%より小さいCPU使用率に対して、コネクション使用可能率を40%から30%に低下させる。   Therefore, the connection control unit 220 determines whether or not it is necessary to reduce the load value of the database server 110 faster based on the control speed of the load value indicated by the connection control history. When the connection control unit 220 determines that the load value needs to be reduced more quickly, the connection control unit 220 causes the connection number storage unit 230 to store a smaller connection availability rate. For example, the connection control unit 220 reduces the connection availability rate from 40% to 30% for a CPU usage rate that is greater than 30% and less than 50%.

このように、コネクション制御部220は、例えば使用可能コネクション数を減少させてから使用可能コネクション数を増加させるまでの時間が長いほど、より小さいコネクション使用率をコネクション数格納部230に格納させる。また、コネクション制御部220は、使用可能コネクション数を増加させてから使用可能コネクション数を減少させるまでの時間が短いほど、より小さいコネクション使用率をコネクション数格納部230に格納させる。   In this way, the connection control unit 220 stores a smaller connection usage rate in the connection number storage unit 230 as the time from the decrease in the number of usable connections to the increase in the number of usable connections is increased, for example. Also, the connection control unit 220 stores a smaller connection usage rate in the connection number storage unit 230 as the time from increasing the number of usable connections to decreasing the number of usable connections is shorter.

このように、コネクション制御部220は、負荷値の制御履歴に応じて、コネクション使用可能率を動的に調整する。これにより、使用可能コネクション数が必要以上に減らされてしまったり、使用可能コネクション数の減少量が負荷値の増加量に対して小さすぎたりしてしまうことを未然に防ぐことができる場合がある。また、アプリケーションサーバ120の数が増えると、アプリケーションサーバ120一台あたりの使用可能コネクション数の増減量が小さくてよくなる場合がある。上記のように制御履歴に応じてコネクション使用可能率を動的に調整することによって、コンピュータシステム100にアプリケーションサーバ120を追加しても、自動的に使用可能コネクション数が適切な値に調整される場合がある。   In this manner, the connection control unit 220 dynamically adjusts the connection availability rate according to the load value control history. This may prevent the number of usable connections from being reduced more than necessary or prevent the decrease in the number of usable connections from being too small relative to the increase in the load value. . Further, when the number of application servers 120 increases, the increase / decrease amount of the number of usable connections per application server 120 may be small. By dynamically adjusting the connection availability according to the control history as described above, the number of available connections is automatically adjusted to an appropriate value even when the application server 120 is added to the computer system 100. There is a case.

以上説明したように、アプリケーションサーバ120のそれぞれに設けられたコネクション制御部220が、アプリケーションサーバ120のそれぞれの使用可能コネクション数をそれぞれ制御するので、特定のアプリケーションサーバ120が保守等によりサービスを停止している場合であっても、データベースサーバ110はアプリケーションサーバ120の生死について関知することなく動作することができる場合がある。そして、アプリケーションサーバ120は、データベースサーバ110の負荷値に応じて使用可能コネクション数を自立的に調整することができる場合がある。また、アプリケーションサーバ120を新たに追加した場合であっても、アプリケーションサーバ120が追加されたことをデータベースサーバ110に通知することなく、データベースサーバ110の負荷値に応じて使用可能コネクション数が適切に調整される場合がある。   As described above, the connection control unit 220 provided in each of the application servers 120 controls the number of usable connections of each of the application servers 120, so that a specific application server 120 stops the service due to maintenance or the like. Even in such a case, the database server 110 may be able to operate without being aware of whether the application server 120 is alive or dead. The application server 120 may be able to autonomously adjust the number of usable connections according to the load value of the database server 110. Even when a new application server 120 is added, the number of usable connections is appropriately determined according to the load value of the database server 110 without notifying the database server 110 that the application server 120 has been added. May be adjusted.

なお、以上の説明においては、アプリケーションサーバ120がデータベースサーバ110に接続するコネクションを用いてこの発明の一実施形態を説明したが、この発明におけるコネクションは、上記コネクションの他に、多様な場面で確立される多様な種類のコネクションを含む。例えば、この発明におけるコネクションは、上記実施形態においてWEBサーバ130がアプリケーションサーバ120に接続するために確立するコネクションであってよい。例えば、この発明のコネクションは、WEBサーバ130上のプロセスとアプリケーションサーバ120上のプロセスとの間のコネクションであってよい。なお、ここでいうプロセスとは、いくつかのオペレーティングシステム(OS)でタスク等と呼ばれる処理単位であってよい。また、この発明におけるコネクションは、異なるプロセスの間のコネクションであってもよいし、同一のプロセス又は異なるプロセスにおけるスレッド間のコネクションであってもよい。   In the above description, the embodiment in which the application server 120 is connected to the database server 110 has been described. However, the connection in the present invention is established in various situations in addition to the above connection. Including various types of connections. For example, the connection in the present invention may be a connection established for the WEB server 130 to connect to the application server 120 in the above embodiment. For example, the connection of the present invention may be a connection between a process on the WEB server 130 and a process on the application server 120. The process referred to here may be a processing unit called a task or the like in some operating systems (OS). Further, the connection in the present invention may be a connection between different processes, or may be a connection between threads in the same process or different processes.

また、この発明におけるコネクションは、アプリケーション層のコネクションであってよい。また、この発明におけるコネクションは、TCPコネクションそのものであってよいし、TCPコネクションを含むより上位層のコネクションであってもよい。また、この発明におけるコネクションは、TCPプロトコル以外にも、種々のプロトコルで行われるコネクションを含む。   The connection in the present invention may be an application layer connection. In addition, the connection in the present invention may be a TCP connection itself or a higher layer connection including a TCP connection. In addition, the connection in the present invention includes connections made by various protocols in addition to the TCP protocol.

また、この発明におけるコネクションは、異なるコンピュータ上のプロセス間のコネクションであってよいし、同一のコンピュータ上のプロセス間のコネクションであってもよい。また、この発明におけるコネクションは、同一の仮想機械(バーチャルマシン)上のプロセス間のコネクションであってよいし、異なる仮想機械上のプロセス間のコネクションであってよい。例えば、この発明におけるコネクションは、第1仮想機械上で動作するプロセスと、当該第1仮想機械と異なる第2仮想機械上で動作するプロセスとの間のコネクションであってよい。仮想機械は、Java(登録商標)VM、仮想マシンモニタ等と呼ばれる種々の仮想オペレーティングシステム環境を含む。また、この発明におけるコネクションは、同じ装置上で動作する仮想機械上におけるプロセス間のコネクションであってよいし、異なる装置上でそれぞれ動作する仮想機械上のプロセス間のコネクションを含む。   The connection in the present invention may be a connection between processes on different computers, or may be a connection between processes on the same computer. The connection in the present invention may be a connection between processes on the same virtual machine (virtual machine) or a connection between processes on different virtual machines. For example, the connection in the present invention may be a connection between a process operating on a first virtual machine and a process operating on a second virtual machine different from the first virtual machine. The virtual machine includes various virtual operating system environments called Java (registered trademark) VM, virtual machine monitor, and the like. Further, the connection in the present invention may be a connection between processes on a virtual machine operating on the same apparatus, and includes a connection between processes on a virtual machine operating on a different apparatus.

図8は、データベースサーバ110及びアプリケーションサーバ120をコンピュータ等の電子情報処理装置でそれぞれ構成した場合のハードウェア構成の一例を示す。データベースサーバ110及びアプリケーションサーバ120は、CPU周辺部と、入出力部と、レガシー入出力部とを備える。CPU周辺部は、ホスト・コントローラ1582により相互に接続されるCPU1505、RAM1520、グラフィック・コントローラ1575、及び表示装置1580を有する。入出力部は、入出力コントローラ1584によりホスト・コントローラ1582に接続される通信インターフェイス1530、ハードディスクドライブ1540、及びCD−ROMドライブ1560を有する。レガシー入出力部は、入出力コントローラ1584に接続されるROM1510、フレキシブルディスク・ドライブ1550、及び入出力チップ1570を有する。   FIG. 8 shows an example of a hardware configuration when the database server 110 and the application server 120 are each configured by an electronic information processing apparatus such as a computer. The database server 110 and the application server 120 include a CPU peripheral unit, an input / output unit, and a legacy input / output unit. The CPU peripheral section includes a CPU 1505, a RAM 1520, a graphic controller 1575, and a display device 1580 that are connected to each other by a host controller 1582. The input / output unit includes a communication interface 1530, a hard disk drive 1540, and a CD-ROM drive 1560 that are connected to the host controller 1582 by the input / output controller 1584. The legacy input / output unit includes a ROM 1510, a flexible disk drive 1550, and an input / output chip 1570 connected to the input / output controller 1584.

ホスト・コントローラ1582は、RAM1520と、高い転送レートでRAM1520をアクセスするCPU1505、及びグラフィック・コントローラ1575とを接続する。CPU1505は、ROM1510、及びRAM1520に格納されたプログラムに基づいて動作して、各部の制御をする。グラフィック・コントローラ1575は、CPU1505等がRAM1520内に設けたフレーム・バッファ上に生成する画像データを取得して、表示装置1580上に表示させる。これに代えて、グラフィック・コントローラ1575は、CPU1505等が生成する画像データを格納するフレーム・バッファを、内部に含んでもよい。   The host controller 1582 connects the RAM 1520, the CPU 1505 that accesses the RAM 1520 at a high transfer rate, and the graphic controller 1575. The CPU 1505 operates based on programs stored in the ROM 1510 and the RAM 1520 to control each unit. The graphic controller 1575 acquires image data generated by the CPU 1505 or the like on a frame buffer provided in the RAM 1520 and displays the image data on the display device 1580. Alternatively, the graphic controller 1575 may include a frame buffer that stores image data generated by the CPU 1505 or the like.

入出力コントローラ1584は、ホスト・コントローラ1582と、比較的高速な入出力装置であるハードディスクドライブ1540、通信インターフェイス1530、CD−ROMドライブ1560を接続する。ハードディスクドライブ1540は、CPU1505が使用するプログラム、及びデータを格納する。通信インターフェイス1530は、ネットワーク通信装置1598に接続してプログラムまたはデータを送受信する。CD−ROMドライブ1560は、CD−ROM1595からプログラムまたはデータを読み取り、RAM1520を介してハードディスクドライブ1540、及び通信インターフェイス1530に提供する。   The input / output controller 1584 connects the host controller 1582 to the hard disk drive 1540, the communication interface 1530, and the CD-ROM drive 1560, which are relatively high-speed input / output devices. The hard disk drive 1540 stores programs and data used by the CPU 1505. The communication interface 1530 is connected to the network communication device 1598 to transmit / receive programs or data. The CD-ROM drive 1560 reads a program or data from the CD-ROM 1595 and provides it to the hard disk drive 1540 and the communication interface 1530 via the RAM 1520.

入出力コントローラ1584には、ROM1510と、フレキシブルディスク・ドライブ1550、及び入出力チップ1570の比較的低速な入出力装置とが接続される。ROM1510は、データベースサーバ110及びアプリケーションサーバ120が起動時に実行するブート・プログラム、あるいはデータベースサーバ110及びアプリケーションサーバ120のハードウェアに依存するプログラム等を格納する。フレキシブルディスク・ドライブ1550は、フレキシブルディスク1590からプログラムまたはデータを読み取り、RAM1520を介してハードディスクドライブ1540、及び通信インターフェイス1530に提供する。入出力チップ1570は、フレキシブルディスク・ドライブ1550、あるいはパラレル・ポート、シリアル・ポート、キーボード・ポート、マウス・ポート等を介して各種の入出力装置を接続する。   The input / output controller 1584 is connected to the ROM 1510, the flexible disk drive 1550, and the relatively low-speed input / output device of the input / output chip 1570. The ROM 1510 stores a boot program executed when the database server 110 and the application server 120 are started up, a program depending on the hardware of the database server 110 and the application server 120, and the like. The flexible disk drive 1550 reads a program or data from the flexible disk 1590 and provides it to the hard disk drive 1540 and the communication interface 1530 via the RAM 1520. The input / output chip 1570 connects various input / output devices via the flexible disk drive 1550 or a parallel port, serial port, keyboard port, mouse port, and the like.

CPU1505が実行するプログラムは、フレキシブルディスク1590、CD−ROM1595、またはICカード等の記録媒体に格納されて利用者によって提供される。記録媒体に格納されたプログラムは圧縮されていても非圧縮であってもよい。プログラムは、記録媒体からハードディスクドライブ1540にインストールされ、RAM1520に読み出されてCPU1505により実行される。CPU1505により実行されるプログラムは、データベースサーバ110を、図1から図7に関連して説明したコネクション確立部200A、負荷検出部215A、コネクション制御部220A、コネクション数格納部230A、コネクション情報格納部240A、及び通信制御部290Aとして機能させ、アプリケーションサーバ120を、図1から図7に関連して説明したコネクション確立部200、負荷取得部210、コネクション制御部220、コネクション数格納部230、コネクション情報格納部240、サービス利用部250、及び通信制御部290として機能させる。   A program executed by the CPU 1505 is stored in a recording medium such as the flexible disk 1590, the CD-ROM 1595, or an IC card and provided by the user. The program stored in the recording medium may be compressed or uncompressed. The program is installed in the hard disk drive 1540 from the recording medium, read into the RAM 1520, and executed by the CPU 1505. The program executed by the CPU 1505 uses the database server 110 as the connection establishment unit 200A, the load detection unit 215A, the connection control unit 220A, the connection number storage unit 230A, and the connection information storage unit 240A described with reference to FIGS. And the communication control unit 290A, the application server 120 is connected to the connection establishment unit 200, the load acquisition unit 210, the connection control unit 220, the connection number storage unit 230, and the connection information storage described with reference to FIGS. Unit 240, service utilization unit 250, and communication control unit 290.

以上に示したプログラムは、外部の記憶媒体に格納されてもよい。記憶媒体としては、フレキシブルディスク1590、CD−ROM1595の他に、DVDまたはPD等の光学記録媒体、MD等の光磁気記録媒体、テープ媒体、ICカード等の半導体メモリ等を用いることができる。また、専用通信ネットワークあるいはインターネットに接続されたサーバシステムに設けたハードディスクまたはRAM等の記憶装置を記録媒体として使用して、ネットワークを介したプログラムとして放射線撮像システムを提供してもよい。   The program shown above may be stored in an external storage medium. As the storage medium, in addition to the flexible disk 1590 and the CD-ROM 1595, an optical recording medium such as a DVD or PD, a magneto-optical recording medium such as an MD, a tape medium, a semiconductor memory such as an IC card, or the like can be used. Further, a storage device such as a hard disk or RAM provided in a server system connected to a dedicated communication network or the Internet may be used as a recording medium to provide a radiation imaging system as a program via the network.

以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されない。上記実施の形態に、多様な変更または改良を加えることが可能であることが当業者に明らかである。その様な変更または改良を加えた形態も本発明の技術的範囲に含まれ得ることが、特許請求の範囲の記載から明らかである。   As mentioned above, although this invention was demonstrated using embodiment, the technical scope of this invention is not limited to the range as described in the said embodiment. It will be apparent to those skilled in the art that various modifications or improvements can be added to the above-described embodiment. It is apparent from the scope of the claims that the embodiments added with such changes or improvements can be included in the technical scope of the present invention.

一実施形態に係るコンピュータシステム100の利用環境の一例を示す図である。It is a figure which shows an example of the utilization environment of the computer system 100 which concerns on one Embodiment. データベースサーバ110及びアプリケーションサーバ120のブロック構成の一例を示す図である。It is a figure which shows an example of the block configuration of the database server 110 and the application server 120. WEBサーバ130、アプリケーションサーバ120、及びデータベースサーバ110の動作シーケンスの一例を示す図である。It is a figure which shows an example of the operation | movement sequence of the WEB server 130, the application server 120, and the database server 110. コネクション数格納部230が格納しているデータの一例をテーブル形式で示す図である。It is a figure which shows an example of the data which the connection number storage part 230 has stored in the table format. CPU使用率の時間発展及び使用可能コネクション数の時間発展の一例を示す図である。It is a figure which shows an example of the time development of CPU utilization, and the time development of the number of usable connections. コネクション制御部220の制御による使用可能コネクション数の増減量の一例を示す図である。5 is a diagram illustrating an example of an increase / decrease amount of usable connections under the control of a connection control unit 220. FIG. コネクション制御部220が記憶しているデータの一例を示す図である。It is a figure which shows an example of the data which the connection control part 220 has memorize | stored. データベースサーバ110及びアプリケーションサーバ120のそれぞれのハードウェア構成の一例を示す図である。It is a figure which shows an example of each hardware constitutions of the database server 110 and the application server 120.

符号の説明Explanation of symbols

100 コンピュータシステム
110 データベースサーバ
120 アプリケーションサーバ
130 WEBサーバ
140 ロードバランサ
150 通信回線
160 クライアント端末
200 コネクション確立部
210 負荷取得部
215 負荷検出部
220 コネクション制御部
230 コネクション数格納部
240 コネクション情報格納部
250 サービス利用部
255 サービス提供部
280 コネクション使用数検出部
290 通信制御部
500 CPU使用率
510 時間発展
1505 CPU
1510 ROM
1520 RAM
1530 通信インターフェイス
1540 ハードディスクドライブ
1550 フレキシブルディスク・ドライブ
1560 CD−ROMドライブ
1570 入出力チップ
1575 グラフィック・コントローラ
1580 表示装置
1582 ホスト・コントローラ
1584 入出力コントローラ
1590 フレキシブルディスク
1595 CD−ROM
1598 ネットワーク通信装置
DESCRIPTION OF SYMBOLS 100 Computer system 110 Database server 120 Application server 130 WEB server 140 Load balancer 150 Communication line 160 Client terminal 200 Connection establishment part 210 Load acquisition part 215 Load detection part 220 Connection control part 230 Connection number storage part 240 Connection information storage part 250 Service use Unit 255 service providing unit 280 connection usage number detecting unit 290 communication control unit 500 CPU usage rate 510 time development 1505 CPU
1510 ROM
1520 RAM
1530 Communication interface 1540 Hard disk drive 1550 Flexible disk drive 1560 CD-ROM drive 1570 Input / output chip 1575 Graphic controller 1580 Display device 1582 Host controller 1584 Input / output controller 1590 Flexible disk 1595 CD-ROM
1598 Network communication device

Claims (20)

サービス提供装置に設けられ、サービスを提供するサービス提供部と、
前記サービス提供装置とは異なるサービス利用装置に設けられ、前記サービス提供部が提供するサービスを利用するサービス利用部と、
前記サービス提供装置および前記サービス利用装置にそれぞれ設けられ、前記サービス利用部が前記サービス提供部と通信するための複数のコネクションを予め確立するコネクション確立部と、
前記サービス提供装置に設けられ、前記サービス提供装置として動作するコンピュータの負荷値を検出する負荷検出部と、
前記サービス利用装置に設けられ、前記負荷検出部が検出した負荷値を前記サービス提供装置から取得する負荷取得部と、
前記サービス利用装置に設けられ、前記負荷取得部が取得した負荷値が予め定められた接続数減少負荷値より大きくなった場合に、前記コネクション確立部によって確立されているコネクションを切断することによって、前記コネクション確立部によって確立されているコネクションのうち、前記サービス利用部が使用することができるコネクションの数を減少させるコネクション制御部と
を備えるコンピュータシステム。
A service providing unit provided in the service providing apparatus for providing a service;
A service using unit that is provided in a service using device different from the service providing device and uses a service provided by the service providing unit;
A connection establishing unit that is provided in each of the service providing device and the service using device, and in which the service using unit establishes in advance a plurality of connections for communicating with the service providing unit;
A load detection unit that is provided in the service providing device and detects a load value of a computer operating as the service providing device ;
A load acquisition unit that is provided in the service use device and acquires the load value detected by the load detection unit from the service providing device;
By disconnecting the connection established by the connection establishment unit when the load value acquired by the load acquisition unit is greater than a predetermined connection number reduction load value provided in the service utilization device, A computer system comprising: a connection control unit that reduces a number of connections that can be used by the service using unit among connections established by the connection establishing unit.
前記負荷検出部が検出する負荷値は、前記コンピュータが有するリソースの使用量、および、前記サービス提供部が外部に応答するのに要する時間長さの少なくとも一方を含む
請求項に記載のコンピュータシステム。
Load value the load detecting unit detects the amount of resources that the computer has, and, a computer system according to claim 1 wherein the service providing unit comprises at least one length of time required to respond to an external .
前記リソースの使用量は、前記コンピュータが有するCPUの使用率を含む
請求項に記載のコンピュータシステム。
The computer system according to claim 2 , wherein the usage amount of the resource includes a usage rate of a CPU included in the computer.
前記サービス利用装置に設けられ、より大きい前記負荷値に対応づけて、より少ない前記使用することができるコネクションの数を格納するコネクション数格納部
をさらに備え、
前記コネクション制御部は、前記使用することができるコネクションの数を、前記負荷取得部が取得した負荷値に対応づけて前記コネクション数格納部が格納しているコネクションの数に制御する
請求項1から3のいずれか一項に記載のコンピュータシステム。
A connection number storage unit that is provided in the service utilization device and stores a smaller number of usable connections in association with the larger load value;
The connection control unit, the number of connections that can be the use of claim 1, wherein the connection number storage unit in association with the load value the load acquisition unit has acquired to control the number of connections that contain 4. The computer system according to any one of 3 .
前記コネクション制御部は、前記使用することができるコネクション数を減少させた後に、前記負荷取得部が取得した負荷値が予め定められた接続数増加負荷値以下になった場合に、前記使用することができるコネクション数を増加させる
請求項1から4のいずれか一項に記載のコンピュータシステム。
The connection control unit uses the load control unit when the load value acquired by the load acquisition unit is less than or equal to a predetermined connection number increase load value after reducing the number of usable connections. computer system according to any one of claims 1 to 4 to increase the number of connections that can.
前記サービス利用装置は複数設けられ、
複数の前記サービス利用装置にそれぞれ設けられた複数の前記コネクション確立部は、前記複数のサービス利用装置にそれぞれ設けられた複数の前記サービス利用部のそれぞれと前記サービス提供部との間で、複数のコネクションをそれぞれ確立し、
前記複数のサービス利用装置にそれぞれ設けられた複数の前記コネクション制御部のそれぞれは、前記負荷取得部が取得した負荷値が前記接続数減少負荷値より大きくなった場合に、前記複数のコネクション確立部によってそれぞれ確立されているコネクションを切断することによって、前記複数のサービス利用部のそれぞれが使用することができるコネクションの数をそれぞれ減少させる
請求項1から5のいずれか一項に記載のコンピュータシステム。
A plurality of the service using devices are provided,
The plurality of connection establishment units provided in each of the plurality of service use devices may include a plurality of connection between each of the plurality of service use units provided in each of the plurality of service use devices and the service providing unit. Establish each connection,
Wherein each of the plurality of the connection control unit provided for each of the plurality of service using apparatus, when the load value the load acquisition unit has acquired is larger than the number of connections decreases load value, the plurality of connection establishing unit The computer system according to any one of claims 1 to 5 , wherein the number of connections that can be used by each of the plurality of service using units is reduced by disconnecting connections established by each of the above .
前記サービス提供装置は、データを格納して外部にデータを提供するデータベースサーバであり
前記サービス利用部は、前記データベースサーバが提供するデータを利用する
請求項1から6のいずれか一項に記載のコンピュータシステム。
The service providing device is a database server that provides data to the external store data,
The service use unit, a computer system according to any one of claims 1 to 6 that utilizes data which the database server provides.
前記サービス利用装置は、前記データベースサーバが提供するデータを利用して外部にサービスを提供するアプリケーションサーバである
請求項に記載のコンピュータシステム。
The service using apparatus, a computer system according to <br/> claim 7 which is an application server that the database server provides a service to the outside by utilizing the data provided.
複数の前記アプリケーションサーバのそれぞれに設けられた前記コネクション制御部は、前記負荷取得部が取得した負荷値が前記接続数減少負荷値より大きくなった場合に、前記コネクション確立部によってそれぞれ確立されているコネクションを切断することによって、前記複数のアプリケーションサーバのそれぞれに設けられた前記サービス利用部のそれぞれが使用することができるコネクションの数をそれぞれ減少させる
請求項に記載のコンピュータシステム。
The connection control unit provided in each of the plurality of application servers is established by the connection establishment unit when the load value acquired by the load acquisition unit becomes larger than the connection number reduction load value . The computer system according to claim 8 , wherein the number of connections that can be used by each of the service using units provided in each of the plurality of application servers is reduced by disconnecting the connection .
サービス提供装置に設けられたサービスを提供するサービス提供部が提供するサービスを利用するサービス利用部を備えるコンピュータシステムを制御する制御方法であって、
前記サービス提供装置と異なるサービス利用装置に設けられた前記サービス利用部が前記サービス提供部と通信するための複数のコネクションを、前記サービス提供装置および前記サービス利用装置にそれぞれ設けられたコネクション確立部が、予め確立するコネクション確立段階と、
前記サービス提供装置に設けられた負荷検出部が、前記サービス提供装置として動作するコンピュータの負荷値を検出する負荷検出段階と、
前記サービス利用装置に設けられた負荷取得部が、前記負荷検出段階において検出された負荷値を前記サービス提供装置から取得する負荷取得段階と、
前記サービス利用装置に設けられたコネクション制御部が、前記負荷取得段階で取得された負荷値が予め定められた接続数減少負荷値より大きくなった場合に、前記コネクション確立段階において確立されたコネクションを切断することによって、前記コネクション確立段階において確立されたコネクションのうち、前記サービス利用部が使用することができるコネクションの数を減少させるコネクション制御段階と
を備える制御方法。
A control method for controlling a computer system including a service using unit that uses a service provided by a service providing unit that provides a service provided in a service providing device ,
A service establishing unit provided in each of the service providing apparatus and the service using apparatus includes a plurality of connections for the service using unit provided in a service using apparatus different from the service providing apparatus to communicate with the service providing unit. A pre-established connection establishment stage;
A load detecting unit provided in the service providing apparatus detects a load value of a computer operating as the service providing apparatus ; and
A load acquisition unit provided in the service utilization device acquires a load value detected in the load detection step from the service providing device; and
The connection control unit provided in the service using device determines the connection established in the connection establishment step when the load value acquired in the load acquisition step is larger than a predetermined connection number reduction load value. A control method comprising: a connection control step of reducing the number of connections that can be used by the service using unit among the connections established in the connection establishment step by disconnecting .
サービスを提供するサービス提供部と、  A service provider that provides services;
複数のサービス利用装置にそれぞれ設けられ、前記サービス提供部が提供するサービスを利用する複数のサービス利用部と、  A plurality of service using units provided in each of a plurality of service using devices, and using a service provided by the service providing unit;
前記複数のサービス利用部のそれぞれと前記サービス提供部との間で、前記複数のサービス利用部のそれぞれが前記サービス提供部とそれぞれ通信するための複数のコネクションをそれぞれ予め確立するコネクション確立部と、  Between each of the plurality of service using units and the service providing unit, a connection establishing unit that establishes in advance a plurality of connections for each of the plurality of service using units to communicate with the service providing unit, and
前記サービス提供部として動作するコンピュータの負荷値を検出する負荷検出部と、  A load detection unit for detecting a load value of a computer operating as the service providing unit;
前記複数のサービス利用部のそれぞれが使用することができるコネクションのうち、前記複数のサービス利用部のそれぞれが現在使用しているコネクションの数を検出するコネクション使用数検出部と、  Of the connections that can be used by each of the plurality of service utilization units, a connection usage number detection unit that detects the number of connections currently used by each of the plurality of service utilization units;
前記負荷検出部が検出した負荷値が予め定められた接続数減少負荷値より大きくなった場合に、前記コネクション確立部によって確立されているコネクションのうち、前記複数のサービス利用部のそれぞれが使用することができるコネクションの数をそれぞれ減少させるコネクション制御部と  When the load value detected by the load detecting unit becomes larger than a predetermined connection number decreasing load value, each of the plurality of service using units among the connections established by the connection establishing unit is used. A connection controller that reduces the number of connections each
を備え、With
前記負荷検出部が検出する負荷値は、前記コンピュータが有するリソースの使用量、および、前記サービス提供部が外部に応答するのに要する時間長さの少なくとも一方を含み、前記リソースの使用量は、前記コンピュータが有するCPUの使用率を含み、  The load value detected by the load detection unit includes at least one of a resource usage amount of the computer and a time length required for the service providing unit to respond to the outside, and the resource usage amount is: Including the usage rate of the CPU of the computer,
前記コネクション制御部は、前記負荷検出部が検出した負荷値が前記接続数減少負荷値より大きくなった場合に、前記コネクション使用数検出部が検出したコネクションの数及び前記複数のサービス利用部のそれぞれが使用することができるコネクションの数に基づいて、前記複数のサービス利用部がそれぞれ使用することができるコネクションの数に対する前記複数のサービス利用部がそれぞれ使用しているコネクションの数の比が前記複数のサービス利用部の間で等しくなる方向に、前記複数のサービス利用部の少なくとも1つが使用することができるコネクションの数を減少させ、  The connection control unit, when the load value detected by the load detection unit is greater than the load reduction load value, the number of connections detected by the connection usage number detection unit and each of the plurality of service usage units Based on the number of connections that can be used, the ratio of the number of connections used by each of the plurality of service using units to the number of connections that can be used by each of the plurality of service using units is the plurality of connections. Reducing the number of connections that can be used by at least one of the plurality of service utilization units in the same direction between the service utilization units of
前記サービス提供部、前記負荷検出部、前記コネクション使用数検出部および前記コネクション制御部は、サービス提供装置に設けられ、  The service providing unit, the load detecting unit, the connection usage number detecting unit, and the connection control unit are provided in a service providing device,
前記コネクション確立部は、前記複数のサービス利用装置および前記サービス提供装置のそれぞれに設けられる  The connection establishment unit is provided in each of the plurality of service using devices and the service providing device.
コンピュータシステム。Computer system.
前記コネクション制御部は、前記使用することができるコネクション数を減少させた後に、前記負荷検出部が検出した負荷値が予め定められた接続数増加負荷値より小さくなった場合に、前記コネクション使用数検出部が検出したコネクションの数及び前記複数のサービス利用部のそれぞれが使用することができるコネクションの数に基づいて、前記複数のサービス利用部がそれぞれ使用することができるコネクションの数に対する前記複数のサービス利用部がそれぞれ使用しているコネクションの数の比が、前記複数のサービス利用部の間で等しくなる方向に、前記複数のサービス利用部の少なくとも1つが使用することができるコネクションの数を増加させる  The connection control unit reduces the number of connections that can be used, and then reduces the number of connections used when the load value detected by the load detection unit becomes smaller than a predetermined connection number increase load value. Based on the number of connections detected by the detection unit and the number of connections that can be used by each of the plurality of service using units, the plurality of connections with respect to the number of connections that can be used by each of the plurality of service using units. Increase the number of connections that can be used by at least one of the plurality of service utilization units in a direction in which the ratio of the number of connections used by each service utilization unit becomes equal among the plurality of service utilization units Make
請求項11に記載のコンピュータシステム。The computer system according to claim 11.
サービスを提供するサービス提供部と、  A service provider that provides services;
複数のサービス利用装置にそれぞれ設けられ、前記サービス提供部が提供するサービスを利用する複数のサービス利用部と、  A plurality of service using units provided in each of a plurality of service using devices, and using a service provided by the service providing unit;
前記複数のサービス利用部のそれぞれと前記サービス提供部との間で、前記複数のサービス利用部のそれぞれが前記サービス提供部とそれぞれ通信するための複数のコネクションをそれぞれ予め確立するコネクション確立部と、  Between each of the plurality of service using units and the service providing unit, a connection establishing unit that establishes in advance a plurality of connections for each of the plurality of service using units to communicate with the service providing unit, and
前記サービス提供部として動作するコンピュータの負荷値を検出する負荷検出部と、  A load detection unit for detecting a load value of a computer operating as the service providing unit;
前記複数のサービス利用部のそれぞれが使用することができるコネクションのうち、前記複数のサービス利用部のそれぞれが現在使用しているコネクションの数を検出するコネクション使用数検出部と、  Of the connections that can be used by each of the plurality of service utilization units, a connection usage number detection unit that detects the number of connections currently used by each of the plurality of service utilization units;
前記負荷検出部が検出した負荷値が予め定められた接続数減少負荷値より大きくなった場合に、前記コネクション確立部によって確立されているコネクションのうち、前記複数のサービス利用部のそれぞれが使用することができるコネクションの数をそれぞれ減少させるコネクション制御部と  When the load value detected by the load detecting unit becomes larger than a predetermined connection number decreasing load value, each of the plurality of service using units among the connections established by the connection establishing unit is used. A connection controller that reduces the number of connections each
を備え、With
前記負荷検出部が検出する負荷値は、前記コンピュータが有するリソースの使用量、および、前記サービス提供部が外部に応答するのに要する時間長さの少なくとも一方を含み、前記リソースの使用量は、前記コンピュータが有するCPUの使用率を含み、  The load value detected by the load detection unit includes at least one of a resource usage amount of the computer and a time length required for the service providing unit to respond to the outside, and the resource usage amount is: Including the usage rate of the CPU of the computer,
前記コネクション制御部は、前記使用することができるコネクション数を減少させた後に、前記負荷検出部が検出した負荷値が予め定められた接続数増加負荷値より小さくなった場合に、前記コネクション使用数検出部が検出したコネクションの数及び前記複数のサービス利用部のそれぞれが使用することができるコネクションの数に基づいて、前記複数のサービス利用部がそれぞれ使用することができるコネクションの数に対する前記複数のサービス利用部がそれぞれ使用しているコネクションの数の比が、前記複数のサービス利用部の間で等しくなる方向に、前記複数のサービス利用部の少なくとも1つが使用することができるコネクションの数を増加させ、  The connection control unit reduces the number of connections that can be used, and then reduces the number of connections used when the load value detected by the load detection unit becomes smaller than a predetermined connection number increase load value. Based on the number of connections detected by the detection unit and the number of connections that can be used by each of the plurality of service using units, the plurality of connections with respect to the number of connections that can be used by each of the plurality of service using units. Increase the number of connections that can be used by at least one of the plurality of service utilization units in a direction in which the ratio of the number of connections used by each service utilization unit becomes equal among the plurality of service utilization units Let
前記サービス提供部、前記負荷検出部、前記コネクション使用数検出部および前記コネクション制御部は、サービス提供装置に設けられ、  The service providing unit, the load detecting unit, the connection usage number detecting unit, and the connection control unit are provided in a service providing device,
前記コネクション確立部は、前記複数のサービス利用装置および前記サービス提供装置のそれぞれに設けられる  The connection establishment unit is provided in each of the plurality of service using devices and the service providing device.
コンピュータシステム。Computer system.
前記サービス提供装置は、データを格納して外部にデータを提供するデータベースサーバであり、  The service providing apparatus is a database server that stores data and provides the data to the outside.
前記複数のサービス利用部は、前記データベースサーバが提供するデータを利用する  The plurality of service using units use data provided by the database server.
請求項11から13のいずれか一項に記載のコンピュータシステム。The computer system according to any one of claims 11 to 13.
前記複数のサービス利用装置は、前記データベースサーバが提供するデータを利用して外部にサービスを提供するアプリケーションサーバである  The plurality of service use devices are application servers that provide services to the outside using data provided by the database server.
請求項14に記載のコンピュータシステム。The computer system according to claim 14.
前記コネクション制御部は、前記負荷検出部が検出した負荷値が前記接続数減少負荷値より大きくなった場合に、前記コネクション確立部によって確立されているコネクションを切断することによって、前記複数のサービス利用部のそれぞれが使用することができるコネクションの数を、それぞれ減少させる  The connection control unit disconnects the connection established by the connection establishment unit when the load value detected by the load detection unit becomes larger than the connection number reduction load value, thereby using the plurality of services. Reduce the number of connections each part can use
請求項11からに15のいずれか一項に記載のコンピュータシステム。The computer system according to any one of claims 11 to 15.
前記コネクション制御部は、前記負荷検出部が検出した負荷値が前記接続数減少負荷値より大きくなった場合に、前記使用することができるコネクションの数を減少させる命令を前記複数のサービス利用装置に送信することによって、前記複数のサービス利用部のそれぞれが使用することができるコネクションの数をそれぞれ減少させる  The connection control unit, when the load value detected by the load detection unit becomes larger than the connection number reduction load value, sends a command to the plurality of service using devices to reduce the number of connections that can be used. By transmitting, the number of connections that each of the plurality of service using units can use is reduced.
請求項11から15のいずれか一項に記載のコンピュータシステム。The computer system according to any one of claims 11 to 15.
サービス提供装置が提供するサービスを利用する、前記サービス提供装置とは異なるサービス利用装置であって、
前記サービス提供装置が提供するサービスを利用するサービス利用部と、
前記サービス利用装置が前記サービス提供装置と通信するための複数のコネクションを予め確立するコネクション確立部と、
前記サービス提供装置の負荷値を取得する負荷取得部と、
前記負荷取得部が取得した負荷値が予め定められた接続数減少負荷値より大きくなった場合に、前記コネクション確立部によって確立されているコネクションを切断することによって、前記コネクション確立部によって確立されているコネクションのうち、前記サービス利用が使用することができるコネクションの数を減少させるコネクション制御部と
を備え
前記サービス提供装置は、
前記サービス利用装置との間で前記複数のコネクションを予め確立するコネクション確立部と、
前記サービスを提供するサービス提供部と、
前記サービス提供装置として動作するコンピュータの負荷値を検出する負荷検出部と
を有し、
前記サービス利用部は、前記サービス提供部が提供するサービスを利用し、
前記コネクション確立部は、前記サービス利用部が前記サービス提供部と通信するための前記複数のコネクションを予め確立し、
前記負荷取得部は、前記負荷検出部が検出した負荷値を前記サービス提供装置から取得する
サービス利用装置。
A service using device that uses a service provided by a service providing device, different from the service providing device ,
A service using unit that uses a service provided by the service providing device;
A connection establishment unit that establishes in advance a plurality of connections for the service using device to communicate with the service providing device;
A load acquisition unit for acquiring a load value of the service providing device;
When the load value acquired by the load acquisition unit is greater than a predetermined connection number reduction load value, the connection established by the connection establishment unit is disconnected by disconnecting the connection established by the connection establishment unit. A connection control unit that reduces the number of connections that can be used by the service using unit ,
The service providing apparatus includes:
A connection establishment unit that establishes the plurality of connections in advance with the service using device;
A service providing unit for providing the service;
A load detection unit for detecting a load value of a computer operating as the service providing device;
Have
The service using unit uses a service provided by the service providing unit,
The connection establishment unit pre-establishes the plurality of connections for the service using unit to communicate with the service providing unit,
The service use device , wherein the load acquisition unit acquires the load value detected by the load detection unit from the service providing device.
コンピュータを、請求項18に記載のサービス利用装置として機能させるためのプログラム。  The program for functioning a computer as a service utilization apparatus of Claim 18. サービス提供装置が提供するサービスを利用する、前記サービス提供装置とは異なるサービス利用装置を制御する制御方法であって、
前記サービス利用装置に設けられ前記サービスを利用するサービス利用部が前記サービス提供装置と通信するための複数のコネクションを予め確立するコネクション確立段階と、
前記サービス利用装置に設けられた負荷取得部が、前記サービス提供装置の負荷値を取得する負荷取得段階と、
前記負荷取得段階で取得された負荷値が予め定められた接続数減少負荷値より大きくなった場合に、前記コネクション確立段階において確立されたコネクションを切断することによって、前記コネクション確立段階において確立されたコネクションのうち、前記サービス利用が使用することができるコネクションの数を減少させるコネクション制御段階と
を備え
前記サービス提供装置は、
前記サービス利用装置との間で前記複数のコネクションを予め確立するコネクション確立部と、
前記サービスを提供するサービス提供部と、
前記サービス提供装置として動作するコンピュータの負荷値を検出する負荷検出部と
を有し、
前記コネクション確立段階は、前記サービス利用部が前記サービス提供部と通信するための前記複数のコネクションを予め確立し、
前記負荷取得段階は、前記負荷検出部が検出した負荷値を前記負荷取得部が前記サービス提供装置から取得する
制御方法。
A control method for controlling a service using device different from the service providing device using a service provided by a service providing device ,
A connection establishment step in which a service utilization unit provided in the service utilization device and utilizing the service establishes a plurality of connections for communicating with the service provision device;
A load acquisition unit provided in the service using device acquires a load value of the service providing device; and
Established in the connection establishment stage by disconnecting the connection established in the connection establishment stage when the load value obtained in the load acquisition stage exceeds a predetermined connection number reduction load value A connection control step for reducing the number of connections that can be used by the service using unit among the connections ,
The service providing apparatus includes:
A connection establishment unit that establishes the plurality of connections in advance with the service using device;
A service providing unit for providing the service;
A load detection unit for detecting a load value of a computer operating as the service providing device;
Have
In the connection establishment step, the service using unit establishes the plurality of connections for communicating with the service providing unit in advance,
The load acquisition step is a control method in which the load acquisition unit acquires the load value detected by the load detection unit from the service providing apparatus .
JP2008021800A 2008-01-31 2008-01-31 Computer system, service utilization apparatus, control method, and program Expired - Fee Related JP5082111B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008021800A JP5082111B2 (en) 2008-01-31 2008-01-31 Computer system, service utilization apparatus, control method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008021800A JP5082111B2 (en) 2008-01-31 2008-01-31 Computer system, service utilization apparatus, control method, and program

Publications (2)

Publication Number Publication Date
JP2009181481A JP2009181481A (en) 2009-08-13
JP5082111B2 true JP5082111B2 (en) 2012-11-28

Family

ID=41035388

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008021800A Expired - Fee Related JP5082111B2 (en) 2008-01-31 2008-01-31 Computer system, service utilization apparatus, control method, and program

Country Status (1)

Country Link
JP (1) JP5082111B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103957057A (en) * 2014-04-29 2014-07-30 华为技术有限公司 Light receiving and transmitting device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8914502B2 (en) * 2011-09-27 2014-12-16 Oracle International Corporation System and method for dynamic discovery of origin servers in a traffic director environment
JP6963168B2 (en) 2017-06-21 2021-11-05 富士通株式会社 Information processing device, memory control method and memory control program
US11176155B2 (en) * 2019-12-13 2021-11-16 Paypal, Inc Self-adjusting connection pool in a distributed system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001195271A (en) * 2000-01-13 2001-07-19 Hitachi Ltd Method and device for generating and deciding distributed object server thread
JP4043355B2 (en) * 2002-12-10 2008-02-06 富士通株式会社 Server load balancing program, server load balancing method, and server load balancing device
JP2005141441A (en) * 2003-11-06 2005-06-02 Hitachi Ltd Load distribution system
JP2008059040A (en) * 2006-08-29 2008-03-13 Nippon Telegr & Teleph Corp <Ntt> Load control system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103957057A (en) * 2014-04-29 2014-07-30 华为技术有限公司 Light receiving and transmitting device
CN103957057B (en) * 2014-04-29 2018-03-16 华为技术有限公司 A kind of light R-T unit

Also Published As

Publication number Publication date
JP2009181481A (en) 2009-08-13

Similar Documents

Publication Publication Date Title
JP6600373B2 (en) System and method for active-passive routing and control of traffic in a traffic director environment
US9021217B2 (en) Communication apparatus, load distribution method, and recording medium
JP4984169B2 (en) Load distribution program, load distribution method, load distribution apparatus, and system including the same
CN113434300B (en) Data processing method and related device
US20230069240A1 (en) Dynamic cloning of application infrastructures
JP5082111B2 (en) Computer system, service utilization apparatus, control method, and program
JP5545853B2 (en) Communication device
JP2007179246A (en) Method, program and server for computer management
JP2014230234A (en) Network management device and network management method
WO2020235055A1 (en) Virtual machine monitoring device, virtual machine monitoring method, and program
CN112291326A (en) Load balancing method, load balancing device, storage medium and electronic equipment
JP6786835B2 (en) Management equipment, servers, thin client systems, management methods and programs
CN116962446B (en) Dynamic NVMe-oF link management method and system
JP2022125381A (en) Information processing device and information processing method
JP2015165361A (en) Virtual computer management device, virtual computer management method, and virtual computer management program
JP2022166934A (en) Information processing device, overload control program, and overload control method
CN115361271A (en) SSH server switching and connecting method, cloud server and storage medium
JPWO2007108135A1 (en) Content switching program, content switching method, and content management apparatus
JPWO2009136628A1 (en) Information processing system and method and program
JP2011248521A (en) Cluster system, scale-out method of cluster system, resource manager apparatus, server apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100514

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110928

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111101

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111220

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120810

R150 Certificate of patent or registration of utility model

Ref document number: 5082111

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150914

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees