JP6058576B2 - Slot group generation device, slot group generation method, and load distribution system - Google Patents

Slot group generation device, slot group generation method, and load distribution system Download PDF

Info

Publication number
JP6058576B2
JP6058576B2 JP2014058202A JP2014058202A JP6058576B2 JP 6058576 B2 JP6058576 B2 JP 6058576B2 JP 2014058202 A JP2014058202 A JP 2014058202A JP 2014058202 A JP2014058202 A JP 2014058202A JP 6058576 B2 JP6058576 B2 JP 6058576B2
Authority
JP
Japan
Prior art keywords
slot
servers
server
group
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2014058202A
Other languages
Japanese (ja)
Other versions
JP2015184744A (en
Inventor
裕一 中谷
裕一 中谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2014058202A priority Critical patent/JP6058576B2/en
Publication of JP2015184744A publication Critical patent/JP2015184744A/en
Application granted granted Critical
Publication of JP6058576B2 publication Critical patent/JP6058576B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Description

本発明は、スロット群生成装置、スロット群生成方法、および、負荷分散システムに関する。   The present invention relates to a slot group generation device, a slot group generation method, and a load distribution system.

ネットワーク越しにサービス要求を受け付けるシステムでは、膨大なサービス要求にも応答し、かつサービス要求量に応じて割り当てるハードウェア量を柔軟に変更する必要があるため、複数のサーバやDB(データベース)サーバを並列動作させる分散システムでの実現が主流となっている。   In a system that accepts service requests over a network, it is necessary to flexibly change the amount of hardware to be allocated according to the amount of service requests while responding to a large number of service requests. Realization in distributed systems that operate in parallel has become the mainstream.

分散システムの実現には、サービス要求やDB操作を適切にいずれかのサーバへ振り分け、サーバ負荷や保管データ量をサーバ間で均一化する負荷分散装置が必要となる。多くのWebサービスにおいては個々のサービス要求は独立に処理することが可能なため、サービス要求を順番にまたはランダムになど、サービス要求やDB操作の内容と無関係に振り分ける負荷分散装置が用いられている。しかし、SIP(Session Initiation Protocol)アプリケーションや分散ハッシュテーブルをはじめとする、複数のサービス要求間で同じ情報を共有する必要があるステートフルなWebサービスにおいては、それら関係があるサービス要求やDB操作を同一サーバに振り分ける負荷分散装置を実現する必要がある。また、分散ハッシュテーブル等においては、サーバの増減に伴って負荷分散装置からの振り分け先が変化すると保管データの移動等が必要となるが、この移動はネットワーク帯域や記憶領域へ大きな負荷を発生させることから、振り分け先の変化は極力低減することが求められる。   In order to realize a distributed system, a load distribution device that appropriately distributes service requests and DB operations to one of the servers and equalizes the server load and the amount of stored data among the servers is required. In many Web services, since each service request can be processed independently, a load balancer is used that distributes the service requests in order or randomly, regardless of the contents of the service requests or DB operations. . However, in stateful Web services that require the same information to be shared among multiple service requests, such as SIP (Session Initiation Protocol) applications and distributed hash tables, the same service requests and DB operations are related. There is a need to implement a load balancer that distributes servers. In distributed hash tables, etc., if the distribution destination from the load balancer changes as the number of servers increases / decreases, it is necessary to move stored data, etc., but this movement generates a heavy load on the network bandwidth and storage area. For this reason, it is required to reduce the change of the distribution destination as much as possible.

この必要性に関して、非特許文献1では、キーのハッシュ値に応じてデータの格納サーバを決定するコンシステント・ハッシュ法を負荷分散装置に応用し、サービス要求内に同一のキーがある限り同じサーバに振り分ける手法、特にハッシュ値と振り分け先サーバの対応付けを定義するスロット群のスロット数を抑制しながら負荷を均一に分散する手法が記されている。   Regarding this necessity, Non-Patent Document 1 applies a consistent hash method in which a data storage server is determined according to a hash value of a key to a load balancer, and the same server as long as the same key exists in a service request. In particular, there is a technique for distributing the load uniformly while suppressing the number of slots in the slot group that defines the association between the hash value and the distribution destination server.

また、非特許文献2にはスロット数を増加させることで、コンシステント・ハッシュ法の負荷の偏りを低減させる手法が記されている。   Non-Patent Document 2 describes a technique for reducing the load bias of the consistent hash method by increasing the number of slots.

入江道生他、“コンシステント・ハッシュ法におけるデータの複製を意識した負荷分散手法”、社団法人電子情報通信学会、信学技報IN2010-77、2010年10月Michio Irie et al., “Load Balancing Method Aware of Data Replication in the Consistent Hash Method”, The Institute of Electronics, Information and Communication Engineers, IEICE Technical Report IN2010-77, October 2010 I.Stoica他、“Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications”、Proc. ACM SIGCOMM 2001、Aug. 2001.I. Stoica et al., “Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications”, Proc. ACM SIGCOMM 2001, Aug. 2001.

非特許文献1の手法では、スロット群の数やサーバ増減に伴う負荷増大を抑制できる一方で負荷の均一化は完全ではなく、サーバ間で大きな負荷の偏りが生じる可能性がある。また、非特許文献2の手法でも、サーバ増減に伴う負荷増大を抑制しつつ、スロット数の増加によって負荷の偏りが低減することは示されているが、どの程度のスロット数で所望の均一化が図れるかは定かではない。   In the method of Non-Patent Document 1, load increase due to the number of slot groups and server increase / decrease can be suppressed, but load equalization is not perfect, and there is a possibility that a large load deviation occurs between servers. Also, the technique of Non-Patent Document 2 shows that the load deviation is reduced by increasing the number of slots while suppressing the increase in load due to increase / decrease of the server. It is not certain that can be achieved.

実際にシステムを構築する場合、負荷の均一化が十分になされず、かつどのサーバの負荷が高くなるかも分からない状況では、サーバ等のハードウェアの調達時に十分な性能を持った機器を選定せざるを得ない。その結果、システム構築のための調達コストを押し上げる結果となってしまう。したがって、システム構築において、システム内のサーバ間の負荷の均一化は非常に重要な課題である。   When actually building a system, in a situation where the load is not evenly distributed and it is not clear which server load will be high, select a device with sufficient performance when procuring server hardware. I must. As a result, the procurement cost for system construction will be increased. Therefore, in system construction, equalizing the load among servers in the system is a very important issue.

そこで、本発明は、サーバ増減に伴う負荷増大を抑制しつつ、サーバ間の負荷の偏りがない負荷分散システムを提供することを目的とする。   Therefore, an object of the present invention is to provide a load distribution system that suppresses an increase in load due to increase / decrease in servers and does not have a load bias between servers.

上述した課題を解決し、目的を達成するために、本発明は、複数のサーバ間で負荷分散を行う負荷分散システムにおいて、受信パケットの振り分けに用いるスロット群を生成するスロット群生成装置であって、前記負荷分散システムを構成するサーバ数を最大とした場合の最大のサーバ群それぞれについて、所定数のサーバの順列組合せの登場回数が同じとなるようサーバを配列したスロット列を生成する最大スロット列生成部と、前記生成されたスロット列を1以上複製して連結させた延長スロット列を生成する延長スロット列生成部と、前記負荷分散システムに要求されるサーバの数が、前記最大のサーバ群のサーバの数よりも少ないとき、前記生成した延長スロット列における、前記最大のサーバ群からの減設対象となるサーバの登場部分それぞれを、前記減設対象外のサーバの基本順列それぞれの登場回数ができるだけ同じになるように前記減設対象外のサーバに置換したスロット列を生成するサーバ置換部と、所定のハッシュ空間を、前記生成されたスロット列の長さのスロットに分割し、前記分割したスロットそれぞれに、前記スロット列に示される順で前記サーバを割り当てたスロット群を生成するスロット割り当て部とを備えることを特徴とする。   In order to solve the above-described problems and achieve the object, the present invention provides a slot group generation device that generates a slot group used for distribution of received packets in a load distribution system that distributes load among a plurality of servers. The maximum slot sequence for generating a slot sequence in which servers are arranged so that the number of appearances of permutation combinations of a predetermined number of servers is the same for each maximum server group when the number of servers constituting the load balancing system is maximized A generation unit, an extension slot sequence generation unit that generates an extended slot sequence in which one or more of the generated slot sequences are duplicated and connected, and the number of servers required for the load distribution system is the maximum server group The number of servers to be removed from the largest server group in the generated extended slot row when the number of servers is smaller than A server replacement unit that generates a slot sequence in which the number of appearances of each of the basic permutations of the non-removable servers is the same as much as possible, and a predetermined hash space A slot allocation unit that divides the slot into the slots having the length of the generated slot sequence and generates a slot group in which the servers are allocated in the order indicated by the slot sequence to each of the divided slots. And

本発明によれば、サーバ増減に伴う負荷増大を抑制しつつ、サーバ間の負荷の偏りがない負荷分散システムを提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the load distribution system which does not have the bias | biasing of the load between servers can be provided, suppressing the load increase accompanying a server increase / decrease.

図1は、各実施形態の負荷分散システムを示す構成図である。FIG. 1 is a configuration diagram illustrating a load distribution system according to each embodiment. 図2は、スロット群生成部を示す構成図である。FIG. 2 is a configuration diagram illustrating the slot group generation unit. 図3は、スロット群生成部を示す構成図である。FIG. 3 is a configuration diagram illustrating the slot group generation unit. 図4は、第1の実施形態のスロット群生成部の処理手順を示すフローチャートである。FIG. 4 is a flowchart illustrating a processing procedure of the slot group generation unit according to the first embodiment. 図5は、図4の基本スロット列生成処理を示すフローチャートである。FIG. 5 is a flowchart showing the basic slot sequence generation processing of FIG. 図6は、基本順列の生成例を示す図である。FIG. 6 is a diagram illustrating an example of generating a basic permutation. 図7は、基本順列接続グラフの生成例を示す図である。FIG. 7 is a diagram illustrating a generation example of a basic permutation connection graph. 図8は、基本順列閉路の生成例を示す図である。FIG. 8 is a diagram illustrating an example of generating a basic permutation cycle. 図9は、スロット列の生成例を示す図である。FIG. 9 is a diagram illustrating a generation example of a slot string. 図10は、ハッシュ空間にサーバA〜Bの担当区分を割り当てたスロット群の生成例を示す図である。FIG. 10 is a diagram illustrating a generation example of a slot group in which the assigned sections of the servers A to B are assigned to the hash space. 図11は、スロット群生成部の処理手順を示すフローチャートである。FIG. 11 is a flowchart showing a processing procedure of the slot group generation unit. 図12は、スロット群生成部の処理手順を示すフローチャートである。FIG. 12 is a flowchart showing the processing procedure of the slot group generation unit. 図13は、延長スロット列の生成例を示す図である。FIG. 13 is a diagram illustrating a generation example of the extension slot row. 図14は、サーバ数が3、4、5の場合のスロット列の一例を示す図である。FIG. 14 is a diagram showing an example of a slot train when the number of servers is 3, 4, and 5. 図15は、ハッシュ空間にサーバA〜Eの担当区分を割り当てたスロット群の生成例を示す図である。FIG. 15 is a diagram illustrating a generation example of a slot group in which the assigned sections of the servers A to E are assigned to the hash space. 図16は、第2の実施形態の最大スロット列生成部の処理手順を示すフローチャートである。FIG. 16 is a flowchart illustrating a processing procedure of the maximum slot string generation unit according to the second embodiment. 図17は、拡張情報の生成例を示す図である。FIG. 17 is a diagram illustrating an example of generating extended information. 図18は、図16のスロット列拡張処理を示すフローチャートである。FIG. 18 is a flowchart showing the slot string expansion processing of FIG. 図19は、拡張基礎順列の生成例を示す図である。FIG. 19 is a diagram illustrating an example of generating the extended basic permutation. 図20は、拡張後のスロット列の生成例を示す図である。FIG. 20 is a diagram illustrating an example of generating a slot train after expansion. 図21は、拡張情報の更新例を示す図である。FIG. 21 is a diagram illustrating an example of updating extension information. 図22は、負荷分散システムの他の構成例を示す図である。FIG. 22 is a diagram illustrating another configuration example of the load distribution system. 図23は、負荷分散プログラムを実行するコンピュータを示す図である。FIG. 23 is a diagram illustrating a computer that executes a load distribution program.

以下、本発明の実施形態について、第1の実施形態および第2の実施形態に分けて説明する。なお、各実施形態により本発明が限定されるものではない。   Hereinafter, embodiments of the present invention will be described by being divided into a first embodiment and a second embodiment. In addition, this invention is not limited by each embodiment.

(第1の実施形態)
各実施形態の負荷分散システム(システム)は、図1に示すように、クライアント100と、負荷分散装置200と、サーバ300とがネットワーク(図示省略)で接続されて構成される。
(First embodiment)
As shown in FIG. 1, the load distribution system (system) of each embodiment is configured by connecting a client 100, a load distribution apparatus 200, and a server 300 via a network (not shown).

負荷分散装置200は、クライアント100からのサービス要求パケットを受信するパケット受信部210と、受信したパケットから所定のキーを抽出し、そのハッシュ値とスロット群との比較からパケットの転送先のサーバ300を決定する振分部220と、振分部220の決定に基づきパケットの転送を実施するパケット転送部230と、負荷の均一化を実現するスロット群を生成するスロット群管理部240と、スロット群管理部240を多くの負荷分散装置で流用できるようにサーバ名称等の抽象化を制御するスロット群汎用化部250とを備える。   The load balancer 200 extracts a predetermined key from the packet reception unit 210 that receives a service request packet from the client 100 and the received packet, and compares the hash value with a slot group to determine a server 300 that is a packet transfer destination. A allocating unit 220 for determining the packet, a packet transferring unit 230 for performing packet transfer based on the determination of the allocating unit 220, a slot group managing unit 240 for generating a slot group for realizing uniform load, and a slot group A slot group generalization unit 250 that controls abstraction of server names and the like so that the management unit 240 can be used by many load distribution devices.

振分部220は、パケット受信部210が受信したパケットから、コンシステント・ハッシュ法でキーとする情報を抽出するキー抽出部221と、抽出したキーからハッシュ値を生成し、スロット群汎用化部250から取得されるスロット群の中からそのハッシュ値に対応するスロットを検索し、そのスロットに割り当てられたサーバをパケットの転送先として決定するパケット送信先決定部222とを備える。   The distribution unit 220 extracts a key extraction unit 221 from the packet received by the packet reception unit 210 as a key by the consistent hash method, generates a hash value from the extracted key, and generates a slot group generalization unit A packet transmission destination determination unit 222 that searches a slot corresponding to the hash value from the slot group acquired from 250 and determines a server assigned to the slot as a packet transfer destination.

スロット群管理部240は、システムの最大構成とした場合のサーバ300のリスト(最大のサーバ群のリスト)や、稼働させたいサーバ300のリスト(要求されるサーバ300のリスト)、サーバ300が何台故障した場合まで負荷を均一化するかを示す耐障害度等の各種パラメータを受信し、これらのパラメータに基づき、各種スロット群の生成、保管等を行う。このスロット群管理部240はと、スロット群生成部241と、スロット保管部242と、最大スロット列生成部243を備える。   The slot group management unit 240 includes a list of servers 300 (the list of maximum server groups) when the maximum configuration of the system is set, a list of servers 300 to be operated (a list of requested servers 300), and what the server 300 is. Various parameters such as fault tolerance indicating whether or not the load is equalized until a table failure occurs are received, and various slot groups are generated and stored based on these parameters. The slot group management unit 240 includes a slot group generation unit 241, a slot storage unit 242, and a maximum slot sequence generation unit 243.

スロット群生成部241は、サーバ群抽象化部251から出力されたパラメータに基づきスロット群の生成を行う。具体的には、スロット群生成部241は、サーバ群抽象化部251からパラメータとして、分散処理システムを構成するサーバリスト(例えば、A、B、C、D、E)、基本順列長(例えば、2)、最大のサーバ群のリスト(例えば、A、B、C、D、E)、現在必要なサーバ数(例えば、4)等の情報の入力を受け付けると、最大スロット列生成部243に最大のサーバ群(例えば、A、B、C、D、E)と、基本順列長(例えば、2)とを送信する。そして、スロット群生成部241は、最大スロット列生成部243より計算結果として最大サーバ数でのスロット群を生成するために必要な、スロットの割り当て順序を規定するスロット列を受け取る。そして、スロット群生成部241は、受け取ったスロット列に基づきスロット群を生成する。ここで、スロット群生成部241は、最大サーバ数や運用中のサーバ数と、要望されたサーバ数とを比較し、要望されたサーバ数が、最大サーバ数や運用中のサーバ数よりも少ないとき、つまり、負荷分散システム内のサーバ数の減設が必要なとき、現在運用中のサーバ群に関するスロット列から、減設の対象のサーバ300を減設したスロット列(減設スロット列)を生成する。そして、その減設スロット列をもとにスロット群を生成し、スロット保管部242へ出力する。このスロット群生成部241の詳細は後記する。   The slot group generation unit 241 generates a slot group based on the parameters output from the server group abstraction unit 251. Specifically, the slot group generation unit 241 receives, as parameters from the server group abstraction unit 251, a server list (for example, A, B, C, D, E) and a basic permutation length (for example, A, B, C, D, E). 2) When the input of information such as a list of maximum server groups (for example, A, B, C, D, E) and the number of currently required servers (for example, 4) is received, the maximum slot sequence generation unit 243 receives the maximum Server group (for example, A, B, C, D, E) and the basic permutation length (for example, 2) are transmitted. Then, the slot group generation unit 241 receives, from the maximum slot sequence generation unit 243, a slot sequence that defines the slot allocation order necessary for generating a slot group with the maximum number of servers as a calculation result. Then, the slot group generation unit 241 generates a slot group based on the received slot train. Here, the slot group generation unit 241 compares the maximum number of servers and the number of servers in operation with the requested number of servers, and the requested number of servers is smaller than the maximum number of servers and the number of servers in operation. In other words, when it is necessary to reduce the number of servers in the load balancing system, a slot row (removal slot row) in which the server 300 to be removed is removed from the slot row relating to the currently operating server group. Generate. Then, a slot group is generated based on the reduced slot row, and is output to the slot storage unit 242. Details of the slot group generation unit 241 will be described later.

