JP2008059040A - Load control system and method - Google Patents

Load control system and method Download PDF

Info

Publication number
JP2008059040A
JP2008059040A JP2006232169A JP2006232169A JP2008059040A JP 2008059040 A JP2008059040 A JP 2008059040A JP 2006232169 A JP2006232169 A JP 2006232169A JP 2006232169 A JP2006232169 A JP 2006232169A JP 2008059040 A JP2008059040 A JP 2008059040A
Authority
JP
Japan
Prior art keywords
request
server
tcp
packet
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006232169A
Other languages
Japanese (ja)
Inventor
Ryosuke Kurebayashi
亮介 榑林
Kazuaki Obana
和昭 尾花
Osamu Ishida
修 石田
Osamu Noguchi
修 野口
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.)
NTT Advanced Technology Corp
Nippon Telegraph and Telephone Corp
Original Assignee
NTT Advanced Technology Corp
Nippon Telegraph and Telephone Corp
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 NTT Advanced Technology Corp, Nippon Telegraph and Telephone Corp filed Critical NTT Advanced Technology Corp
Priority to JP2006232169A priority Critical patent/JP2008059040A/en
Publication of JP2008059040A publication Critical patent/JP2008059040A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To process a significant request on application with priority when a server is congested. <P>SOLUTION: The priority control is conducted depending on the class of a request in an application layer of a server. When the server receives a request through TCP/IP, before the request is next processed by Web application, the request is analyzed. The request determined to be significant is first processed with priority by the Web application. When the server is congested and all requests are not processed, a request with the least significance is refused. Further, when the overload of the server is detected, TCP/IP layer is controlled client by client to regulate packet receiving. At this time, it is estimated based on the request analysis result whether or not the priority of future request transmitted by the client is high. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、クライアントからリクエストを受信し、レスポンスを返送するサーバが過負荷となった場合のパケット制御技術に関する。特に、リクエストの優先度予測に基づき、クライアント単位で優先制御を行うパケット制御技術に関する。なお、本明細書では、Webサーバに着目して説明するが、必ずしも他のサーバへの本発明の適用を制限するものではない。   The present invention relates to a packet control technique when a server that receives a request from a client and returns a response is overloaded. In particular, the present invention relates to a packet control technique for performing priority control in units of clients based on request priority prediction. In this specification, the description will be given focusing on the Web server, but the application of the present invention to other servers is not necessarily limited.

インターネットの普及に伴い、ネットワークを介して様々なサービスを利用できるようになっている。メール、ホームページの閲覧、検索、オンライン取引、IP電話、ビデオオンデマンドなどは、その一例である。これらのネットワークサービスは様々な形態で提供し得るが、近年、クライアントとのインタフェースとして、Webサーバの利用が主流となっている。   With the spread of the Internet, various services can be used via a network. Examples are mail, homepage browsing, search, online transactions, IP phone calls, video on demand, and the like. Although these network services can be provided in various forms, in recent years, the use of a Web server has become the mainstream as an interface with a client.

Webサーバを用いたサービス(Webサービス)の基本的な仕組みは以下のとおりである。まず、クライアントがWebサーバに対して、取得したいコンテンツを識別するURL(Uniform Resource Locator)を付与したリクエストを送信する。Webサーバがリクエストを受け取ると、リクエスト中のURLに対するコンテンツをレスポンスとしてクライアントに送り返す。Webサービスは、このリクエスト−レスポンスの繰り返しによって提供される。   The basic mechanism of a service using a Web server (Web service) is as follows. First, a client transmits a request to which a URL (Uniform Resource Locator) for identifying content to be acquired is added to a Web server. When the Web server receives the request, the content for the URL in the request is sent back to the client as a response. The Web service is provided by repeating this request-response.

本明細書では、Webサービスを行うサーバシステム全体をWebサーバ、また、Webサーバ上でリクエストに応じたコンテンツを生成する機能をWebアプリケーションと呼ぶ。また、Webサービスでは、リクエスト・レスポンスを送受信するためのトランスポート層/ネットワーク層プロトコルとしてTCP/IPが用いられている。   In this specification, the entire server system that performs a Web service is referred to as a Web server, and a function for generating content according to a request on the Web server is referred to as a Web application. In the Web service, TCP / IP is used as a transport layer / network layer protocol for transmitting and receiving requests and responses.

Webサービスの課題として、リクエストが集中した場合の、サーバの負荷制御が挙げられる。特に、Webサービスでは、リクエストの内容に応じて、その重要度が異なる。故に、サーバが混雑時には重要なリクエストから優先的に処理することが必要である。   An issue of Web services is server load control when requests are concentrated. In particular, the importance of Web services differs depending on the content of the request. Therefore, it is necessary to preferentially process important requests when the server is busy.

例えば、Webサービスでは、クライアントのブラウザ上に一つのページを表示するために、多数のリクエストが必要になる場合がある。1つのページを表示するためのリクエストの繰り返しを、本明細書ではページ処理と呼ぶ。このとき、サーバが混雑時には、最初のページ取得要求を非優先化することが望ましく、既に開始されたページ処理は保護する必要がある。   For example, a web service may require a large number of requests in order to display one page on a client browser. Repeating a request for displaying one page is referred to as page processing in this specification. At this time, when the server is congested, it is desirable to de-prioritize the first page acquisition request, and the already started page processing needs to be protected.

ページ処理の基本的な進行手順は以下のとおりである。まず、クライアントはブラウザに対して取得したいページのルートとなるリソース(以下、ページルートリソース)のURLを入力する。次に、ブラウザは、入力されたURLに基づき、Webサーバに対してリクエストを送信し、ページルートリソースを取得する。このとき、ページルートリソースにはページ表示に必要となる他のリソースのURLが指し示される。次に、ブラウザは、指し示されるURLに対して自動的にリクエストを発行する。以上を、ページ表示に必要な全リソースを取得するまで再帰的に繰り返す。   The basic procedure for page processing is as follows. First, the client inputs the URL of a resource (hereinafter referred to as a page root resource) that is the root of a page to be acquired to the browser. Next, the browser transmits a request to the Web server based on the input URL, and acquires a page root resource. At this time, the URL of another resource necessary for page display is indicated in the page root resource. Next, the browser automatically issues a request for the indicated URL. The above is recursively repeated until all resources necessary for page display are acquired.

多数のクライアントからページ処理を要求されると、サーバ上のリソース競合によってページ処理中のリクエストが失敗し、いずれのクライアントにおいてもページが完全に表示されなくなる、という状況が引き起こされる。この問題を解決するためには、新規のページ処理要求を非優先化させ、既に開始されたページ処理を保護することが必要となる。   When page processing is requested from a large number of clients, a request during page processing fails due to resource contention on the server, causing a situation in which the page cannot be completely displayed on any client. In order to solve this problem, it is necessary to prioritize a new page processing request and protect the already started page processing.

また、Webサービスでは、複数のページに跨がって、閲覧および情報入力をすることで、初めて1つのサービスが完了する場合がある。例えば、オンラインショッピングでは、購入すべき商品の選択、クライアント情報の入力などをし、最後に購入内容の確認をすることで、初めて購入手続きが完了する。   In addition, in a Web service, one service may be completed for the first time by browsing and inputting information across a plurality of pages. For example, in online shopping, a purchase procedure is completed for the first time by selecting a product to be purchased, inputting client information, and finally confirming purchase contents.

本明細書では、完了までに複数ページを要するサービスにおいて、クライアントが先頭ページを取得してから最後のページを取得完了するまでをセッションと呼ぶ。セッションは、金品の取引や、個人情報の更新など、重要な処理を行う場合に用いられる。   In this specification, in a service that requires a plurality of pages to complete, a session from when the client acquires the first page until the last page is acquired is referred to as a session. The session is used when performing important processing such as dealing with gold goods or updating personal information.

特開2002−16633号公報JP 2002-16633 A

上述したセッション処理においては、サーバが混雑すると、セッション処理がほとんど完了しなくなる、という問題が生じる。この問題は、サーバ上で並列処理されるセッションの数が増加すると、セッション間でサーバリソースが競合し、途中失敗するセッションが増加することによって引き起こされる。故に、新規のセッション処理要求を非優先化させ、既に開始済みのセッション処理を保護することが必要である。   In the session processing described above, there arises a problem that session processing is hardly completed when the server is congested. This problem is caused by an increase in the number of sessions that are processed in parallel on the server, resulting in an increase in the number of sessions that fail midway due to contention of server resources among the sessions. It is therefore necessary to de-prioritize new session processing requests and protect already started session processing.

