JP2010061622A - Transaction load distribution device and program - Google Patents

Transaction load distribution device and program Download PDF

Info

Publication number
JP2010061622A
JP2010061622A JP2008229612A JP2008229612A JP2010061622A JP 2010061622 A JP2010061622 A JP 2010061622A JP 2008229612 A JP2008229612 A JP 2008229612A JP 2008229612 A JP2008229612 A JP 2008229612A JP 2010061622 A JP2010061622 A JP 2010061622A
Authority
JP
Japan
Prior art keywords
transaction
message
stage
resource
processing
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
JP2008229612A
Other languages
Japanese (ja)
Inventor
Michiaki Hayashi
通秋 林
Nobutaka Matsumoto
延孝 松本
Takahiro Miyamoto
崇弘 宮本
Hideaki Tanaka
英明 田中
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.)
KDDI Research Inc
Original Assignee
KDDI R&D Laboratories 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 KDDI R&D Laboratories Inc filed Critical KDDI R&D Laboratories Inc
Priority to JP2008229612A priority Critical patent/JP2010061622A/en
Publication of JP2010061622A publication Critical patent/JP2010061622A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To enable load distribution, while preventing a speed of transaction processing from getting low, consistency of a transaction from being deprived, and reliability of the transaction from getting low, even in the stateful transaction. <P>SOLUTION: A transaction reception part 11 receives a message, when an address of the message transmitted from a client in each stage of the stateful transaction is an address of own transaction load distribution device. An ID extracting part 12 extracts a resource ID inserted into the message. Transaction distribution parts 12-15 distribute the message to anyone of a plurality of subordinate processors, based on the resource ID. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、トランザクション負荷分散装置およびプログラムに関し、特に、複数段階の処理または手続きが必要となり、各段階において前段階の状態を考慮する必要があるトランザクションでも負荷分散させることができるトランザクション負荷分散装置およびプログラムに関する。   The present invention relates to a transaction load distribution apparatus and program, and in particular, a transaction load distribution apparatus that can perform load distribution even for a transaction that requires a plurality of stages of processing or procedures and needs to consider the state of the previous stage in each stage. Regarding the program.

従来、処理装置、例えばWebサーバに対するトランザクションの数が膨大である場合、Webサーバの前段にトランザクション負荷分散装置を設け、その配下に複数のWebサーバを配置してトランザクションを分散する形態が採られる。トランザクション負荷分散装置は、仮想的に複数のWebサーバの窓口となるIPアドレスを持ち、クライアントからのトランザクションを受け付け、これを配下の複数のWebサーバに振り分ける。この振り分けは、例えば、ラウンドロビン方式あるいは応答時間の早いWebサーバを優先させるなどの方法によって行われる。このようなトランザクション負荷分散装置は、特許文献1に記載されており、これによれば、クライアントからのトランザクションの数の増大に対処することができる。   Conventionally, when the number of transactions with a processing device, for example, a Web server is enormous, a transaction load distribution device is provided in front of the Web server, and a plurality of Web servers are arranged under the transaction load distribution method. The transaction load balancer virtually has an IP address that serves as a contact point for multiple Web servers, accepts transactions from clients, and distributes them to multiple Web servers under its control. This distribution is performed by, for example, a round robin method or a method of giving priority to a Web server with a fast response time. Such a transaction load distribution device is described in Patent Document 1, and according to this, it is possible to cope with an increase in the number of transactions from a client.

非特許文献1には、複数段階の処理または手続きが必要となるトランザクションについて記載されている。このようなトランザクションは、例えば、2相コミットを利用してトランザクションの原子性や永続性を向上させる場合、以前に要求したトランザクションの条件を後で変更したりするなど、トランザクションに紐付けした柔軟な処理を行う場合などに必要となる。
米国特許6128279号 中川路 哲男著「OSIとUNIX(登録商標)分散トランザクション処理技術解説」ソフト・リサーチセンター 1994年
Non-Patent Document 1 describes a transaction that requires a multi-step process or procedure. Such transactions are flexible, linked to transactions, for example, when using two-phase commit to improve the atomicity and durability of transactions, changing the conditions of previously requested transactions later, etc. Necessary for processing.
US Pat. No. 6,128,279 Tetsuo Nakagawa "OSI and UNIX (registered trademark) Distributed Transaction Processing Technology" Software Research Center 1994

従来のトランザクション負荷分散装置では、トランザクションの状態遷移などのトランザクション間の関連性を考慮しないので、複数段階の処理または手続きが必要となり、各段階において前段階の状態を考慮する必要があるトランザクションの場合、それをそのまま適用することができない。   In the case of a transaction in which the conventional transaction load balancer does not consider the relationship between transactions such as transaction state transitions, so multiple stages of processing or procedures are required, and the state of the previous stage must be considered at each stage It cannot be applied as it is.

負荷分散させた複数のWebサーバ間でのデータベース同期(データベースの状態の同期:ミラーリング)やデータベース集中(共有)化を行うことで、これを可能にすることも考えられるが、データベース同期やデータベース集中化を行うと、トランザクション処理の速度低下が生じ、負荷分散の意味が低減されてしまうという課題が生じる。また、トランザクションの一貫性喪失や信頼性低下などを引き起こす可能性もある。   Database synchronization (database synchronization: mirroring) and database centralization (sharing) between multiple load-distributed Web servers may be possible, but database synchronization and database concentration are also possible. However, there is a problem that the speed of transaction processing is reduced and the meaning of load distribution is reduced. In addition, transaction consistency may be lost and reliability may be reduced.