最大スロット列生成部243は、最大構成のサーバ群(例えば、A、B、C、D、E)と、基本順列長(例えば、2)とに基づき、この最大のサーバ群のスロット列を生成する。この最大スロット列生成部243の詳細についても後記する。   The maximum slot sequence generation unit 243 generates a slot sequence of the maximum server group based on the maximum configuration server group (for example, A, B, C, D, E) and the basic permutation length (for example, 2). To do. Details of the maximum slot sequence generation unit 243 will be described later.

スロット保管部242は、スロット群生成部241から出力されたスロット群やスロット列を保持する。具体的には、スロット保管部242は、最大構成のサーバ群から、稼働させるサーバ300までサーバ300の数を減少させる場合にその過程で生成されるスロット列やスロット群を保管する。   The slot storage unit 242 holds the slot group and the slot string output from the slot group generation unit 241. Specifically, the slot storage unit 242 stores the slot train and the slot group generated in the process when the number of servers 300 is reduced from the maximum configuration server group to the server 300 to be operated.

スロット群汎用化部250は、システム保守者400等から事前に設定された、負荷分散システムのサーバリストをもとに、各サーバ300に汎用的なサーバ名を割り当て、スロット群管理部240へスロット群の生成を要求するサーバ群抽象化部251と、スロット群管理部240が生成したスロット群において、各スロットに割り当てられたサーバ名称を汎用的な名称からシステム固有の名称に変換するサーバ群個別化部252と、サーバリストの汎用化に係る対応表を保持するサーバリスト保持テーブル253とで構成される。また、図1の負荷分散装置200は、図1に例示する台数に限定されず、サーバ300の集合に対し、任意の台数としてもよい。   The slot group generalization unit 250 assigns a general server name to each server 300 based on the server list of the load distribution system set in advance by the system maintainer 400 or the like, and assigns the slot name to the slot group management unit 240. The server group abstraction unit 251 that requests group generation and the slot group generated by the slot group management unit 240 convert the server name assigned to each slot from a general name to a system specific name. And a server list holding table 253 that holds a correspondence table related to generalization of the server list. 1 is not limited to the number illustrated in FIG. 1, and may be an arbitrary number for the set of servers 300.

以下の説明では、負荷分散装置200の適用サービスが、分散ハッシュテーブルを用いたサービスである場合を例に説明するが、適用サービスはこれに限られるものではない。   In the following description, a case where the application service of the load distribution apparatus 200 is a service using a distributed hash table will be described as an example, but the application service is not limited to this.

クライアント100は、例えば、DBクライアントであり、PUTやGET等のDB操作に係る要求パケットを送出する装置である。   The client 100 is, for example, a DB client, and is a device that transmits a request packet related to a DB operation such as PUT or GET.

この場合、負荷分散装置200とサーバ300の集合は一体のシステムとしてデータベースであるように振る舞い、クライアント100からのDB操作パケットは専ら負荷分散装置200が受信・振り分けし、DB操作そのものはサーバ300が実施する。これにより、クライアント100はサーバ300の増設等を意識することなく、負荷分散装置200と対向すればよい。ただし、キーが同一のデータに関する更新や参照処理は同一のサーバ300が一貫して実施する必要があるため、負荷分散装置200の振り分けロジックは、同一キーのデータを同一サーバ300に振り分けるものである必要がある。この点について、負荷分散装置200は以下で説明するコンシステント・ハッシュ法を用いる。   In this case, the set of the load balancer 200 and the server 300 behaves like a database as an integrated system, the DB operation packet from the client 100 is exclusively received and distributed by the load balancer 200, and the DB operation itself is handled by the server 300. carry out. Thus, the client 100 may face the load distribution apparatus 200 without being aware of the addition of the server 300 or the like. However, since update and reference processing related to data with the same key needs to be performed consistently by the same server 300, the distribution logic of the load distribution apparatus 200 distributes data with the same key to the same server 300. There is a need. In this regard, the load balancer 200 uses a consistent hash method described below.

コンシステント・ハッシュ法において、クライアント100からのDB操作パケットを受信した負荷分散装置200のパケット受信部210は、受信したDB操作パケットを振分部220のキー抽出部221に受け渡す。キー抽出部221では、操作対象データを識別するため、DB操作パケットからキーを抽出し、パケット送信先決定部222に送る。キーを受信したパケット送信先決定部222では、キーのハッシュ値を生成し、スロット群汎用化部250から取得した、各サーバ300が担当するハッシュ値の範囲を記したスロット群にキーのハッシュ値を照らし合わせることで、受信パケットの転送先とするサーバ300を決定する。このように振り分け先を決定することで、操作対象データのキーが同一である限りにおいて同一のサーバ300にパケットを転送することができる。   In the consistent hash method, the packet reception unit 210 of the load distribution apparatus 200 that has received the DB operation packet from the client 100 passes the received DB operation packet to the key extraction unit 221 of the distribution unit 220. In order to identify operation target data, the key extraction unit 221 extracts a key from the DB operation packet and sends it to the packet transmission destination determination unit 222. The packet destination determination unit 222 that has received the key generates a hash value of the key, and obtains the hash value of the key in the slot group that is acquired from the slot group generalization unit 250 and describes the range of hash values that each server 300 is responsible for. Are determined, the server 300 that is the transfer destination of the received packet is determined. By determining the distribution destination in this way, packets can be transferred to the same server 300 as long as the keys of the operation target data are the same.

パケットの転送先の決定の後は、パケット転送部230がその情報をもとにパケットの送信先IPアドレス等を書き換え、該当するサーバ300へパケットを転送する。   After the packet transfer destination is determined, the packet transfer unit 230 rewrites the packet destination IP address and the like based on the information, and transfers the packet to the corresponding server 300.

負荷分散装置200が上記の処理によってパケットを振り分けた場合に、サーバ300間での負荷の均一化をはかるためには、各サーバ300が担当するハッシュ値の範囲が均一化されたスロット群を生成する必要がある。以下では、いくつかのサーバ300が故障した場合を含め、各サーバ300が担当するハッシュ値の範囲が均一化されたスロット群を生成する方法について説明する。   When the load distribution apparatus 200 distributes the packets by the above processing, in order to equalize the load among the servers 300, a slot group in which the range of hash values that each server 300 is in charge of is generated is generated. There is a need to. Hereinafter, a method of generating a slot group in which the range of hash values that each server 300 is in charge of, including the case where several servers 300 have failed, will be described.

今回の例では、負荷分散システムを構成するサーバ300が最大5台(最大サーバ数が5台)であり、それぞれサーバ名称が、DBserver1、DBserver2、DBserver3、DBserver4、DBserver5であるものとする。例えば、運用開始当初はDBserver1、DBserver2、DBserver3、DBserver4の4台のサーバ300で運用されるが、その後、DBserver1、DBserver2、DBserver3の3台に減設されたり、5台に増設されたりする等、負荷分散システムにおいて運用(稼働)されるサーバ数は、最大サーバ数以下で増減が発生することを想定している。また、負荷分散システムにおけるサーバ300の故障時の対応については、サーバ300のうちランダムに1台が故障した場合であっても残るサーバ300で負荷を均一化する。   In this example, it is assumed that there are a maximum of five servers 300 (the maximum number of servers is 5) constituting the load balancing system, and the server names are DBserver1, DBserver2, DBserver3, DBserver4, and DBserver5, respectively. For example, at the beginning of operation, DBserver1, DBserver2, DBserver3, and DBserver4 will be operated on four servers 300. After that, the number of servers will be reduced to three (DBserver1, DBserver2, and DBserver3) or increased to five. It is assumed that the number of servers operated (operated) in the load balancing system increases or decreases below the maximum number of servers. In addition, regarding the response when the server 300 fails in the load balancing system, the load is made uniform by the remaining server 300 even when one of the servers 300 randomly fails.

スロット群汎用化部250は、スロット群管理部240が個別のサーバ名DBserver1等を意識することなくスロット群を生成することができるよう、名称の変換を担う。   The slot group generalization unit 250 is responsible for name conversion so that the slot group management unit 240 can generate a slot group without being aware of the individual server name DBserver1 or the like.

具体的には、サーバリスト保持テーブル253には、システム保守者400が事前にDBserver1等システム固有のサーバ名称と、AやBといったスロット群管理部240が用いるサーバ名称の対応付け、例えば、DBserver1:A、DBserver2:B、DBserver3:C、DBserver4:D、DBserver5:Eを保持させる。この状況でサーバ群抽象化部251がシステム保守者400から、最大サーバ数を5台とする中で1台故障まで耐性のあるスロット群を生成するよう要求を受けた場合、サーバ群抽象化部251では、サーバリスト保持テーブル253の情報をもとに最大でA、B、C、D、Eに関するスロット群が必要となることとともに、現在はA、B、C、Dに関するスロット群が必要であると、スロット群管理部240のスロット群生成部241に要求する。この際には、例えば、「故障耐性を求められる台数(想定する故障サーバの台数)+1」、すなわちここでは「1+1=2」を、スロット群生成に係るパラメータとして送信する(以下、本パラメータを基本順列長と呼ぶ)。なお、この「1」を加える処理については、必ずしもサーバ群抽象化部251で行う必要はなく、スロット群生成部241で行ってもよい。   Specifically, in the server list holding table 253, the system maintainer 400 associates in advance the server name unique to the system such as DBserver1 with the server name used by the slot group management unit 240 such as A and B, for example, DBserver1: A, DBserver2: B, DBserver3: C, DBserver4: D, and DBserver5: E are held. In this situation, when the server group abstraction unit 251 receives a request from the system maintenance person 400 to generate a slot group that is resistant to one of the five servers, the server group abstraction unit In 251, a slot group for A, B, C, D, and E is required based on information in the server list holding table 253, and a slot group for A, B, C, and D is currently required. If there is, it requests the slot group generation unit 241 of the slot group management unit 240. In this case, for example, “the number of required failure tolerances (the number of assumed failure servers) +1”, that is, “1 + 1 = 2” here is transmitted as a parameter relating to slot group generation (hereinafter, this parameter is referred to as “parameter”). Called the basic permutation length). Note that the process of adding “1” is not necessarily performed by the server group abstraction unit 251 and may be performed by the slot group generation unit 241.