サーバ混雑を解決することを目的に、既に、CPU使用率などに応じて送信元IPアドレス単位でパケットを廃棄する手法が提案されている(例えば、特許文献1参照)。しかしながら、この手法では、Webアプリケーションにおける優先度を考慮しないため、前述したページ処理やセッション処理を保護することはできない。   For the purpose of solving server congestion, a method of discarding packets in units of source IP addresses according to the CPU usage rate has already been proposed (for example, see Patent Document 1). However, with this method, since the priority in the Web application is not considered, the above-described page processing and session processing cannot be protected.

本発明は、サーバ混雑時において、重要なリクエストを優先的にアプリケーション上で処理させることを目的とする。   It is an object of the present invention to preferentially process an important request on an application when the server is congested.

本発明では、まず、リクエスト優先制御手段において、サーバのアプリケーション層でリクエストの種別に応じた優先制御を行う。サーバがTCP/IPを介してリクエストを受信すると、次に、Webアプリケーションでリクエストを処理させる前に、リクエストを解析する。そして、重要だと判定されたリクエスト、例えば、継続中のページ・セッション処理に属するリクエストから、優先的にWebアプリケーションで処理させる。また、サーバが混雑し全てのリクエストを処理しきれなくなった場合は、重要度の低いリクエストから拒絶する。   In the present invention, first, in the request priority control means, priority control according to the type of request is performed in the application layer of the server. When the server receives the request via TCP / IP, the request is then analyzed before the request is processed by the Web application. Then, the Web application preferentially processes requests determined to be important, for example, requests belonging to ongoing page session processing. If the server is too busy to process all requests, it rejects requests with low importance.

さらに本発明では、リクエスト優先制御手段自体が過負荷とならないように、リクエストの優先度予測を用いてTCP/IPを制御する。すなわち、リクエスト優先制御手段によるリクエストの解析および重要度判定に要する計算コストが大きく、また、リクエスト受信時にはTCP/IP処理といったリクエスト受信処理を伴うため、サーバが混雑するほど、アプリケーション層によるリクエスト優先制御が過負荷となり、重要なリクエストの取りこぼしが生じるようになる。そこで本発明では、サーバの過負荷を検知すると、クライアント単位でTCP/IP層を制御しパケット受信を規制することで、リクエスト優先制御手段の負荷を軽減する。   Furthermore, in the present invention, TCP / IP is controlled using request priority prediction so that the request priority control means itself does not become overloaded. That is, the calculation cost required for request analysis and importance determination by the request priority control means is large, and request reception processing such as TCP / IP processing is involved when receiving a request. Becomes overloaded and important requests are missed. Therefore, in the present invention, when an overload of the server is detected, the load on the request priority control unit is reduced by controlling the TCP / IP layer for each client and regulating packet reception.

このとき、優先度予測手段において、リクエスト優先制御手段におけるリクエスト分析結果をもとに、クライアントが今後送信するリクエストの優先度が高いか否かを予測する。そして、予測された優先度をTCP/IP層における優先制御に反映させている。これにより、アプリケーション層で優先化される可能性が高いリクエストは、TCP/IP層で規制されることなく、Webアプリケーションで処理させることができる。   At this time, the priority prediction means predicts whether or not the priority of the request that the client will transmit in the future is high based on the request analysis result in the request priority control means. The predicted priority is reflected in the priority control in the TCP / IP layer. Thus, a request that is highly likely to be prioritized in the application layer can be processed by the Web application without being regulated by the TCP / IP layer.

TCP/IP層ではIPアドレスに基づき優先制御を行う。このため、TCP/IP層の優先制御では、アプリケーション層でのリクエスト単位での優先制御を正確に反映できない場合がある。しかし、リクエスト優先制御の負荷軽減による重要リクエストの保護、という目的を阻害するものではない。例えば、異なるクライアントが同じプロキシを経由してリクエストが転送されている場合は、サーバが受け取るパケットの送信元IPアドレスは、全てプロキシのIPアドレスとなる。したがって、複数のクライアントがプロキシを介して接続している場合には、個々のクライアント毎に優先制御を行うことができない。しかしながら、サーバ混雑時には、同プロキシ以外の送信元IPアドレスも多く存在すると予測できる。故に、他の送信元IPアドレスからのトラヒック規制によって、十分な負荷軽減効果が得られる。プロキシに接続された全てのクライアントが非優先化された場合に、初めてプロキシからのリクエストを非優先化すればよい。   The TCP / IP layer performs priority control based on the IP address. For this reason, the priority control in the TCP / IP layer may not accurately reflect the priority control in the request unit in the application layer. However, it does not impede the purpose of protecting important requests by reducing the load of request priority control. For example, if different clients are transferring requests via the same proxy, the source IP address of the packet received by the server is all the IP address of the proxy. Therefore, when a plurality of clients are connected via a proxy, priority control cannot be performed for each individual client. However, when the server is congested, it can be predicted that there are many source IP addresses other than the proxy. Therefore, a sufficient load reduction effect can be obtained by restricting traffic from other source IP addresses. When all clients connected to the proxy are de-prioritized, the request from the proxy may be de-prioritized for the first time.

すなわち、本発明は、クライアントからリクエストを受信し、レスポンスを返送するサーバに用いる負荷制御システムであって、本発明の特徴とするところは、前記リクエスト優先制御手段に、複数のリクエストを要する処理の進行に基づき、リクエストの送信元クライアントのIPアドレス毎に優先度を設定する手段と、サーバ負荷が閾値を超えたか否かを判定する手段と、閾値を超えた場合に、低い優先度に設定されたIPアドレスからのIPパケット受信を制限する手段とを備えたところにある。   That is, the present invention is a load control system used for a server that receives a request from a client and sends back a response. The feature of the present invention is that the request priority control means performs processing that requires a plurality of requests. Based on the progress, a means for setting the priority for each IP address of the request source client, a means for determining whether or not the server load exceeds the threshold, and when the threshold is exceeded, the priority is set to a low priority. And means for restricting reception of IP packets from the IP address.

あるいは、前記リクエスト優先制御手段に、リクエストに格納されたユーザ識別情報に基づき、リクエストの送信元クライアントのIPアドレス毎に優先度を設定する手段を備えることもできる。   Alternatively, the request priority control means may be provided with means for setting a priority for each IP address of the request source client based on the user identification information stored in the request.

前記IPパケット受信を制限する手段は、例えば、TCP/IPプロトコルを用いて、IPパケットのうち、TCP/SYNパケットのレートを制限することでIPパケット受信を制限する。あるいは、TCP/IPプロトコルを用いて、サーバシステムから送信されるTCP−ACKパケットにあるTCPヘッダのWindowサイズを減じることによりIPパケット受信を制限する。あるいは、TCP/IPプロトコルを用いて、TCPコネクションを切断することによりIPパケット受信を制限する。   The means for restricting the reception of the IP packet restricts the reception of the IP packet by, for example, limiting the rate of the TCP / SYN packet among the IP packets using the TCP / IP protocol. Alternatively, reception of IP packets is restricted by reducing the window size of the TCP header in the TCP-ACK packet transmitted from the server system using the TCP / IP protocol. Alternatively, reception of IP packets is restricted by cutting the TCP connection using the TCP / IP protocol.

また、サーバ負荷が閾値を超えた場合に前記IPパケット受信の制限を段階的に強め、サーバ負荷が閾値以下となった場合に前記IPパケット受信の制限を段階的に弱めることができる。   Further, when the server load exceeds a threshold value, the IP packet reception limit can be gradually increased, and when the server load becomes equal to or less than the threshold value, the IP packet reception limit can be gradually decreased.

