Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5629281B2 - Management device and program - Google Patents
[go: Go Back, main page]

JP5629281B2 - Management device and program - Google Patents

Management device and program Download PDF

Info

Publication number
JP5629281B2
JP5629281B2 JP2012047548A JP2012047548A JP5629281B2 JP 5629281 B2 JP5629281 B2 JP 5629281B2 JP 2012047548 A JP2012047548 A JP 2012047548A JP 2012047548 A JP2012047548 A JP 2012047548A JP 5629281 B2 JP5629281 B2 JP 5629281B2
Authority
JP
Japan
Prior art keywords
server
servers
space
data
management information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2012047548A
Other languages
Japanese (ja)
Other versions
JP2013182546A (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.)
NTT Inc
NTT Inc USA
Original Assignee
Nippon Telegraph and Telephone Corp
NTT Inc USA
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, NTT Inc USA filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2012047548A priority Critical patent/JP5629281B2/en
Publication of JP2013182546A publication Critical patent/JP2013182546A/en
Application granted granted Critical
Publication of JP5629281B2 publication Critical patent/JP5629281B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Hardware Redundancy (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、協調してデータ処理を行うクラスタを構成する複数のサーバを管理する管理装置に関する。   The present invention relates to a management apparatus that manages a plurality of servers constituting a cluster that performs data processing in a coordinated manner.

近年、クラウドコンピューティングの隆盛に伴い、多量のデータの処理や保持を効率的に行うことが求められている。そこで、複数のサーバを協調動作させることにより効率的な処理を実現する分散処理技術が発展している。   In recent years, with the rise of cloud computing, it has been required to efficiently process and retain a large amount of data. Thus, distributed processing technology has been developed that realizes efficient processing by operating a plurality of servers in a coordinated manner.

分散処理を行う際には、処理対象(管理対象)のデータを、クラスタを構成する各サーバ(以下、「クラスタメンバ」または「メンバ」とも称する。)に振り分けておく必要がある。このとき、クラスタ全体での処理能力を高めるためには、各クラスタメンバが担当するデータ数(データ量)は平均化されていることが望ましい。   When performing distributed processing, it is necessary to distribute processing target (management target) data to each server constituting the cluster (hereinafter also referred to as “cluster member” or “member”). At this time, in order to increase the processing capacity of the entire cluster, it is desirable that the number of data (data amount) handled by each cluster member is averaged.

代表的なデータの振り分け手法として、各データのkeyをハッシュ関数にかけた値(以下、「hash(key)」と称する。)をクラスタメンバ数Nで割った余り、すなわち「hash(key) mod N」を番号として持つクラスタメンバにデータを振り分ける手法がある。この場合、各クラスタメンバに事前に「0」から「N−1」までの番号を割り当てていることが前提となる。このような振り分け手法を用いた場合、クラスタメンバを追加すると、Nの値が変化して、多くのデータについて、担当するクラスタメンバが変更になるため、担当するデータの再配置が必要になる。   As a typical data distribution method, a remainder obtained by dividing a value obtained by multiplying the key of each data by a hash function (hereinafter referred to as “hash (key)”) by the number N of cluster members, that is, “hash (key) mod N There is a method of distributing data to cluster members having "" as a number. In this case, it is assumed that numbers “0” to “N−1” are assigned to each cluster member in advance. When such a distribution method is used, if a cluster member is added, the value of N changes, and the cluster member in charge of a lot of data is changed, so that the data in charge must be rearranged.

そこで、クラスタメンバの追加に伴い担当するクラスタメンバが変更になるデータ数を約1/Nに抑える方法として、コンシステント・ハッシュ法[Consistent Hashing](非特許文献1参照)を用いた振り分け手法がある。   Therefore, as a method for suppressing the number of data that the cluster member in charge changes with the addition of the cluster member to about 1 / N, there is a distribution method using a consistent hashing method (see Non-Patent Document 1). is there.

このコンシステント・ハッシュ法を用いたデータ振り分け手法では、クラスタメンバとデータの双方にID(IDentifier)を割り当て、データのIDからID空間を時計回りに辿った場合に最初に出合ったクラスタメンバをそのデータの担当とする。   In this data distribution method using the consistent hash method, an ID (IDentifier) is assigned to both the cluster member and the data, and when the ID space is traced clockwise from the data ID, the first cluster member encountered is Take charge of data.

また、多量のデータの管理をクラスタ構成の分散処理システムで行う場合、あるクラスタメンバに障害が発生した場合でも他のクラスタメンバで処理を継続できるように、データの複製を保持することでデータ冗長化を実現する必要がある。これは、コンシステント・ハッシュ法によるデータ管理手法を用いた分散処理システムにおいても同様である。   In addition, when managing a large amount of data in a cluster-structured distributed processing system, data redundancy is maintained by maintaining a copy of the data so that even if a failure occurs in one cluster member, processing can be continued on other cluster members. Needs to be realized. The same applies to a distributed processing system that uses a data management technique based on the consistent hash method.

図7に示すように、コンシステント・ハッシュ法では、クラスタメンバ(メンバ1〜4)とデータ(データA〜D。黒丸で表示)の双方にIDを割り当て、データのIDからID空間を時計回りに辿り最初に出合ったクラスタメンバをそのデータの担当として決定する。そして、担当するクラスタメンバのさらに右隣(時計回りに次)のクラスタメンバに複製データを担当させる。   As shown in FIG. 7, in the consistent hash method, IDs are assigned to both cluster members (members 1 to 4) and data (data A to D, indicated by black circles), and the ID space is clockwise from the data ID. As a result, the first cluster member encountered is determined to be responsible for the data. Then, the cluster member that is further to the right of the cluster member in charge (next clockwise) is assigned the duplicate data.

例えば、図7においては、データAはID空間上を時計回りに辿り最初に出合ったメンバ1が担当となり、その複製データはID空間上でメンバ1の右隣にあたるメンバ2に担当させる。このように原本データ・複製データを担当するクラスタメンバを決定することで、クラスタメンバに離脱があった場合でもその複製データを所持しているクラスタメンバが新しくデータを担当するクラスタメンバとなることで対応できるという利点がある。なお、複製データを複数個とる場合には、さらに右隣のクラスタメンバに2個目の複製データを担当させるようにすることもできる。   For example, in FIG. 7, data A is traced clockwise in the ID space and is assigned to the member 1 that first encounters, and the duplicated data is assigned to the member 2 on the right side of the member 1 in the ID space. By determining the cluster member in charge of the original data / replicated data in this way, even if the cluster member leaves, the cluster member that owns the replicated data becomes the new cluster member in charge of the data. There is an advantage that it can respond. When a plurality of pieces of duplicate data are taken, the second duplicate data can be assigned to the cluster member on the right side.

なお、このような手法に使用できるデータベースサーバとしては、例えば、Cassandra(非特許文献2)等に記載されている、複数サーバが動的にクラスタに参加・離脱可能できる分散データベースサーバがある。非特許文献2の技術では、コンシステント・ハッシュ法を用いたデータの均等な分散と、O(1)の高速アクセスを実現している。また、複製情報を複数のサーバに対して持たせることで、耐故障性を高めている。   As a database server that can be used in such a method, for example, there is a distributed database server described in Cassandra (Non-Patent Document 2) or the like, in which a plurality of servers can dynamically join and leave a cluster. In the technique of Non-Patent Document 2, uniform distribution of data using the consistent hash method and high-speed access of O (1) are realized. In addition, fault tolerance is enhanced by providing duplicate information to a plurality of servers.

David Karger et al., “Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web”, [online], 1997, ACM, [平成24年2月20日検索], インターネット<URL:http://www.akamai.com/dl/technical_publications/ConsistenHashingandRandomTreesDistributedCachingprotocolsforrelievingHotSpotsontheworldwideweb.pdf>David Karger et al., “Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web”, [online], 1997, ACM, [searched February 20, 2012], Internet <URL: http://www.akamai.com/dl/technical_publications/ConsistenHashingandRandomTreesDistributedCachingprotocolsforrelievingHotSpotsontheworldwideweb.pdf> Avinash Lakshman et al., “Cassandra - A Decentralized Structured Storage System”, [online], [平成24年2月20日検索], インターネット<URL:http://www.cs.cornell.edu/projects/ladis2009/papers/lakshman-ladis2009.pdf>Avinash Lakshman et al., “Cassandra-A Decentralized Structured Storage System”, [online], [searched February 20, 2012], Internet <URL: http://www.cs.cornell.edu/projects/ladis2009 /papers/lakshman-ladis2009.pdf>

しかし、前記した従来の手法では、激甚災害等が発生し、複数のサーバが同時にダウン(故障)した場合、原本データおよび複製データの両方を消失してしまう可能性がある。そうなると、復旧には、別途のバックアップデータ等による処理が必要になる。この処理は、通常、ディスクからの吸出し作業になるため低速であり、サービスの一時停止等の弊害は免れない。   However, in the conventional method described above, when a catastrophic disaster or the like occurs and a plurality of servers are down (failed) at the same time, there is a possibility that both the original data and the duplicated data are lost. In this case, a process using separate backup data or the like is required for recovery. This process is usually slow since it is a suction operation from the disk, and it is inevitable that the service is temporarily stopped.

よって、汎用サーバを複数台用いた分散処理システムにおいて、激甚災害等で大規模故障が発生した場合でも、データを消失することなく処理を継続できる可能性を高めるためのデータ複製方式について検討する。   Therefore, in a distributed processing system using a plurality of general-purpose servers, a data replication method is studied to increase the possibility that processing can be continued without losing data even when a large-scale failure occurs due to a severe disaster or the like.

例えば、関東をエリアとするデータセンタエリア(サーバを管理するデータセンタが管轄するエリア)のみに複数のサーバを配置した場合、関東全域に激甚災害等が発生すると、すべてのサーバがダウンし、すべてのデータが消失してしまう可能性がある。したがって、広域なエリアに複数のサーバを分散させておくことが、まず必要になる。   For example, if multiple servers are placed only in the data center area with the Kanto area (the area under the control of the data center that manages the server), if a catastrophic disaster occurs in the entire Kanto area, all servers will go down, Data may be lost. Therefore, it is first necessary to distribute a plurality of servers in a wide area.

ここで、図8に示すように、複数のサーバが全国に跨ってK種類(ここでは5種類)のデータセンタエリアのいずれかに属している場合について考える。なお、図8のID空間では、記号(黒丸、白丸、黒三角、白三角、白四角)が同じサーバは、同じデータセンタエリアに属しているものとする。   Here, as shown in FIG. 8, consider a case where a plurality of servers belong to one of K types (here, five types) of data center areas across the country. In the ID space of FIG. 8, it is assumed that servers having the same symbol (black circle, white circle, black triangle, white triangle, white square) belong to the same data center area.

この場合、関東全域に激甚災害等が発生しても、関東のデータセンタエリアに属するサーバはダウンするが、その他のデータセンタエリアに属するサーバはダウンしない。つまり、コンシステント・ハッシュ法のID空間では、関東のデータセンタエリアのサーバは離脱するが、他のデータセンタエリアのサーバは離脱しない。   In this case, even if a catastrophic disaster or the like occurs in the entire Kanto region, servers belonging to the Kanto data center area go down, but servers belonging to other data center areas do not go down. In other words, in the consistent hash method ID space, servers in the Kanto data center area leave, but servers in other data center areas do not leave.

なお、通常、コンシステント・ハッシュ法のID空間では、サーバの物理位置を考慮せずにサーバを分散(配置)させている。そのため、図8において、ID空間における上部に破線で囲った2つのサーバのように、同じデータセンタエリアに属するサーバが隣り合っていると、そのデータセンタエリア全域に激甚災害等が発生した場合、原本データと複製データの両方を同時に消失してしまう可能性がある。   Normally, in the ID space of the consistent hash method, the servers are distributed (arranged) without considering the physical positions of the servers. Therefore, in FIG. 8, when servers belonging to the same data center area are adjacent to each other, such as two servers surrounded by a broken line at the top in the ID space, when a catastrophic disaster or the like occurs in the entire data center area, There is a possibility that both original data and duplicated data will be lost at the same time.

そこで、本発明は、前記した事情に鑑みてなされたものであり、分散処理システムにおける管理装置が、サーバ(クラスタメンバ)を増設する際に、サーバの物理位置を考慮したサーバ選択を行うことで、3つ以上の地域のうちの1つの地域に存在するすべてのサーバがダウンしても、データが消失する事態を回避することを課題とする。   Therefore, the present invention has been made in view of the circumstances described above, and the management apparatus in the distributed processing system performs server selection in consideration of the physical position of the server when adding servers (cluster members). It is an object to avoid a situation in which data is lost even if all servers in one of the three or more regions are down.

前記課題を解決するために、本発明は、環状のID空間に、管理対象の複数のデータ、および、前記データを管理しクラスタを構成する複数のサーバ、が割り振られ、それぞれの前記サーバが、前記ID空間において自身から所定方向回りに次の前記サーバまでの間に位置する前記データを管理するとともに、当該次の前記サーバから前記所定方向回りにさらに次の前記サーバまでの間に位置する前記データの複製を記憶する分散処理システムにおいて、クライアントマシンからのリクエストを前記複数のサーバのいずれに振り分けるかを決定する管理装置であって、前記ID空間における前記データの管理を担当するサーバを管理するID空間管理情報、前記複数のサーバおよび待機中のサーバを含むサーバそれぞれは所定の3以上の複数の物理的な地域のいずれかに属しており、前記地域ごとに、当該地域に物理的に存在するすべての前記サーバとの対応付けを管理するサーバ管理情報、を記憶する記憶部と、前記クラスタに対して前記待機中のサーバを増設する場合、当該増設するサーバについての前記ID空間における挿入位置に基づき、前記ID空間管理情報を参照して前記ID空間における当該挿入位置の両側の前記サーバを特定し、前記サーバ管理情報を参照して当該特定した前記両隣のサーバが属さない地域に物理的に存在するサーバを選択し、当該選択したサーバと当該挿入位置の情報を用いて前記ID空間管理情報を更新する処理部と、を有することを特徴とする。   In order to solve the above-described problem, the present invention allocates a plurality of data to be managed and a plurality of servers that manage the data and constitute a cluster in a circular ID space, and each of the servers includes: Managing the data located between itself and the next server around the predetermined direction in the ID space, and located between the next server and the next server around the predetermined direction. In a distributed processing system that stores a copy of data, a management device that determines to which of the plurality of servers a request from a client machine is distributed, and manages a server in charge of managing the data in the ID space Each of the servers including the ID space management information, the plurality of servers, and the waiting server is a predetermined number of three or more. A storage unit for storing, for each of the regions, server management information for managing the association with all the servers physically existing in the region; On the other hand, when the standby server is added, the servers on both sides of the insertion position in the ID space are identified with reference to the ID space management information based on the insertion position in the ID space for the added server. Then, referring to the server management information, selects a server that physically exists in an area to which the specified adjacent servers do not belong, and uses the selected server and the information on the insertion position to identify the ID space management information. And a processing unit for updating.

これによれば、クラスタに対して待機中のサーバを増設する場合、ID空間におけるそのサーバの挿入位置の両隣のサーバが属さない地域に物理的に存在するサーバを選択することで、ID空間において同じ地域のサーバが隣り合うことがないので、3つ以上の地域のうちの1つの地域に存在するすべてのサーバがダウンしても、データが消失する事態を回避することができる。   According to this, when adding a standby server to the cluster, by selecting a server that physically exists in an area to which the server next to the insertion position of the server in the ID space does not belong, Since servers in the same region are not adjacent to each other, it is possible to avoid a situation where data is lost even if all servers existing in one region of three or more regions are down.

また、本発明は、環状のID空間に、管理対象の複数のデータ、および、前記データを管理しクラスタを構成する複数のサーバ、が割り振られ、それぞれの前記サーバが、前記ID空間において自身から所定方向回りに次の前記サーバまでの間に位置する前記データを管理するとともに、当該次の前記サーバから前記所定方向回りにさらに次の前記サーバまでの間に位置する前記データの複製を記憶する分散処理システムにおいて、クライアントマシンからのリクエストを前記複数のサーバのいずれに振り分けるかを決定する管理装置であって、前記ID空間における前記データの管理を担当するサーバを管理するID空間管理情報、前記複数のサーバおよび待機中のサーバを含むサーバそれぞれは所定の3以上の複数の物理的な地域のいずれかに属しており、前記地域ごとに、当該地域に物理的に存在するすべての前記サーバとの対応付けを管理するサーバ管理情報、を記憶する記憶部と、前記クラスタに対して前記待機中のサーバを増設する場合、当該増設するサーバについての前記ID空間における挿入位置に基づき、前記地域の数をK(≧3)とした場合、Kが奇数のとき、前記ID空間管理情報を参照して前記ID空間における当該挿入位置の両側それぞれについて{(K−1)/2}台の前記サーバを特定し、Kが偶数のとき、前記ID空間管理情報を参照して前記ID空間における当該挿入位置の両側の一方について(K/2)台、他方について{(K−2)/2}台の前記サーバを特定し、前記サーバ管理情報を参照して当該特定したすべてのサーバがいずれも属さない地域に物理的に存在するサーバを選択し、当該選択したサーバと当該挿入位置の情報を用いて前記ID空間管理情報を更新する処理部と、を有することを特徴とする。   Further, according to the present invention, a plurality of data to be managed and a plurality of servers that manage the data and constitute a cluster are allocated to the annular ID space, and each of the servers is assigned to itself in the ID space. Manages the data located between the next server around the predetermined direction and stores a copy of the data located between the next server and the next server around the predetermined direction. In a distributed processing system, a management apparatus that determines to which of the plurality of servers a request from a client machine is allocated, ID space management information for managing a server in charge of managing the data in the ID space, Each server including a plurality of servers and a standby server is one of a plurality of predetermined physical regions. A storage unit that stores, for each of the regions, server management information that manages associations with all the servers physically existing in the region, and is waiting for the cluster When adding a server, based on the insertion position in the ID space for the added server, if the number of regions is K (≧ 3), when K is an odd number, refer to the ID space management information. For each side of the insertion position in the ID space, {(K-1) / 2} servers are specified, and when K is an even number, the insertion position in the ID space is referred to with reference to the ID space management information (K / 2) units on one side of the server, and {(K-2) / 2} units on the other side are identified, and all of the identified servers belong to the server management information. Select the server physically present in the free area, and having a processing unit by using the selected server and information of the insertion position to update the ID space management information.

これによれば、クラスタに対して待機中のサーバを増設する場合、地域の数を3以上の自然数Kとした場合、Kが奇数のとき、ID空間におけるそのサーバの挿入位置の両側それぞれについて{(K−1)/2}台のサーバを特定し、Kが偶数のとき、ID空間におけるそのサーバの挿入位置の両側の一方について(K/2)台、他方について{(K−2)/2}台のサーバを特定する。そして、特定したすべてのサーバがいずれも属さない地域に物理的に存在するサーバを選択する。これによって、Kが奇数のときは、ID空間において任意の連続する{(K+1)/2}台のサーバはすべて異なる地域に属していることになる。また、Kが偶数のときは、ID空間において任意の連続する(K/2)台のサーバはすべて異なる地域に属していることになる。したがって、冗長数(原本データと複製データの合計数)を3以上とした場合、1つの地域のサーバがすべてダウンしても、ダウンしたサーバが保持していた原本データの複製データを保持しているサーバの数の期待値をより大きくすることができる。   According to this, when adding a standby server to the cluster, when the number of regions is a natural number K of 3 or more, and when K is an odd number, both sides of the insertion position of the server in the ID space { (K-1) / 2} servers are identified, and when K is an even number, (K / 2) units on one side of the insertion position of the server in the ID space and {(K-2) / 2} servers are specified. Then, a server that physically exists in an area to which all the specified servers do not belong is selected. Accordingly, when K is an odd number, any continuous {(K + 1) / 2} servers in the ID space belong to different regions. Further, when K is an even number, any continuous (K / 2) servers in the ID space belong to different areas. Therefore, if the redundancy number (total number of original data and duplicate data) is 3 or more, even if all the servers in one region are down, the duplicate data of the original data held by the down server is held. The expected value of the number of existing servers can be increased.

また、本発明は、前記処理部が、前記クラスタに対して前記待機中のサーバを増設する場合、前記ID空間管理情報を参照して前記ID空間において前記サーバ同士の間が最も広い箇所の中央の位置を前記挿入位置として特定することを特徴とする。   Further, in the present invention, when the processing unit adds the standby server to the cluster, the center of the widest portion between the servers in the ID space is referred to with reference to the ID space management information. This position is specified as the insertion position.

これによれば、クラスタに対して待機中のサーバを増設する場合、ID空間においてサーバ同士の間が最も広い箇所の中央の位置に対応する地域に物理的に存在するサーバを選択することで、3つ以上の地域のうちの1つの地域に存在するすべてのサーバがダウンしても、データが消失する事態を回避するとともに、各サーバにおける処理負荷をより平均化することができる。なお、本明細書および特許請求の範囲において、「中央の位置」とは、厳密な中央の位置だけでなく、中央付近の位置も含む。   According to this, when adding a standby server to the cluster, by selecting a server physically present in an area corresponding to the center position of the widest portion between the servers in the ID space, Even if all the servers existing in one of the three or more regions are down, it is possible to avoid a situation where data is lost and to further average the processing load on each server. In the present specification and claims, the “center position” includes not only the exact center position but also the position near the center.

また、本発明は、コンピュータを前記管理装置として機能させるためのプログラムである。   Further, the present invention is a program for causing a computer to function as the management device.

これによれば、このようなプログラムを実装したコンピュータを管理装置として機能させることができる。   According to this, a computer in which such a program is installed can be caused to function as a management device.

本発明によれば、分散処理システムにおける管理装置が、サーバ(クラスタメンバ)を増設する際に、サーバの物理位置を考慮したサーバ選択を行うことで、3つ以上の地域のうちの1つの地域に存在するすべてのサーバがダウンしても、データが消失する事態を回避することができる。   According to the present invention, when a management device in a distributed processing system adds a server (cluster member), it performs server selection in consideration of the physical location of the server, thereby allowing one of the three or more regions to be selected. Even if all the servers existing in the server are down, it is possible to avoid a situation where data is lost.

本発明の概要の説明図である。It is explanatory drawing of the outline | summary of this invention. 本実施形態の管理装置等の構成図である。It is a block diagram of the management apparatus etc. of this embodiment. 本実施形態のID空間管理情報の構成を示す図である。It is a figure which shows the structure of ID space management information of this embodiment. 本実施形態の地域名情報の構成を示す図である。It is a figure which shows the structure of the area name information of this embodiment. 本実施形態のサーバ管理情報を示す図である。It is a figure which shows the server management information of this embodiment. 本実施形態の管理装置による処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process by the management apparatus of this embodiment. 従来のコンシステント・ハッシュ法の説明図である。It is explanatory drawing of the conventional consistent hash method. 従来のコンシステント・ハッシュ法におけるID空間およびクラスタメンバの物理位置の説明図である。It is explanatory drawing of ID space and the physical position of a cluster member in the conventional consistent hash method.

以下、本発明を実施するための形態(以下、実施形態と称する。)について、図面を参照(言及図以外の図も適宜参照)しながら説明する。なお、理解を容易にするために、まず、図1を参照して本実施形態の概要について説明し、その後、実施形態について説明する。   Hereinafter, modes for carrying out the present invention (hereinafter referred to as embodiments) will be described with reference to the drawings (refer to drawings other than the referenced drawings as appropriate). In order to facilitate understanding, the outline of the present embodiment will be described first with reference to FIG. 1, and then the embodiment will be described.

(本実施形態の概要)
図1に示すように、K種類(3種類以上。ここでは5種類)のデータセンタエリア(以下、「地域」とも称する。)にサーバを配置する場合を考える。コンシステント・ハッシュ法のID空間では、まず、同じ地域のサーバが隣り合わないように、サーバを図示のように分散させて(地域ごとに順番に)並べる。
(Outline of this embodiment)
As shown in FIG. 1, a case is considered where servers are arranged in data center areas (hereinafter also referred to as “regions”) of K types (three or more types, here five types). In the ID space of the consistent hash method, first, the servers in the same region are distributed as shown in the figure (in order for each region) so as not to be adjacent to each other.

そして、サーバの増設時は、ID空間における新たなクラスタメンバの挿入先(「挿入位置」と同義。ID)を決定する(図1の(1))。   When a server is added, a new cluster member insertion destination (synonymous with “insertion position”, ID) in the ID space is determined ((1) in FIG. 1).

ID空間における新たなクラスタメンバの挿入先を決定した(図1の(1))後に、その挿入先の周囲K−1個(最低限、両隣だけでもよい。)のサーバの地域を調査する(図1の(2)。詳細は後記)。そして、そのK−1個(最低限、両隣)のサーバのいずれも属さない地域のサーバを選択し(図1の(3))、そのサーバを増設する。   After the insertion destination of a new cluster member in the ID space is determined ((1) in FIG. 1), the area of the K-1 servers around the insertion destination (at least, both neighbors are sufficient) is investigated ( (2) in FIG. Then, a server in a region to which none of the K-1 (at least, both adjacent) servers belong is selected ((3) in FIG. 1), and the server is added.

このようなアルゴリズムにより、ID空間において同じ地域のサーバが隣り合うことがないので、3つ以上の地域のうちの1つの地域に存在するすべてのサーバがダウンしても、データが消失する事態を回避することができる。また、各サーバにおける処理負荷をより平均化することもできる。   With such an algorithm, servers in the same region are not adjacent to each other in the ID space, so that even if all the servers existing in one of the three or more regions are down, data is lost. It can be avoided. In addition, the processing load on each server can be further averaged.

改めて説明すると、コンシステント・ハッシュ法の特性上、「どれか1つでもデータが(複製ともども)失われる確率」は、「連続してM(冗長数(原本データと複製データの合計数))個同じ地域のサーバが配置される確率」と等しい。前記したアルゴリズムによれば、M≧2の場合に常に上記確率を0%にできる。つまり、1つの地域が全壊(その地域に存在するすべてのサーバがダウン)したとしても、Mが2以上であればいずれのデータも失われない(複製データは必ず残る)。   To explain again, due to the characteristics of the consistent hash method, the “probability of losing any one of the data (also with duplicates)” is “continuous M (redundant number (total number of original data and duplicated data))” It is equal to the probability that servers in the same area will be placed. According to the algorithm described above, the probability can always be 0% when M ≧ 2. That is, even if one area is completely destroyed (all servers existing in that area are down), if M is 2 or more, no data is lost (duplicated data always remains).

また、挿入先の「両隣」だけでなく周囲K−1個のサーバの地域を調査する手法の場合、Kが奇数のときは、ID空間において任意の連続する{(K+1)/2}台のサーバはすべて異なる地域に属していることになる。また、Kが偶数のときは、ID空間において任意の連続する(K/2)台のサーバはすべて異なる地域に属していることになる。これによって、冗長数を3以上とした場合、1つの地域のサーバがすべてダウンしても、ダウンしたサーバが保持していた原本データの複製データを保持しているサーバの数の期待値をより大きくすることができる。   In addition, in the case of a method of examining the area of the surrounding K−1 servers as well as the “neighbors” of the insertion destination, if K is an odd number, any continuous {(K + 1) / 2} units in the ID space All servers belong to different regions. Further, when K is an even number, any continuous (K / 2) servers in the ID space belong to different areas. As a result, if the number of redundancy is 3 or more, even if all the servers in one region are down, the expected value of the number of servers holding duplicate data of the original data held by the down server is more Can be bigger.

例えば、K=5で、M=3の場合、1つの地域が全壊しても、その地域のサーバが保持していた原本データの複製データを保持しているサーバは、いずれもその地域以外の別々の地域に属しており、複製データを保持し続けている。つまり、その場合、2つの地域が全壊したとしても、1つのサーバが複製データを必ず保持していることになる。   For example, if K = 5 and M = 3, even if one area is completely destroyed, any server that holds duplicate data of the original data held by the server in that area is not in that area. They belong to different regions and keep replica data. That is, in this case, even if two areas are completely destroyed, one server always holds duplicate data.

データの冗長数Mをもっと増加させれば、さらに多くの地域が全壊した場合でも、複製データが消失していない可能性を高くすることができる。例えば、K=7の場合、M=4としておけば、3つの地域が全壊しても、1つのサーバが複製データを必ず保持していることになる。   If the redundant number M of data is further increased, it is possible to increase the possibility that duplicated data is not lost even when more regions are completely destroyed. For example, when K = 7, if M = 4, even if three regions are completely destroyed, one server always holds duplicate data.

なお、クラスタにサーバを追加する場合に、ID空間の中で、クラスタメンバ間の距離が最も広い個所の中央の位置を選んだが、これは一例に過ぎない。つまり、クラスタにサーバを追加する場合に、ID空間において選択する位置(挿入位置)は任意でよく、必須事項は、そのID空間において選択した位置の両隣のサーバのいずれも属さない地域のサーバを選択することである。これにより、サーバの物理位置を考慮したサーバ選択を行うことができ、3つ以上の地域のうちの1つの地域に存在するすべてのサーバがダウンしても、データが消失する事態を回避することができる。   In addition, when adding a server to a cluster, the center position of the place where the distance between cluster members is the widest is selected in the ID space, but this is only an example. That is, when adding a server to a cluster, the position (insertion position) selected in the ID space may be arbitrary, and the essential matter is that a server in an area to which neither of the servers adjacent to the selected position in the ID space belongs. Is to choose. This makes it possible to select a server in consideration of the physical location of the server, and to avoid a situation where data is lost even if all servers existing in one of three or more regions are down. Can do.

(実施形態)
次に、本実施形態について説明する。図2に示すように、本実施形態の分散処理システム1000は、負荷分散装置3、管理装置4、クラスタ100を構成する複数のサーバ5を備えている。負荷分散装置3は、インターネット等のネットワーク2を介して、複数のクライアントマシン1と接続されている。
(Embodiment)
Next, this embodiment will be described. As illustrated in FIG. 2, the distributed processing system 1000 according to the present embodiment includes a load distribution device 3, a management device 4, and a plurality of servers 5 configuring the cluster 100. The load balancer 3 is connected to a plurality of client machines 1 via a network 2 such as the Internet.

全体の主な動作について説明すると、クライアントマシン1からのデータ処理リクエストを、ネットワーク2経由で負荷分散装置3が受け取る。負荷分散装置3は、データのID空間上のサーバ割当表(ID空間管理情報)に基づいて、そのリクエストを、データ処理を行う複数のサーバ5のいずれかに振り分ける。振り分けられたサーバ5は、そのリクエストの処理を行う。管理装置4は、ID空間管理情報を管理する。   The main operation will be described. The data distribution request from the client machine 1 is received by the load balancer 3 via the network 2. The load balancer 3 distributes the request to one of a plurality of servers 5 that perform data processing based on the server allocation table (ID space management information) on the data ID space. The distributed server 5 processes the request. The management device 4 manages ID space management information.

次に、負荷分散装置3と管理装置4の構成について説明する。
負荷分散装置3は、記憶部31、処理部32、通信部33を備える。
記憶部31は、情報を記憶する手段であり、RAM(Random Access Memory)やROM(Read Only Memory)などのメモリ、HDD(Hard Disk Drive)などによって構成される。記憶部31には、管理装置4から受信したID空間管理情報411が、ID空間管理情報311として格納されている。なお、記憶部31には、処理部32の動作プログラムなども格納されている(図示を省略)。
Next, the configuration of the load distribution device 3 and the management device 4 will be described.
The load distribution device 3 includes a storage unit 31, a processing unit 32, and a communication unit 33.
The storage unit 31 is a means for storing information, and includes a memory such as a random access memory (RAM) or a read only memory (ROM), a hard disk drive (HDD), or the like. The storage unit 31 stores ID space management information 411 received from the management device 4 as ID space management information 311. The storage unit 31 also stores an operation program for the processing unit 32 (not shown).

処理部32は、記憶部31に格納された情報に基づいて演算処理を行う手段であり、例えばCPU(Central Processing Unit)によって構成される。   The processing unit 32 is means for performing arithmetic processing based on information stored in the storage unit 31, and is configured by, for example, a CPU (Central Processing Unit).

通信部33は、外部装置との通信に用いられる通信インタフェースである。
なお、負荷分散装置3は、ほかに、負荷分散装置3のユーザが情報を入力する入力部や、情報を表示する表示部などを備えていてもよい。
The communication unit 33 is a communication interface used for communication with an external device.
In addition, the load balancer 3 may further include an input unit for the user of the load balancer 3 to input information, a display unit for displaying information, and the like.

管理装置4は、コンシステント・ハッシュ法に基づいて、クライアントマシン1からのリクエストを複数のサーバ5(クラスタメンバ)のいずれに振り分けるかを決定するコンピュータ装置である。なお、前記したように、このコンシステント・ハッシュ法では、環状のID空間に、管理対象の複数のデータ、および、データを管理しクラスタ100を構成する複数のサーバ5、が割り振られ、それぞれのサーバ5が、ID空間において自身から時計回り(所定方向回り)に次のサーバ5までの間に位置するデータを管理(担当)するとともに、当該次のサーバ5から時計回りにさらに次のサーバ5までの間に位置するデータの複製を記憶することを前提とする。   The management device 4 is a computer device that determines to which of a plurality of servers 5 (cluster members) a request from the client machine 1 is distributed based on a consistent hash method. As described above, in this consistent hash method, a plurality of data to be managed and a plurality of servers 5 that manage the data and constitute the cluster 100 are allocated to the circular ID space, The server 5 manages (in charge) data positioned between itself and the next server 5 in the clockwise direction (predetermined direction) in the ID space, and from the next server 5 to the next server 5 in the clockwise direction. It is assumed that a copy of the data located in between is stored.

管理装置4は、記憶部41、処理部42、入力部43、表示部44、通信部45を備える。
記憶部41は、情報を記憶する手段であり、RAMやROMなどのメモリ、HDDなどによって構成される。記憶部41には、ID空間管理情報411、地域名情報412、サーバ管理情報413、地域数414、冗長数415が格納されている。なお、記憶部41には、処理部42の動作プログラムなども格納されている(図示を省略)。
The management device 4 includes a storage unit 41, a processing unit 42, an input unit 43, a display unit 44, and a communication unit 45.
The storage unit 41 is a means for storing information, and includes a memory such as a RAM or a ROM, an HDD, or the like. The storage unit 41 stores ID space management information 411, area name information 412, server management information 413, number of areas 414, and number of redundancy 415. The storage unit 41 also stores an operation program for the processing unit 42 (not shown).

ID空間管理情報411は、管理対象のデータについて所定のハッシュ値変換を行って算出されたIDを用いて、そのデータを担当するサーバ5を管理する情報である(図3で後記)。   The ID space management information 411 is information for managing the server 5 in charge of data using an ID calculated by performing predetermined hash value conversion on the management target data (described later in FIG. 3).

地域名情報412は、地域IDと、その地域IDに対応する地域名との対応付けを管理する情報である(図4で後記)。   The area name information 412 is information for managing the association between the area ID and the area name corresponding to the area ID (described later in FIG. 4).

サーバ管理情報413は、地域(地域ID)ごとに、当該地域に物理的に存在するすべてのサーバ5との対応付けを管理する情報である(図5で後記)。なお、本実施形態では、すべてのサーバ5(クラスタ100をすでに構成している複数のサーバ、および、待機中のサーバ)は、所定の3以上の複数の物理的な地域のいずれかに属していることを前提としている。   The server management information 413 is information for managing the association with all the servers 5 physically existing in the area for each area (area ID) (described later in FIG. 5). In the present embodiment, all the servers 5 (a plurality of servers that already constitute the cluster 100 and a standby server) belong to one of a plurality of predetermined three or more physical regions. It is assumed that

地域数414は、管理装置4のユーザによって予め設定された地域数(K)の情報である。
冗長数415は、管理装置4のユーザによって予め設定された冗長数(M)の情報である。
The number of areas 414 is information on the number of areas (K) preset by the user of the management apparatus 4.
The redundancy number 415 is information on the redundancy number (M) preset by the user of the management apparatus 4.

処理部42は、記憶部41に格納された情報に基づいて演算処理を行う手段であり、例えばCPUによって構成される。処理部42は、クラスタ100に対して待機中のサーバ5を増設する場合、まず、当該増設するサーバ5についてID空間における挿入位置を決定する。次に、処理部42は、ID空間管理情報411を参照してID空間における当該挿入位置の両側のサーバ5を特定する。次に、処理部42は、サーバ管理情報413を参照して当該特定した両隣のサーバ5が属さない地域に物理的に存在するサーバ5を選択し、当該選択したサーバ5と当該挿入位置の情報を用いてID空間管理情報411を更新する。詳細は図6の説明で後記する。   The processing unit 42 is a unit that performs arithmetic processing based on information stored in the storage unit 41, and is configured by a CPU, for example. When adding the standby server 5 to the cluster 100, the processing unit 42 first determines an insertion position in the ID space for the server 5 to be added. Next, the processing unit 42 refers to the ID space management information 411 and identifies the servers 5 on both sides of the insertion position in the ID space. Next, the processing unit 42 refers to the server management information 413, selects the server 5 that physically exists in the area to which the specified adjacent servers 5 do not belong, and information on the selected server 5 and the insertion position. Is used to update the ID space management information 411. Details will be described later with reference to FIG.

また、処理部42は、クラスタ100に対して待機中のサーバ5を増設する場合、次のような処理を行ってもよい。まず、地域の数をK(≧3)とした場合、Kが奇数のとき、ID空間管理情報411を参照してID空間における当該挿入位置の両側それぞれについて{(K−1)/2}台のサーバ5を特定する。また、処理部42は、Kが偶数のとき、ID空間管理情報411を参照してID空間における当該挿入位置の両側の一方について(K/2)台、他方について{(K−2)/2}台のサーバ5を特定する。次に、処理部42は、サーバ管理情報413を参照して当該特定したすべてのサーバ5がいずれも属さない地域に物理的に存在するサーバ5を選択し、当該選択したサーバと当該挿入位置の情報を用いてID空間管理情報411を更新する。詳細は図6の説明で後記する。   Further, the processing unit 42 may perform the following processing when adding the standby server 5 to the cluster 100. First, when the number of regions is K (≧ 3), when K is an odd number, the ID space management information 411 is referred to and {{K−1) / 2} units on both sides of the insertion position in the ID space. The server 5 is specified. In addition, when K is an even number, the processing unit 42 refers to the ID space management information 411 and (K / 2) units on one side of the insertion position in the ID space and {(K-2) / 2 on the other side } Identify the servers 5. Next, the processing unit 42 refers to the server management information 413, selects a server 5 that physically exists in an area to which none of the specified servers 5 belongs, and selects the selected server and the insertion position. The ID space management information 411 is updated using the information. Details will be described later with reference to FIG.

入力部43は、管理装置4のユーザが情報を入力する手段であり、例えば、キーボードやマウスによって実現される。
表示部44は、情報を表示する手段であり、例えば、LCD(Liquid Crystal Display)によって実現される。
通信部45は、外部装置との通信に用いられる通信インタフェースである。
The input unit 43 is a means for the user of the management device 4 to input information, and is realized by, for example, a keyboard or a mouse.
The display unit 44 is a means for displaying information, and is realized by an LCD (Liquid Crystal Display), for example.
The communication unit 45 is a communication interface used for communication with an external device.

次に、ID空間管理情報411について説明する。図3に示すように、ID空間管理情報411は、ID、サーバの各カラムから構成され、IDの値の大きさでソートされている。
IDは、ID空間におけるIDであり、サーバ5が管理を担当するデータの領域を特定するために格納される。
Next, the ID space management information 411 will be described. As shown in FIG. 3, the ID space management information 411 includes ID and server columns, and is sorted according to the size of the ID value.
The ID is an ID in the ID space, and is stored in order to specify the data area that the server 5 is responsible for.

サーバは、クラスタ100を構成するサーバ5の識別子を表す。例えば、図3に示す、第1行目のIDの値が「0056」の場合は、識別子が「0000」〜「0056」の領域に属するデータを「サーバA」が担当することを示す。また、第2行目のIDの値が「0172」の場合は、1つ前の行のIDの値に1をプラスした「0057」〜「0172」の識別子に属するデータを「サーバG」が担当することを示す。   The server represents an identifier of the server 5 constituting the cluster 100. For example, when the ID value in the first row shown in FIG. 3 is “0056”, this indicates that “server A” is in charge of data belonging to the area having identifiers “0000” to “0056”. When the ID value of the second row is “0172”, the data belonging to the identifiers “0057” to “0172” obtained by adding 1 to the ID value of the previous row is assigned to “Server G”. Indicates that you are in charge.

次に、地域名情報412について説明する。図4に示すように、地域名情報412は、地域ID、地域名の各カラムから構成される。
地域IDは、所定の複数の物理的な地域の識別子を表す。
地域名は、その行の地域IDに対応する地域の名称を表す。
Next, the area name information 412 will be described. As shown in FIG. 4, the region name information 412 is composed of columns of region ID and region name.
The region ID represents an identifier of a predetermined plurality of physical regions.
The region name represents the name of the region corresponding to the region ID of the row.

次に、サーバ管理情報413について説明する。図5に示すように、サーバ管理情報413は、地域ID、サーバの各カラムから構成される。
地域IDは、所定の複数の物理的な地域の識別子を表す。
サーバは、対応する地域IDの地域に物理的に存在するサーバ5の識別子を表す。なお、このサーバ5には、まだクラスタ100として使用されていないものも含まれている。
Next, the server management information 413 will be described. As shown in FIG. 5, the server management information 413 is composed of each column of area ID and server.
The region ID represents an identifier of a predetermined plurality of physical regions.
The server represents the identifier of the server 5 that physically exists in the area of the corresponding area ID. The server 5 includes servers that have not been used as the cluster 100 yet.

次に、管理装置4による処理について説明する。
図6に示すように、ステップS1において、管理装置4の処理部42は、クラスタ構成変更要求があるか否かを判定し、Yesの場合はステップS2に進み、Noの場合はステップS1に戻る。なお、ここでのクラスタ構成変更要求は、例えば、管理装置4のユーザによるその旨の入力や、他の装置からのその旨のリクエストの受信などが考えられる。
Next, processing by the management device 4 will be described.
As shown in FIG. 6, in step S1, the processing unit 42 of the management device 4 determines whether or not there is a cluster configuration change request. If Yes, the process proceeds to step S2, and if No, the process returns to step S1. . The cluster configuration change request here may be, for example, an input to that effect by the user of the management apparatus 4 or a request to that effect from another apparatus.

ステップS2において、処理部42は、そのクラスタ構成変更要求がクラスタメンバの追加か否かを判定し、Yesの場合はステップS3に進み、Noの場合はステップS7に進む。   In step S2, the processing unit 42 determines whether or not the cluster configuration change request is to add a cluster member. If Yes, the process proceeds to step S3, and if No, the process proceeds to step S7.

ステップS3において、処理部42は、ID空間において、追加するクラスタメンバの挿入先(ID)を決定する。   In step S3, the processing unit 42 determines the insertion destination (ID) of the cluster member to be added in the ID space.

どこに挿入するかは、入力部43を通じて保守者から指定を受けてもよいし、処理部42が任意の方法で算出することもできる。ID空間において選択する位置は任意でよく、必須事項は、そのID空間において選択した位置の両隣のサーバ5のいずれも属さない地域のサーバ5を選択することである。これにより、サーバ5の物理位置を考慮したサーバ選択を行うことができ、3つ以上の地域のうちの1つの地域に存在するすべてのサーバ5がダウンしても、データが消失する事態を回避することができる。   Where to insert may be designated by the maintenance person through the input unit 43, or the processing unit 42 can calculate by any method. The position to be selected in the ID space may be arbitrary, and the essential matter is to select a server 5 in a region to which neither of the servers 5 adjacent to the selected position in the ID space belongs. As a result, the server can be selected in consideration of the physical location of the server 5, and even if all the servers 5 existing in one of the three or more regions are down, data is not lost. can do.

例えば、処理部42が、記憶部41のID空間管理情報411を参照して、ID空間の中でクラスタメンバ間の距離(ID空間上の距離)が最も広い個所を検索(特定)し、そのクラスタメンバ間の中央の位置を新たなクラスタメンバのIDの挿入先として決定する。なお、このような位置を選択する理由は、クラスタ構成の分散処理システム1000では、クラスタメンバ間で負荷がなるべく平均化されていることが望ましく、統計的に、データ数がクラスタメンバ数よりも格段に多い場合には、各クラスタメンバが担当するデータ数はID空間上のクラスタメンバ間の距離にほぼ比例するためである。   For example, the processing unit 42 refers to the ID space management information 411 stored in the storage unit 41 to search (specify) a location where the distance between cluster members (distance on the ID space) is the largest in the ID space, and The center position between the cluster members is determined as the insertion destination of the new cluster member ID. The reason for selecting such a position is that, in the cluster configuration distributed processing system 1000, it is desirable that the load among the cluster members be averaged as much as possible. Statistically, the number of data is much more than the number of cluster members. This is because the number of data handled by each cluster member is almost proportional to the distance between the cluster members in the ID space.

続いて、ステップS4において、処理部42は、記憶部41のID空間管理情報411および地域数414を参照して、前記中央点の周囲K−1個のサーバ5の属するデータセンタエリアを調査し、使用されていないデータセンタエリア(地域ID)を特定する。   Subsequently, in step S4, the processing unit 42 refers to the ID space management information 411 and the number of regions 414 in the storage unit 41, and investigates the data center area to which the K-1 servers 5 around the central point belong. The unused data center area (area ID) is specified.

ステップS4では、具体的には、処理部42は、Kが奇数のとき、ID空間管理情報411と地域数414を参照してID空間における当該位置の両側それぞれについて{(K−1)/2}台のサーバ5を特定する。また、Kが偶数のとき、ID空間管理情報411と地域数414を参照してID空間における当該位置の両側の一方について(K/2)台、他方について{(K−2)/2}台のサーバ5を特定する。次に、サーバ管理情報413を参照して当該特定したすべてのサーバ5がいずれも属さないデータセンタエリアを特定する。なお、「いずれも属さないデータセンタエリア」が複数ある場合は、例えば、使用されているサーバ5の総数の最も少ないデータセンタエリアを選ぶなどすればよいが、これに限定されない。   In step S4, specifically, when K is an odd number, the processing unit 42 refers to the ID space management information 411 and the number of regions 414 for each side of the position in the ID space {(K−1) / 2. } Identify the servers 5. When K is an even number, referring to the ID space management information 411 and the number of regions 414, (K / 2) units on one side of the position in the ID space and {(K-2) / 2} units on the other side The server 5 is specified. Next, referring to the server management information 413, the data center area to which none of the specified servers 5 belongs is specified. When there are a plurality of “data center areas to which none of them belong”, for example, a data center area with the smallest total number of servers 5 used may be selected. However, the present invention is not limited to this.

続いて、ステップS5において、処理部42は、記憶部41のサーバ管理情報413を参照して、そのデータセンタエリアに物理的に存在する(つまり、ステップSで特定した地域IDに対応する)サーバ5を選択する。   Subsequently, in step S5, the processing unit 42 refers to the server management information 413 in the storage unit 41, and physically exists in the data center area (that is, corresponds to the area ID specified in step S). 5 is selected.

ステップS6において、処理部42は、ID空間管理情報411を更新して、処理を終了する。ステップS7では、具体的には、ステップS3〜S5を経由した場合は、ID空間管理情報411において、新たな行を挿入し、該当するIDおよび追加するサーバ5の識別子を書き込む等の処理を行う(追加されたサーバ5は周知の手段でアクティベートされる)。また、例えば、ステップS3〜S5を経由せず、障害等によりクラスタメンバの一部を削除する場合は、ID空間管理情報411において、該当する行を削除する等の処理を行う。   In step S6, the processing unit 42 updates the ID space management information 411 and ends the process. In step S7, specifically, if the process goes through steps S3 to S5, a new line is inserted in the ID space management information 411, and the corresponding ID and the identifier of the server 5 to be added are written. (The added server 5 is activated by a known means). For example, when a part of the cluster member is deleted due to a failure or the like without going through steps S3 to S5, processing such as deleting the corresponding line in the ID space management information 411 is performed.

なお、この後、負荷分散装置3は、管理装置4から最新のID空間管理情報411を受信して記憶部31にID空間管理情報311として保存する。そして、負荷分散装置3は、そのID空間管理情報311に基づいて、コンシステント・ハッシュ法によって、クライアントマシン1から受け取ったリクエストを、複数のサーバ5のいずれかに振り分ける。振り分けられたサーバ5は、そのリクエストの処理を行う。   Thereafter, the load distribution device 3 receives the latest ID space management information 411 from the management device 4 and stores it as the ID space management information 311 in the storage unit 31. Then, the load balancer 3 distributes the request received from the client machine 1 to one of the plurality of servers 5 by the consistent hash method based on the ID space management information 311. The distributed server 5 processes the request.

また、複数のサーバ5は、管理装置4から最新のID空間管理情報411と冗長数415を受信して記憶部(不図示)に保存し、コンシステント・ハッシュ法に基づく前記したデータの複製を行う。   Further, the plurality of servers 5 receive the latest ID space management information 411 and the redundancy number 415 from the management device 4 and store them in a storage unit (not shown), and copy the data described above based on the consistent hash method. Do.

このようにして、本実施形態の管理装置4によれば、クラスタ100に対して待機中のサーバ5を増設する場合、ID空間におけるそのサーバ5の位置の周囲K−1個のサーバ5の属するデータセンタエリアを調査し、使用されていないデータセンタエリアに物理的に存在するサーバ5を選択することで、ID空間において同じ地域のサーバが隣り合うことがないので、3つ以上(本実施形態では5つ)のデータセンタエリアのうちの1つのデータセンタエリアに存在するすべてのサーバ5がダウンしても、複製データが消失する事態を回避することができる。また、ID空間における挿入先の「両隣」だけでなく「周囲K−1個」のサーバの属するデータセンタエリアを調査することで、ダウンしたサーバ5が保持していた原本データの複製データを保持しているサーバ5の数の期待値をより大きくすることができる(前記「本実施形態の概要」参照)。   As described above, according to the management device 4 of the present embodiment, when the standby server 5 is added to the cluster 100, the K-1 servers 5 around the position of the server 5 in the ID space belong. By investigating the data center area and selecting a server 5 that physically exists in an unused data center area, servers in the same region in the ID space are not adjacent to each other. In this case, even if all the servers 5 existing in one data center area out of the five data center areas are down, it is possible to avoid a situation in which duplicate data is lost. In addition, by checking not only “both neighbors” of the insertion destination in the ID space but also the data center area to which “K−1 neighboring servers” belong, the copy data of the original data held by the down server 5 is held. It is possible to increase the expected value of the number of servers 5 (see “Summary of the present embodiment”).

また、クラスタ100に対して待機中のサーバ5を増設する場合、ID空間においてサーバ5同士の間が最も広い箇所の中央の位置に対応する地域に物理的に存在するサーバ5を選択することで、各サーバ5における処理負荷をより平均化することができる。   Further, when adding standby servers 5 to the cluster 100, by selecting a server 5 that physically exists in an area corresponding to the center position of the widest portion between the servers 5 in the ID space. The processing load on each server 5 can be further averaged.

なお、前記したように、「周囲K−1個」の代わりに「両隣」としても、ID空間において同じデータセンタエリアのサーバ5が隣り合うことがないので、3つ以上のデータセンタエリアのうちの1つのデータセンタエリアに存在するすべてのサーバ5がダウンしても、データが消失する事態を回避することができるという最低限の効果を奏する。   As described above, even if “both neighbors” is used instead of “periphery K−1”, the servers 5 in the same data center area are not adjacent to each other in the ID space. Even if all the servers 5 existing in one data center area are down, a situation in which data is lost can be avoided.

以上で本実施形態の説明を終えるが、本発明の態様はこれらに限定されるものではない。
例えば、管理装置4と負荷分散装置3を同一のハードウエアに並存させる構成としてもよい。
Although description of this embodiment is finished above, the aspect of the present invention is not limited to these.
For example, the management device 4 and the load distribution device 3 may be configured to coexist on the same hardware.

また、負荷分散装置3を使用せず、それぞれのクライアントマシン1が管理装置4から受信したID空間管理情報411を保持して、ネットワーク2経由で複数のサーバ5のいずれかに直接アクセスするようにしてもよい。   Further, without using the load balancer 3, each client machine 1 holds the ID space management information 411 received from the management device 4 and directly accesses any of the plurality of servers 5 via the network 2. Also good.

また、地域として、データセンタエリアを単位とする場合を例にとって説明したが、データセンタエリアをさらに分割したものや都道府県等の別の単位を採用してもよい。   Moreover, although the case where the data center area is used as a unit as an area has been described as an example, another unit such as a further divided data center area or a prefecture may be adopted.

また、本実施形態ではコンシステント・ハッシュ法を前提としたが、他の手法を前提としてもよい。
また、本発明は、コンピュータを管理装置4として機能させるためのプログラムとしても具現化可能である。
その他、具体的な構成について、本発明の主旨を逸脱しない範囲で適宜変更が可能である。
In the present embodiment, the consistent hash method is assumed, but another method may be assumed.
The present invention can also be embodied as a program for causing a computer to function as the management device 4.
In addition, about a concrete structure, it can change suitably in the range which does not deviate from the main point of this invention.

1 クライアントマシン
2 ネットワーク
3 負荷分散装置
4 管理装置
5 サーバ
31 記憶部
32 処理部
33 通信部
41 記憶部
42 処理部
43 入力部
44 表示部
45 通信部
100 クラスタ
311 ID空間管理情報
411 ID空間管理情報
412 地域名情報
413 サーバ管理情報
414 地域数
415 冗長数
1000 分散処理システム
DESCRIPTION OF SYMBOLS 1 Client machine 2 Network 3 Load distribution apparatus 4 Management apparatus 5 Server 31 Storage part 32 Processing part 33 Communication part 41 Storage part 42 Processing part 43 Input part 44 Display part 45 Communication part 100 Cluster 311 ID space management information 411 ID space management information 412 Area name information 413 Server management information 414 Area count 415 Redundancy count 1000 Distributed processing system

Claims (4)

環状のID(IDentifier)空間に、管理対象の複数のデータ、および、前記データを管理しクラスタを構成する複数のサーバ、が割り振られ、それぞれの前記サーバが、前記ID空間において自身から所定方向回りに次の前記サーバまでの間に位置する前記データを管理するとともに、当該次の前記サーバから前記所定方向回りにさらに次の前記サーバまでの間に位置する前記データの複製を記憶する分散処理システムにおいて、クライアントマシンからのリクエストを前記複数のサーバのいずれに振り分けるかを決定する管理装置であって、
前記ID空間における前記データの管理を担当するサーバを管理するID空間管理情報、
前記複数のサーバおよび待機中のサーバを含むサーバそれぞれは所定の3以上の複数の物理的な地域のいずれかに属しており、前記地域ごとに、当該地域に物理的に存在するすべての前記サーバとの対応付けを管理するサーバ管理情報、を記憶する記憶部と、
前記クラスタに対して前記待機中のサーバを増設する場合、当該増設するサーバについての前記ID空間における挿入位置に基づき、前記ID空間管理情報を参照して前記ID空間における当該挿入位置の両側の前記サーバを特定し、前記サーバ管理情報を参照して当該特定した前記両隣のサーバが属さない地域に物理的に存在するサーバを選択し、当該選択したサーバと当該挿入位置の情報を用いて前記ID空間管理情報を更新する処理部と、
を有することを特徴とする管理装置。
In a circular ID (IDentifier) space, a plurality of data to be managed and a plurality of servers that manage the data and constitute a cluster are allocated, and each of the servers rotates in a predetermined direction from itself in the ID space. A distributed processing system for managing the data located between the next server and storing a copy of the data located between the next server and the next server around the predetermined direction. In the management device for determining which of the plurality of servers the request from the client machine is distributed,
ID space management information for managing a server in charge of managing the data in the ID space;
Each of the servers including the plurality of servers and the standby server belongs to one of a plurality of predetermined three or more physical regions, and for each region, all the servers physically existing in the region A storage unit for storing server management information for managing the association with
When adding the standby server to the cluster, based on the insertion position in the ID space for the server to be added, the ID space management information is referred to and the both sides of the insertion position in the ID space are The server is identified, the server management information is referred to, a server that physically exists in an area to which the identified two adjacent servers do not belong is selected, and the ID is obtained using information on the selected server and the insertion position A processing unit for updating the space management information;
A management apparatus comprising:
環状のID(IDentifier)空間に、管理対象の複数のデータ、および、前記データを管理しクラスタを構成する複数のサーバ、が割り振られ、それぞれの前記サーバが、前記ID空間において自身から所定方向回りに次の前記サーバまでの間に位置する前記データを管理するとともに、当該次の前記サーバから前記所定方向回りにさらに次の前記サーバまでの間に位置する前記データの複製を記憶する分散処理システムにおいて、クライアントマシンからのリクエストを前記複数のサーバのいずれに振り分けるかを決定する管理装置であって、
前記ID空間における前記データの管理を担当するサーバを管理するID空間管理情報、
前記複数のサーバおよび待機中のサーバを含むサーバそれぞれは所定の3以上の複数の物理的な地域のいずれかに属しており、前記地域ごとに、当該地域に物理的に存在するすべての前記サーバとの対応付けを管理するサーバ管理情報、を記憶する記憶部と、
前記クラスタに対して前記待機中のサーバを増設する場合、当該増設するサーバについての前記ID空間における挿入位置に基づき、
前記地域の数をK(≧3)とした場合、
Kが奇数のとき、前記ID空間管理情報を参照して前記ID空間における当該挿入位置の両側それぞれについて{(K−1)/2}台の前記サーバを特定し、
Kが偶数のとき、前記ID空間管理情報を参照して前記ID空間における当該挿入位置の両側の一方について(K/2)台、他方について{(K−2)/2}台の前記サーバを特定し、
前記サーバ管理情報を参照して当該特定したすべてのサーバがいずれも属さない地域に物理的に存在するサーバを選択し、当該選択したサーバと当該挿入位置の情報を用いて前記ID空間管理情報を更新する処理部と、
を有することを特徴とする管理装置。
In a circular ID (IDentifier) space, a plurality of data to be managed and a plurality of servers that manage the data and constitute a cluster are allocated, and each of the servers rotates in a predetermined direction from itself in the ID space. A distributed processing system for managing the data located between the next server and storing a copy of the data located between the next server and the next server around the predetermined direction. In the management device for determining which of the plurality of servers the request from the client machine is distributed,
ID space management information for managing a server in charge of managing the data in the ID space;
Each of the servers including the plurality of servers and the standby server belongs to one of a plurality of predetermined three or more physical regions, and for each region, all the servers physically existing in the region A storage unit for storing server management information for managing the association with
When adding the standby server to the cluster, based on the insertion position in the ID space for the added server,
When the number of the areas is K (≧ 3),
When K is an odd number, {(K-1) / 2} servers are specified for each of both sides of the insertion position in the ID space with reference to the ID space management information;
When K is an even number, with reference to the ID space management information, (K / 2) servers on one side of the insertion position in the ID space and {(K-2) / 2} servers on the other side Identify,
The server management information is referenced to select a server physically present in an area to which none of the specified servers belongs, and the ID space management information is determined using the selected server and the information on the insertion position. A processing unit to be updated;
A management apparatus comprising:
前記処理部は、
前記クラスタに対して前記待機中のサーバを増設する場合、
前記ID空間管理情報を参照して前記ID空間において前記サーバ同士の間が最も広い箇所の中央の位置を前記挿入位置として特定する
ことを特徴とする請求項1または請求項2に記載の管理装置。
The processor is
When adding the standby server to the cluster,
The management apparatus according to claim 1 or 2, wherein a reference position of a center of the widest portion between the servers in the ID space is specified as the insertion position with reference to the ID space management information. .
コンピュータを請求項1から請求項3までのいずれか一項に記載の管理装置として機能させるためのプログラム。   The program for functioning a computer as a management apparatus as described in any one of Claim 1- Claim 3.
JP2012047548A 2012-03-05 2012-03-05 Management device and program Active JP5629281B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012047548A JP5629281B2 (en) 2012-03-05 2012-03-05 Management device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012047548A JP5629281B2 (en) 2012-03-05 2012-03-05 Management device and program

Publications (2)

Publication Number Publication Date
JP2013182546A JP2013182546A (en) 2013-09-12
JP5629281B2 true JP5629281B2 (en) 2014-11-19

Family

ID=49273130

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012047548A Active JP5629281B2 (en) 2012-03-05 2012-03-05 Management device and program

Country Status (1)

Country Link
JP (1) JP5629281B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5945252B2 (en) * 2013-07-12 2016-07-05 日本電信電話株式会社 Distributed processing system
JP6093319B2 (en) * 2014-02-27 2017-03-08 日本電信電話株式会社 Cluster system
JP6053712B2 (en) * 2014-02-27 2016-12-27 日本電信電話株式会社 Management device and program
JP6085266B2 (en) * 2014-02-27 2017-02-22 日本電信電話株式会社 Server resource management device
JP5932875B2 (en) * 2014-04-08 2016-06-08 日本電信電話株式会社 Server apparatus and program
JP5941494B2 (en) * 2014-05-01 2016-06-29 ウイングアーク1st株式会社 In-memory management system and in-memory management program
JP6586058B2 (en) * 2016-08-23 2019-10-02 日本電信電話株式会社 Load distribution apparatus and load distribution method

Also Published As

Publication number Publication date
JP2013182546A (en) 2013-09-12

Similar Documents

Publication Publication Date Title
JP5629281B2 (en) Management device and program
AU2015221548B2 (en) A computer implemented method for dynamic sharding
US7590672B2 (en) Identification of fixed content objects in a distributed fixed content storage system
US9442673B2 (en) Method and apparatus for storing data using a data mapping algorithm
US10735545B2 (en) Routing vault access requests in a dispersed storage network
CN108287660A (en) Date storage method and equipment
CN101984632A (en) Load distributing method, device and server in distributed cache system
US20170262464A1 (en) System and method for supporting elastic data metadata compression in a distributed data grid
JP5723309B2 (en) Server and program
KR20130038517A (en) System and method for managing data using distributed containers
JP6055197B2 (en) Database system
JP6085266B2 (en) Server resource management device
JP5745445B2 (en) Management device and program
JP2019527414A (en) Manipulating the distributed agreement protocol to identify the desired storage unit set
CN107943615B (en) Data processing method and system based on distributed cluster
CN115237682A (en) Block chain node fault synchronization method and device, computer equipment and storage medium
JP6053712B2 (en) Management device and program
US20190004730A1 (en) Using index structure to guide load balancing in a distributed storage system
CN110874288A (en) A method and device for managing cached data in a Redis cluster
JP6007340B2 (en) Computer system, computer system management method and program
JP6093320B2 (en) Distributed processing system
US20200379657A1 (en) Applying dynamic routing protocols to route dsn access requests
JP5815000B2 (en) Nodes and programs
US10360107B2 (en) Modifying allocation of storage resources in a dispersed storage network
JP5845298B2 (en) Nodes and programs

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140305

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20140502

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20140528

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140919

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141003

R150 Certificate of patent or registration of utility model

Ref document number: 5629281

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350