今回の場合、例えば、サーバ群抽象化部251から、パラメータとして、サーバリスト「A、B、C、D、E」、基本順列長「2」、最大でA、B、C、D、Eに関するスロット群が必要となり、現在はA、B、C、Dに関するスロット群が必要であるという情報がスロット群生成部241に送信されると、スロット群管理部240からは、例えば、後述するようなA、B等で構成されたスロット群が返送される。つまり、環状のハッシュ空間に対し、各サーバの担当範囲を割り当てたスロット群が返送される。そして、サーバ群個別化部252が、返送されたスロット群に対し、サーバリスト保持テーブル253の情報をもとに、A、B等の汎用的な名称からDBserver1等の個別の名称に変換することで、DBserver1等の個別の名称に対応したスロット群が生成される。以降、サーバ台数が増減する際にも、スロット群汎用化部250は同様に動作する。   In this case, for example, from the server group abstraction unit 251, the server list “A, B, C, D, E”, the basic permutation length “2”, and the maximum A, B, C, D, E When information indicating that slot groups are required and slot groups related to A, B, C, and D are currently required is transmitted to the slot group generation unit 241, the slot group management unit 240, for example, as described below A slot group composed of A, B, etc. is returned. That is, a slot group to which the assigned range of each server is assigned is returned to the circular hash space. Then, the server group individualization unit 252 converts the returned slot group from a general name such as A or B to an individual name such as DBserver1 based on the information in the server list holding table 253. Thus, a slot group corresponding to an individual name such as DBserver1 is generated. Thereafter, when the number of servers increases or decreases, the slot group generalization unit 250 operates in the same manner.

なお、このスロット群は、負荷分散システムのいずれかのサーバ300が故障したとき、この故障サーバの処理を引き継ぐサーバ300を選択するときにも用いられる。例えば、振分部220が受信パケットの振り分け先としてDBserver1を選択した後、このDBserver1が故障したとき、処理の引き継ぎ先のサーバ300として、当該スロット群において故障サーバ(DBserver1(A))の右隣り(時計回りの向きで隣り)に配置されるサーバ(例えば、DBserver5(E))を選択する。   This slot group is also used when a server 300 that takes over the processing of the failed server is selected when any of the servers 300 in the load distribution system fails. For example, after the distribution unit 220 selects DBserver1 as the distribution destination of the received packet, when this DBserver1 fails, the server 300 that is the takeover destination of processing is immediately adjacent to the failed server (DBserver1 (A)) in the slot group. A server (for example, DBserver5 (E)) arranged in the (clockwise direction adjacent) is selected.

(スロット群生成部)
次に、図2を用いて、スロット群生成部241を詳細に説明する。スロット群生成部241は、パラメータ受信部2411と、最大スロット列生成依頼部2412と、判定部2413と、スロット列延長部2414と、処理対象集合抽出部2415と、スロット列保管処理部2416と、サーバ選定部2417と、サーバ置換部2418と、スロット割り当て部2419とを備える。
(Slot group generator)
Next, the slot group generation unit 241 will be described in detail with reference to FIG. The slot group generation unit 241 includes a parameter reception unit 2411, a maximum slot sequence generation request unit 2412, a determination unit 2413, a slot sequence extension unit 2414, a processing target set extraction unit 2415, a slot sequence storage processing unit 2416, A server selection unit 2417, a server replacement unit 2418, and a slot allocation unit 2419 are provided.

パラメータ受信部2411は、サーバ群抽象化部251からスロット群生成に関するパラメータを受信する。例えば、パラメータ受信部2411は、サーバ群抽象化部251からパラメータとして、分散処理システムを構成するサーバリスト(例えば、A、B、C、D、E)、基本順列長(例えば、2)、最大のサーバ群のリスト(例えば、A、B、C、D、E)、現在必要なサーバ数(例えば、4)等の情報を受信する。   The parameter receiving unit 2411 receives parameters related to slot group generation from the server group abstraction unit 251. For example, the parameter reception unit 2411 receives, as parameters from the server group abstraction unit 251, a server list (for example, A, B, C, D, E) constituting the distributed processing system, a basic permutation length (for example, 2), a maximum Information such as a list of server groups (for example, A, B, C, D, E) and the number of servers currently required (for example, 4).

最大スロット列生成依頼部2412は、最大スロット列生成部243に対しこの最大のサーバ群のスロット列(最大スロット列)の生成の依頼を行う。具体的には、最大スロット列生成依頼部2412は、スロット群生成に関するパラメータに示される、最大のサーバ群のリスト(例えば、A、B、C、D、E)と、基本順列長(例えば、2)とを最大スロット列生成部243へ送信し、そして、最大スロット列生成部243から計算結果として最大スロット列を受け取る。受け取った最大スロット列はスロット列延長部2414へ出力する。   The maximum slot sequence generation request unit 2412 requests the maximum slot sequence generation unit 243 to generate a slot sequence (maximum slot sequence) of this maximum server group. Specifically, the maximum slot sequence generation request unit 2412 indicates a list of maximum server groups (for example, A, B, C, D, E) indicated in the parameters related to slot group generation, and a basic permutation length (for example, 2) is transmitted to the maximum slot sequence generation unit 243, and the maximum slot sequence is received from the maximum slot sequence generation unit 243 as a calculation result. The received maximum slot row is output to the slot row extension 2414.

判定部2413は、負荷分散システムにサーバ増減設が必要か否か、また必要な場合、増設が必要か、減設が必要かを判定する。具体的には、判定部2413は、まず、スロット群生成に関するパラメータに示される、現在必要なサーバ数(システム保守者400等から要求されたサーバの数)および負荷分散システムの最大サーバ数を参照して、現在必要なサーバ数が、最大サーバ数よりも少なければ減設が必要と判定し、最大サーバ数と同じであれば減設は必要ないと判定する。また、判定部2413は、負荷分散システムの運用開始後、要求されたサーバ数と、現在運用中のサーバ数とを比較し、要求されたサーバ数が現在運用中のサーバ数よりも少ないときは減設が必要と判定し、要求されたサーバ数が現在運用中のサーバ数よりも多いときは増設が必要と判定する。   The determination unit 2413 determines whether or not server load / uninstall is necessary for the load distribution system, and if necessary, whether or not expansion / deinstallation is necessary. Specifically, the determination unit 2413 first refers to the number of currently required servers (the number of servers requested by the system maintainer 400 or the like) and the maximum number of servers in the load balancing system, which are indicated in the parameters related to slot group generation. If the currently required number of servers is smaller than the maximum number of servers, it is determined that the reduction is necessary, and if the number is the same as the maximum number of servers, it is determined that the reduction is not necessary. Further, the determination unit 2413 compares the requested number of servers with the number of servers currently in operation after starting the operation of the load balancing system, and when the requested number of servers is smaller than the number of servers currently in operation. If it is determined that a reduction is necessary and the number of requested servers is greater than the number of servers currently in operation, it is determined that an expansion is necessary.

スロット列延長部2414は、最大スロット列を1回以上繰り返した延長スロット列(後記する図13参照)を生成する。   The slot row extension 2414 generates an extension slot row (see FIG. 13 described later) in which the maximum slot row is repeated one or more times.

スロット列保管処理部2416は、スロット列延長部2414により生成された延長スロット列やサーバ置換部2418により生成されたスロット列をスロット保管部242へ出力する。   The slot row storage processing unit 2416 outputs the extended slot row generated by the slot row extension unit 2414 and the slot row generated by the server replacement unit 2418 to the slot storage unit 242.

処理対象集合抽出部2415は、最大のサーバ群と現在必要なサーバ群との差分のサーバ群を減設対象となるサーバ群として抽出する。   The processing target set extraction unit 2415 extracts a difference server group between the largest server group and the currently required server group as a server group to be removed.

サーバ選定部2417は、減設対象となるサーバ群からサーバ置換部2418による置換処理の対象のサーバ300を選定する。   The server selection unit 2417 selects the server 300 to be replaced by the server replacement unit 2418 from the server group to be removed.

サーバ置換部2418は、スロット列延長部2414により生成された延長スロット列またはスロット保管部242に保管されるスロット列において、サーバ選定部2417により選択されたサーバ300が登場する箇所を、別のサーバ300に置き換える(置換処理を行う)。例えば、判定部2413により、負荷分散システムの最大のサーバ群からサーバ減設が必要と判定された場合、サーバ置換部2418は、延長スロット列における置換処理の対象のサーバ300の登場部分を、当該延長スロット列に登場する他のサーバ300に置換する。このサーバ置換部2418の詳細は具体例を交えながら後記する。   The server replacement unit 2418 determines a location where the server 300 selected by the server selection unit 2417 appears in another slot in the extended slot sequence generated by the slot sequence extension unit 2414 or the slot sequence stored in the slot storage unit 242. Replace with 300 (perform replacement). For example, when the determination unit 2413 determines that server reduction is necessary from the largest server group of the load distribution system, the server replacement unit 2418 determines the appearance portion of the server 300 that is the target of replacement processing in the extension slot row. Replace with another server 300 appearing in the extension slot row. Details of the server replacement unit 2418 will be described later with specific examples.

スロット割り当て部2419は、スロット列をもとにスロット群を生成する。例えば、スロット割り当て部2419は、サーバ置換部2418により生成されたスロット列またスロット列延長部2414により生成された延長スロット列をもとに、受信パケットの振り分けに用いるハッシュ空間を、当該スロット列の長さのスロットに分割する。そして、スロット割り当て部2419は、この分割したスロットそれぞれに、スロット列に示される順でサーバ300を割り当てたスロット群を生成する(図15参照)。生成したスロット群は、スロット保管部242へ出力する。なお、システム保守者400等により要求されたサーバ数に対応するスロット列が、スロット保管部242に既に保管されている場合、スロット割り当て部2419は、スロット保管部242に保管されるスロット列を用いてスロット群を生成する。   The slot allocation unit 2419 generates a slot group based on the slot sequence. For example, the slot allocating unit 2419 uses the slot space generated by the server replacing unit 2418 or the extended slot sequence generated by the slot sequence extending unit 2414 as a hash space used for distributing received packets. Divide into length slots. Then, the slot assignment unit 2419 generates a slot group in which the servers 300 are assigned to the divided slots in the order shown in the slot row (see FIG. 15). The generated slot group is output to the slot storage unit 242. When the slot sequence corresponding to the number of servers requested by the system maintainer 400 or the like is already stored in the slot storage unit 242, the slot allocation unit 2419 uses the slot sequence stored in the slot storage unit 242. Slot group.

(最大スロット列生成部)
最大スロット列生成部243を詳細に説明する。最大スロット列生成部243は、図3に示すように、スロット列順列組合せ生成部2431と、接続グラフ生成部244と、順列閉路抽出部245と、スロット列生成部246とを備える。拡張基礎順列生成部248と、拡張スロット列生成部249とは、最大スロット列生成部243が装備する場合と装備しない場合とがあり、装備する場合については第2の実施形態で述べる。なお、各部の処理の詳細は、具体例を交えながら後記する。
(Maximum slot sequence generator)
The maximum slot sequence generation unit 243 will be described in detail. As illustrated in FIG. 3, the maximum slot sequence generation unit 243 includes a slot sequence permutation combination generation unit 2431, a connection graph generation unit 244, a permutation cycle extraction unit 245, and a slot sequence generation unit 246. The extended basic permutation generation unit 248 and the expansion slot sequence generation unit 249 may or may not be equipped with the maximum slot sequence generation unit 243. The case of being equipped will be described in the second embodiment. Details of the processing of each unit will be described later with specific examples.

スロット列順列組合せ生成部2431は、負荷分散システムの最大のサーバ群から、(想定する故障サーバの台数+1)の台数のサーバの順列組合せを生成する。   The slot column permutation combination generation unit 2431 generates a permutation combination of servers of (the number of assumed failure servers + 1) from the largest server group of the load distribution system.

接続グラフ生成部244は、スロット列順列組合せ生成部2431により生成された順列組合せ同士をノードとして接続した順列接続グラフを生成する。   The connection graph generation unit 244 generates a permutation connection graph in which the permutation combinations generated by the slot column permutation combination generation unit 2431 are connected as nodes.

順列閉路抽出部245は、接続グラフ生成部244により生成された順列接続グラフから、各ノードを同じ回数通る順列閉路を抽出する。   The permutation cycle extraction unit 245 extracts a permutation cycle that passes through each node the same number of times from the permutation connection graph generated by the connection graph generation unit 244.

スロット列生成部246は、順列閉路抽出部245により抽出された順列閉路を構成するノードそれぞれの先頭のサーバを閉路の順に並べてスロット列(基本スロット列)を生成する。   The slot sequence generation unit 246 generates a slot sequence (basic slot sequence) by arranging the leading servers of the nodes constituting the permutation cycle extracted by the permutation cycle extraction unit 245 in the order of the cycles.

(処理手順)
次に、負荷分散装置200のスロット群管理部240の処理手順について説明する。
(Processing procedure)
Next, a processing procedure of the slot group management unit 240 of the load distribution apparatus 200 will be described.

(最大スロット列生成部の処理手順)
まず、スロット群管理部240の最大スロット列生成部243の処理手順を説明する。最大スロット列生成部243は、図4に示すように、スロット群生成の対象となるサーバを示したサーバリストを取得し(S10)、サーバリストに示されるサーバの基本スロット列を生成する(S20)。
(Processing procedure of maximum slot sequence generator)
First, the processing procedure of the maximum slot sequence generation unit 243 of the slot group management unit 240 will be described. As shown in FIG. 4, the maximum slot sequence generation unit 243 obtains a server list indicating servers for which a slot group is to be generated (S10), and generates a basic slot sequence for the servers indicated in the server list (S20). ).

例えば、最大のサーバ群がA、B、Cであり、最大スロット列生成部243が基本スロット列生成処理により、ABCBACというスロット列を生成した場合を考える。この場合、スロット群生成部241は、このABCBACというスロット列に基づきスロット群を生成する。例えば、スロット群生成部241は、後記する図10に示すように、ハッシュ空間を6等分(スロット列の長さで等分)し、スロット列と同じ順番でスロットにサーバを割り当てる。つまり、スロット群生成部241は、A→B→C→B→A→C(→Aに戻る)というスロット群を生成する。このように、スロット群生成部241が最大のサーバ群の各サーバの登場回数が同じで、かつ各サーバの次に他のサーバが登場する回数が均一になるようなスロット群を生成し、振分部220が当該スロット群により受信パケットの振り分けを行うことで、各サーバ間で負荷を均一化し、かつ、故障時の負荷についても均一化することができる。   For example, consider a case where the maximum server group is A, B, and C, and the maximum slot sequence generation unit 243 generates a slot sequence ABCBAC by the basic slot sequence generation processing. In this case, the slot group generation unit 241 generates a slot group based on this ABCBAC slot string. For example, as shown in FIG. 10 to be described later, the slot group generation unit 241 divides the hash space into six equal parts (equally divided by the length of the slot string), and assigns servers to the slots in the same order as the slot string. That is, the slot group generation unit 241 generates a slot group of A → B → C → B → A → C (→ returns to A). In this way, the slot group generation unit 241 generates a slot group in which the number of appearances of each server in the maximum server group is the same, and the number of appearances of other servers after each server is uniform. Since the dividing unit 220 distributes the received packets according to the slot group, it is possible to equalize the load among the servers and to equalize the load at the time of failure.