また、本発明を負荷制御方法の観点から観ると、本発明は、クライアントからリクエストを受信し、レスポンスを返送するサーバに用いる負荷制御方法であって、本発明の特徴とするところは、複数のリクエストを要する処理の進行に基づき、リクエストの送信元クライアントのIPアドレス毎に優先度を設定し、サーバ負荷が閾値を超えたか否かを判定し、閾値を超えた場合に、低い優先度に設定されたIPアドレスからのIPパケット受信を制限するところにある。   Further, from the viewpoint of the load control method, the present invention is a load control method used for a server that receives a request from a client and sends back a response. Based on the progress of the processing that requires the request, set the priority for each IP address of the request source client, determine whether the server load exceeds the threshold, and set the priority lower when the threshold is exceeded The IP packet reception from the specified IP address is restricted.

あるいは、リクエストに格納されたユーザ識別情報に基づき、リクエストの送信元クライアントのIPアドレス毎に優先度を設定してもよい。   Alternatively, the priority may be set for each IP address of the request source client based on the user identification information stored in the request.

前記IPパケット受信を制限する際には、例えば、TCP/IPプロトコルを用いて、IPパケットのうち、TCP/SYNパケットのレートを制限することでIPパケット受信を制限する。あるいは、TCP/IPプロトコルを用いて、サーバシステムから送信されるTCP−ACKパケットにあるTCPヘッダのWindowサイズを減じることによりIPパケット受信を制限する。あるいは、TCP/IPプロトコルを用いて、TCPコネクションを切断することによりIPパケット受信を制限する。   When restricting the reception of the IP packet, for example, the TCP / IP protocol is used to restrict the reception of the IP packet by limiting the rate of the TCP / SYN packet among the IP packets. Alternatively, reception of IP packets is restricted by reducing the window size of the TCP header in the TCP-ACK packet transmitted from the server system using the TCP / IP protocol. Alternatively, reception of IP packets is restricted by cutting the TCP connection using the TCP / IP protocol.

また、サーバ負荷が閾値を超えた場合に前記IPパケット受信の制限を段階的に強め、サーバ負荷が閾値以下となった場合に前記IPパケット受信の制限を段階的に弱めることができる。   Further, when the server load exceeds a threshold value, the IP packet reception limit can be gradually increased, and when the server load becomes equal to or less than the threshold value, the IP packet reception limit can be gradually decreased.

本発明に基づくことにより、サーバ過負荷時におけるリクエスト優先制御に要する負荷を軽減できる。   Based on the present invention, the load required for request priority control when the server is overloaded can be reduced.

(第一〜第三実施例に共通の事項)
本実施例の負荷制御システムのブロック構成を図1に示す。本実施例は、クライアント1−1〜1−nと負荷制御機能付サーバ3とから構成される。以下、単にサーバと呼ぶ場合は、この負荷制御機能付サーバ3を指すものとする。サーバは、ネットワークを介して1つ以上のクライアント1−1〜1−n(以下では符号1−1〜1−nを省略する)と接続される。サーバがリクエストを受信すると、適切なコンテンツをレスポンスとして返送する。サーバは、リクエストを自身で処理することも、バックエンドのサーバに対して処理を依頼するプロキシとして動作することもできる。
(Matters common to the first to third embodiments)
FIG. 1 shows a block configuration of the load control system of the present embodiment. The present embodiment includes clients 1-1 to 1-n and a server 3 with a load control function. Hereinafter, when simply referred to as a server, the server 3 with load control function is indicated. The server is connected to one or more clients 1-1 to 1-n (hereinafter, reference numerals 1-1 to 1-n are omitted) via a network. When the server receives the request, it returns appropriate content as a response. The server can process the request itself, or it can act as a proxy to request processing from the back-end server.

リクエストを処理し終わると、サーバは結果をレスポンスとしてクライアントに返送する。なお、サーバとクライアントとの間でリクエスト/レスポンスを送受信するためのプロトコルとして、TCP/IPが用いられるものとする。   After processing the request, the server sends the result back to the client as a response. It is assumed that TCP / IP is used as a protocol for transmitting / receiving a request / response between the server and the client.

本実施例のサーバは、サーバの負荷に応じてTCP/IP処理を適切に制御する。ここで、サーバ負荷の測定対象として、以下のリソースを想定する。このとき、以下のリソースのいずれかのみを測定しても、全リソースを測定しても、また、複数のリソースを選択的に測定してもよい。
・CPU使用率(U):サーバ全体で単位時間あたりに使用したCPU時間の割合
・メモリ使用量(M):サーバが使用中のメモリ量
・同時接続TCPコネクション数(C):クライアントとサーバとの間で接続されるTCPコネクションの数
さらに、各リソースに閾値を定める。CPU使用率U、メモリ使用量M、同時接続TCPコネクション数Cに対する閾値をそれぞれ、LU、LM、LCと表記する。本発明では、測定対象とする、各リソースがその閾値を超える場合に、サーバが過負荷である、と表現する。本実施例では、各リソースが閾値以下となるように、TCP/IP処理の制御を試みる。
The server of this embodiment appropriately controls TCP / IP processing according to the load on the server. Here, the following resources are assumed as the server load measurement targets. At this time, only one of the following resources may be measured, all resources may be measured, or a plurality of resources may be selectively measured.
CPU usage rate (U): Percentage of CPU time used per unit time in the entire server Memory usage amount (M): Memory amount used by the server Number of simultaneously connected TCP connections (C): Client and server Further, a threshold value is defined for each resource. The threshold values for the CPU usage rate U, the memory usage amount M, and the simultaneous connection TCP connection number C are expressed as LU, LM, and LC, respectively. In the present invention, it is expressed that the server is overloaded when each resource to be measured exceeds the threshold. In this embodiment, control of TCP / IP processing is attempted so that each resource is equal to or less than a threshold value.

本実施例のサーバの構成を図2に示す。本実施例のサーバは、以下によって構成される。
・アプリケーション部10
・リクエスト優先制御部11
・負荷制御機能付TCP/IP処理部12
・優先度予測部13
アプリケーション部10では、リクエストに指定されるURLに基づきコンテンツを作成し、レスポンスとして返送する。アプリケーション部10にリクエストを処理させても、アプリケーション部10をリバースProxyとして動作させ、バックエンドのサーバにリクエストを処理させてもよい。
The configuration of the server of this embodiment is shown in FIG. The server of this embodiment is configured by the following.
Application section 10
Request priority control unit 11
-TCP / IP processing unit 12 with load control function
Priority prediction unit 13
The application unit 10 creates content based on the URL specified in the request and returns it as a response. Even if the application unit 10 processes the request, the application unit 10 may be operated as a reverse proxy and the back-end server may process the request.

リクエスト優先制御部11では、サーバのアプリケーション層でリクエストの種別に応じた優先制御をする。サーバがTCP/IPを介してリクエストを受信すると、次に、Webアプリケーションでリクエストを処理させる前に、リクエストを解析する。そして、重要だと判定されたリクエスト、例えば、継続中のページ・セッション処理に属するリクエストから、優先的にWebアプリケーションで処理させる。また、サーバが混雑し全てのリクエストを処理しきれなくなった場合は、重要度の低いリクエストから拒絶する。   The request priority control unit 11 performs priority control according to the request type in the application layer of the server. When the server receives the request via TCP / IP, the request is then analyzed before the request is processed by the Web application. Then, the Web application preferentially processes requests determined to be important, for example, requests belonging to ongoing page session processing. If the server is too busy to process all requests, it rejects requests with low importance.

優先度予測部13は、リクエスト優先制御部11におけるリクエスト分析結果を元に、同じ送信元IPアドレスから送信される後続リクエストの優先度を予測する。ここで、説明を簡単化するため、リクエストの優先度として、高優先と低優先との2段階のみを用いる。優先度予測部13では、後続リクエストが高優先であると判定されたクライアントの送信元IPアドレスを高優先アドレス表に登録する。   The priority prediction unit 13 predicts the priority of subsequent requests transmitted from the same transmission source IP address based on the request analysis result in the request priority control unit 11. Here, in order to simplify the description, only two stages of high priority and low priority are used as request priorities. The priority predicting unit 13 registers the transmission source IP address of the client for which the subsequent request is determined to have high priority in the high priority address table.