本発明の目的は、上記課題を解決し、複数段階の処理または手続きが必要となり、各段階において前段階の状態を考慮する必要があるトランザクションでも、トランザクション処理の速度低下や、トランザクションの一貫性喪失や信頼性低下などを引き起こすことなく、負荷分散させることができるトランザクション負荷分散装置およびプログラムを提供することにある。   The object of the present invention is to solve the above-mentioned problems and require a multi-stage process or procedure. Even in a transaction where the state of the previous stage needs to be taken into consideration at each stage, the transaction processing speed is reduced and the transaction is not consistent. It is an object of the present invention to provide a transaction load distribution apparatus and program capable of distributing a load without causing a decrease in reliability and reliability.

上記課題を解決するため、本発明は、クライアントからのトランザクションを複数の処理装置に振り分けて負荷分散させるトランザクション負荷分散装置において、複数段階の処理または手続きが必要となり、各段階において前段階の状態を考慮する必要があるトランザクションの、各段階においてクライアントから送信されてくるメッセージのヘッダ内に挿入されている宛先アドレスが、自トランザクション負荷分散装置のアドレスである場合に、該メッセージを受け付けるトランザクション受付部と、前記トランザクション受付部で受け付けられたメッセージのヘッダ内に挿入されているリソースIDを抽出するID抽出部と、前記ID抽出部により抽出されたリソースIDに基づいて当該メッセージを、配下の複数の処理装置のいずれかに振り分けるトランザクション振り分け部を備えることを特徴としている。   In order to solve the above-described problems, the present invention requires a multi-stage process or procedure in a transaction load distribution apparatus that distributes a load from a client to a plurality of processing apparatuses and distributes the load. A transaction receiving unit that receives the message when the destination address inserted in the header of the message transmitted from the client at each stage of the transaction that needs to be considered is the address of the own transaction load balancer; , An ID extraction unit that extracts a resource ID inserted in the header of the message received by the transaction reception unit, and a plurality of processes under the message based on the resource ID extracted by the ID extraction unit Any of the equipment It is characterized in that it comprises a transaction distributing unit for distributing to.

また、本発明は、前記リソースIDが、トランザクションの最初の段階のメッセージでは、ブランクであり、以降の段階のメッセージでは、最初の段階のメッセージが振り分けられた処理装置からクライアントに送信された応答中に該処理装置が挿入したものであり、前記トランザクション振り分け部は、最初の段階のメッセージを任意の手法により複数の処理装置のうちのいずれかに振り分け、以降の段階のメッセージを、該メッセージに挿入されているリソースIDに従って振り分けることを特徴としている。   Further, according to the present invention, the resource ID is blank in a message at the first stage of a transaction, and in a response sent from the processing apparatus to which the message at the first stage is distributed to a client to a message at the subsequent stage. The transaction distribution unit distributes the message at the first stage to one of a plurality of processing apparatuses by an arbitrary method, and inserts the message at the subsequent stage into the message. It is characterized by sorting according to the resource ID.

また、本発明は、前記リソースIDが、トランザクションの最初の段階のメッセージでは、ブランクであり、以降の段階のメッセージでは、最初の段階のメッセージが振り分けられた処理装置からクライアントに送信された応答中にトランザクション負荷分散装置が挿入したものであり、前記トランザクション振り分け部は、最初の段階のメッセージを任意の手法により複数の処理装置のうちのいずれかに振り分け、以降の段階のメッセージを、該メッセージに挿入されているリソースIDに従って振り分けることを特徴としている。   Further, according to the present invention, the resource ID is blank in a message at the first stage of a transaction, and in a response sent from the processing apparatus to which the message at the first stage is distributed to a client to a message at the subsequent stage. The transaction distribution unit inserts the message at the first stage into one of a plurality of processing devices by an arbitrary method, and the message at the subsequent stage is assigned to the message. It is characterized by sorting according to the inserted resource ID.

また、本発明は、前記リソースIDが、トランザクションの最初の段階のメッセージからクライアントが挿入したものであり、前記トランザクション振り分け部は、トランザクションの各段階のメッセージを、該メッセージに挿入されているリソースIDに従って振り分けることを特徴としている。   According to the present invention, the resource ID is inserted by a client from a message at the first stage of a transaction, and the transaction distribution unit includes a resource ID in which a message at each stage of the transaction is inserted into the message. It is characterized by sorting according to.

また、本発明は、トランザクションの各段階のメッセージに挿入されるリソースIDが、各処理装置に対して予め与えられた範囲の値を持つことを特徴としている。   In addition, the present invention is characterized in that the resource ID inserted in the message at each stage of the transaction has a value in a range given in advance to each processing device.

また、本発明は、トランザクションの各段階のメッセージに挿入されるリソースIDが、それを処理装置数で割ったときの剰余値により各処理装置が同定される値を持つことを特徴としている。   Further, the present invention is characterized in that the resource ID inserted in the message at each stage of the transaction has a value that identifies each processing device by a remainder value obtained by dividing the resource ID by the number of processing devices.

さらに、本発明は、トランザクションの各段階のメッセージに挿入されるリソースIDが、トランザクションのエントリとネットワーク内で唯一の値を有するID情報との積算値あるいはハッシュ値から得られる値を持つことを特徴としている。   Furthermore, the present invention is characterized in that the resource ID inserted in the message at each stage of the transaction has a value obtained from an integrated value or a hash value of the transaction entry and ID information having a unique value in the network. It is said.

なお、本発明は、コンピュータに搭載してトランザクション負荷分散装置として機能させるプログラムとしても実現できる。   The present invention can also be realized as a program that is mounted on a computer and functions as a transaction load distribution apparatus.