図4の基本スロット列生成処理(S20)は、図5に示す手順により行われる。まず、最大スロット列生成部243のスロット列順列組合せ生成部2431は、図4のS10で取得されたサーバリストに基づき基本順列を生成する(S21)。具体的には、スロット列順列組合せ生成部2431は、サーバリストに示されるサーバ群について、(想定する故障サーバの台数+1)、すなわち基本順列長の台数のサーバの順列組合せをすべて抽出する。   The basic slot string generation process (S20) in FIG. 4 is performed according to the procedure shown in FIG. First, the slot sequence permutation combination generation unit 2431 of the maximum slot sequence generation unit 243 generates a basic permutation based on the server list acquired in S10 of FIG. 4 (S21). Specifically, the slot sequence permutation combination generation unit 2431 extracts all permutation combinations of servers having the number of basic permutation lengths for the server group indicated in the server list (the number of assumed failure servers + 1).

例えば、想定する故障サーバの台数を「1」とし、サーバリストにA、B、Cが記載されていた場合を考える。この場合、スロット列生成部243は、図6に示すように、3つのサーバについて「2(基本順列長)」の長さの全順列を列挙すると、AB、AC、BC、BA、CA、CBとなる。つまり、例えば、Aが故障したときはBが処理を引き継ぐ、Aが故障したときにはCが引き継ぐ、Bが故障したときはCが処理を引き継ぐ、…というように、故障サーバとその故障サーバの処理を引き継ぐサーバとの順列組合せをすべて列挙する。なお、このようにして列挙した順列を基本順列とする。サーバが3台の場合の基本順列の数は、つまり6個となる。 For example, let us consider a case where the assumed number of failed servers is “1” and A, B, and C are described in the server list. In this case, as shown in FIG. 6, the slot sequence generation unit 243 enumerates all permutations having a length of “2 (basic permutation length)” for the three servers, and AB, AC, BC, BA, CA, CB It becomes. In other words, for example, when A fails, B takes over processing, when A fails, C takes over, when B fails, C takes over processing, and so on. List all permutations with servers that take over The permutations enumerated in this way are defined as basic permutations. When there are three servers, the number of basic permutations is 3 P 2 , that is, six.

図5の説明に戻る。S21の後、接続グラフ生成部244は、基本順列接続グラフを生成する(S22)。具体的には、接続グラフ生成部244は、S21で抽出した順列組合せ(基本順列)同士をノードとして接続した基本順列接続グラフを生成する。   Returning to the description of FIG. After S21, the connection graph generation unit 244 generates a basic permutation connection graph (S22). Specifically, the connection graph generation unit 244 generates a basic permutation connection graph in which the permutation combinations (basic permutations) extracted in S21 are connected as nodes.

例えば、図7に示すように、基本順列がAB、AC、BC、BA、CA、CBである場合、接続グラフ生成部244は、各基本順列について、後ろ2−1=1の長さの部分順列で始まる基本順列と接続する。つまり、接続グラフ生成部244は、各基本順列をラベルに持つノードを生成し、各基本順列についてはじめの1サーバを除く部分順列を抽出する。例えば、AB、AC、BC、BA、CA、CBという基本順列をラベルに持つノードを生成し、ABについてはBという部分順列を抽出し、ACについてはCという部分順列を抽出する。このような処理をすべての基本順列に対し行う。そして、接続グラフ生成部244は、その抽出した部分順列から始まる基本順列を抽出する。例えば、Bという部分順列から始まる基本順列としてBC、BAを抽出し、Cという部分順列から始まる基本順列としてCA、CBを抽出する(図7の「基本順列接続グラフのリンク」参照)。このように、接続グラフ生成部244は、基本順列の最後尾と同じサーバを先頭に持つ基本順列をグラフのリンク先として抽出する。そして、接続グラフ生成部244は、各基本順列を示すノードを、前記した処理により抽出したリンク先のノードと有向リンクにより接続し、図7の右側に示すような基本順列接続グラフを生成する。   For example, as illustrated in FIG. 7, when the basic permutation is AB, AC, BC, BA, CA, CB, the connection graph generation unit 244 has a length of 2-1 = 1 for each basic permutation. Connect to a basic permutation starting with a permutation. That is, the connection graph generation unit 244 generates a node having each basic permutation as a label, and extracts a partial permutation excluding the first one server for each basic permutation. For example, a node having a basic permutation of AB, AC, BC, BA, CA, CB as a label is generated, a partial permutation of B is extracted for AB, and a partial permutation of C is extracted for AC. Such processing is performed for all basic permutations. Then, the connection graph generation unit 244 extracts a basic permutation starting from the extracted partial permutation. For example, BC and BA are extracted as basic permutations starting from a partial permutation called B, and CA and CB are extracted as basic permutations starting from a partial permutation called C (see “Link of Basic Permutation Connection Graph” in FIG. 7). As described above, the connection graph generation unit 244 extracts a basic permutation having the same server as the end of the basic permutation as the head of the graph as a link destination of the graph. Then, the connection graph generation unit 244 connects the nodes indicating the basic permutations with the link destination nodes extracted by the above-described processing by the directed links, and generates a basic permutation connection graph as illustrated on the right side of FIG. .

図5の説明に戻る。S22の後、順列閉路抽出部245は、S22で生成された基本順列接続グラフから、各ノードを同じ回数通る基本順列閉路を抽出する(S23)。   Returning to the description of FIG. After S22, the permutation cycle extraction unit 245 extracts a basic permutation cycle that passes through each node the same number of times from the basic permutation connection graph generated in S22 (S23).

例えば、順列閉路抽出部245は、図8に示すような基本順列接続グラフから、各ノードを同回数通る閉路を抽出し、図8の右側に示す基本順列閉路を得る。このような閉路が生成されれば、最大スロット列生成部243が、この閉路に沿ってスロット列上のサーバの順番を決定することで、各基本順列が同回数出現するスロット列を生成することができる。当該閉路の抽出方法は問わないが、少なくとも当該グラフはオイラー閉路を持つ条件を満たしているため、Fleuryのアルゴリズムを用いることでオイラー閉路を抽出することが可能である。   For example, the permutation cycle extraction unit 245 extracts a cycle that passes through each node the same number of times from a basic permutation connection graph as shown in FIG. 8, and obtains a basic permutation cycle shown on the right side of FIG. If such a cycle is generated, the maximum slot sequence generation unit 243 determines the order of the servers on the slot sequence along the cycle, thereby generating a slot sequence in which each basic permutation appears the same number of times. Can do. There is no limitation on the method of extracting the cycle, but at least the graph satisfies the condition having the Euler cycle, and therefore the Euler cycle can be extracted by using Fleury's algorithm.

なお、図8に例示した基本順列接続グラフは、各ノードが入次数、出次数ともに2次の有向グラフとなっているため、抽出されたオイラー閉路は各ノードを丁度2回ずつ通る閉路となる。以降の説明では基本順列閉路として図8に示す「AB→BC→CB→BA→AC→CA→AC→CB→BC→CA→AB→BA(ABに戻る)」を用いるものとする。   In the basic permutation connection graph illustrated in FIG. 8, each node is a second-order directed graph for both the incoming order and the outgoing order. Therefore, the extracted Euler circuit is a circuit that passes through each node exactly twice. In the following description, “AB → BC → CB → BA → AC → CA → AC → CB → BC → CA → AB → BA (return to AB)” shown in FIG. 8 is used as the basic permutation circuit.

図5の説明に戻る。S23の後、スロット列生成部246は、S23で抽出された基本順列閉路を構成するノードそれぞれの先頭のサーバを閉路の順に並べてスロット列を生成する(S24)。例えば、スロット列生成部246は、図9に示すように基本順列閉路をAB→BC→CB→BA→AC→CA→AC→CB→BC→CA→AB→BAの順に走査し、それぞれのラベルのはじめのサーバを閉路に沿って並べ、スロット列としてABCBACACBCABを生成する。   Returning to the description of FIG. After S23, the slot sequence generation unit 246 generates a slot sequence by arranging the leading servers of the nodes constituting the basic permutation cycle extracted in S23 in the order of the cycle (S24). For example, as shown in FIG. 9, the slot sequence generation unit 246 scans the basic permutation cycle in the order of AB → BC → CB → BA → AC → CA → AC → CB → BC → CA → AB → BA. The first servers are arranged along a closed path, and ABCBACABCCAB is generated as a slot train.

その後、スロット群生成部241は、例えば、図5のS24で生成されたスロット列の長さでハッシュ空間を等分(空間を12等分)し、スロット列(ABCBACACBCAB)と同じ順で各スロットにサーバを割り当てたスロット群を生成する。つまり、スロット群生成部241は、A→B→C→B→A→C→A→C→B→C→A→B(→Aに戻る)というスロット群を生成する。   Thereafter, for example, the slot group generation unit 241 equally divides the hash space by the length of the slot string generated in S24 of FIG. 5 (divides the space into 12 equal parts), and each slot in the same order as the slot string (ABCBACABCBCAB) A slot group in which servers are assigned to is generated. That is, the slot group generation unit 241 generates a slot group of A → B → C → B → A → C → A → C → B → C → A → B (→ returns to A).

このようにして生成されたスロット群には、前記した基本順列が全て同じ回数含まれる。したがって、振分部220が、受信パケットの振り分けにこのようなスロット群を用いることで、負荷分散システム内のサーバ300の故障時を含め、各サーバ間の負荷を均一化させることができる。すなわち、前記したスロット群には、サーバ300もサーバ300の順列も同じ数だけ登場するため、平常時の割り当てスロット数が均一となる。さらに、例えばスロットの割り当てとしてA→Bの順で割り当てている部分があった場合、Aが故障時にはコンシステント・ハッシュ法に従うと、次のBが割り当てを受ける形となる。その結果、全ての基本順列の登場回数が同じであった場合、各サーバ300の次に他のサーバ300が登場する回数が均一となり、故障時も負荷を均一化させることができる。   In the slot group generated in this way, all the basic permutations described above are included the same number of times. Therefore, by using such a slot group for distribution of received packets, the distribution unit 220 can equalize the load among the servers including when the server 300 in the load distribution system fails. That is, since the same number of servers 300 and permutations of the servers 300 appear in the slot group described above, the number of slots allocated in normal times is uniform. Further, for example, when there is a part assigned in the order of A → B as slot assignment, if A follows a failure according to the consistent hash method, the next B is assigned. As a result, when the number of appearances of all the basic permutations is the same, the number of times other servers 300 appear after each server 300 becomes uniform, and the load can be made uniform even at the time of failure.

なお、上記では、説明を簡単にするため、負荷分散システムの最大サーバ数がA、B、Cの3台である場合のスロット列の生成手順を示したが、最大サーバ数がA、B、C、D、Eの5台である場合のスロット列も同様の手順により生成される。例えば、最大サーバ数がA、B、C、D、Eの5台である場合、最大スロット列生成部243はオイラー閉路から生成すると「ABCDEABDADCDBDBEDBCACBAEBDECDABEACDCBEBCEBACEADEBECECBCBDCABADACAEAEDEDCEDAECADB」、オイラー閉路ではなく各ノードを2回ずつ通る閉路を用いる場合は「AEADEDAEABEBDEDBEBCECDCECBDBADACDCACBCAB」というスロット列を生成する。そして、最大スロット列生成部243は、生成したスロット列を、スロット群生成部241へ出力する。なお、以降の説明では最大スロット列としては後者の「AEADEDAEABEBDEDBEBCECDCECBDBADACDCACBCAB」を用いる。   In the above, for the sake of simplicity, the procedure for generating the slot train when the maximum number of servers in the load balancing system is three, A, B, and C, is shown, but the maximum number of servers is A, B, The slot sequence for C, D, and E is generated in the same procedure. For example, if the maximum number of servers is 5 (A, B, C, D, E), the maximum slot sequence generator 243 generates “ABCDEABDADCDBDBEDEDCACBAEBDDECABEACDCBEBCCEBACEADEBEDECECBCBCBDACADAEDEDEDAECADB in each node instead of in a closed node” Is used, a slot sequence "AEADEDAEABEBDEDBEBCDECDCCBDBADACDCACBCAB" is generated. Then, the maximum slot sequence generation unit 243 outputs the generated slot sequence to the slot group generation unit 241. In the following explanation, the latter “AEADEDAEABEBDEDBEBBCDECDCDBADACDCACBCAB” is used as the maximum slot row.

(スロット群生成部の処理手順)
図11を用いて、スロット群生成部241の処理手順を説明する。スロット群生成部241のパラメータ受信部2411は、サーバ群抽象化部251からスロット群生成に関するパラメータを受信すると(S1)、最大スロット列生成依頼部2412は、最大スロット列生成部243に対し最大スロット列の生成依頼を行う(S2)。その後、最大スロット列生成部243から、最大スロット列を受信すると(S3)、判定部2413は、S1で受信したパラメータに示される、最大のサーバ群の数(最大サーバ数)と現在必要なサーバ数とを比較し、サーバ300の減設が必要か否かを判定する(S4)。ここで判定部2413において、サーバ300の減設が必要と判定した場合(S4でYes)、スロット群生成部241は、減設スロット群の生成を行う(S5)。つまり、スロット群生成部241は、減設スロット列を生成し、この生成した減設スロット列をもとにスロット群(減設スロット群)を生成する。一方、判定部2413がサーバ300の減設は必要ないと判定した場合(S4でNo)、スロット群生成部241は、S3で受信した最大スロット列をもとにスロット群を生成する(S6)。
(Processing procedure of slot group generation unit)
A processing procedure of the slot group generation unit 241 will be described with reference to FIG. When the parameter reception unit 2411 of the slot group generation unit 241 receives the parameter related to slot group generation from the server group abstraction unit 251 (S1), the maximum slot sequence generation request unit 2412 sends the maximum slot sequence generation unit 243 to the maximum slot. A column generation request is made (S2). Thereafter, when the maximum slot sequence is received from the maximum slot sequence generation unit 243 (S3), the determination unit 2413 indicates the maximum number of server groups (maximum number of servers) and the currently required server indicated by the parameter received in S1. The number is compared to determine whether or not the server 300 needs to be removed (S4). If the determination unit 2413 determines that the server 300 needs to be removed (Yes in S4), the slot group generation unit 241 generates a reduction slot group (S5). That is, the slot group generation unit 241 generates a reduced slot row, and generates a slot group (removed slot group) based on the generated reduced slot row. On the other hand, if the determination unit 2413 determines that the server 300 need not be removed (No in S4), the slot group generation unit 241 generates a slot group based on the maximum slot sequence received in S3 (S6). .