本実施例のTCP/IP処理では、この高優先アドレス表を参照することで、負荷を制御する。図3に高優先アドレス表を示す。高優先アドレス表には、高優先なリクエストを送信すると予測される送信元のIPアドレスと、当該エントリの有効期限とが登録される。有効期限としては、2006年5月21日13時45分30秒のように絶対時刻で設定することも、残り何秒、というように相対時間で設定することもできる。   In the TCP / IP processing of this embodiment, the load is controlled by referring to this high priority address table. FIG. 3 shows a high priority address table. In the high priority address table, an IP address of a transmission source that is predicted to transmit a high priority request and an expiration date of the entry are registered. The expiration date can be set as an absolute time such as 13:45:30 on May 21, 2006, or as a relative time such as how many seconds remain.

高優先コネクション表への登録時に、既に同じアドレスが登録されていた場合は、該当するエントリの有効期限のみを更新すればよい。なお、本明細書では、高優先アドレス表にIPアドレスが登録されているクライアントを高優先クライアント、登録されていないクライアントを低優先クライアントと呼ぶ。また、高優先クライアントと接続されるコネクションを高優先コネクション、低優先クライアントと接続されるコネクションを低優先コネクションと呼ぶこととする。   If the same address has already been registered at the time of registration in the high priority connection table, it is only necessary to update the expiration date of the corresponding entry. In this specification, a client whose IP address is registered in the high priority address table is called a high priority client, and a client that is not registered is called a low priority client. A connection connected to a high priority client is called a high priority connection, and a connection connected to a low priority client is called a low priority connection.

本実施例における優先度予測方法を示す。以下で示す方法の全てを用いても、いずれかのみを用いてもよい。
・複数のリクエストが必要な処理の進行に基づく予測:前述したように、一つの処理を完了するために、複数のリクエストの実行を要する処理として、ページ処理、セッション処理がある。本実施例では、ページ処理またはセッション処理の進行に基づき、今後送られてくるリクエストの優先度をIPアドレス単位で予測する。
The priority prediction method in a present Example is shown. All of the methods described below may be used, or only one of them may be used.
Prediction based on progress of processing requiring a plurality of requests: As described above, there are page processing and session processing as processing that requires execution of a plurality of requests to complete one processing. In this embodiment, based on the progress of page processing or session processing, the priority of a request sent in the future is predicted in units of IP addresses.

・ページ処理の進行に基づく優先度予測:ページ処理保護の観点から、処理中のページ処理に属するリクエストを優先化する場合がある。故に、ページルートリソースへのリクエストの処理が完了した時点で、そのリクエストのクライアントのアドレスを優先アドレス表に登録する。ページルートリソースであるか否かは、例えば、ページルートリソースとそれ以外のリソースとを異なるディレクトリに格納しておくことで、リクエストのURLから判定できる。高優先アドレス表の有効期限としてページ処理の完了に十分な値を設定する。一般的に、ページ処理は通常、数秒で完了する。   Priority prediction based on progress of page processing: From the viewpoint of page processing protection, priority may be given to requests belonging to the page processing being processed. Therefore, when the processing of the request to the page root resource is completed, the client address of the request is registered in the priority address table. Whether or not it is a page root resource can be determined from the URL of the request by storing the page root resource and other resources in different directories, for example. Set a value sufficient for the completion of page processing as the expiration date of the high priority address table. In general, page processing is usually completed in a few seconds.

・セッション処理の進行に基づく優先度予測:セッション処理保護の観点から、処理中のページ処理に属するリクエストは優先化する場合がある。故に、セッション開始がアプリケーションに承認されたクライアントのアドレスを優先アドレス表に登録する。セッション処理が承認されたか否かの判定法として、例えば、以下の方法がある。   Priority prediction based on the progress of session processing: From the viewpoint of session processing protection, requests belonging to the page processing being processed may be prioritized. Therefore, the address of the client whose session start is approved by the application is registered in the priority address table. As a method for determining whether or not the session processing has been approved, for example, there are the following methods.

Webサーバでは一般的に、セッション処理の開始時にセッション識別番号を発行する。そして、セッション識別番号を、HTTPのCookieなどを用いてレスポンスに付与し、クライアントに通知する。クライアントは、その後のリクエストにWebサーバから通知されたセッション識別番号を付与することで、Webサーバはリクエストが属するセッションを識別する。   In general, a Web server issues a session identification number at the start of session processing. Then, the session identification number is given to the response using HTTP Cookie or the like and notified to the client. The client gives the session identification number notified from the Web server to the subsequent request, so that the Web server identifies the session to which the request belongs.

したがって、優先度予測部13では、レスポンスにセッション識別番号が付与されている場合に、そのクライアントがセッション処理を開始したとみなす。そして、レスポンスの返却先であるクライアントのIPアドレスを、高優先アドレス表に格納する。有効期限はセッション処理を完了するのに十分な値を設定する。セッション処理は一般的に数分〜数十分を要するため、ページ処理の有効期限より長く設定すべきである。
・ユーザ識別番号(ユーザID)に基づく優先度予測:リクエスト中に格納されるユーザIDに基づきリクエストを優先制御する場合がある。ユーザIDは一般的に、CookieやURLのクエリに格納される。故に、リクエストを受信した際に、リクエストのCookieやURLを検査し、ユーザIDが含まれるか否かを判定する。
Therefore, the priority predicting unit 13 considers that the client has started session processing when a session identification number is given to the response. Then, the IP address of the client to which the response is returned is stored in the high priority address table. The expiration date is set to a value sufficient to complete session processing. Since session processing generally requires several minutes to several tens of minutes, it should be set longer than the expiration date of page processing.
Precedence prediction based on user identification number (user ID): The request may be preferentially controlled based on the user ID stored in the request. The user ID is generally stored in a Cookie or URL query. Therefore, when the request is received, the cookie and URL of the request are inspected to determine whether or not the user ID is included.

ユーザIDが含まれる場合は、次に、そのユーザIDが優先化されるべきIDか否かを判定する。高優先とすべきユーザIDである場合は、そのリクエストを送信したクライアントが今後もそのユーザIDをリクエストに含める可能性が高いと判定し、そのアドレスを高優先アドレス表に登録する。ユーザIDとアドレスとの関係は頻繁に変化しないと考えられるため、有効期限としてページ処理、セッション処理の場合より長く設定することができる。   If the user ID is included, it is next determined whether the user ID is an ID to be prioritized. If it is a user ID that should be given high priority, it is determined that the client that transmitted the request is likely to include the user ID in the request in the future, and the address is registered in the high priority address table. Since it is considered that the relationship between the user ID and the address does not change frequently, the expiration date can be set longer than in the case of page processing and session processing.

(第一実施例)
第一実施例として、負荷制御機能付TCP/IP処理部12の実行手順を説明する。負荷制御機能付TCP/IP処理部12とは、本発明に基づく負荷制御が可能なように拡張されたTCP/IPである。すなわち、サーバ過負荷時には、優先度予測部13の予測結果に基づき、クライアントからのパケット受信を規制する。処理内容の多くは通常のIP処理と同じであるため、ここでは、通常のTCP/IP処理と異なる箇所にのみ注目して説明する。
(First Example)
As a first embodiment, an execution procedure of the load control function-equipped TCP / IP processing unit 12 will be described. The TCP / IP processing unit 12 with load control function is TCP / IP extended so that load control based on the present invention is possible. That is, when the server is overloaded, packet reception from the client is restricted based on the prediction result of the priority prediction unit 13. Since most of the processing contents are the same as those in the normal IP processing, only the points different from the normal TCP / IP processing will be described here.

まず、本TCP/IP処理の開始時に、サーバ負荷に応じて、IPパケットの受信可否を制御する。ここでは特にTCPコネクションの接続レートの制御を行う。過負荷時には、IPパケットのうち、TCPコネクションの接続要求、すなわちTCP/SYNパケットレートを制限することで、既存のコネクションを保護しつつ、新たなコネクションからのリクエストの転送を抑制する。   First, at the start of this TCP / IP process, whether or not an IP packet can be received is controlled according to the server load. Here, the connection rate of the TCP connection is particularly controlled. In the case of an overload, by limiting the connection request of the TCP connection, that is, the TCP / SYN packet rate, in the IP packet, the transfer of the request from the new connection is suppressed while protecting the existing connection.

ここで接続要求レートの上限をF(pps: packet per second)で表す。このとき本実施例では、サーバ負荷が閾値を超えている場合は、接続要求レートの上限Fを減少させる。そして上限Fを超えるTCP/SYNパケットを受信した場合は、その超過分を廃棄する。   Here, the upper limit of the connection request rate is represented by F (pps: packet per second). At this time, in this embodiment, when the server load exceeds the threshold, the upper limit F of the connection request rate is decreased. If a TCP / SYN packet exceeding the upper limit F is received, the excess is discarded.