本発明のトランザクション負荷分散装置およびプログラムによれば、複数段階の処理または手続きが必要となり、各段階において前段階の状態を考慮する必要があるトランザクションでも、配下の複数の処理装置間のデータベース同期やデータベースの共有化を行うことなく、処理装置間の独立性を維持したまま負荷分散させることができる。したがって、複数段階の処理または手続きが必要となり、各段階において前段階の状態を考慮する必要があるトランザクションでも、トランザクション処理の速度低下や、トランザクションの一貫性喪失や信頼性低下などを引き起こすことなく、負荷分散させることができる。   According to the transaction load distribution apparatus and program of the present invention, it is necessary to perform a multi-stage process or procedure, and even in a transaction that needs to consider the state of the previous stage in each stage, Without sharing the database, it is possible to distribute the load while maintaining independence between the processing apparatuses. Therefore, even if a transaction requires multiple stages of processing or procedures, and each stage needs to consider the state of the previous stage, it does not cause a decrease in transaction processing speed, loss of transaction consistency or reliability, The load can be distributed.

以下、図面を参照して本発明を説明する。以下では、本発明をトランザクション負荷分散装置として実現した場合について説明するが、本発明は、コンピュータに搭載してトランザクション負荷分散装置として機能させるプログラムとしても実現できる。   The present invention will be described below with reference to the drawings. Hereinafter, a case where the present invention is implemented as a transaction load distribution apparatus will be described. However, the present invention can also be implemented as a program that is mounted on a computer and functions as a transaction load distribution apparatus.

図1は、本発明が適用される基本的なトランザクション処理システムの基本構成を示すブロック図である。   FIG. 1 is a block diagram showing a basic configuration of a basic transaction processing system to which the present invention is applied.

トランザクション負荷分散装置10は、クライアント1と複数の分散サーバ(処理装置)2-1,2-2,2-3,・・・の間に設けられ、クライアント1からのトランザクションを受付け、該トランザクションを配下の複数の分散サーバ2-1,2-2,2-3,・・・に振り分ける。   The transaction load balancer 10 is provided between the client 1 and a plurality of distributed servers (processing devices) 2-1, 2-2, 2-3,..., Accepts transactions from the client 1, and Distribute to multiple distributed servers 2-1, 2-2, 2-3, ....

図2は、本発明に係るトランザクション負荷分散装置の一実施形態を示すブロック図である。   FIG. 2 is a block diagram showing an embodiment of the transaction load distribution apparatus according to the present invention.

トランザクション負荷分散装置10は、トランザクション受付部11、ID抽出部12、ID処理部13、宛先編集部14、トランザクション切替部15、ポリシーデータベース(DB)16および宛先DB17を備え、クライアント1からのトランザクションを受付け、配下の複数の分散サーバ2-1,2-2,2-3,・・・に振り分ける。   The transaction load balancer 10 includes a transaction accepting unit 11, an ID extracting unit 12, an ID processing unit 13, a destination editing unit 14, a transaction switching unit 15, a policy database (DB) 16 and a destination DB 17, and processes transactions from the client 1. Accept and distribute to multiple distributed servers 2-1, 2-2, 2-3,.

トランザクション負荷分散装置10は、仮想的に分散サーバ2-1,2-2,2-3,・・・全ての窓口となるIPアドレスを持ち、トランザクション受付部11は、このIPアドレスがヘッダに挿入された、クライアント1からのトランザクションを受け付ける。   The transaction load balancer 10 virtually has an IP address as a distribution server 2-1, 2-2, 2-3,..., And the transaction reception unit 11 inserts this IP address into the header. The received transaction from client 1 is accepted.

ID抽出部12は、トランザクション受付部11で受け付けられたトランザクションからリソースID(Resource ID)を抽出する。例えば、SOAP(Simple Object Access Protocol)で転送されたトランザクションの場合、ID抽出部12としてのXMLパーサ部でトランザクションを解析処理し、Resource IDを抽出する。ポリシーDB16は、トランザクションのヘッダを解析し、Resource IDを抽出するために必要なポリシーを格納している。   The ID extraction unit 12 extracts a resource ID from the transaction accepted by the transaction acceptance unit 11. For example, in the case of a transaction transferred by SOAP (Simple Object Access Protocol), the XML parser unit as the ID extraction unit 12 analyzes the transaction and extracts a Resource ID. The policy DB 16 stores a policy necessary for analyzing a transaction header and extracting a Resource ID.

以下のID処理部13、宛先編集部14およびトランザクション切替部15は、ID抽出部12により抽出されたリソースIDに基づいてメッセージを、配下の分散サーバ2-1,2-2,2-3,・・・のいずれかに振り分けるトランザクション振り分け部として機能する。   The following ID processing unit 13, destination editing unit 14, and transaction switching unit 15 send messages based on the resource ID extracted by the ID extraction unit 12 to subordinate distributed servers 2-1, 2-2, 2-3, It functions as a transaction distribution unit that distributes to any of.

まず、ID処理部13は、受け付けたトランザクションを送出する宛先の分散サーバ2-1,2-2,2-3,・・・を判定するために、ID抽出部12で抽出されたResource IDを計算処理する。この際、定義された処理方法(計算アルゴリズム)は、Resource IDの計算処理が定義されている前処理定義データベースを参照する。この前処理定義データベース定義は、任意に変更可能であり、分散サーバの構成に応じたものとされる。   First, the ID processing unit 13 determines the Resource ID extracted by the ID extracting unit 12 in order to determine the destination distributed servers 2-1, 2-2, 2-3,. Calculate. At this time, the defined processing method (calculation algorithm) refers to the pre-processing definition database in which the resource ID calculation processing is defined. This pre-processing definition database definition can be arbitrarily changed, and depends on the configuration of the distributed server.

宛先編集部14は、宛先DB17に格納されているリソースIDプロファイルを参照し、ID処理部13で計算処理されたResource IDを基に宛先アドレスを編集する。リソースIDプロファイルには、Resource IDと宛先の分散サーバ2-1,2-2,2-3,・・・との関係が定義されている。   The destination editing unit 14 refers to the resource ID profile stored in the destination DB 17, and edits the destination address based on the Resource ID calculated by the ID processing unit 13. In the resource ID profile, the relationship between the Resource ID and the destination distributed servers 2-1, 2-2, 2-3,... Is defined.