図11の減設スロット群生成処理(S5)は、図12に示す手順により行われる。まず、スロット列延長部2414は、最大スロット列生成部243から得られた最大スロット列について、1回以上繰り返した延長スロット列を生成する(S80:スロット列延長)。例えば、スロット列延長部2414は、図13に示すように3回繰り返した延長スロット列を生成する。この繰り返しの回数については1でもよいが、基本的には大きくするほど、負荷分散システムのサーバ300間での負荷の偏りを抑制することができる。   The reduced slot group generation process (S5) in FIG. 11 is performed according to the procedure shown in FIG. First, the slot row extension unit 2414 generates an extension slot row that is repeated one or more times for the maximum slot row obtained from the maximum slot row generation unit 243 (S80: slot row extension). For example, the slot row extension 2414 generates an extension slot row that is repeated three times as shown in FIG. The number of repetitions may be 1, but basically, the larger the number of repetitions, the more the load unevenness among the servers 300 of the load distribution system can be suppressed.

次に、処理対象集合抽出部2415は、図12のS80で生成された延長スロット列に現れるサーバ集合と、スロット群を生成するよう求められているサーバ群との差分を減設対象のサーバ300として抽出する(S90:減設対象集合抽出)。例えば、処理対象集合抽出部2415は、例えば、最大のサーバ群(A、B、C、D、E)の中から、減設対象集合として{E}を抽出する。S90の後、サーバ選定部2417は、減設対象集合が空集合になるまで1サーバずつ選択する。   Next, the processing target set extraction unit 2415 reduces the difference between the server set appearing in the extended slot sequence generated in S80 of FIG. 12 and the server group that is requested to generate the slot group, and the server 300 that is to be reduced. (S90: Extraction target set extraction). For example, the processing target set extraction unit 2415 extracts {E} as a reduction target set from the largest server group (A, B, C, D, E), for example. After S90, the server selection unit 2417 selects one server at a time until the reduction target set becomes an empty set.

すなわち、減設対象集合に減設対象があれば(S100でYes)、まずスロット列保管処理部2416は、その段階での延長スロット列をスロット保管部242に保管する(S110:スロット列保管)。ここで延長スロット列を保管するのは、サーバ300を減設して負荷分散システムの運用を開始した後、サーバ300を増設する場合に、この増設したサーバ300を含めたスロット群の生成を行うときに用いるためである。一方、S100で減設対象集合に減設対象がなければ(S100でNo)、スロット群生成部241は現在のスロット列をもとにスロット群を生成する(S150)。そして、生成したスロット群を、スロット保管部242に出力する。   That is, if there is a reduction target in the reduction target set (Yes in S100), the slot row storage processing unit 2416 first stores the extended slot row at that stage in the slot storage unit 242 (S110: slot row storage). . Here, the extension slot row is stored because when the server 300 is added after the server 300 is removed and the operation of the load balancing system is started, a slot group including the added server 300 is generated. This is for occasional use. On the other hand, if there is no reduction target in the reduction target set in S100 (No in S100), the slot group generation unit 241 generates a slot group based on the current slot sequence (S150). Then, the generated slot group is output to the slot storage unit 242.

S110の後、サーバ選定部2417は、減設対象集合{E}から1つ、例えば降順等の条件で置換処理の対象のサーバ300を選定する(S120:処理対象サーバ選定)。例えば、サーバ選定部2417は、減設対象集合{E}からEを選定する。   After S110, the server selection unit 2417 selects one target server 300 for replacement processing from the reduction target set {E} under conditions such as descending order (S120: processing target server selection). For example, the server selection unit 2417 selects E from the reduction target set {E}.

S120の後、サーバ置換部2418は、延長スロット列における置換処理の対象のサーバ300(例えば、E)を他のサーバ300に置換する(S130:処理対象サーバ置換)。具体的には、サーバ置換部2418は延長スロット列中、S120で選定したサーバ300(例えば、E)が登場する箇所を、負荷分散システムを構成する他のサーバ300(例えば、A、B、C、Dのいずれか)に置換する。このとき、サーバ置換部2418は、サーバ置換後の延長スロット列に登場するサーバ300(A、B、C、D)の基本順列(例えば、AB、CD等)それぞれの登場回数ができるだけ同じになるように置換する。このS130の処理の詳細は具体例を交えながら後記する。   After S120, the server replacement unit 2418 replaces the server 300 (for example, E) to be replaced in the extension slot row with another server 300 (S130: processing target server replacement). Specifically, the server replacement unit 2418 identifies the location where the server 300 selected in S120 (for example, E) appears in the extension slot row as another server 300 (for example, A, B, C, etc.) constituting the load balancing system. , D). At this time, the server replacement unit 2418 makes the number of appearances of each of the basic permutations (for example, AB, CD, etc.) of the servers 300 (A, B, C, D) appearing in the extension slot row after server replacement as much as possible. Replace as follows. Details of the processing of S130 will be described later with specific examples.

S130の後、サーバ置換部2418は減設対象集合の更新を行い(S140)、S100へ戻る。そして、S100で減設対象集合に減設対象がなければ(S100でNo)、スロット群生成部241は現在のスロット列をもとにスロット群を生成する(S150)。すなわち、スロット群生成部241は、生成されたスロット列の長さでハッシュ空間を分割し、それをスロット列に沿って各サーバ300に割り当てることでスロット群を生成する。例えば、生成されたスロット列の長さが「20」であった場合、図15に例示するようにハッシュ空間を20に分割し、生成されたスロット列に沿って各サーバ300に割り当てることでスロット群を生成する。   After S130, the server replacement unit 2418 updates the reduction target set (S140), and returns to S100. If there is no reduction target in the reduction target set in S100 (No in S100), the slot group generation unit 241 generates a slot group based on the current slot sequence (S150). That is, the slot group generation unit 241 generates a slot group by dividing the hash space by the length of the generated slot string and assigning it to each server 300 along the slot string. For example, when the length of the generated slot sequence is “20”, the hash space is divided into 20 as illustrated in FIG. 15 and assigned to each server 300 along the generated slot sequence. Create a group.

なお、このスロット群においてサーバ300それぞれの登場回数が各サーバ300間で同じであるほど各サーバ300が正常動作している場合の負荷が均一化される。また、このスロット群において各基本順列の登場回数が各基本順列間で同じであるほど、基本順列長−1台まで故障した場合の稼働サーバ間での負荷が均一化される。   In this slot group, the load when each server 300 is operating normally becomes more uniform as the number of appearances of each server 300 is the same among the servers 300. Further, the more the same number of appearances of each basic permutation is in this slot group, the more uniform the load among the active servers when the basic permutation length is reduced to one.

(処理対象サーバ置換処理)
前記した図12のS130における処理対象サーバ置換処理を詳細に説明する。例えば、図13に示すような延長スロット列においてA〜EのうちEを置換処理の対象として選定した場合を考える。この場合、延長スロット列中にEは24回登場しているが、サーバ置換部2418は、その登場している箇所についてE以外のいずれかのサーバ(A、B、C、Dのいずれか)に置換する。このときサーバ置換部2418は、基本順列(例えば、AB、CD等)それぞれの登場回数ができるだけ同じになるように置換する。
(Processing server replacement process)
The processing target server replacement process in S130 of FIG. 12 will be described in detail. For example, let us consider a case where E is selected as a replacement processing target from A to E in the extension slot row as shown in FIG. In this case, E appears 24 times in the extended slot row, but the server replacement unit 2418 selects one of the servers other than E (any one of A, B, C, and D) at the appearing location. Replace with. At this time, the server replacement unit 2418 performs replacement so that the number of appearances of each basic permutation (for example, AB, CD, etc.) is the same as much as possible.

例えば、サーバ置換部2418は、延長スロット列においてEが登場している箇所それぞれについてA、B、C、Dそれぞれに置換してみて、置換後に全ての基本順列(AB、BA、BC、CB、CD、DC、DA、AD、AC、CA、BD、DB)の登場回数の分散値が最少となる置換を探索する。   For example, the server replacement unit 2418 replaces each of the locations where E appears in the extension slot sequence with A, B, C, and D, and after replacement, all the basic permutations (AB, BA, BC, CB, (CD, DC, DA, AD, AC, CA, BD, DB) is searched for a replacement with the smallest variance value of the number of appearances.

その結果、例えば、図14に示すように、サーバ数5の延長スロット列から、同図に示すサーバ数4のスロット列が生成される。このサーバ数4のスロット列では、全ての基本順列(AB、BA、BC、CB、CD、DC、DA、AD、AC、CA、BD、DB)が等しく10回ずつ登場している。   As a result, for example, as shown in FIG. 14, from the extended slot row with 5 servers, a slot row with 4 servers shown in FIG. 14 is generated. In this slot row with 4 servers, all the basic permutations (AB, BA, BC, CB, CD, DC, DA, AD, AC, CA, BD, DB) appear equally 10 times.

したがって、このスロット列に沿ってスロット割り当て部2419がスロット群を生成すれば、負荷分散システム内でA、B、C、Dの4サーバが正常に動作しているときも、その任意の1台が故障したときもサーバ間の負荷を均一化するようなスロット群を生成することができる。また、サーバ置換部2418は、延長スロット列から減設対象のサーバ300の登場する箇所を別のサーバ300に置き換えたスロット列(減設スロット列)を生成する。したがって、このスロット列に沿ってスロット割り当て部2419がスロット群を生成すれば、サーバ300の減設があった場合でも、減設前のスロット群と比較して、減設対象のサーバ300のハッシュ空間の割当担当範囲のみ変更されたスロット群を生成することができる。例えば、負荷分散システムを構成するサーバ数が4(A、B、C、D)と5(A、B、C、D、E)との間で変動したときも、減設対象のサーバ300(例えば、E)に割り当てられていたハッシュ空間の割当担当範囲のみ変更されたスロット群を生成することができる。したがって、負荷分散システムを構成するサーバ数に増減があったときでも、上記の処理により生成されたスロット群を用いて、振分部220がパケットの振り分けを行うことで、サーバ間での保管データの移動等による影響を必要最小限にすることができる。   Therefore, if the slot allocation unit 2419 generates a slot group along this slot row, any one of the four servers A, B, C, and D operates normally in the load balancing system. It is possible to generate a slot group that equalizes the load between servers even when a failure occurs. In addition, the server replacement unit 2418 generates a slot train (removal slot train) in which the location where the server 300 to be removed appears is replaced with another server 300 from the extended slot train. Therefore, if the slot allocation unit 2419 generates a slot group along this slot row, even if the server 300 is reduced, the hash of the server 300 to be reduced is compared with the slot group before the reduction. A slot group in which only the space allocation range is changed can be generated. For example, even when the number of servers constituting the load balancing system fluctuates between 4 (A, B, C, D) and 5 (A, B, C, D, E), the server 300 ( For example, it is possible to generate a slot group in which only the assigned range of the hash space assigned to E) is changed. Therefore, even when the number of servers constituting the load balancing system increases or decreases, the distribution unit 220 distributes packets using the slot group generated by the above processing, so that the stored data between the servers It is possible to minimize the influence due to the movement of the.

なお、この後、システム保守者400等から、負荷分散システムを構成するサーバ300の変更に関する要求があった場合は、当該要求を受信したスロット群生成部241は運用中のサーバ数と、要求されたサーバ数とを比較し、サーバ300の減設または増設が必要か否かを判定する。   After this, if there is a request from the system maintenance person 400 or the like regarding the change of the server 300 that constitutes the load balancing system, the slot group generation unit 241 that has received the request is requested the number of servers in operation. It is determined whether or not the number of servers 300 needs to be reduced or increased.

例えば、現在運用中のサーバ数が4(A、B、C、D)であり、要求されるサーバ数が3(A、B、C)である場合、当該要求を受信したスロット群生成部241は、サーバ300(例えば、D)の減設が必要であると判定する。そして、スロット群生成部241は、図12に示したフローの中でスロット列延長処理(S80)を実行せず、S90以降の処理を実行することで、スロット保管部242に保管されるサーバ数4の場合のスロット列から、減設対象のサーバ300(例えば、D)を減設したスロット列を生成する。例えば、スロット群生成部241は、図14に示すサーバ数3の場合のスロット列を生成する。そして、スロット群生成部241は、減設対象のサーバ300(例えば、D)を減設したスロット列を生成する。   For example, when the number of servers currently in operation is 4 (A, B, C, D) and the requested number of servers is 3 (A, B, C), the slot group generation unit 241 that has received the request. Determines that the server 300 (for example, D) needs to be removed. Then, the slot group generation unit 241 does not execute the slot string extension process (S80) in the flow shown in FIG. 12, but executes the processes after S90, thereby the number of servers stored in the slot storage unit 242. From the slot row in the case of 4, a slot row in which the reduction target server 300 (for example, D) is removed is generated. For example, the slot group generation unit 241 generates a slot string in the case of 3 servers shown in FIG. And the slot group production | generation part 241 produces | generates the slot row | line | column which reduced the server 300 (for example, D) of reduction object.

また、例えば、現在運用中のサーバ数が3であり、要求されるサーバ数が4または5である場合、つまり、現在運用中のサーバ数よりも、要求されるサーバ数の方が大きく、かつ最大サーバ数より小さい場合には、当該要求を受信したスロット群生成部241は、サーバ300の増設が必要であると判定する。そして、スロット群生成部241はスロット保管部242にサーバ数4または5の場合のスロット列(例えば、図14のサーバ数4のスロット列またはサーバ数5のスロット列)を取り出し、取り出したスロット列をもとに、スロット群を生成する。   Further, for example, when the number of servers currently in operation is 3 and the number of servers requested is 4 or 5, that is, the number of servers requested is larger than the number of servers currently in operation, and When the number is smaller than the maximum number of servers, the slot group generation unit 241 that has received the request determines that the server 300 needs to be added. Then, the slot group generation unit 241 takes out the slot train in the case of the number of servers 4 or 5 (for example, the slot row of the number of servers 4 or the slot row of the number of servers 5 in FIG. 14) from the slot storage unit 242, and Based on the above, a slot group is generated.

このようにすることで、例えば、負荷分散システムのサーバ数を3(例えば、A、B、C)から、4(例えば、A、B、C、D)に増加させる場合でも、スロット群生成部241は、増設対象のサーバ300(例えば、D)以外のサーバ300(例えば、A、B,C)に割り当てられるハッシュ空間の担当範囲をできるだけ変えないようなスロット群を生成することができる。その結果、負荷分散システムにおいてサーバ300を増設する場合でも、最大サーバ数以下であれば、スロット群生成部241は、サーバ間で負荷を均一化しつつ、サーバ間で保管データの移動等による影響を必要最小限にするようなスロット群を生成することができる。   By doing so, for example, even when the number of servers in the load balancing system is increased from 3 (for example, A, B, C) to 4 (for example, A, B, C, D), the slot group generation unit 241 can generate a slot group that does not change the assigned range of the hash space assigned to servers 300 (for example, A, B, C) other than the server 300 (for example, D) to be added as much as possible. As a result, even when the number of servers 300 is increased in the load balancing system, if the number of servers is less than or equal to the maximum number, the slot group generation unit 241 has an effect due to the movement of stored data between servers while equalizing the load among servers. Slot groups that can be minimized are generated.

(第2の実施形態)
次に、本発明の第2の実施形態を説明する。第2の実施形態は、最大スロット列生成部243aが、最大スロット数のスロット列(最大スロット列)を生成するとき、サーバリストの一部のサーバのスロット列を生成し(基本スロット列生成)、そのスロット列をサーバリストの残りのサーバ分まで拡張する(スロット列拡張を行う)ことを特徴とする。このように最大スロット列生成部243aが基本スロット列生成とスロット列拡張とを組み合わせてスロット列を生成することで、サーバリストに示されるサーバの台数が多い場合でも、全サーバのスロット列の生成にかかる計算量とスロット長を低減することができる。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. In the second embodiment, when the maximum slot sequence generation unit 243a generates a slot sequence of the maximum number of slots (maximum slot sequence), it generates slot sequences of some servers in the server list (basic slot sequence generation). The slot sequence is expanded to the remaining servers in the server list (slot sequence expansion is performed). Thus, even when the number of servers shown in the server list is large, the maximum slot sequence generation unit 243a generates a slot sequence by combining basic slot sequence generation and slot sequence expansion. The amount of calculation and the slot length can be reduced.

なお、以下、最大スロット列生成部243aは、まずサーバリストのサーバのうち、(基本順列長+1)台のサーバのスロット列を生成し、その後、このスロット列を残りのサーバ分まで拡張する場合を例に説明する。前記した第1の実施形態と同じ構成は、同じ符号を付して説明を省略する。   Hereinafter, the maximum slot sequence generation unit 243a first generates a slot sequence of (basic permutation length + 1) servers among the servers in the server list, and then extends this slot sequence to the remaining servers. Will be described as an example. The same configurations as those of the first embodiment described above are denoted by the same reference numerals and description thereof is omitted.

この最大スロット列生成部243aは、図3に示すように、破線で示す拡張基礎順列生成部248と、拡張スロット列生成部249とをさらに備える。   As shown in FIG. 3, the maximum slot sequence generation unit 243a further includes an extended basic permutation generation unit 248 indicated by a broken line and an expansion slot sequence generation unit 249.

まず、最大スロット列生成部243aは、スロット順列組合せ生成部243、接続グラフ生成部244、順列閉路抽出部245、および、スロット列生成部246により、サーバリストに示されるサーバ(例えば、A〜E)のうち、(基本順列長+1)台のサーバ、例えば、A、B、Cの3台のサーバのスロット列を生成する。   First, the maximum slot sequence generation unit 243a includes a server (for example, A to E) indicated in the server list by the slot sequence combination generation unit 243, the connection graph generation unit 244, the permutation cycle extraction unit 245, and the slot sequence generation unit 246. ), A slot sequence of (basic permutation length + 1) servers, for example, three servers A, B, and C is generated.