一方で、サーバ負荷が閾値を超えていないにも関わらずTCP/SYNパケットが廃棄されている場合は、その接続要求レートの上限Fを上昇させる。さらに本実施例では、接続要求レート制限において、アプリケーション層で予測された優先度を用いた優先制御を行う。なお、本明細書では、リクエストを送信するL4プロトコルとしてTCPの利用を想定しているが、UDPを用いる場合は、TCP/SYNパケットをUDPパケットと読み替えてもよい。   On the other hand, when the TCP / SYN packet is discarded even though the server load does not exceed the threshold, the upper limit F of the connection request rate is increased. Furthermore, in the present embodiment, priority control using priority predicted in the application layer is performed in connection request rate limitation. In this specification, it is assumed that TCP is used as the L4 protocol for transmitting a request. However, when UDP is used, a TCP / SYN packet may be read as a UDP packet.

説明を単純化するために、高優先クライアントからのTCP/SYNパケットは常にその受信を許可するものとする。一方で、低優先クライアントからのTCP/SYNパケットをレート制御の対象とする。また、パケットのレート制御のアルゴリズム例として、トークンバケット方式を用いて説明する。   To simplify the description, it is assumed that TCP / SYN packets from high priority clients are always allowed to be received. On the other hand, TCP / SYN packets from low priority clients are subject to rate control. Further, an example of the packet rate control algorithm will be described using a token bucket method.

トークンバケット方式では、パケット処理の実行に必要なトークンを一定容量のバケツに一定速度で追加していく。トークン数がバケツの容量を超える場合は、トークンの追加を見合わせる。IPパケット受信時において、バケツの中にトークンが残っているならば、そのトークンを消費し、パケットの処理を起動する。一方で、バケツの中にトークンが空である場合は、当該パケットを廃棄する。トークンの追加速度とバケツの容量とを調整することにより、適切にパケットのレートを制限できる。   In the token bucket method, tokens necessary for executing packet processing are added to a bucket of a certain capacity at a constant speed. If the number of tokens exceeds the bucket capacity, stop adding tokens. When the IP packet is received, if a token remains in the bucket, the token is consumed and packet processing is started. On the other hand, if the token is empty in the bucket, the packet is discarded. By adjusting the token addition speed and the bucket capacity, the packet rate can be appropriately limited.

図4は、本発明に基づきレート制限する場合の実行手順を示している。図4は、本サーバがIPパケットをネットワークから受信した際の、TCP/IP処理の前処理として実行される。まず、IPパケットを受け取ると、当該パケットがTCP/SYNパケットであるか否かを検査する。TCP/SYNパケットである場合は、そのままTCP/IP処理を継続する。   FIG. 4 shows an execution procedure for rate limiting according to the present invention. FIG. 4 is executed as pre-processing of TCP / IP processing when the server receives an IP packet from the network. First, when an IP packet is received, it is checked whether the packet is a TCP / SYN packet. If it is a TCP / SYN packet, the TCP / IP process is continued as it is.

次に、当該IPパケットの送信元IPアドレスが、優先アドレス表に登録されているか否かを判定する。優先アドレス表に登録されている場合は、そのままTCP/IP処理を継続する。   Next, it is determined whether or not the source IP address of the IP packet is registered in the priority address table. If it is registered in the priority address table, the TCP / IP process is continued as it is.

次に、当該IPパケットを処理するためのトークンが残っているか否かを判定する。残りトークンがある場合は、トークンを一つ消費し、そのままTCP/IP処理を継続する。一方で、残っているトークンがない場合は、TCP/SYNパケットのレートがFを上回っているとみなし、廃棄フラグをセットさせた後、当該IPパケットを廃棄する。   Next, it is determined whether or not a token for processing the IP packet remains. If there are remaining tokens, one token is consumed and TCP / IP processing is continued as it is. On the other hand, if there is no remaining token, it is assumed that the rate of the TCP / SYN packet is higher than F, the discard flag is set, and then the IP packet is discarded.

次に、バケツに対しトークンの追加を行う処理部(トークン追加処理部)の実行手順を図5に示す。トークン追加処理部は、当該サーバが起動されると同時に起動され、サーバの動作終了までトークン追加処理を繰り返す。トークンの追加処理は時間D毎に実施すると仮定し、時間Dが経過するまで、実行待ち合わせる。次に、Fの更新が必要か否かを判定する。Fは一定時間間隔毎に更新してもよく、また受信したパケットが一定数を超えるたびにFを更新してもよい。   Next, FIG. 5 shows an execution procedure of a processing unit (token addition processing unit) that adds a token to the bucket. The token addition processing unit is activated at the same time when the server is activated, and repeats the token addition processing until the server operation is completed. It is assumed that the token addition process is performed every time D, and the execution waits until the time D elapses. Next, it is determined whether or not F needs to be updated. F may be updated at regular time intervals, or F may be updated each time the number of received packets exceeds a certain number.

Fの更新が必要な場合は、まず、サーバが過負荷であるか否かを判定する。すなわち、CPU負荷U、メモリ使用量M、TCPコネクション数Cのうち測定対象とするリソースにおいて、それぞれの閾値LU、LM、LCを超えているか判定する。次に、閾値を超えている場合は、サーバ負荷を軽減するため、FをΔF減少させる。一方で、閾値を超えていない場合は、次に、現在のFによる制限が強過ぎないか否かを判定する。   When F needs to be updated, it is first determined whether or not the server is overloaded. That is, it is determined whether the resource to be measured among the CPU load U, the memory usage M, and the number of TCP connections C exceeds the respective threshold values LU, LM, and LC. Next, when the threshold value is exceeded, F is reduced by ΔF in order to reduce the server load. On the other hand, if the threshold is not exceeded, it is next determined whether or not the current limit by F is too strong.

すなわち、過負荷でないにもかかわらずTCP/SYNパケットの廃棄が行われている場合は、レート制限が強過ぎることを意味している。したがって、廃棄フラグが真である場合は、FをΔF上昇させ、レート制限を緩和させる。最後に廃棄フラグをリセットする。   In other words, if the TCP / SYN packet is discarded despite not being overloaded, it means that the rate limit is too strong. Therefore, if the discard flag is true, F is increased by ΔF to relax the rate limit. Finally, the discard flag is reset.

Fの更新が必要ない場合、またはFの更新が完了すると、次にトークンをバケツに追加する。このときの追加されるトークン数はF×Dである。このとき、トークン数がバケツの容量を超えないようにする。   If F update is not required, or when F update is complete, the token is then added to the bucket. The number of tokens added at this time is F × D. At this time, the number of tokens should not exceed the bucket capacity.

なお、TCP/SYNパケットのレート制御は、サーバではなくサーバ前段に接続されたネットワーク装置(ルータ、L2スイッチ、Firewall、負荷分散装置)などで実施してもよい。この場合は、優先すべきIPアドレスと、サーバのCPU負荷をネットワーク装置に送信する。そしてネットワーク装置にて、図4および図5の実行手順に基づきTCP/SYNパケットのレート制御を行う。   Note that the rate control of TCP / SYN packets may be performed not by the server but by a network device (router, L2 switch, Firewall, load balancer) connected to the previous stage of the server. In this case, the priority IP address and the CPU load of the server are transmitted to the network device. Then, the TCP / SYN packet rate control is performed in the network device based on the execution procedure of FIGS.

(第二実施例)
第一実施例では、過負荷時に新規確立されるTCPコネクションのレートを制限することで、サーバの負荷の低減を図っていた。しかし、過負荷時に個々のTCPコネクションのリクエストレートを制御することで、サーバの負荷を減少させることができる。
(Second embodiment)
In the first embodiment, the load on the server is reduced by limiting the rate of the TCP connection newly established at the time of overload. However, the server load can be reduced by controlling the request rate of each TCP connection during an overload.