トランザクション切替部15は、宛先編集部14で編集された宛先アドレスに従って当該トランザクションを分散サーバ2-1,2-2,2-3,・・・に振り分ける。   The transaction switching unit 15 distributes the transaction to the distributed servers 2-1, 2-2, 2-3,... According to the destination address edited by the destination editing unit 14.

図3は、トランザクション負荷分散装置の負荷分散動作の例を示すフローチャートである。   FIG. 3 is a flowchart illustrating an example of the load distribution operation of the transaction load distribution apparatus.

本例の場合、各分散サーバ2-1,2-2,2-3,・・・に対してResource IDの範囲を予め与える。例えば、分散サーバ2-1に対して0〜10000のResource IDを与え、分散サーバ2-2に対して10001〜20000のResource IDを与え、分散サーバ2-3に対して20001〜30000のResource IDを与える。   In this example, a range of Resource IDs is given in advance to each of the distributed servers 2-1, 2-2, 2-3,. For example, a Resource ID of 0 to 10000 is given to the distributed server 2-1, a Resource ID of 10001 to 20000 is given to the distributed server 2-2, and a Resource ID of 20001 to 30000 is given to the distributed server 2-3. give.

以下では、複数段階の処理または手続きが必要となり、各段階において前段階の状態を考慮する必要があるトランザクションを、状態を持つトランザクション(ステートフル・トランザクション(stateful trnsaction)と称する。また、クライアント1のアドレスが「ID1」であり、トランザクション負荷分散装置10のアドレスが「ID10」であり、分散サーバ2-1,2-2,2-3,・・・のアドレスがそれぞれ「IDA」,「IDB」,「IDC」,・・・であるとする。   In the following, a transaction that requires a multi-step process or procedure and needs to consider the state of the previous step in each step is referred to as a stateful transaction (stateful transaction (stateful trnsaction). Is "ID1", the address of the transaction load balancer 10 is "ID10", and the addresses of the distributed servers 2-1, 2-2, 2-3, ... are "IDA", "IDB", It is assumed that “IDC”,.

まず、クライアント1は、状態を持つトランザクションの最初の段階のメッセージ(1)を送信する。この最初のメッセージ(1)は、ヘッダ内に送信元アドレス(SA)、送信先アドレス(DS)およびResource ID(ID)を含み、この場合、SA=「ID1」、DS=「ID10」、ID=「ブランク(空)」である。このメッセージ(1)は、例えば、送信先処理装置(DS=「ID10」)において、トランザクションを構成する処理が実現可能かどうかの問い合わせである   First, the client 1 transmits a message (1) of the first stage of a transaction having a state. This first message (1) includes a source address (SA), a destination address (DS), and a Resource ID (ID) in the header. In this case, SA = “ID1”, DS = “ID10”, ID = "Blank (empty)". This message (1) is, for example, an inquiry as to whether or not processing constituting a transaction can be realized in the transmission destination processing device (DS = “ID10”)

トランザクション負荷分散装置10は、メッセージ(1)の送信先アドレス(DS=「ID10」)に従ってメッセージ(1)を受け付ける。次に、メッセージ(1)のヘッダ内のResource ID(ID)を抽出して宛先分散サーバを特定するが、ID=「ブランク(空)」であり、宛先分散サーバは特定されないので、メッセージ(1)を、例えば、ラウンドロビン方式に従って、配下の分散サーバ2-1,2-2,2-3,・・・のいずれかに振り分ける。例えば、メッセージ(1)を、そのヘッダ内の送信先アドレスDSを分散サーバ2-1のアドレスである「IDA」に修正して分散サーバ2-1に振り分ける。   The transaction load balancer 10 accepts the message (1) according to the transmission destination address (DS = “ID10”) of the message (1). Next, the Resource ID (ID) in the header of the message (1) is extracted to identify the destination distributed server. However, since ID = “blank (empty)” and the destination distributed server is not specified, the message (1 ) Is distributed to any of the subordinate distributed servers 2-1, 2-2, 2-3,... According to, for example, the round robin method. For example, the message (1) is distributed to the distributed server 2-1 by modifying the transmission destination address DS in the header to “IDA” which is the address of the distributed server 2-1.

分散サーバ2-1は、トランザクション負荷分散装置10からメッセージ(1)を受け、トランザクションを構成する処理が実現可能であれば、承認の応答(1′)をトランザクション負荷分散装置10に返す。分散サーバ2-1は、このときの応答(1′)のヘッダ内の送信元アドレス(SA)、送信先アドレス(DS)をそれぞれ、「IDA」、「ID1」とし、また、Resource ID(ID)を自分散サーバに与えられている範囲内の値、例えば「1000」とする。   The distributed server 2-1 receives the message (1) from the transaction load balancer 10 and returns an approval response (1 ′) to the transaction load balancer 10 if the process constituting the transaction can be realized. The distributed server 2-1 sets the source address (SA) and destination address (DS) in the header of the response (1 ′) at this time to “IDA” and “ID1”, respectively, and Resource ID (ID ) Is a value within the range given to the self-distributed server, for example, “1000”.

トランザクション負荷分散装置10は、分散サーバ2-1から応答(1′)を受けると、応答(1′)のヘッダ内の送信元アドレス(SA)を「ID10」に修正してクライアント1に送信する。   Upon receiving the response (1 ′) from the distribution server 2-1, the transaction load distribution device 10 corrects the source address (SA) in the header of the response (1 ′) to “ID10” and transmits it to the client 1. .

承認の応答を受けたクライアント1は、次の段階のメッセージ(2)をトランザクション負荷分散装置10に送信する。メッセージ(2)のSAおよびDSは、メッセージ(1)と同一であるが、Resource IDは、応答(1′)のヘッダ内に含まれていたもの(ID=「1000」)とする。   Upon receiving the approval response, the client 1 transmits a message (2) at the next stage to the transaction load balancer 10. The SA and DS of the message (2) are the same as the message (1), but the Resource ID is the one included in the header of the response (1 ′) (ID = “1000”).

トランザクション負荷分散装置10は、メッセージ(2)の送信先アドレス(DS=「ID10」)に従ってメッセージ(2)を受け付ける。次に、メッセージ(2)のヘッダ内のResource ID(ID)を抽出して宛先分散サーバを特定する。メッセージ(2)では、ID=「1000」であり、宛先分散サーバ2-1が特定されているので、メッセージ(2)を、そのヘッダ内の送信先アドレスDSを分散サーバ2-1のアドレスである「IDA」に修正して分散サーバ2-1に振り分ける。これにより、状態を持つトランザクションの最初の段階のメッセージ(1)と次の段階のメッセージ(2)は、同じ分散サーバ2-1に振り分けられる。   The transaction load distribution apparatus 10 accepts the message (2) according to the transmission destination address (DS = “ID10”) of the message (2). Next, the Resource ID (ID) in the header of the message (2) is extracted to specify the destination distribution server. In message (2), ID = “1000” and the destination distribution server 2-1 is specified, so the message (2) is sent with the destination address DS in its header as the address of the distribution server 2-1. Modify to “IDA” and distribute to distributed server 2-1. As a result, the message (1) at the first stage and the message (2) at the next stage of the transaction having a state are distributed to the same distributed server 2-1.

分散サーバ2-1は、トランザクション負荷分散装置10からメッセージ(2)を受け、メッセージ(2)での指示に従って処理を行い、その応答(2′)をトランザクション負荷分散装置10に返す。このときの応答(2′)のヘッダ内のSA,DA,IDは、応答(1′)と同じである。   The distribution server 2-1 receives the message (2) from the transaction load distribution apparatus 10, performs processing according to the instruction in the message (2), and returns a response (2 ′) to the transaction load distribution apparatus 10. SA, DA, ID in the header of the response (2 ′) at this time is the same as that of the response (1 ′).

トランザクション負荷分散装置10は、分散サーバ2-1から応答(2′)を受けると、応答(2′)のヘッダ内の送信元アドレス(SA)を「ID10」に修正してクライアント1に送信する。   Upon receiving the response (2 ′) from the distributed server 2-1, the transaction load balancer 10 modifies the source address (SA) in the header of the response (2 ′) to “ID10” and transmits it to the client 1. .

同様にして、状態を持つトランザクションの以降に続く段階のメッセージを同じ分散サーバ2-1に振り分けることができる。   Similarly, messages following the transaction having a state can be distributed to the same distributed server 2-1.

以上のように、本例においては、状態を持つトランザクションの最初の段階のメッセージが振り分けられた分散サーバが、自装置に予め与えられているResource IDをヘッダ内に挿入して応答を返し、クライアントが、以降に続く段階のメッセージに、応答に含まれるResource IDを挿入し、トランザクション負荷分散装置は、このResource IDを手掛かりとして分散サーバに振り分けるので、状態を持つトランザクションの処理を、1つの分散サーバで、一貫して矛盾なく、独立して実行させることができる。   As described above, in this example, the distributed server to which the message at the first stage of the transaction having the state is distributed inserts the Resource ID given in advance to the own device into the header and returns a response, and the client However, the resource ID included in the response is inserted into the message at the subsequent stage, and the transaction load balancer distributes the resource ID to the distributed server as a clue. It can be executed independently without any contradiction.

図3は、トランザクション負荷分散装置の負荷分散動作の他の例を示すフローチャートである。図2の例では、Resource IDは分散サーバにより付与されるが、本例では、Resource IDはトランザクション負荷分散装置により付与される。   FIG. 3 is a flowchart showing another example of the load balancing operation of the transaction load balancing apparatus. In the example of FIG. 2, the Resource ID is assigned by the distributed server, but in this example, the Resource ID is assigned by the transaction load balancer.

クライアント1から、状態を持つトランザクションの最初の段階のメッセージ(1)が送信されること、トランザクション負荷分散装置10が、メッセージ(1)の送信先アドレス(DS=「ID10」)に従ってメッセージ(1)を受け付け、例えば、ラウンドロビン方式に従って、メッセージ(1)を分散サーバ2-1に振り分けることまでは、図2の例と同じである。   The message (1) of the first stage of the transaction with state is sent from the client 1, and the transaction load balancer 10 sends the message (1) according to the destination address (DS = “ID10”) of the message (1). The process is the same as the example of FIG. 2 until the message (1) is distributed to the distributed servers 2-1 according to, for example, the round robin method.

分散サーバ2-1は、トランザクション負荷分散装置10からメッセージ(1)を受け、承認の応答(1′)をトランザクション負荷分散装置10に返す。このときの応答(1′)のヘッダ内の送信元アドレス(SA)、送信先アドレス(DS)をそれぞれ、「IDA」、「ID1」とすることは、図2の例と同じであるが、Resource ID(ID)は、そのままブランク(空)とする、すなわち、Resource IDが分散サーバで付与されないことが、図2の例と異なる。   The distribution server 2-1 receives the message (1) from the transaction load distribution apparatus 10 and returns an approval response (1 ′) to the transaction load distribution apparatus 10. The source address (SA) and destination address (DS) in the header of the response (1 ′) at this time are set to “IDA” and “ID1”, respectively, as in the example of FIG. The Resource ID (ID) is blank (empty) as it is, that is, the Resource ID is not assigned by the distributed server, which is different from the example of FIG.

トランザクション負荷分散装置10は、分散サーバ2-1から応答(1′)を受けると、応答(1′)のヘッダ内の送信元アドレス(SA)を「ID10」に修正し、さらに、Resource ID(ID)を分散サーバ2-1に与えられている範囲内の値、例えば「1000」としてクライアント1に送信する。すなわち、Resource IDはトランザクション負荷分散装置10で付与される。以降の動作は、図2の例と同じであるので、図示するのみで、説明を省略する。   Upon receiving the response (1 ′) from the distributed server 2-1, the transaction load balancer 10 corrects the source address (SA) in the header of the response (1 ′) to “ID10”, and further adds a Resource ID ( ID) is transmitted to the client 1 as a value within the range given to the distributed server 2-1, for example, “1000”. That is, the Resource ID is assigned by the transaction load balancing apparatus 10. The subsequent operations are the same as those in the example of FIG.

本例においても、状態を持つトランザクションの最初の段階のメッセージに対して、トランザクション負荷分散装置が、該メッセージを振り分けた分散サーバに予め与えられているResource IDをヘッダ内に挿入して応答を返し、クライアントが、以降に続く段階のメッセージに、応答に含まれるResource IDを挿入し、トランザクション負荷分散装置は、このResource IDを手掛かりとして分散サーバに振り分けるので、状態を持つトランザクションの処理を、1つの分散サーバで、一貫して矛盾なく、独立して実行させることができる。   Also in this example, the transaction load balancer inserts the Resource ID given in advance to the distributed server that distributed the message into the header and returns a response to the message at the first stage of the transaction with state. The client inserts the Resource ID included in the response into the message at the subsequent stage, and the transaction load balancer distributes the Resource ID to the distributed server as a clue. Distributed server can be run independently, consistently and consistently.

図4は、トランザクション負荷分散装置の負荷分散動作のさらに他の例を示すフローチャートである。本例は、分散サーバに与えられているResource IDがクライアント側で予め分かっている場合である。この場合、Resource IDを分散サーバやトランザクション負荷分散装置により付与することは不要であり、クライアント1からの状態を持つトランザクションの最初の段階のメッセージ(1)から、分散サーバを特定するResource IDを含ませることができる。   FIG. 4 is a flowchart showing still another example of the load balancing operation of the transaction load balancing apparatus. In this example, the Resource ID given to the distributed server is known in advance on the client side. In this case, it is not necessary to assign the Resource ID by the distributed server or transaction load balancer, and the Resource ID that identifies the distributed server is included from the message (1) in the first stage of the transaction having the state from the client 1. Can be made.

トランザクション負荷分散装置は、メッセージ(1)のResource IDから、該メッセージ(1)を振り分ける分散サーバを、例えば分散サーバ2-1に特定し、以降に続くメッセージ(2),・・・も同様に、分散サーバ2-1に特定して振り分けることができる。   The transaction load balancer identifies the distributed server that distributes the message (1) from the Resource ID of the message (1), for example, the distributed server 2-1, and the subsequent messages (2),. It can be specified and distributed to the distributed server 2-1.

以上、実施形態を説明したが、本発明は、上記実施形態に限定されるものではなく、種々に変形することができる。例えば、上記実施形態では、各分散サーバ2-1,2-2,2-3,・・・に対してResource IDの範囲を予め与え、このResource IDから分散サーバ2-1,2-2,2-3,・・・の同定を行うものとしたが、各分散サーバ2-1,2-2,2-3,・・・に対して与えるResource IDとしては、種々のものを用いることができる。   Although the embodiment has been described above, the present invention is not limited to the above embodiment, and can be variously modified. For example, in the above embodiment, a range of Resource IDs is given in advance to each of the distributed servers 2-1, 2-2, 2-3,..., And the distributed servers 2-1, 2-2,. 2-3, ... are identified, but various resource IDs can be used for each distributed server 2-1, 2-2, 2-3, ... it can.

例えば、Resource IDの剰余値から分散サーバ2-1,2-2,2-3,・・・の同定を行うようにすることもできる。これは、例えば、3台の分散サーバ2-1,2-2,2-3にトランザクションを分散させる場合、Resource IDの剰余値が0か1か2かに従って分散サーバ2-1か2-2か2-3かを同定できるように、各分散サーバ2-1,2-2,2-3にResource IDを付与しておき、この規則を宛先DB17に格納しておくことで実現できる。   For example, the distributed servers 2-1, 2-2, 2-3,... Can be identified from the remainder value of the Resource ID. For example, when a transaction is distributed to three distributed servers 2-1, 2-2, and 2-3, the distributed server 2-1 or 2-2 depends on whether the remainder value of Resource ID is 0, 1, or 2. This can be realized by assigning a Resource ID to each of the distributed servers 2-1, 2-2, and 2-3 and storing this rule in the destination DB 17 so that it can be identified.

また、トランザクションのエントリ(例えば、通し番号)とネットワーク内で唯一の値を有するIPアドレスやMACアドレスなどのID情報との積算値やハッシュ値などから得られる値を唯一のIDとして生成し、これをResource IDとして分散サーバに付与するようにしてもよい。この場合、Resource IDから逆算することにより、トランザクションの宛先の分散サーバを導出できる。   Also, a value obtained from the integrated value or hash value of the transaction entry (for example, serial number) and ID information such as an IP address or MAC address that has a unique value in the network is generated as a unique ID. You may make it give to a distributed server as Resource ID. In this case, by calculating backward from the Resource ID, it is possible to derive a distributed server as a transaction destination.

本発明は、Webトランザクションに対する負荷分散システム、SOAP、XML、SIP(Session Initiation Protocol)、Diameterプロトコル、COPSプロトコル、H.248プロトコルなどを利用したトランザクションに対する負荷分散システムに適用できる。   The present invention can be applied to a load distribution system for Web transactions, a load distribution system for transactions using SOAP, XML, SIP (Session Initiation Protocol), Diameter protocol, COPS protocol, H.248 protocol, and the like.

本発明が適用される基本的なトランザクション処理構成を示すブロック図である。It is a block diagram which shows the basic transaction processing structure to which this invention is applied. 本発明に係るトランザクション負荷分散装置の一実施形態を示すブロック図である。It is a block diagram which shows one Embodiment of the transaction load distribution apparatus which concerns on this invention. トランザクション負荷分散装置の負荷分散動作の例を示すフローチャートである。It is a flowchart which shows the example of the load distribution operation | movement of a transaction load distribution apparatus. トランザクション負荷分散装置の負荷分散動作の他の例を示すフローチャートである。It is a flowchart which shows the other example of the load distribution operation | movement of a transaction load distribution apparatus. トランザクション負荷分散装置の負荷分散動作のさらに他の例を示すフローチャートである。It is a flowchart which shows the further another example of load distribution operation | movement of a transaction load distribution apparatus.

符号の説明Explanation of symbols

1・・・クライアント、分散サーバ・・・2-1,2-2,2-3、10・・・トランザクション負荷分散装置、11・・・トランザクション受付部、12・・・ID抽出部、13・・・ID処理部、14宛先編集部、15トランザクション切替部、16・・・ポリシーデータベース(DB)、17・・・宛先DB 1 ... Client, distributed server ... 2-1,2-2,2-3, 10 ... Transaction load balancing device, 11 ... Transaction accepting unit, 12 ... ID extracting unit, 13. ..ID processing unit, 14 destination editing unit, 15 transaction switching unit, 16 ... policy database (DB), 17 ... destination DB

Claims (8)

クライアントからのトランザクションを複数の処理装置に振り分けて負荷分散させるトランザクション負荷分散装置において、
複数段階の処理または手続きが必要となり、各段階において前段階の状態を考慮する必要があるトランザクションの、各段階においてクライアントから送信されてくるメッセージのヘッダ内に挿入されている宛先アドレスが、自トランザクション負荷分散装置のアドレスである場合に、該メッセージを受け付けるトランザクション受付部と、
前記トランザクション受付部で受け付けられたメッセージのヘッダ内に挿入されているリソースIDを抽出するID抽出部と、
前記ID抽出部により抽出されたリソースIDに基づいて当該メッセージを、配下の複数の処理装置のいずれかに振り分けるトランザクション振り分け部を備えることを特徴とするトランザクション負荷分散装置。
In a transaction load balancer that distributes transactions from clients to multiple processing devices and distributes the load,
For transactions that require multiple stages of processing or procedures, and each stage needs to consider the state of the previous stage, the destination address inserted in the header of the message sent from the client at each stage is the local transaction. A transaction accepting unit that accepts the message when the address is the address of the load balancer;
An ID extraction unit that extracts a resource ID inserted in a header of a message received by the transaction reception unit;
A transaction load distribution apparatus comprising: a transaction distribution unit that distributes the message to one of a plurality of processing devices under the resource ID extracted by the ID extraction unit.
前記リソースIDは、トランザクションの最初の段階のメッセージでは、ブランクであり、以降の段階のメッセージでは、最初の段階のメッセージが振り分けられた処理装置からクライアントに送信された応答中に該処理装置が挿入したものであり、前記トランザクション振り分け部は、最初の段階のメッセージを任意の手法により複数の処理装置のうちのいずれかに振り分け、以降の段階のメッセージを、該メッセージに挿入されているリソースIDに従って振り分けることを特徴とする請求項1に記載のトランザクション負荷分散装置。 The resource ID is blank in the first stage message of the transaction, and in the subsequent stage message, the processing apparatus inserts it in the response sent from the processing apparatus to which the first stage message is distributed to the client. The transaction distribution unit distributes the message at the first stage to any one of the plurality of processing devices by an arbitrary method, and the message at the subsequent stage is assigned according to the resource ID inserted in the message. The transaction load distribution apparatus according to claim 1, wherein distribution is performed. 前記リソースIDは、トランザクションの最初の段階のメッセージでは、ブランクであり、以降の段階のメッセージでは、最初の段階のメッセージが振り分けられた処理装置からクライアントに送信された応答中にトランザクション負荷分散装置が挿入したものであり、前記トランザクション振り分け部は、最初の段階のメッセージを任意の手法により複数の処理装置のうちのいずれかに振り分け、以降の段階のメッセージを、該メッセージに挿入されているリソースIDに従って振り分けることを特徴とする請求項1に記載のトランザクション負荷分散装置。 The resource ID is blank in the first stage message of the transaction, and in the subsequent stage message, the transaction load balancer during the response sent from the processing apparatus to which the first stage message is distributed to the client. The transaction distribution unit distributes the message at the first stage to one of the plurality of processing devices by an arbitrary method, and the resource ID at which the message at the subsequent stage is inserted into the message. The transaction load distribution apparatus according to claim 1, wherein distribution is performed according to: 前記リソースIDは、トランザクションの最初の段階のメッセージからクライアントが挿入したものであり、前記トランザクション振り分け部は、トランザクションの各段階のメッセージを、該メッセージに挿入されているリソースIDに従って振り分けることを特徴とする請求項1に記載のトランザクション負荷分散装置。 The resource ID is inserted by a client from a message at the first stage of a transaction, and the transaction distribution unit distributes a message at each stage of the transaction according to a resource ID inserted in the message. The transaction load distribution apparatus according to claim 1. トランザクションの各段階のメッセージに挿入されるリソースIDは、各処理装置に対して予め与えられた範囲の値を持つことを特徴とする請求項1ないし4のいずれかに記載のトランザクション負荷分散装置。 5. The transaction load distribution apparatus according to claim 1, wherein the resource ID inserted in the message at each stage of the transaction has a value in a range given in advance to each processing apparatus. トランザクションの各段階のメッセージに挿入されるリソースIDは、それを処理装置数で割ったときの剰余値により各処理装置が同定される値を持つことを特徴とする請求項1ないし4のいずれかに記載のトランザクション負荷分散装置。 5. The resource ID inserted in a message at each stage of a transaction has a value for identifying each processing device by a remainder value obtained by dividing the resource ID by the number of processing devices. The transaction load balancer described in 1. トランザクションの各段階のメッセージに挿入されるリソースIDは、トランザクションのエントリとネットワーク内で唯一の値を有するID情報との積算値あるいはハッシュ値から得られる値を持つことを特徴とする請求項1ないし4のいずれかに記載のトランザクション負荷分散装置。 The resource ID inserted in the message at each stage of the transaction has a value obtained from an integrated value or a hash value of the transaction entry and ID information having a unique value in the network. 4. The transaction load distribution device according to any one of 4 above. コンピュータを、
複数段階の処理または手続きが必要となり、各段階において前段階の状態を考慮する必要があるトランザクションの、各段階においてクライアントから送信されてくるメッセージのヘッダ内に挿入されている宛先アドレスが、自トランザクション負荷分散装置のアドレスである場合に、該メッセージを受け付けるトランザクション受付手段と、
前記トランザクション受付部で受け付けられたメッセージのヘッダ内に挿入されているリソースIDを抽出するID抽出手段と、
前記ID抽出部により抽出されたリソースIDに基づいて当該メッセージを、配下の複数の処理装置のいずれかに振り分けるトランザクション振り分け手段として機能させ、
クライアントからのトランザクションを複数の処理装置に振り分けて負荷分散させるためのプログラム。
Computer
For transactions that require multiple stages of processing or procedures, and each stage needs to consider the state of the previous stage, the destination address inserted in the header of the message sent from the client at each stage is the local transaction. A transaction accepting means for accepting the message when it is the address of the load balancer;
ID extraction means for extracting a resource ID inserted in a header of a message received by the transaction receiving unit;
Based on the resource ID extracted by the ID extraction unit, the message functions as a transaction distribution unit that distributes the message to any of a plurality of subordinate processing devices,
A program for distributing transactions from clients to multiple processing devices for load distribution.
JP2008229612A 2008-09-08 2008-09-08 Transaction load distribution device and program Pending JP2010061622A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008229612A JP2010061622A (en) 2008-09-08 2008-09-08 Transaction load distribution device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008229612A JP2010061622A (en) 2008-09-08 2008-09-08 Transaction load distribution device and program

Publications (1)

Publication Number Publication Date
JP2010061622A true JP2010061622A (en) 2010-03-18

Family

ID=42188308

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008229612A Pending JP2010061622A (en) 2008-09-08 2008-09-08 Transaction load distribution device and program

Country Status (1)

Country Link
JP (1) JP2010061622A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015153250A (en) * 2014-02-17 2015-08-24 日本電信電話株式会社 Load distribution processing apparatus and load distribution processing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002183104A (en) * 2000-12-11 2002-06-28 Hitachi Ltd Item allocating method for workflow system, workflow system, program implementing the same method, and computer-readable recording medium having the same program stored
JP2003131961A (en) * 2001-07-09 2003-05-09 Hitachi Ltd Network system and load distribution method
JP2007219608A (en) * 2006-02-14 2007-08-30 Fujitsu Ltd Load balancing processing program and load balancing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002183104A (en) * 2000-12-11 2002-06-28 Hitachi Ltd Item allocating method for workflow system, workflow system, program implementing the same method, and computer-readable recording medium having the same program stored
JP2003131961A (en) * 2001-07-09 2003-05-09 Hitachi Ltd Network system and load distribution method
JP2007219608A (en) * 2006-02-14 2007-08-30 Fujitsu Ltd Load balancing processing program and load balancing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015153250A (en) * 2014-02-17 2015-08-24 日本電信電話株式会社 Load distribution processing apparatus and load distribution processing method

Similar Documents

Publication Publication Date Title
JP4979711B2 (en) Method, system, and computer-readable recording medium for load balancing media resources (load balancing and failover of distributed media resources in a media server)
US10110429B2 (en) Enabling planned upgrade/downgrade of network devices without impacting network sessions
US8892768B2 (en) Load balancing apparatus and load balancing method
US20070258451A1 (en) Message-Based Processing
US20060167897A1 (en) Administration of a broker-based publish/subscribe messaging system
US20180307546A1 (en) Event driven subscription matching
WO2008077816A1 (en) Method and system for resource-based synchronization between endpoints in a web-based real time collaboration
JP5104591B2 (en) Bus system
JP2007317199A (en) Method, device and computer program for verifying transmission to appropriate server acting as host of web service instance
CN108369608A (en) Idempotent cluster of servers
EP1757065A1 (en) Improvements in message-based communications
US20170331900A1 (en) Clustering Websocket Communications With Configurable Master-Slave Servers
JP2006174374A (en) Relay system
US20160269335A1 (en) Method and apparatus for identifying changed mailboxes in an internet message access protocol (imap) list
US20120036185A1 (en) State management in a distributed computing system
WO2018018490A1 (en) Access distribution method, device and system
US10666738B2 (en) Managing topic updates for a distributed data system
CN106973106B (en) Method, device and system for acquiring session information
JP2010061622A (en) Transaction load distribution device and program
US20150100973A1 (en) Intelligent High-Volume Cloud Application Programming Interface Request Caching
CN111756844A (en) Multi-language message agent method and device
CN111614726A (en) Data forwarding method, cluster system and storage medium
CN106878356B (en) Scheduling method and computing node
US11777852B1 (en) System and method for web service atomic transaction (WS-AT) affinity routing
CN108696549B (en) Load balancing method, device and system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110314

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120607

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120613

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20121010