拡張基礎順列生成部248は、スロット順列組合せ生成部243により生成された基本順列に示されるサーバ(例えば、A、B、C)から、(基本順列長−1)台のサーバの順列組合せである拡張基礎順列をすべて抽出する。例えば、拡張基礎順列生成部248は、拡張基礎順列として、A、B、Cを抽出する。   The extended basic permutation generation unit 248 is a permutation combination of (basic permutation length-1) servers from the servers (for example, A, B, and C) indicated in the basic permutation generated by the slot permutation combination generation unit 243. Extract all extended basic permutations. For example, the extended basic permutation generation unit 248 extracts A, B, and C as the extended basic permutation.

拡張スロット列生成部249は、サーバリストに示されるサーバ(例えば、A〜E)のうち、スロット列生成部246がスロット列(基本スロット列)の対象としなかったサーバを1つ選択する。   The expansion slot string generation unit 249 selects one of the servers (for example, A to E) indicated in the server list, which is not targeted by the slot string generation unit 246 as a slot string (basic slot string).

例えば、拡張スロット列生成部249は、D、Eのいずれかを選択する、そして、拡張スロット列生成部249は、スロット列生成部246により生成されたスロット列(例えば、ABCBAC)から、拡張基礎順列に示されるサーバ(例えば、A、B、C)を1つずつ抽出し、それぞれ拡張対象サーバ(例えば、D)を拡張基礎順列(例えば、A、B、C)で挟んだ順列で置換する。これにより、基本スロット列に、拡張対象サーバが挿入された新たなスロット列が生成される。つまり、基本スロット列が拡張対象サーバの分まで拡張される。その後、拡張スロット列生成部249は、上記と同様の処理により、拡張サーバ(例えば、D)が挿入されたスロット列に、さらに拡張対象サーバ(例えば、E)を挿入する。これにより、サーバリストに示される全サーバ(A、B、C、D、E)のスロット列が生成される。   For example, the expansion slot sequence generation unit 249 selects either D or E, and the expansion slot sequence generation unit 249 uses the expansion basis from the slot sequence (for example, ABCBAC) generated by the slot sequence generation unit 246. One server (for example, A, B, C) shown in the permutation is extracted one by one, and each expansion target server (for example, D) is replaced with a permutation sandwiched between expansion basic permutations (for example, A, B, C). . As a result, a new slot sequence in which the expansion target server is inserted is generated in the basic slot sequence. That is, the basic slot sequence is expanded to the expansion target server. Thereafter, the expansion slot string generation unit 249 inserts an expansion target server (for example, E) further into the slot string in which the expansion server (for example, D) is inserted, by the same processing as described above. As a result, a slot train of all servers (A, B, C, D, E) shown in the server list is generated.

この拡張基礎順列生成部248と、拡張スロット列生成部249の詳細は、具体例を用いて後記する。   Details of the extended basic permutation generation unit 248 and the expansion slot sequence generation unit 249 will be described later using a specific example.

次に、第2の実施形態の最大スロット列生成部243aにおけるスロット群生成の処理手順について説明する。   Next, a slot group generation processing procedure in the maximum slot string generation unit 243a of the second embodiment will be described.

図16に示すように、最大スロット列生成部243aは、サーバリストおよび基本順列長を示した基礎情報を取得し(S40)、この基礎情報をもとに基本スロット列生成用のサーバリストを抽出する(S50)。そして、最大スロット列生成部243aは、S50で抽出されたサーバリストをもとに、図4のS20と同様の手順により基本スロット列生成を行う(S20)。そして、最大スロット列生成部243aは、拡張情報を生成する(S60)。この拡張情報は、スロット列を拡張するために用いられる情報であり、基本スロット列生成用のサーバリスト(拡張前サーバリスト)と、S20で生成した基本スロット列(拡張前のスロット列)と、基本順列長と、サーバリストのうち基本スロット列の対象外としたサーバのリスト(拡張サーバリスト)とを示した情報である。   As shown in FIG. 16, the maximum slot sequence generation unit 243a acquires basic information indicating the server list and the basic permutation length (S40), and extracts the server list for generating the basic slot sequence based on the basic information. (S50). Then, based on the server list extracted in S50, the maximum slot string generation unit 243a generates a basic slot string in the same procedure as S20 in FIG. 4 (S20). Then, the maximum slot sequence generation unit 243a generates extension information (S60). This extension information is information used to extend the slot sequence, and includes a server list for generating a basic slot sequence (pre-expansion server list), a basic slot sequence (slot sequence before expansion) generated in S20, This is information indicating the basic permutation length and a list of servers (extended server list) excluded from the basic slot sequence in the server list.

例えば、図17に示すように、基礎情報に示されるサーバリストが「A、B、C、D、E」であり、基本順列長が「2」である場合、最大スロット列生成部243aは、基本順列長+1=3台のサーバを任意に抽出し、基本スロット列生成のためのサーバリスト(例えば、A、B、C)を抽出する。なお、ここで抽出対象外のサーバ(例えば、D、E)は拡張サーバリストにのせる。その後、最大スロット列生成部243aは基本スロット列生成処理(図4のS20と同様の処理)によってスロット列を生成する。このスロット列を基本スロット列とする。そして、最大スロット列生成部243aは、拡張前サーバリスト(基本スロット列生成用のサーバリスト)が「A、B、C」であり、拡張前のスロット列(基本スロット列)が「ABCBACACBCAB」であり、基本順列長が「2」であり、拡張サーバリストが「D、E」であることを示した拡張情報を生成する。   For example, as illustrated in FIG. 17, when the server list indicated in the basic information is “A, B, C, D, E” and the basic permutation length is “2”, the maximum slot sequence generation unit 243 a Basic permutation length + 1 = 3 servers are arbitrarily extracted, and a server list (for example, A, B, C) for generating a basic slot sequence is extracted. Here, servers that are not subject to extraction (for example, D and E) are put on the extended server list. Thereafter, the maximum slot string generation unit 243a generates a slot string by a basic slot string generation process (a process similar to S20 in FIG. 4). This slot row is a basic slot row. The maximum slot sequence generation unit 243a has the pre-expansion server list (server list for basic slot sequence generation) “A, B, C”, and the slot sequence before expansion (basic slot sequence) is “ABCBAACACBCAB”. Yes, extended information indicating that the basic permutation length is “2” and the extended server list is “D, E” is generated.

図16の説明に戻る。S60の後、最大スロット列生成部243aは、S60で生成された拡張情報をもとにスロット列拡張処理を実行する(S70)。   Returning to the description of FIG. After S60, the maximum slot string generation unit 243a executes a slot string expansion process based on the expansion information generated in S60 (S70).

ここで、図18を用いて、図16のS70のスロット列拡張処理を説明する。拡張基礎順列生成部248は、S60で生成された拡張情報を取得すると(S71)、拡張対象サーバを抽出し(S72)、拡張基礎順列を生成する(S73)。   Here, the slot string expansion process in S70 of FIG. 16 will be described with reference to FIG. When the extended basic permutation generation unit 248 acquires the extended information generated in S60 (S71), the extended basic permutation generation unit 248 extracts an expansion target server (S72) and generates an extended basic permutation (S73).

例えば、拡張基礎順列生成部248は、図17に示す拡張情報の拡張サーバリスト「D、E」から、Dを抽出する。そして、拡張基礎順列生成部248は、図19に示すように、拡張前サーバリストは「A、B、C」、基本順列長は「2」という情報から、A、B、Cの3つのサーバについて、基本順列長2−1=1の長さの全順列を生成する。ここで抽出する順列を拡張基礎順列と呼ぶ。例えば、拡張基礎順列生成部248は、拡張基礎順列として「A、B、C」を生成する。ここで抽出する拡張基礎順列の個数はサーバがA、B、Cの3台の場合、=3個となる。 For example, the extended basic permutation generation unit 248 extracts D from the extended server list “D, E” of the extended information shown in FIG. Then, as shown in FIG. 19, the extended basic permutation generation unit 248 uses three servers A, B, and C from the information that the pre-extension server list is “A, B, C” and the basic permutation length is “2”. For all permutations with a basic permutation length 2-1 = 1. The permutation extracted here is called an extended basic permutation. For example, the extended basic permutation generation unit 248 generates “A, B, C” as the extended basic permutation. The number of extended basic permutations extracted here is 3 P 1 = 3 when there are three servers A, B, and C.

図18の説明に戻る。S73の後、拡張スロット列生成部249は、S73で生成された拡張基礎順列をスロット列へ挿入する(S74)。   Returning to the description of FIG. After S73, the expansion slot string generation unit 249 inserts the expansion basic permutation generated in S73 into the slot string (S74).

例えば、拡張スロット列生成部249は、S73で生成された拡張基礎順列(例えば、A、B、C)について、拡張前のスロット列(例えば、ABCBACACBCAB)から2つずつ、その位置を検索していく。いくつずつ検索していくかについては、当該スロット列の基本順列閉路(図8参照)において各ノードを通過した回数に等しく、拡張前のスロット列長を基本順列の数で除することで求められる。例えば、前記した例でいうと拡張前のスロット列(ABCBACACBCAB)の長さは「12」で、基本順列の数は「=6」なので、「12÷6=2」となる。 For example, the expansion slot string generation unit 249 searches the position of the expansion basic permutation (for example, A, B, C) generated in S73 two times from the slot string before expansion (for example, ABCBACABCBCAB). Go. The number of times of searching is determined by dividing the slot sequence length before expansion by the number of basic permutations, which is equal to the number of passes through each node in the basic permutation cycle of the slot sequence (see FIG. 8). . For example, the above-mentioned means if the length of the extended previous slot columns (ABCBACACBCAB) in Example "12", the number of basic permutations since the "3 P 2 = 6", and "12 ÷ 6 = 2".