TCPの受信側のバッファ溢れを回避するための機能として、Windowサイズに基づくフロー制御がある。フロー制御では、応答メッセージであるACKを返送する際に、受信用バッファの残りバイト数をWindowサイズとして、送信側に通知する。送信側では、通知されたWindowサイズより大きいデータを送信しないようにする。したがって、サーバのWindowサイズが小さくなればなるほど、クライアントから送信されるデータ量(すなわち、リクエスト量)が小さくなる。   As a function for avoiding buffer overflow on the TCP reception side, there is a flow control based on the window size. In flow control, when an ACK that is a response message is returned, the number of bytes remaining in the reception buffer is notified to the transmission side as a window size. On the transmission side, data larger than the notified window size is not transmitted. Therefore, the smaller the window size of the server, the smaller the amount of data transmitted from the client (that is, the request amount).

本実施例では、過負荷時にWindowサイズがより小さくなるように制御する。このとき、低優先クライアントと接続されたコネクションを優先的に規制してもよい。本明細書では説明の単純化のため、高優先クライアントと接続されたコネクションのWindowサイズ制御は行わないとする。TCP処理におけるWindowサイズをwとする。これに係数k(0≦k≦1)を用いると、ACKパケットによってクライアントに通知されるWindowサイズwは、以下の式によって表されるとする。   In the present embodiment, control is performed so that the window size becomes smaller during overload. At this time, the connection connected to the low priority client may be preferentially restricted. In the present specification, for simplification of description, it is assumed that the window size control of the connection connected to the high priority client is not performed. The window size in TCP processing is set to w. When the coefficient k (0 ≦ k ≦ 1) is used for this, the window size w notified to the client by the ACK packet is expressed by the following equation.

W=w …高優先クライアントと接続されたコネクション
W=kw …低優先クライアントと接続されたコネクション
ここで、kは図6に示される実行手順に基づき、定期的に更新される。まず、所定時間の間、更新を待ち合わせる。次に過負荷が生じているか否かを判定する。すなわち、CPU負荷U、メモリ使用量M、TCPコネクション数Cのうち測定対象とするリソースにおいて、それぞれの閾値LU、LM、LCを超えているか判定する。過負荷が生じている場合は、kの値をΔk減少させ、より小さなWindowサイズがクライアントに通知されるようにする。
W = w... Connection connected with high priority client W = kw... Connection connected with low priority client Here, k is periodically updated based on the execution procedure shown in FIG. First, an update is waited for a predetermined time. Next, it is determined whether or not an overload has occurred. That is, it is determined whether the resource to be measured among the CPU load U, the memory usage M, and the number of TCP connections C exceeds the respective threshold values LU, LM, and LC. When overload occurs, the value of k is decreased by Δk so that a smaller window size is notified to the client.

このとき、kの値が小さくなり過ぎると、サイズが小さいパケットによってデータが送信されるようになり、サーバの効率が低下する。故に、kの下限KMINを下回った場合はkを0とし、優先度が低いクライアントからサーバにリクエストが流れないようにする。 At this time, if the value of k becomes too small, data is transmitted by a packet having a small size, and the efficiency of the server is lowered. Therefore, if the value falls below the lower limit K MIN of k, k is set to 0 so that a request does not flow from the client having a low priority to the server.

一方で、過負荷が生じていない場合は、kの値をΔk増加させ、より多くのリクエストが送信されるようにする。まずkの値が0であるかを確認する。kが0の場合は、クライアントからサーバへのリクエスト送信が停止している状態である。故に、Windowサイズが回復したことを示すACKメッセージを、優先度が低いクライアントに送信する。次に、kの値を増加させる。このときkが1を超えないようにする。   On the other hand, if no overload occurs, the value of k is increased by Δk so that more requests are transmitted. First, it is confirmed whether the value of k is 0. When k is 0, the request transmission from the client to the server is stopped. Therefore, an ACK message indicating that the window size has been restored is transmitted to the client having a low priority. Next, the value of k is increased. At this time, k does not exceed 1.

図6では、低優先コネクションのWindowサイズを一律で小さくしていた。しかしながら、コネクション毎にkを設定できるようにし、非優先コネクションの一部のリクエスト送信を停止させることもできる。図7にその実行手順を示す。まず、所定時間の間、更新を待ち合わせる。次に過負荷が生じているか否か判定する。すなわち、CPU負荷U、メモリ使用量M、TCPコネクション数Cのうち測定対象とするリソースにおいて、それぞれの閾値LU、LM、LCを超えているか判定する。   In FIG. 6, the window size of the low priority connection is uniformly reduced. However, it is possible to set k for each connection, and it is also possible to stop transmission of some requests of non-priority connections. FIG. 7 shows the execution procedure. First, an update is waited for a predetermined time. Next, it is determined whether or not an overload has occurred. That is, it is determined whether the resource to be measured among the CPU load U, the memory usage M, and the number of TCP connections C exceeds the respective threshold values LU, LM, and LC.

過負荷が生じている場合は、k>0である低優先コネクションから、リクエスト送信を停止させるコネクションを選択する。ここで、選択されるコネクション数は複数であってもよい。また、コネクションは、ランダムに選んでもよく、また、リクエスト・レスポンスの送受信に使用されていない期間が最も長いコネクション、または、最も新しく接続されたコネクション、などから選んでもよい。次に選択したコネクションのkを0とする。これにより、選択されたコネクションからのリクエスト送信を停止させ、サーバの負荷を測る。   When an overload occurs, a connection for stopping request transmission is selected from low priority connections in which k> 0. Here, a plurality of connections may be selected. The connection may be selected at random, or may be selected from a connection that has not been used for transmission / reception of a request / response, a connection having the longest period, or a connection that has been newly connected. Next, k of the selected connection is set to 0. This stops request transmission from the selected connection and measures the load on the server.

一方で、過負荷が生じていない場合は、リクエスト送信を停止させていたコネクション、すなわちk=0のコネクションから、リクエスト送信を再開するコネクションを選択する。ここで、一度に選択されるコネクション数は複数であってもよい。また、コネクションは、ランダムに選んでもよく、また、最も長くリクエスト送信が停止されていたコネクション、などを選んでもよい。次に、選択したコネクションのkを1とし、Windowサイズが回復したことを示すACKメッセージを、クライアントに送信する。   On the other hand, if no overload has occurred, a connection that resumes request transmission is selected from the connections that have stopped request transmission, that is, connections with k = 0. Here, a plurality of connections may be selected at a time. Further, the connection may be selected randomly, or a connection that has been suspended for the longest time may be selected. Next, k of the selected connection is set to 1, and an ACK message indicating that the window size has been restored is transmitted to the client.

なお、TCP/SYNレート制御と、Windowサイズ制御とを併用することもできる。この場合は、例えば、まずTCP/SYNレート制御を実施する。そして、Fの値が十分小さくなっても、過負荷が解消されない場合は、Windowサイズ制御を用いて、すでに確立されているコネクションのリクエストレートを減少させる、といった手法がとれる。   Note that TCP / SYN rate control and window size control can be used in combination. In this case, for example, TCP / SYN rate control is first performed. If the overload is not resolved even if the value of F is sufficiently small, a method of reducing the request rate of an already established connection using window size control can be used.

図7では、Windowサイズの変更によってパケット受信を停止させているが、選択したコネクションを切断することによって、パケット受信を停止させてもよい。この場合は、サーバが過負荷となっていない場合の処理は不要である。   In FIG. 7, the packet reception is stopped by changing the window size, but the packet reception may be stopped by cutting the selected connection. In this case, processing when the server is not overloaded is unnecessary.

(第三実施例)
第三実施例として、同時接続TCPコネクション数Cに注目した、過負荷回避方法について述べる。本実施例では、同時接続TCPコネクション数Cが過負荷となっている場合には、TCPコネクションの接続確立処理(例えばC言語におけるaccept())において、優先アドレス表に登録されているクライアントからのコネクションを優先的に確立する。
(Third embodiment)
As a third embodiment, an overload avoidance method focusing on the number C of simultaneously connected TCP connections will be described. In this embodiment, when the number C of simultaneously connected TCP connections is overloaded, in the connection establishment process (for example, accept () in C language) from the client registered in the priority address table. Establish a connection preferentially.

図8に本実施例によるTCPコネクション接続処理の実行手順を示す。本処理は新規TCPコネクションを確立された際に呼び出されるものとする。まず、新規TCPコネクションの確立によって、同時接続TCPコネクション数Cがその閾値LCを超えるか否かを判定する。閾値を超えていない場合は、当該処理を終了させる。閾値を超えている場合は、次に新しく確立したTCPコネクションの送信元のクライアントのIPアドレスが、優先アドレス表に登録されているか否かを検査する。優先アドレス表に登録されていない場合は、新規確立されたTCPコネクションを切断し、当該処理を終了する。   FIG. 8 shows the execution procedure of the TCP connection connection process according to this embodiment. This process is called when a new TCP connection is established. First, it is determined whether or not the number C of simultaneously connected TCP connections exceeds the threshold LC by establishing a new TCP connection. If the threshold is not exceeded, the process is terminated. When the threshold value is exceeded, it is checked whether or not the IP address of the transmission source client of the newly established TCP connection is registered in the priority address table. If it is not registered in the priority address table, the newly established TCP connection is disconnected and the process is terminated.

優先アドレス表に登録されている場合は、新規に確立されたTCPコネクションは優先して維持すべきであることを意味する。故に、まず優先アドレス表に登録されていないクライアントと接続されたTCPコネクションが存在するか否かを検査する。存在する場合は、優先アドレス表に登録されていないクライアントと接続されたTCPコネクションの中から一つのコネクションを選択して切断する。切断するコネクションはランダムに選んでもよく、また、リクエスト・レスポンスの送受信に使用されていない期間が最も長いコネクション、最も新しく接続されたコネクション、などを選んでもよい。一方で、存在しない場合は、新規コネクションを切断する。   When registered in the priority address table, it means that a newly established TCP connection should be maintained with priority. Therefore, it is first checked whether there is a TCP connection connected to a client that is not registered in the priority address table. If it exists, one connection is selected from the TCP connections connected to the clients not registered in the priority address table and disconnected. The connection to be disconnected may be selected at random, or the connection that has not been used for request / response transmission / reception for the longest period or the connection that has been newly connected may be selected. On the other hand, if it does not exist, the new connection is disconnected.

本発明に基づくことにより、サービスの途中でリクエストが廃棄され中断されることがなくなり、サーバの処理能力を向上させることができる。   Based on the present invention, the request is not discarded and interrupted in the middle of the service, and the processing capability of the server can be improved.

本実施例の負荷制御システムのブロック構成図。The block block diagram of the load control system of a present Example. 本実施例のサーバのブロック構成図。The block block diagram of the server of a present Example. 本実施例の高優先アドレス表の一例を示す図。The figure which shows an example of the high priority address table | surface of a present Example. 本実施例のIPパケットの受信処理手順を示すフローチャート。The flowchart which shows the reception process procedure of the IP packet of a present Example. 本実施例のトークン追加処理の実行手順を示すフローチャート。The flowchart which shows the execution procedure of the token addition process of a present Example. 本実施例のWindowサイズ制御の実施例(一律規制)を示すフローチャート。The flowchart which shows the Example (uniform regulation) of the Window size control of a present Example. 本実施例のWindowサイズ制御の実施例(選択規制)を示すフローチャート。The flowchart which shows the Example (selection regulation) of the window size control of a present Example. 本実施例の新規TCPコネクション確立時のコネクション選択処理手順を示すフローチャート。The flowchart which shows the connection selection process sequence at the time of the new TCP connection establishment of a present Example.

符号の説明Explanation of symbols

1−1〜1−n クライアント
2 ネットワーク
3 負荷制御機能付サーバ
10 アプリケーション部
11 リクエスト優先制御部
12 負荷制御機能付TCP/IP処理部
13 優先度予測部
1-1 to 1-n Client 2 Network 3 Server 10 with load control function Application unit 11 Request priority control unit 12 TCP / IP processing unit with load control function 13 Priority prediction unit

Claims (12)

クライアントからリクエストを受信し、レスポンスを返送するサーバに用いる負荷制御システムにおいて、
複数のリクエストを要する処理の進行に基づき、リクエストの送信元クライアントのIPアドレス毎に優先度を設定する手段と、
サーバ負荷が閾値を超えたか否かを判定する手段と、
閾値を超えた場合に、低い優先度に設定されたIPアドレスからのIPパケット受信を制限する手段と
を備えたことを特徴とする負荷制御システム。
In a load control system used for a server that receives a request from a client and returns a response,
Means for setting a priority for each IP address of a request source client based on progress of a process requiring a plurality of requests;
Means for determining whether the server load exceeds a threshold;
And a means for restricting reception of an IP packet from an IP address set to a low priority when a threshold value is exceeded.
クライアントからリクエストを受信し、レスポンスを返送するサーバに用いる負荷制御システムにおいて、
リクエストに格納されたユーザ識別情報に基づき、リクエストの送信元クライアントのIPアドレス毎に優先度を設定する手段と、
サーバ負荷が閾値を超えたか否かを判定する手段と、
閾値を超えた場合に、低い優先度に設定されたIPアドレスからのIPパケット受信を制限する手段と
を備えたことを特徴とする負荷制御システム。
In a load control system used for a server that receives a request from a client and returns a response,
A means for setting a priority for each IP address of the request source client based on the user identification information stored in the request;
Means for determining whether the server load exceeds a threshold;
And a means for restricting reception of an IP packet from an IP address set to a low priority when a threshold value is exceeded.
TCP/IPプロトコルを用いて、IPパケットのうち、TCP/SYNパケットのレートを制限することでIPパケット受信を制限する請求項1または2記載の負荷制御システム。   3. The load control system according to claim 1, wherein reception of an IP packet is limited by limiting a rate of a TCP / SYN packet among IP packets using a TCP / IP protocol. TCP/IPプロトコルを用いて、サーバシステムから送信されるTCP−ACKパケットにあるTCPヘッダのWindowサイズを減じることによりIPパケット受信を制限する請求項1または2記載の負荷制御システム。   3. The load control system according to claim 1, wherein reception of an IP packet is limited by reducing a window size of a TCP header in a TCP-ACK packet transmitted from a server system using a TCP / IP protocol. TCP/IPプロトコルを用いて、TCPコネクションを切断することによりIPパケット受信を制限する請求項1または2記載の負荷制御システム。   The load control system according to claim 1 or 2, wherein reception of an IP packet is restricted by disconnecting a TCP connection using the TCP / IP protocol. サーバ負荷が閾値を超えた場合に前記IPパケット受信の制限を段階的に強め、サーバ負荷が閾値以下となった場合に前記IPパケット受信の制限を段階的に弱める請求項1ないし5のいずれかに記載の負荷制御システム。   6. The IP packet reception limit is gradually increased when a server load exceeds a threshold value, and the IP packet reception limit is gradually decreased when a server load becomes equal to or less than the threshold value. Load control system as described in. クライアントからリクエストを受信し、レスポンスを返送するサーバに用いる負荷制御方法において、
複数のリクエストを要する処理の進行に基づき、リクエストの送信元クライアントのIPアドレス毎に優先度を設定し、
サーバ負荷が閾値を超えたか否かを判定し、閾値を超えた場合に、低い優先度に設定されたIPアドレスからのIPパケット受信を制限する
ことを特徴とする負荷制御方法。
In a load control method used for a server that receives a request from a client and returns a response,
Based on the progress of processing that requires multiple requests, set the priority for each IP address of the request source client,
A load control method characterized by determining whether or not a server load exceeds a threshold, and restricting IP packet reception from an IP address set to a low priority when the threshold is exceeded.
クライアントからリクエストを受信し、レスポンスを返送するサーバに用いる負荷制御方法において、
リクエストに格納されたユーザ識別情報に基づき、リクエストの送信元クライアントのIPアドレス毎に優先度を設定し、
サーバ負荷が閾値を超えたか否かを判定し、閾値を超えた場合に、低い優先度に設定されたIPアドレスからのIPパケット受信を制限する
ことを特徴とする負荷制御方法。
In a load control method used for a server that receives a request from a client and returns a response,
Based on the user identification information stored in the request, set the priority for each IP address of the request source client,
A load control method characterized by determining whether or not a server load exceeds a threshold, and restricting IP packet reception from an IP address set to a low priority when the threshold is exceeded.
TCP/IPプロトコルを用いて、IPパケットのうち、TCP/SYNパケットのレートを制限することでIPパケット受信を制限する請求項7または8記載の負荷制御方法。   The load control method according to claim 7 or 8, wherein reception of an IP packet is limited by limiting a rate of a TCP / SYN packet among IP packets using a TCP / IP protocol. TCP/IPプロトコルを用いて、サーバシステムから送信されるTCP−ACKパケットにあるTCPヘッダのWindowサイズを減じることによりIPパケット受信を制限する請求項7または8記載の負荷制御方法。   The load control method according to claim 7 or 8, wherein reception of an IP packet is limited by reducing a window size of a TCP header in a TCP-ACK packet transmitted from a server system using a TCP / IP protocol. TCP/IPプロトコルを用いて、TCPコネクションを切断することによりIPパケット受信を制限する請求項7または8記載の負荷制御方法。   The load control method according to claim 7 or 8, wherein reception of an IP packet is restricted by disconnecting a TCP connection using a TCP / IP protocol. サーバ負荷が閾値を超えた場合に前記IPパケット受信の制限を段階的に強め、サーバ負荷が閾値以下となった場合に前記IPパケット受信の制限を段階的に弱める請求項7ないし11のいずれかに記載の負荷制御方法。   12. The IP packet reception limit is gradually increased when a server load exceeds a threshold value, and the IP packet reception limit is gradually decreased when a server load is equal to or less than the threshold value. The load control method described in 1.
JP2006232169A 2006-08-29 2006-08-29 Load control system and method Pending JP2008059040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006232169A JP2008059040A (en) 2006-08-29 2006-08-29 Load control system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006232169A JP2008059040A (en) 2006-08-29 2006-08-29 Load control system and method

Publications (1)

Publication Number Publication Date
JP2008059040A true JP2008059040A (en) 2008-03-13

Family

ID=39241743

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006232169A Pending JP2008059040A (en) 2006-08-29 2006-08-29 Load control system and method

Country Status (1)

Country Link
JP (1) JP2008059040A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009181481A (en) * 2008-01-31 2009-08-13 Techfirm Kk Computer system, service providing device, service using device, control method and program
JP2013504807A (en) * 2009-09-11 2013-02-07 株式会社エヌ・ティ・ティ・ドコモ Method and apparatus for data center automation
JP2013058830A (en) * 2011-09-07 2013-03-28 Nec Access Technica Ltd Communication device, priority control method, and program
JP2013530567A (en) * 2010-04-12 2013-07-25 クゥアルコム・インコーポレイテッド Scheme and apparatus for controlling multi-resource flows
JP2017046032A (en) * 2015-08-24 2017-03-02 日本電信電話株式会社 System and method for traffic control
JP2017157963A (en) * 2016-02-29 2017-09-07 キヤノン株式会社 Communication device, communication method and program

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000049858A (en) * 1998-07-27 2000-02-18 Hitachi Ltd Communication system
JP2000196677A (en) * 1998-12-28 2000-07-14 Fujitsu Ltd Repeater used for network system
JP2000253048A (en) * 1999-02-26 2000-09-14 Nec Corp Data communication method, terminal, router, data communication system and its recording medium
JP2000322365A (en) * 1999-05-12 2000-11-24 Hitachi Ltd Acceptance limiting method for server computer
JP2001022714A (en) * 1999-07-12 2001-01-26 Hitachi Ltd Server computer, load decentralization system, telephone exchange system, and load decentralizing method
JP2003152783A (en) * 2001-11-19 2003-05-23 Fujitsu Ltd Server load distributing device
JP2003167775A (en) * 2001-11-30 2003-06-13 Mitsubishi Electric Corp Load distribution system and load distribution device
JP2003224607A (en) * 2002-01-30 2003-08-08 Toshiba Corp Server computer protecting device and data transfer control method for the device
JP2003289332A (en) * 2002-03-28 2003-10-10 Ntt Comware Corp Packet repeating apparatus, packet repeating method, packet repeating program, and computer readable recording medium recorded with packet repeating program
JP2004005669A (en) * 2003-05-19 2004-01-08 Fujitsu Ltd Network server allocation system
JP2005100220A (en) * 2003-09-26 2005-04-14 Konica Minolta Business Technologies Inc Server device and its control method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000049858A (en) * 1998-07-27 2000-02-18 Hitachi Ltd Communication system
JP2000196677A (en) * 1998-12-28 2000-07-14 Fujitsu Ltd Repeater used for network system
JP2000253048A (en) * 1999-02-26 2000-09-14 Nec Corp Data communication method, terminal, router, data communication system and its recording medium
JP2000322365A (en) * 1999-05-12 2000-11-24 Hitachi Ltd Acceptance limiting method for server computer
JP2001022714A (en) * 1999-07-12 2001-01-26 Hitachi Ltd Server computer, load decentralization system, telephone exchange system, and load decentralizing method
JP2003152783A (en) * 2001-11-19 2003-05-23 Fujitsu Ltd Server load distributing device
JP2003167775A (en) * 2001-11-30 2003-06-13 Mitsubishi Electric Corp Load distribution system and load distribution device
JP2003224607A (en) * 2002-01-30 2003-08-08 Toshiba Corp Server computer protecting device and data transfer control method for the device
JP2003289332A (en) * 2002-03-28 2003-10-10 Ntt Comware Corp Packet repeating apparatus, packet repeating method, packet repeating program, and computer readable recording medium recorded with packet repeating program
JP2004005669A (en) * 2003-05-19 2004-01-08 Fujitsu Ltd Network server allocation system
JP2005100220A (en) * 2003-09-26 2005-04-14 Konica Minolta Business Technologies Inc Server device and its control method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009181481A (en) * 2008-01-31 2009-08-13 Techfirm Kk Computer system, service providing device, service using device, control method and program
JP2013504807A (en) * 2009-09-11 2013-02-07 株式会社エヌ・ティ・ティ・ドコモ Method and apparatus for data center automation
JP2013530567A (en) * 2010-04-12 2013-07-25 クゥアルコム・インコーポレイテッド Scheme and apparatus for controlling multi-resource flows
US8937863B2 (en) 2010-04-12 2015-01-20 Qualcomm Incorporated Scheme and apparatus for multi-resource flow control
JP2013058830A (en) * 2011-09-07 2013-03-28 Nec Access Technica Ltd Communication device, priority control method, and program
JP2017046032A (en) * 2015-08-24 2017-03-02 日本電信電話株式会社 System and method for traffic control
JP2017157963A (en) * 2016-02-29 2017-09-07 キヤノン株式会社 Communication device, communication method and program

Similar Documents

Publication Publication Date Title
US8667120B2 (en) Load control device and method thereof for controlling requests sent to a server
US11418620B2 (en) Service request management
JP4916809B2 (en) Load balancing control apparatus and method
US7130912B2 (en) Data communication system using priority queues with wait count information for determining whether to provide services to client requests
US7774492B2 (en) System, method and computer program product to maximize server throughput while avoiding server overload by controlling the rate of establishing server-side net work connections
KR100869421B1 (en) Splicing persistent connections
EP1320237B1 (en) System and method for controlling congestion in networks
US7290028B2 (en) Methods, systems and computer program products for providing transactional quality of service
Ros et al. Less-than-best-effort service: A survey of end-to-end approaches
JPWO2006087817A1 (en) Communication control system
JP2008059040A (en) Load control system and method
EP1545093B1 (en) Traffic control apparatus and service system using the same
JP2004164553A (en) Server computer protection apparatus and method, server computer protection program, and server computer
JP2009159024A (en) Communication system, communication regulation method, signal processing server, and program
JP4394710B2 (en) Load control apparatus, method, and program
JP4350098B2 (en) Execution control apparatus and method
EP2245537A1 (en) Network message management device and methods thereof
JP6102347B2 (en) Information device, printing system, computer program, and data transfer method
JP6339974B2 (en) API providing system and API providing method
JP4646931B2 (en) Server apparatus and request organizing method
JP3853784B2 (en) Data communication management method
JP2004206172A (en) Method and apparatus for controlling communication
US20230246966A1 (en) Flexible load balancing on multipath networks
JP2009159231A (en) Test device measurement system
Wang et al. An inter-application and inter-client priority-based QoS proxy architecture for heterogeneous networks

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080827

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7426

Effective date: 20090910

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20090910

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20090910

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20090910

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091201

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091215

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100210

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100323