そして、拡張スロット列生成部249は、拡張前のスロット列から検索した拡張基礎順列のそれぞれについて、その拡張基礎順列で拡張対象サーバを挟んだ順列で置換していく。例えば、拡張対象サーバが「D」である場合を考える。この場合、図20に示すように、拡張スロット列生成部249は、拡張基礎順列「A」については、拡張前のスロット列で「A」となっている箇所2つについて、「ADA」で置換する。また、同様に、拡張前のスロット列で「B」となっている箇所2つについて、「BDB」で置換する。さらに、拡張前のスロット列で「C」となっている箇所2つについて、「CDC」で置換する。その結果、拡張後のスロット列として「ADABDBCDCBDBADACDCACBCAB」が得られる。   Then, the expansion slot string generation unit 249 replaces each expansion basic permutation searched from the slot string before expansion with a permutation sandwiching the expansion target server in the expansion basic permutation. For example, consider a case where the expansion target server is “D”. In this case, as illustrated in FIG. 20, the expansion slot sequence generation unit 249 replaces the expansion basic permutation “A” with “ADA” for two locations that are “A” in the slot sequence before expansion. To do. Similarly, two locations that are “B” in the slot row before expansion are replaced with “BDB”. Furthermore, “CDC” is replaced with two locations that are “C” in the slot row before expansion. As a result, “ADABDBCDCBDBADACDCACBCAB” is obtained as the expanded slot string.

このように、拡張スロット列生成部249は、拡張前のスロット列から、拡張基礎順列を各2抽出し、それぞれ拡張対象サーバを当該拡張基礎順列で挟んだ順列で置換する。なお、前記した例では、拡張基礎順列の長さが「1」である場合について説明したが、長さが「2」である場合、例えば、拡張基礎順列が「AB」である場合、拡張対象サーバが「D」なら、拡張前のスロット列で「AB」となっている箇所について「ABDAB」に置換する。   In this way, the expansion slot string generation unit 249 extracts two expansion basic permutations from the slot string before expansion, and replaces each expansion target server with a permutation sandwiched between the expansion basic permutations. In the above example, the case where the length of the extended basic permutation is “1” has been described. However, when the length is “2”, for example, when the extended basic permutation is “AB”, the extension target If the server is “D”, the place “AB” in the slot string before expansion is replaced with “ABDAB”.

図18の説明に戻る。このようにして拡張基礎順列をスロット列に挿入した(S74)後、拡張スロット列生成部249は、処理済みの拡張対象サーバを拡張前サーバリストに加える等して拡張情報を更新する(S75)。例えば、拡張スロット列生成部249は、拡張前のスロット列「ABCBACACBCAB」に、サーバ「D」を挿入した後、図21の左側の拡張情報を、右側の拡張情報へ更新する。   Returning to the description of FIG. After inserting the expansion basic permutation into the slot string in this way (S74), the expansion slot string generating unit 249 updates the extension information by adding the processed expansion target server to the server list before expansion (S75). . For example, the expansion slot string generation unit 249 inserts the server “D” into the slot string “ABCBACABCBCAB” before expansion, and then updates the left extension information in FIG. 21 to the right extension information.

図18の説明に戻る。S76で拡張対象サーバが残存していれば(S76でYes)、最大スロット列生成部243aは、更新した拡張情報を用いて、再度S71以降の処理を実行する。一方、拡張対象サーバが残存していなければ(S76でNo)、スロット列拡張処理を終了する。   Returning to the description of FIG. If the expansion target server remains in S76 (Yes in S76), the maximum slot string generation unit 243a executes the processing from S71 again using the updated expansion information. On the other hand, if the expansion target server does not remain (No in S76), the slot string expansion process is terminated.

なお、拡張スロット列生成部249は、図20に示す処理により、拡張対象サーバ「D」をスロット列へ挿入した後、上記と同様の処理により拡張対象サーバ「E」をスロット列へ挿入する。つまり、拡張スロット列生成部249は、「ADABDBCDCBDBADACDCACBCAB」というスロット列を生成した後、このスロット列の「A、B、C、D」が登場する箇所を2つずつ抽出し、それぞれについて、拡張対象サーバ「E」を挟んだ順列で置換していく。その結果、拡張スロット列生成部249は、「AEADEDAEABEBDEDBEBCECDCECBDBADACDCACBCAB」というスロット列を生成する。   The expansion slot string generation unit 249 inserts the expansion target server “D” into the slot string by the process shown in FIG. 20, and then inserts the expansion target server “E” into the slot string by the same process as described above. That is, the expansion slot string generation unit 249 generates a slot string “ADABDBCDCBDBADACDCACBCAB”, then extracts two locations where “A, B, C, D” of this slot string appears, and expands each of them. Replacement is performed with a permutation sandwiching the server “E”. As a result, the expansion slot sequence generation unit 249 generates a slot sequence of “AEADEDAEABEBDEDBEBCDECDECBDBADACDCACBCAB”.

以上の処理によってサーバリストに示される全てのサーバ(A、B、C、D、E)が組み込まれたスロット列が完成すると、スロット群生成部241はこれをもとにスロット群を生成する。   When the slot sequence incorporating all the servers (A, B, C, D, E) shown in the server list is completed by the above processing, the slot group generation unit 241 generates a slot group based on this.

例えば、最大スロット列生成部243aは、ハッシュ値の空間を、スロット列「AEADEDAEABEBDEDBEBCECDCECBDBADACDCACBCAB」の長さ40に分割したスロットを生成すると、スロット群生成部241はこのスロットに、スロット列「AEADEDAEABEBDEDBEBCECDCECBDBADACDCACBCAB」に登場する順番で担当サーバを割り当てる。   For example, when the maximum slot string generation unit 243a generates a slot in which the space of the hash value is divided into the length 40 of the slot string “AEADEDAEABEBDDECBBECDCDECDBADACDCACBCAB”, the slot group generation unit 241 includes the slot string “AEADEDAEABEBDBCBDECDCACDCCBDCDC” in this slot. Assign the servers in order.

以上の処理によって、サーバリストに示される全てのサーバが含まれ、かつ、それらの間で担当範囲が均一なスロット群が生成されたため、当該スロット群を用いた負荷分散システムでは、負荷をサーバ間で均一に分散することが可能となる。   As a result of the above processing, a slot group including all the servers shown in the server list and having a uniform assigned range among them is generated. Therefore, in the load balancing system using the slot group, the load is distributed between the servers. It becomes possible to disperse uniformly.

また、最大スロット列生成部243aが、スロット列の生成を(基本順列長+1)台までとし、(基本順列長+1)台を超えた分のサーバについてはスロット列拡張処理によりスロット列に挿入することで、サーバリストに示される全サーバについてのスロット列を生成する際の計算量とスロット長を低減できる。   In addition, the maximum slot sequence generation unit 243a limits the generation of slot sequences to (basic permutation length + 1) units, and inserts servers that exceed (basic permutation length + 1) units into the slot sequence by slot sequence expansion processing. Thus, it is possible to reduce the amount of calculation and the slot length when generating the slot train for all the servers shown in the server list.

(その他の実施形態)
なお、図1のスロット群管理部240は、負荷分散装置200の中に1つであるように例示しているが、図22のように負荷分散装置200から切り出し、スロット群提供装置500のような構成にしてもよく、またこの場合、1つのスロット群提供装置500が複数の負荷分散装置200の処理を行うことも可能である。
(Other embodiments)
The slot group management unit 240 in FIG. 1 is illustrated as being one in the load distribution apparatus 200, but is cut out from the load distribution apparatus 200 as shown in FIG. In this case, one slot group providing apparatus 500 can perform processing of a plurality of load distribution apparatuses 200.

(プログラム)
また、上記実施形態に係る負荷分散装置200が実行する処理をコンピュータが実行可能な言語で記述したプログラムを作成することもできる。この場合、コンピュータがプログラムを実行することにより、上記実施形態と同様の効果を得ることができる。さらに、かかるプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータに読み込ませて実行することにより上記実施形態と同様の処理を実現してもよい。以下に、負荷分散装置200と同様の部を実現する負荷分散プログラムを実行するコンピュータの一例を説明する。
(program)
It is also possible to create a program in which the processing executed by the load distribution apparatus 200 according to the above embodiment is described in a language that can be executed by a computer. In this case, the same effect as the above-described embodiment can be obtained by the computer executing the program. Further, such a program may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by a computer and executed to execute the same processing as in the above embodiment. Hereinafter, an example of a computer that executes a load distribution program that implements the same unit as the load distribution apparatus 200 will be described.

図23は、負荷分散プログラムを実行するコンピュータを示す図である。図23に示すように、コンピュータ1000は、例えば、メモリ1010と、CPU1020と、ハードディスクドライブインタフェース1030と、ディスクドライブインタフェース1040と、シリアルポートインタフェース1050と、ビデオアダプタ1060と、ネットワークインタフェース1070とを有する。これらの各部は、バス1080によって接続される。   FIG. 23 is a diagram illustrating a computer that executes a load distribution program. As shown in FIG. 23, the computer 1000 includes, for example, a memory 1010, a CPU 1020, a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These units are connected by a bus 1080.

メモリ1010は、ROM(Read Only Memory)1011およびRAM(Random Access Memory)1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。ディスクドライブ1100には、例えば、磁気ディスクや光ディスク等の着脱可能な記憶媒体が挿入される。シリアルポートインタフェース1050には、例えば、マウス1110およびキーボード1120が接続される。ビデオアダプタ1060には、例えば、ディスプレイ1130が接続される。   The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM (Random Access Memory) 1012. The ROM 1011 stores a boot program such as BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to the hard disk drive 1090. The disk drive interface 1040 is connected to the disk drive 1100. A removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100, for example. For example, a mouse 1110 and a keyboard 1120 are connected to the serial port interface 1050. For example, a display 1130 is connected to the video adapter 1060.

ここで、図23に示すように、ハードディスクドライブ1090は、例えば、OS1091、アプリケーションプログラム1092、プログラムモジュール1093およびプログラムデータ1094を記憶する。上記実施形態で説明した各テーブルは、例えばハードディスクドライブ1090やメモリ1010に記憶される。   Here, as shown in FIG. 23, the hard disk drive 1090 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. Each table described in the above embodiment is stored in the hard disk drive 1090 or the memory 1010, for example.

また、負荷分散プログラムは、例えば、コンピュータ1000によって実行される指令が記述されたプログラムモジュールとして、ハードディスクドライブ1090に記憶される。具体的には、上記実施形態で説明した負荷分散装置200が実行する各処理が記述されたプログラムモジュールが、ハードディスクドライブ1090に記憶される。   Further, the load distribution program is stored in the hard disk drive 1090 as a program module in which a command executed by the computer 1000 is described, for example. Specifically, a program module describing each process executed by the load distribution apparatus 200 described in the above embodiment is stored in the hard disk drive 1090.

また、負荷分散プログラムによる情報処理に用いられるデータは、プログラムデータとして、例えば、ハードディスクドライブ1090に記憶される。そして、CPU1020が、ハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して、上述した各手順を実行する。   Further, data used for information processing by the load balancing program is stored as program data in, for example, the hard disk drive 1090. Then, the CPU 1020 reads out the program module 1093 and the program data 1094 stored in the hard disk drive 1090 to the RAM 1012 as necessary, and executes the above-described procedures.

なお、負荷分散プログラムに係るプログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限られず、例えば、着脱可能な記憶媒体に記憶されて、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。あるいは、負荷分散プログラムに係るプログラムモジュール1093やプログラムデータ1094は、LAN(Local Area Network)やWAN(Wide Area Network)等のネットワークを介して接続された他のコンピュータに記憶され、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。   Note that the program module 1093 and the program data 1094 related to the load balancing program are not limited to being stored in the hard disk drive 1090. For example, the program module 1093 and the program data 1094 are stored in a removable storage medium and read by the CPU 1020 via the disk drive 1100 or the like. May be issued. Alternatively, the program module 1093 and the program data 1094 related to the load distribution program are stored in another computer connected via a network such as a LAN (Local Area Network) or a WAN (Wide Area Network), and are transmitted via the network interface 1070. May be read by the CPU 1020.

100 クライアント
200 負荷分散装置
210 パケット受信部
220 振分部
221 キー抽出部
222 パケット送信先決定部
230 パケット転送部
240 スロット群管理部
241 スロット群生成部
242 スロット保管部
243、243a 最大スロット列生成部
244 接続グラフ生成部
245 順列閉路抽出部
246 スロット列生成部
248 拡張基礎順列生成部
249 拡張スロット列生成部
250 スロット群汎用化部
251 サーバ群抽象化部
252 サーバ群個別化部
253 サーバリスト保持テーブル
300 サーバ
2411 パラメータ受信部
2412 最大スロット列生成依頼部
2413 判定部
2414 スロット列延長部
2415 処理対象集合抽出部
2416 スロット列保管処理部
2417 サーバ選定部
2418 サーバ置換部
2419 スロット割り当て部
2431 スロット列順列組合せ生成部
DESCRIPTION OF SYMBOLS 100 Client 200 Load distribution apparatus 210 Packet receiving part 220 Distribution part 221 Key extraction part 222 Packet transmission destination determination part 230 Packet transfer part 240 Slot group management part 241 Slot group generation part 242 Slot storage part 243, 243a Maximum slot row generation part 244 connection graph generation unit 245 permutation cycle extraction unit 246 slot sequence generation unit 248 extended basic permutation generation unit 249 expansion slot sequence generation unit 250 slot group generalization unit 251 server group abstraction unit 252 server group individualization unit 253 server list holding table 300 server 2411 parameter reception unit 2412 maximum slot sequence generation request unit 2413 determination unit 2414 slot sequence extension unit 2415 processing target set extraction unit 2416 slot sequence storage processing unit 2417 server selection unit 241 Server replacement section 2419 slot assignment unit 2431 slot bank permutations generator

Claims (8)

複数のサーバ間で負荷分散を行う負荷分散システムにおいて、受信パケットの振り分けに用いるスロット群を生成するスロット群生成装置であって、
前記負荷分散システムを構成するサーバ数を最大とした場合の最大のサーバ群それぞれについて、所定数のサーバの順列組合せの登場回数が同じとなるようサーバを配列したスロット列を生成する最大スロット列生成部と、
前記生成されたスロット列を1以上複製して連結させた延長スロット列を生成する延長スロット列生成部と、
前記負荷分散システムに要求されるサーバの数が、前記最大のサーバ群のサーバの数よりも少ないとき、前記生成した延長スロット列における、前記最大のサーバ群からの減設対象となるサーバの登場部分それぞれを、前記減設対象外のサーバの基本順列それぞれの登場回数ができるだけ同じになるように前記減設対象外のサーバに置換したスロット列を生成するサーバ置換部と、
所定のハッシュ空間を、前記サーバ置換部により生成されたスロット列の長さのスロットに分割し、前記分割したスロットそれぞれに、前記スロット列に示される順で前記サーバを割り当てたスロット群を生成するスロット割り当て部とを備えることを特徴とするスロット群生成装置。
In a load distribution system that distributes load among a plurality of servers, a slot group generation device that generates a slot group used for distributing received packets,
Maximum slot sequence generation for generating a slot sequence in which servers are arranged so that the number of appearances of permutation combinations of a predetermined number of servers is the same for each maximum server group when the number of servers constituting the load balancing system is maximized And
An extension slot string generation unit that generates an extension slot string obtained by duplicating and connecting one or more of the generated slot strings;
When the number of servers required for the load balancing system is smaller than the number of servers in the maximum server group, the appearance of servers to be removed from the maximum server group in the generated extension slot row A server replacement unit that generates a slot sequence in which each portion is replaced with a server that is not subject to reduction so that the number of appearances of each basic permutation of the server that is not subject to reduction is the same as possible,
A predetermined hash space is divided into slots each having the length of the slot sequence generated by the server replacement unit, and a slot group in which the servers are assigned to each of the divided slots in the order indicated by the slot sequence is generated. A slot group generation device comprising a slot allocation unit.
前記スロット群生成装置は、さらに、
前記延長スロット列および前記サーバ置換部による置換の過程で生成されたスロット列を保管する保管部を備え、
前記スロット割り当て部は、
前記負荷分散システムに要求されるサーバの数に対応するスロット列が前記保管部にあるとき、前記保管部から前記負荷分散システムに要求されるサーバの数に対応するスロット列を取得し、前記スロット群を生成することを特徴とする請求項1に記載のスロット群生成装置。
The slot group generation device further includes:
A storage unit for storing the extended slot row and the slot row generated in the process of replacement by the server replacement unit;
The slot allocation unit includes:
When there is a slot sequence corresponding to the number of servers required for the load distribution system in the storage unit, the slot sequence corresponding to the number of servers required for the load distribution system is obtained from the storage unit, and the slot The slot group generation device according to claim 1, wherein a group is generated.
前記サーバ置換部は、
前記負荷分散システムに要求されるサーバの数に対応するスロット列が前記保管部になく、かつ、前記負荷分散システムに要求されるサーバの数が、前記最大のサーバ群のサーバの数よりも少ないとき、前記保管部から現在の前記負荷分散システムのサーバ群に対応するスロット列を取得し、前記取得したスロット列における、現在の前記負荷分散システムのサーバ群からの減設対象となるサーバの登場部分それぞれを、前記減設対象外のサーバの基本順列それぞれの登場回数ができるだけ同じになるように前記減設対象外のサーバに置換したスロット列を生成することを特徴とする請求項2に記載のスロット群生成装置。
The server replacement unit
There is no slot sequence corresponding to the number of servers required for the load distribution system in the storage unit, and the number of servers required for the load distribution system is smaller than the number of servers in the maximum server group. When the slot string corresponding to the current server group of the load distribution system is acquired from the storage unit, the appearance of the server to be removed from the server group of the current load distribution system in the acquired slot string 3. The slot train in which each portion is replaced with a server that is not subject to reduction is generated so that the number of appearances of each basic permutation of the server that is not subject to reduction is the same as possible. Slot group generator.
前記最大スロット列生成部は、
前記負荷分散システムを構成するサーバ数を最大とした場合の最大のサーバ群の中から、所定数のサーバの順列組合せである基本順列を生成するスロット順列組み合わせ生成部と、
前記生成した基本順列をノードとして接続した順列接続グラフを生成する接続グラフ生成部と、
前記生成した順列接続グラフから、各ノードの通過回数が全ノード間で同じになる順列閉路を抽出する順列閉路抽出部と、
前記抽出した順列閉路を構成するノードそれぞれの先頭のサーバを閉路の順に並べて前記最大のサーバ群のスロット列を生成するスロット列生成部とを備えることを特徴とする請求項1〜3のいずれか1項に記載のスロット群生成装置。
The maximum slot sequence generation unit includes:
A slot permutation combination generation unit that generates a basic permutation that is a permutation combination of a predetermined number of servers from the maximum server group when the number of servers constituting the load balancing system is maximized;
A connection graph generation unit for generating a permutation connection graph in which the generated basic permutation is connected as a node;
From the generated permutation connection graph, a permutation cycle extraction unit that extracts a permutation cycle in which the number of times each node passes is the same between all nodes;
4. A slot sequence generation unit configured to generate a slot sequence of the largest server group by arranging the first servers of the nodes constituting the extracted permutation cycle in the order of the cycle. 2. A slot group generation device according to item 1.
前記所定数は、
前記負荷分散システムにおいて想定する故障サーバの台数に1を加算した値であることを特徴とする請求項1〜4のいずれか1項に記載のスロット群生成装置。
The predetermined number is
The slot group generation device according to claim 1, wherein the slot group generation device is a value obtained by adding 1 to the number of failed servers assumed in the load distribution system.
前記スロット群生成装置は、
前記最大スロット列生成部がスロット列の対象外としたサーバを、前記最大スロット列生成部が生成したスロット列に組み込むとき、前記最大スロット列生成部が生成したスロット列に示されるサーバについて、前記所定数から1を減じた数のサーバの順列組合せである拡張基礎順列を生成する拡張基礎順列生成部と、
前記スロット列の対象外としたサーバを、前記拡張基礎順列で挟んだ順列を生成し、前記生成した順列で、前記最大スロット列生成部が生成したスロット列における当該拡張基礎順列の箇所を置換したスロット列を生成する拡張スロット列生成部とをさらに備えることを特徴とする請求項1〜5のいずれか1項に記載のスロット群生成装置。
The slot group generation device includes:
The maximum slot server sequence generator is excluded from the slot bank, when incorporated into slot column the maximum slot sequence generating unit has generated, the server indicated in the slot column the maximum slot sequence generating unit has generated, the An extended basic permutation generating unit that generates an extended basic permutation that is a permutation combination of a number of servers obtained by subtracting 1 from a predetermined number;
A permutation in which the servers excluded from the slot sequence are included in the extended basic permutation is generated, and the location of the extended basic permutation in the slot sequence generated by the maximum slot sequence generation unit is replaced with the generated permutation. The slot group generation device according to claim 1, further comprising: an expansion slot sequence generation unit that generates a slot sequence.
複数のサーバ間で負荷分散を行う負荷分散システムにおいて、受信パケットの振り分けに用いるスロット群を生成するスロット群生成装置が、
前記負荷分散システムを構成するサーバ数を最大とした場合の最大のサーバ群それぞれについて、所定数のサーバの順列組合せの登場回数が同じとなるようサーバを配列したスロット列を生成する最大スロット列生成ステップと、
前記生成されたスロット列を1以上複製して連結させた延長スロット列を生成する延長スロット列生成ステップと、
前記負荷分散システムに要求されるサーバの数が、前記最大のサーバ群のサーバの数よりも少ないとき、前記生成した延長スロット列における、前記最大のサーバ群からの減設対象となるサーバの登場部分それぞれを、前記減設対象外のサーバの基本順列それぞれの登場回数ができるだけ同じになるように前記減設対象外のサーバに置換したスロット列を生成するサーバ置換ステップと、
所定のハッシュ空間を、前記サーバ置換ステップにより生成されたスロット列の長さのスロットに分割し、前記分割したスロットそれぞれに、前記スロット列に示される順で前記サーバを割り当てたスロット群を生成するスロット割り当てステップとを実行することを特徴とするスロット群生成方法。
In a load distribution system that distributes load among a plurality of servers, a slot group generation device that generates a slot group used for distribution of received packets includes:
Maximum slot sequence generation for generating a slot sequence in which servers are arranged so that the number of appearances of permutation combinations of a predetermined number of servers is the same for each maximum server group when the number of servers constituting the load balancing system is maximized Steps,
An extended slot sequence generating step of generating an extended slot sequence in which one or more of the generated slot sequences are duplicated and connected;
When the number of servers required for the load balancing system is smaller than the number of servers in the maximum server group, the appearance of servers to be removed from the maximum server group in the generated extension slot row A server replacement step for generating a slot train in which each portion is replaced with a server that is not subject to reduction so that the number of appearances of each basic permutation of the server that is not subject to reduction is the same as possible,
A predetermined hash space is divided into slots each having a length of the slot string generated by the server replacement step, and a slot group in which the servers are assigned to the divided slots in the order indicated by the slot string is generated. A slot group generation method comprising: performing a slot allocation step.
複数のサーバ間で負荷分散を行う負荷分散システムにおいて、受信パケットの振り分けに用いるスロット群を生成するスロット群生成装置と、前記生成されたスロット群を用いて、前記受信パケットの振り分けを行う振分装置とを備える負荷分散システムであって、
前記スロット群生成装置は、
前記負荷分散システムを構成するサーバ数を最大とした場合の最大のサーバ群それぞれについて、所定数のサーバの順列組合せの登場回数が同じとなるようサーバを配列したスロット列を生成する最大スロット列生成部と、
前記生成されたスロット列を1以上複製して連結させた延長スロット列を生成する延長スロット列生成部と、
前記負荷分散システムに要求されるサーバの数が、前記最大のサーバ群のサーバの数よりも少ないとき、前記生成した延長スロット列における、前記最大のサーバ群からの減設対象となるサーバの登場部分それぞれを、前記減設対象外のサーバの基本順列それぞれの登場回数ができるだけ同じになるように前記減設対象外のサーバに置換したスロット列を生成するサーバ置換部と、
所定のハッシュ空間を、前記サーバ置換部により生成されたスロット列の長さのスロットに分割し、前記分割したスロットそれぞれに、前記スロット列に示される順で前記サーバを割り当てたスロット群を生成するスロット割り当て部とを備えることを特徴とする負荷分散システム。
In a load distribution system that distributes load among a plurality of servers, a slot group generation device that generates a slot group used for distribution of received packets, and distribution that distributes the received packets using the generated slot groups A load balancing system comprising a device,
The slot group generation device includes:
Maximum slot sequence generation for generating a slot sequence in which servers are arranged so that the number of appearances of permutation combinations of a predetermined number of servers is the same for each maximum server group when the number of servers constituting the load balancing system is maximized And
An extension slot string generation unit that generates an extension slot string obtained by duplicating and connecting one or more of the generated slot strings;
When the number of servers required for the load balancing system is smaller than the number of servers in the maximum server group, the appearance of servers to be removed from the maximum server group in the generated extension slot row A server replacement unit that generates a slot sequence in which each portion is replaced with a server that is not subject to reduction so that the number of appearances of each basic permutation of the server that is not subject to reduction is the same as possible,
A predetermined hash space is divided into slots each having the length of the slot sequence generated by the server replacement unit, and a slot group in which the servers are assigned to each of the divided slots in the order indicated by the slot sequence is generated. A load distribution system comprising a slot allocation unit.
JP2014058202A 2014-03-20 2014-03-20 Slot group generation device, slot group generation method, and load distribution system Expired - Fee Related JP6058576B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014058202A JP6058576B2 (en) 2014-03-20 2014-03-20 Slot group generation device, slot group generation method, and load distribution system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014058202A JP6058576B2 (en) 2014-03-20 2014-03-20 Slot group generation device, slot group generation method, and load distribution system

Publications (2)

Publication Number Publication Date
JP2015184744A JP2015184744A (en) 2015-10-22
JP6058576B2 true JP6058576B2 (en) 2017-01-11

Family

ID=54351252

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014058202A Expired - Fee Related JP6058576B2 (en) 2014-03-20 2014-03-20 Slot group generation device, slot group generation method, and load distribution system

Country Status (1)

Country Link
JP (1) JP6058576B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11902363B2 (en) 2020-07-20 2024-02-13 Nippon Telegraph And Telephone Corporation Load distribution method, load distribution device, load distribution system and program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5514041B2 (en) * 2010-08-25 2014-06-04 日本電信電話株式会社 Identifier assignment method and program
JP5759881B2 (en) * 2011-12-08 2015-08-05 株式会社日立ソリューションズ Information processing system

Also Published As

Publication number Publication date
JP2015184744A (en) 2015-10-22

Similar Documents

Publication Publication Date Title
CN107231399B (en) Capacity expansion method and device for high-availability server cluster
JP6355759B2 (en) Method, system, and computer program for load balancing anycast data traffic
US7032013B2 (en) Reliability for interconnect fabrics
EP3811597A1 (en) Zone redundant computing services using multiple local services in distributed computing systems
JP6089884B2 (en) Information processing system, information processing apparatus, information processing apparatus control program, and information processing system control method
Alenazi et al. Resilient placement of SDN controllers exploiting disjoint paths
US9354995B2 (en) Method for controlling operations of server cluster
JP5599943B2 (en) Server cluster
JP5813872B2 (en) COMMUNICATION CONTROL DEVICE, COMMUNICATION DEVICE, AND PROGRAM
CN107800551A (en) Redis group systems and its method, the client for improving reliability
Ding et al. A MapReduce‐supported network structure for data centers
CN106874142A (en) A kind of real time data fault-tolerance processing method and system
US10785103B2 (en) Method and system for managing control connections with a distributed control plane
JP6058576B2 (en) Slot group generation device, slot group generation method, and load distribution system
Ferdousi et al. Joint progressive recovery of optical network and datacenters after large-scale disasters
JP6139432B2 (en) Slot group generation device, slot group generation method, and load distribution system
US10904327B2 (en) Method, electronic device and computer program product for searching for node
JP7485046B2 (en) LOAD DISTRIBUTING METHOD, LOAD DISTRIBUTING DEVICE, LOAD DISTRIBUTING SYSTEM, AND PROGRAM
Pashkov et al. On high availability distributed control plane for software-defined networks
US10110474B2 (en) Updating interface list of multi-link group
JP6085265B2 (en) Distributed processing system
JP5658621B2 (en) Signal distribution duplication destination determination system, signal distribution duplication destination determination method and program
JP4073923B2 (en) Network device management apparatus, network device management program, and network device management method
US10084890B2 (en) Sysplexport allocation across a z/OS sysplex
CN114513490B (en) View library cluster

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20151001

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20151005

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160113

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160824

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160920

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161107

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20161206

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161207

R150 Certificate of patent or registration of utility model

Ref document number: 6058576

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees