JP5723309B2 - Server and program - Google Patents
Server and program Download PDFInfo
- Publication number
- JP5723309B2 JP5723309B2 JP2012047991A JP2012047991A JP5723309B2 JP 5723309 B2 JP5723309 B2 JP 5723309B2 JP 2012047991 A JP2012047991 A JP 2012047991A JP 2012047991 A JP2012047991 A JP 2012047991A JP 5723309 B2 JP5723309 B2 JP 5723309B2
- Authority
- JP
- Japan
- Prior art keywords
- space
- server
- data
- management information
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は、協調してデータ処理を行うクラスタを構成する複数のサーバにおけるデータ複製の技術に関する。 The present invention relates to a technology for data replication in 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参照)を用いた振り分け手法がある。このコンシステント・ハッシュ法は、Amazon Dynamo(非特許文献2参照)等で用いられている。 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. This consistent hash method is used in Amazon Dynamo (see Non-Patent Document 2) and the like.
このコンシステント・ハッシュ法を用いたデータ振り分け手法では、クラスタメンバとデータの双方に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.
図5に示すように、コンシステント・ハッシュ法では、クラスタメンバ(メンバ1〜4)とデータ(データA〜D。黒丸(●)で表示)の双方にIDを割り当て、データのIDからID空間を時計回りに辿り最初に出合ったクラスタメンバをそのデータの担当として決定する。そして、担当するクラスタメンバのさらに右隣(時計回りに次)のクラスタメンバに複製データを担当させる。
As shown in FIG. 5, in the consistent hash method, IDs are assigned to both cluster members (
例えば、図5においては、データAはID空間上を時計回りに辿り最初に出合ったメンバ1が担当となり、その複製データはID空間上でメンバ1の右隣にあたるメンバ2に担当させる。このように原本データ・複製データを担当するクラスタメンバを決定することで、クラスタメンバに離脱があった場合でも複製データを所持しているクラスタメンバが新しくデータを担当するクラスタメンバとなることで対応できるという利点がある。なお、複製データを複数個とる場合には、さらに右隣のクラスタメンバに2個目の複製データを担当させるようにすることもできる。
For example, in FIG. 5, data A follows the ID space in the clockwise direction, and the
ここで、ID空間上におけるクラスタメンバにおける具体的なサーバの割り当てポリシを定める場合に、一つでなく、異なる二つのポリシで運用したい場合がある。
前記したように、コンシステント・ハッシュ法によるデータ管理手法では、データを担当するクラスタメンバの右隣に複製データを配置する方法を採用する。ここで、図6に示すように、クラスタを構成するメンバは、地理的に離れたK個(ここでは5個)のデータセンタエリア(サーバを管理するデータセンタが管轄するエリア)内から選択されているとする。
Here, when a specific server allocation policy for cluster members in the ID space is determined, there are cases where it is desired to operate with two different policies instead of one.
As described above, the data management method based on the consistent hash method employs a method in which replicated data is arranged on the right side of the cluster member in charge of data. Here, as shown in FIG. 6, the members constituting the cluster are selected from K (in this case, five) data center areas (areas under the control of the data center that manages the server) that are geographically separated. Suppose that
そして、例えば、激甚災害や大規模障害等(以下、代表して「激甚災害」と称する。)によってデータセンタエリア単位でサーバの使用ができなくなる場合を考える。このとき、クラスタ内の多数のサーバが同時に減設される。通常、コンシステント・ハッシュ法のID空間上では、サーバについて物理位置を考慮せずにランダムに配置しているため、減設されるサーバがID空間上で隣り合うクラスタメンバであった場合、原本データおよび複製データの両方を消失してしまう(複製データが1個の場合)。 Consider, for example, a case where a server cannot be used in units of data center areas due to a catastrophic disaster, a large-scale failure, or the like (hereinafter referred to as a “severe catastrophe”). At this time, a large number of servers in the cluster are removed simultaneously. Usually, in the ID space of the consistent hash method, the servers are randomly arranged without considering the physical position. Therefore, if the server to be removed is a cluster member adjacent in the ID space, the original Both data and duplicated data are lost (when there is only one duplicated data).
一方、ID空間上で右隣のクラスタメンバに複製データを作成する際の通信時間等を考えると、ID空間上で隣り合うクラスタメンバ同士が物理的に近いほうがよい。
つまり、サーバの物理位置を考慮しながらID空間を作成すれば、高速データ複製を考慮したID空間や、激甚災害を考慮したID空間等を作成することができる。しかし、単一のID空間を利用する手法では、例えば、高速データ複製と激甚災害対策を両立させることができない。
On the other hand, considering the communication time and the like when creating duplicate data for the cluster member on the right side in the ID space, it is better that the cluster members adjacent in the ID space are physically close to each other.
That is, if an ID space is created while considering the physical location of the server, an ID space that takes into account high-speed data replication, an ID space that takes into account a catastrophic disaster, and the like can be created. However, the method using a single ID space cannot achieve both high-speed data replication and severe disaster countermeasures, for example.
そこで、本発明は、前記した事情に鑑みてなされたものであり、分散処理システムにおいて、クラスタメンバであるサーバの割り当てのポリシについて異なる複数のものを両立して運用可能にするサーバおよびそのプログラムを提供することを課題とする。 Therefore, the present invention has been made in view of the circumstances described above, and a server and a program for enabling a plurality of different allocation policies for servers as cluster members to be operated in a distributed processing system. The issue is to provide.
前記課題を解決するために、本発明は、環状のID空間に、管理対象の複数のデータ、および、前記データを管理しクラスタを構成する複数のサーバ、が割り振られ、それぞれの前記サーバが、前記ID空間において自身から所定方向回りに次の前記サーバまでの間に位置する前記データを管理するとともに、当該次の前記サーバから前記所定方向回りにさらに次の前記サーバまでの間に位置する前記データの複製を記憶する分散処理システムにおいて、負荷分散装置によって振り分けられたクライアントマシンからのリクエストを処理する前記サーバであって、前記複数のサーバそれぞれは所定の3以上の複数の物理的な地域のいずれかに属しており、第1ID空間が前記地域の数に分割されていて、当該分割されているそれぞれの部分には同じ地域の前記サーバが配置されている第1ID空間管理情報、および、第2ID空間において同じ地域の前記サーバが隣り合わないように配置されている第2ID空間管理情報、を記憶する記憶部と、前記負荷分散装置によって振り分けられた前記クライアントマシンからのリクエストを処理するとともに、前記第1ID空間管理情報を参照して前記第1ID空間における自身から前記所定方向回りに次の前記サーバに当該リクエストの処理に用いたデータの複製の記憶を要求し、かつ、前記第2ID空間管理情報を参照して前記第2ID空間における自身から前記所定方向回りに次の前記サーバに当該リクエストの処理に用いたデータの複製の記憶を要求する処理部と、を備えることを特徴とする。 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 for storing a copy of data, the server processes requests from client machines distributed by a load balancer, and each of the plurality of servers includes a plurality of predetermined physical regions of three or more. The first ID space is divided into the number of the regions, and each divided portion A storage unit that stores first ID space management information in which the servers in the same area are arranged, and second ID space management information arranged so that the servers in the same area are not adjacent to each other in the second ID space; The request from the client machine distributed by the load balancer is processed, and the request is processed from the self in the first ID space to the next server around the predetermined direction with reference to the first ID space management information. Requesting storage of a copy of the data used in the process, and referring to the second ID space management information from the self in the second ID space to the next server around the predetermined direction, the data used for processing the request And a processing unit that requests storage of a copy.
これによれば、高速データ複製用の第1ID空間を有する第1ID空間管理情報と、激甚災害対策用の第2ID空間を有する第2ID空間管理情報を用いることで、高速データ複製と激甚災害対策を両立可能な分散処理システムにおけるサーバを実現することができる。つまり、異なるID空間を複数用いることで、サーバの割り当てのポリシについて異なる複数のものを両立して運用可能にするサーバを提供することができる。 According to this, by using the first ID space management information having the first ID space for high-speed data replication and the second ID space management information having the second ID space for severe disaster countermeasures, high-speed data replication and severe disaster countermeasures can be performed. A server in a compatible distributed processing system can be realized. That is, by using a plurality of different ID spaces, it is possible to provide a server that can operate a plurality of different server allocation policies at the same time.
また、本発明は、前記処理部が、第1ID空間が前記地域の数に分割されていて前記分割されているそれぞれの部分には同じ地域の前記サーバが配置されている第1ID空間管理情報を参照して前記第1ID空間における自身から前記所定方向回りに次の前記サーバに当該リクエストの処理に用いたデータの複製の記憶を要求する場合は、当該リクエストの処理と同期的に行い、第2ID空間において同じ地域の前記サーバが隣り合わないように配置されている前記第2ID空間管理情報を参照して前記第2ID空間における自身から前記所定方向回りに次の前記サーバに当該リクエストの処理に用いたデータの複製の記憶を要求する場合は、当該リクエストの処理と非同期的に行うことを特徴とする。 Further, the present invention provides the first ID space management information in which the first ID space is divided into the number of the regions, and the server in the same region is arranged in each divided part. Referring to requesting the next server to store a copy of the data used for processing the request around the predetermined direction from itself in the first ID space, the second ID is performed synchronously with the processing of the request. For processing the request to the next server around the predetermined direction from itself in the second ID space with reference to the second ID space management information arranged so that the servers in the same area are not adjacent to each other in the space When requesting storage of a copy of the received data, it is performed asynchronously with the processing of the request.
これによれば、処理時間が短い第1ID空間管理情報を用いたデータ複製はリクエスト処理と同期的に行い、処理時間が長い第2ID空間管理情報を用いたデータ複製はリクエスト処理と同非期的に行うことで、サーバにおける処理遅延の可能性を低減することができる。 According to this, data replication using the first ID space management information with a short processing time is performed synchronously with the request processing, and data replication using the second ID space management information with a long processing time is the same as the request processing. By doing so, the possibility of processing delay in the server can be reduced.
また、本発明は、コンピュータを前記サーバとして機能させるためのプログラムである。 Further, the present invention is a program for causing a computer to function as the server.
これによれば、このようなプログラムを実装したコンピュータをサーバとして機能させることができる。 According to this, a computer in which such a program is installed can be caused to function as a server.
本発明によれば、分散処理システムにおいて、異なるID空間を複数用いることで、サーバの割り当てのポリシについて異なる複数のものを両立して運用可能にするサーバおよびそのプログラムを提供することができる。 According to the present invention, by using a plurality of different ID spaces in a distributed processing system, it is possible to provide a server and a program for enabling a plurality of different server allocation policies to be operated simultaneously.
以下、本発明を実施するための形態(以下、実施形態と称する。)について、図面を参照(言及図以外の図も適宜参照)しながら説明する。なお、理解を容易にするために、まず、図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 described in detail.
(本実施形態の概要)
本実施形態では、クラスタメンバであるサーバの割り当ての異なるポリシの例として、高速データ複製および激甚災害対策というポリシを挙げて説明する。
まず、図1(a)に示すように、データセンタエリアの数K(3以上の自然数。ここでは5)に応じて、高速データ複製用の第1ID空間を事前に分割しておく。そして、クラスタにサーバを追加する場合には、ID空間における新たなクラスタメンバの挿入先を決定する。例えば、第1ID空間の中でクラスタメンバ間の距離(第1ID空間上の距離)が最も広い個所を検索(特定)し、そのクラスタメンバ間の中央の位置を新たなクラスタメンバのIDの挿入先として決定する(図1(a)の(1))。なお、このような位置を選択する理由は、クラスタ構成の分散処理システムでは、クラスタメンバ間で負荷がなるべく平均化されていることが望ましく、統計的に、データ数がクラスタメンバ数よりも格段に多い場合には、各クラスタメンバが担当するデータ数はID空間上のクラスタメンバ間の距離にほぼ比例するためである。
(Outline of this embodiment)
In this embodiment, as an example of a policy with different allocation of servers that are cluster members, a policy of high-speed data replication and catastrophic disaster countermeasures will be described.
First, as shown in FIG. 1A, the first ID space for high-speed data replication is divided in advance according to the number K of data center areas (a natural number of 3 or more, here 5). When adding a server to a cluster, the insertion destination of a new cluster member in the ID space is determined. For example, the location where the distance between the cluster members (distance in the first ID space) is the largest in the first ID space is searched (specified), and the center position between the cluster members is inserted into the new cluster member ID insertion destination. (1 in FIG. 1A). The reason for selecting such a position is that, in a distributed processing system with a cluster configuration, it is desirable that the load among the cluster members be averaged as much as possible. Statistically, the number of data is much larger 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 when there are many.
第1ID空間における新たなクラスタメンバの挿入先を決定した(図1(a)の(1))後に、その挿入先に対応するデータセンタエリアを特定し、そのデータセンタエリアに物理的に存在するサーバを選択し(図1(a)の(2))、クラスタメンバに組み込む。このようなアルゴリズムにより、サーバの物理位置を考慮したサーバ選択を行うことができ、高速データ複製を実現するとともに、各サーバにおける処理負荷をより平均化することができる。 After determining the insertion destination of a new cluster member in the first ID space ((1) in FIG. 1A), the data center area corresponding to the insertion destination is specified and physically exists in the data center area. A server is selected ((2) in FIG. 1A) and incorporated into a cluster member. With such an algorithm, server selection can be performed in consideration of the physical location of the server, high-speed data replication can be realized, and the processing load on each server can be further averaged.
なお、クラスタにサーバを追加する場合に、第1ID空間の中で、クラスタメンバ間の距離が最も広い個所の中央の位置を選んだが、これは一例に過ぎない。つまり、クラスタにサーバを追加する場合に、第1ID空間において選択する位置は任意でよく、必須事項は、そのID空間において選択した位置に対応するデータセンタエリア(以下、「地域」と称する場合もある。)に物理的に存在するサーバを選択することである。これにより、高速データ複製を実現することができる。 In addition, when adding a server to a cluster, the center position of the place where the distance between cluster members is the widest in the first ID space is selected, but this is only an example. That is, when adding a server to a cluster, the position selected in the first ID space may be arbitrary, and the essential item is a data center area corresponding to the position selected in the ID space (hereinafter also referred to as “region”). Is to select a server that physically exists. Thereby, high-speed data replication can be realized.
次に、図1(b)に示すように、激甚災害対策用の第2ID空間では、まず、同じ地域のサーバが隣り合わないように、サーバを図示のように分散させて(地域ごとに順番に)並べる。 Next, as shown in FIG. 1B, in the second ID space for catastrophic disaster countermeasures, first, the servers in the same region are distributed as shown so that the servers in the same region are not adjacent (in order for each region). To line up.
そして、サーバの増設時は、第2ID空間の中でクラスタメンバ間の距離(第2ID空間上の距離)が最も広い個所を検索(特定)し、そのクラスタメンバ間の中央の位置を新たなクラスタメンバのIDの挿入先として決定する(図1(b)の(1))。 Then, when adding a server, the location where the distance between the cluster members (distance on the second ID space) is the largest in the second ID space is searched (specified), and the center position between the cluster members is determined as a new cluster. It is determined as a member ID insertion destination ((1) in FIG. 1B).
第2ID空間における新たなクラスタメンバの挿入先を決定した(図1(b)の(1))後に、その挿入先の周囲K−1個(最低限、両隣だけでもよい。)のサーバの地域を調査する(図1(b)の(2))。そして、そのK−1個(最低限、両隣)のサーバのいずれも属さない地域のサーバを選択し(図1(b)の(3))、そのサーバを増設する。 After determining the insertion destination of a new cluster member in the second ID space ((1) in FIG. 1 (b)), the area of K-1 servers around the insertion destination (only at least both neighbors are acceptable). Is investigated ((2) in FIG. 1B). Then, a server in a region to which none of the K-1 (at least, both adjacent) servers belongs is selected ((3) in FIG. 1B), and the server is added.
なお、「周囲K−1個のサーバ」とは、具体的には、Kが奇数のときは、挿入先の両側それぞれについて{(K−1)/2}台のサーバのことである。また、Kが偶数のときは、挿入先の両側の一方について(K/2)台、他方について{(K−2)/2}台のサーバのことである The “periphery K−1 servers” specifically refers to {(K−1) / 2} servers for both sides of the insertion destination when K is an odd number. When K is an even number, it means (K / 2) servers on one side of the insertion destination and {(K-2) / 2} servers on the other side.
このようなアルゴリズムにより、第2ID空間において同じ地域のサーバが隣り合うことがないので、3つ以上の地域のうちの1つの地域に存在するすべてのサーバがダウンしても、データが消失する事態を回避することができる。また、各サーバにおける処理負荷をより平均化することもできる。 With such an algorithm, servers in the same region do not adjoin in the second ID space, so that data is lost even if all servers existing in one of the three or more regions go down. Can be avoided. In addition, the processing load on each server can be further averaged.
改めて説明すると、コンシステント・ハッシュ法の特性上、「どれか1つでもデータが(複製ともども)失われる確率」は、「連続してM(冗長数(原本データと複製データの合計数))個同じ地域のサーバが配置される確率」と等しい。図1(b)で説明したアルゴリズムによれば、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 in FIG. 1B, 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が奇数のときは、第2ID空間において任意の連続する{(K+1)/2}台のサーバはすべて異なる地域に属していることになる。また、Kが偶数のときは、第2ID空間において任意の連続する(K/2)台のサーバはすべて異なる地域に属していることになる。これによって、冗長数を3以上とした場合、1つの地域のサーバがすべてダウンしても、ダウンしたサーバが保持していた原本データの複製データを保持しているサーバの数の期待値をより大きくすることができる。 In addition, in the case of a method of examining the area of “K-1 surroundings” servers as well as “both neighbors” of the insertion destination, when K is an odd number, any continuous {(K + 1) / 2 in the second ID space } All servers belong to different regions. When K is an even number, any continuous (K / 2) servers in the second ID space all 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.
KとMの値をもっと増加させれば、さらに多くの地域が全壊した場合でも、複製データが消失していない可能性を高くすることができる。例えば、K=7で、M=4の場合、3つの地域が全壊しても、1つのサーバが複製データを必ず保持していることになる。 If the values of K and M are further increased, it is possible to increase the possibility that duplicate data has not been lost even if more areas are completely destroyed. For example, when K = 7 and M = 4, even if three areas are completely destroyed, one server always holds duplicate data.
なお、クラスタにサーバを追加する場合に、第2ID空間の中で、クラスタメンバ間の距離が最も広い個所の中央の位置を選んだが、これは一例に過ぎない。つまり、クラスタにサーバを追加する場合に、第2ID空間において選択する位置は任意でよく、必須事項は、その第2ID空間において選択した位置の両隣のサーバのいずれも属さない地域のサーバを選択することである。これにより、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 in the second ID space is selected, but this is only an example. That is, when adding a server to a cluster, the position to be selected in the second ID space may be arbitrary, and an essential matter is to select a server in a region to which neither of the servers adjacent to the selected position in the second ID space belongs. That is. Thereby, even if all the servers existing in one of the three or more regions go down, a situation in which data is lost can be avoided. In other words, it has the effect of catastrophic disaster countermeasures.
(実施形態)
次に、本実施形態について説明する。図2に示すように、本実施形態の分散処理システム1000は、負荷分散装置3、クラスタ100を構成する複数のサーバ4を備えている。負荷分散装置3は、インターネット等のネットワーク2を介して、複数のクライアントマシン1と接続されている。
(Embodiment)
Next, this embodiment will be described. As shown in FIG. 2, the distributed processing system 1000 according to the present embodiment includes a
全体の主な動作について説明すると、クライアントマシン1からのリクエストを、ネットワーク2経由で負荷分散装置3が受け取る。負荷分散装置3は、そのリクエストを、複数のサーバ4のいずれかに振り分ける。リクエストを振り分けられたサーバ4は、そのリクエストの処理を行うとともに、他の2つのサーバ4にデータの複製の記憶を要求する。
The main operation will be described. The
次に、負荷分散装置3とサーバ4の構成について説明する。
負荷分散装置3は、記憶部31、処理部32、入力部33、表示部34、通信部35を備える。
記憶部31は、情報を記憶する手段であり、RAM(Random Access Memory)やROM(Read Only Memory)などのメモリ、HDD(Hard Disk Drive)などによって構成される。記憶部31には、第1ID空間管理情報311と第2ID空間管理情報312が格納されている。なお、第1ID空間管理情報311は第1ID空間管理情報411と同一で、第2ID空間管理情報312は第2ID空間管理情報412と同一であり、第1ID空間管理情報411と第2ID空間管理情報412の説明は後記する。また、記憶部31には、処理部32の動作プログラムなども格納されている(図示を省略)。
Next, the configuration of the
The
The
処理部32は、記憶部31に格納された情報に基づいて演算処理を行う手段であり、例えばCPU(Central Processing Unit)によって構成される。処理部32は、クラスタ100へのサーバ4の追加等により第1ID空間管理情報311を更新すると、その最新の第1ID空間管理情報311をすべてのサーバ4に送信する。また、処理部32は、クラスタ100へのサーバ4の追加等により第2ID空間管理情報312を更新すると、その最新の第2ID空間管理情報312をすべてのサーバ4に送信する。
The
処理部32は、また、通信部35が受信したクライアントマシン1からのリクエストを、いずれのサーバ4に振り分けるかを決定する。振り分けの決定は、第1ID空間管理情報311または第2ID空間管理情報312に基づくが、いずれを用いるかは、システム一意に事前に定められている。
The
入力部33は、サーバ4のユーザが情報を入力する手段であり、例えば、キーボードやマウスによって実現される。
表示部34は、情報を表示する手段であり、例えば、LCD(Liquid Crystal Display)によって実現される。
通信部35は、外部装置との通信に用いられる通信インタフェースである。
The
The
The
サーバ4は、負荷分散装置3によって振り分けられたクライアントマシン1からのリクエストを処理するコンピュータ装置である。なお、前記したように、コンシステント・ハッシュ法では、環状のID空間に、管理対象の複数のデータ、および、データを管理しクラスタ100を構成する複数のサーバ4、が割り振られ、それぞれのサーバ4が、ID空間において自身から時計回り(所定方向回り)に次のサーバ4までの間に位置するデータを管理するとともに、当該次のサーバ4から時計回り(所定方向回り)にさらに次のサーバ4までの間に位置するデータの複製を記憶することを前提とする。また、複数のサーバ4それぞれは、所定の3以上の複数の物理的な地域のいずれかに属している。
The
サーバ4は、記憶部41、処理部42、通信部43を備える。
記憶部41は、情報を記憶する手段であり、RAMやROMなどのメモリ、HDDなどによって構成される。記憶部41には、負荷分散装置3から受信した第1ID空間管理情報311と第2ID空間管理情報312が、それぞれ、第1ID空間管理情報411と第2ID空間管理情報412として格納されている。なお、記憶部41には、処理部42の動作プログラムなども格納されている(図示を省略)。
The
The
処理部42は、記憶部41に格納された情報に基づいて演算処理を行う手段であり、例えばCPUによって構成される。処理部42は、負荷分散装置3によって振り分けられたクライアントマシン1からのリクエストを処理する。処理部42は、さらに、第1ID空間管理情報411を参照して第1ID空間における自身から所定方向回りに次のサーバ4に当該リクエストの処理に用いたデータの複製の記憶を要求する。処理部42は、さらに、第2ID空間管理情報412を参照して第2ID空間における自身から所定方向回りに次のサーバ4に当該リクエストの処理に用いたデータの複製の記憶を要求する。
The
また、処理部42は、第1ID空間管理情報411を参照して第1ID空間における自身から所定方向回りに次のサーバ4に当該リクエストの処理に用いたデータの複製の記憶を要求する場合は、当該リクエストの処理と同期的に行うのが好ましい。また、処理部42は、第2ID空間管理情報412を参照して第2ID空間における自身から所定方向回りに次のサーバ4に当該リクエストの処理に用いたデータの複製の記憶を要求する場合は、当該リクエストの処理と非同期的に(都合のいいタイミングで)行うのが好ましい。
In addition, when the
このように、処理時間が短い第1ID空間管理情報411を用いたデータ複製はリクエスト処理と同期的に行い、処理時間が長い第2ID空間管理情報412を用いたデータ複製はリクエスト処理と同非期的に行うようにすれば、サーバ4における処理遅延の可能性を低減することができる。
Thus, data replication using the first ID
通信部43は、外部装置との通信に用いられる通信インタフェースである。
なお、サーバ4は、入力部や表示部を備えていてもよい。
The
The
次に、第1ID空間管理情報411について説明する。第1ID空間管理情報411では、第1ID空間が地域の数に分割されていて、当該分割されているそれぞれの部分には同じ地域のサーバ4が配置されている(図1(a)参照)。
図3(a)では、第1ID空間管理情報411について、ID空間におけるIDと、サーバ4の識別子としてのIPアドレスの情報を示している。
Next, the first ID
FIG. 3A shows the ID in the ID space and the IP address information as the identifier of the
第1ID空間管理情報411は、管理対象のデータについて、所定のハッシュ値変換によって算出されたIDを用いて、そのデータを担当するサーバ4を管理する情報である。IDは、ID空間におけるIDであり、サーバ4が管理を担当するデータの領域を特定するために格納され、IDの値の大きさでソートされている。
The first ID
例えば、図3(a)では、第1行目のIDの値が「446D0BE6」の場合は、識別子が「00000000」〜「446D0BE6」の領域に属するデータを、IPアドレスが「192.168.0.10」のサーバ4が担当することを示す。また、第2行目の場合は、1つ前の行のIDの値に1をプラスした識別子からその行のIDまでの値の識別子に属するデータを、IPアドレスが「192.168.0.25」のサーバ4が担当することを示す。
For example, in FIG. 3A, when the ID value in the first row is “446D0BE6”, the data belonging to the area with the identifiers “00000000” to “446D0BE6” and the IP address “192.168.8.0”. .10 "indicates that the
次に、第2ID空間管理情報412について説明する。第2ID空間管理情報412では、第2ID空間において同じ地域のサーバ4が隣り合わないように配置されている(図1(b)参照)。図3(b)では、第2ID空間管理情報412について、ID空間におけるIDと、サーバ4の識別子としてのIPアドレスの情報を示している。
Next, the second ID
次に、サーバ4による処理について説明する。
図4に示すように、ステップS1において、サーバ4の処理部42は、クライアントマシン1からのリクエストを、負荷分散装置3から受信したか否かを判定し、Yesの場合はステップS2に進み、Noの場合はステップS1に戻る。
ステップS2において、処理部42は、そのリクエストに対するデータ処理を行う。
Next, processing by the
As shown in FIG. 4, in step S <b> 1, the
In step S2, the
ステップS3において、処理部42は、記憶部41の第1ID空間管理情報411を参照して、第1ID空間における時計回りに隣のサーバ4にデータの複製の記憶を要求する。
In step S <b> 3, the
ステップS4において、処理部42は、記憶部41の第2ID空間管理情報412を参照して、第2ID空間における時計回りに隣のサーバ4にデータの複製の記憶を要求する。
In step S <b> 4, the
このようにして、本実施形態によれば、高速データ複製用の第1ID空間を有する第1ID空間管理情報411と、激甚災害対策用の第2ID空間を有する第2ID空間管理情報412を用いることで、高速データ複製と激甚災害対策を両立可能な分散処理システム1000におけるサーバ4を実現することができる。つまり、異なるID空間を複数用いることで、サーバ4の割り当てのポリシについて異なる複数のものを両立して運用可能にするサーバ4を提供することができ、分散処理システム1000の柔軟な運用が可能になる。
As described above, according to the present embodiment, the first ID
また、サーバ4において、処理時間が短い第1ID空間管理情報411を用いたデータ複製はリクエスト処理と同期的に行い、処理時間が長い第2ID空間管理情報412を用いたデータ複製はリクエスト処理と同非期的に行うようにすれば、処理遅延の可能性を低減することができる。
In the
以上で本実施形態の説明を終えるが、本発明の態様はこれらに限定されるものではない。
例えば、本実施形態では、高速データ複製および激甚災害対策という2つのポリシを反映した異なる2つのID空間を用いる場合を例にとって説明したが、これに限定されず、異なるポリシの複数のID空間を用いるだけでデータ消失の可能性低減等の効果が期待できるので、種々のポリシに基づく異なる複数のID空間を用いることができる。
Although description of this embodiment is finished above, the aspect of the present invention is not limited to these.
For example, in this embodiment, the case where two different ID spaces reflecting two policies of high-speed data replication and catastrophic disaster countermeasures are used as an example. However, the present invention is not limited to this, and a plurality of ID spaces of different policies are used. Since the effect of reducing the possibility of data loss or the like can be expected simply by using it, a plurality of different ID spaces based on various policies can be used.
また、地域として、データセンタエリアを単位とする場合を例にとって説明したが、データセンタエリアをさらに分割したものや都道府県等の別の単位を採用してもよい。 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
In addition, specific configurations and processes can be appropriately changed without departing from the gist of the present invention.
1 クライアントマシン
2 ネットワーク
3 負荷分散装置
4 サーバ
31 記憶部
32 処理部
33 入力部
34 表示部
35 通信部
41 記憶部
42 処理部
43 通信部
100 クラスタ
311 第1ID空間管理情報
312 第2ID空間管理情報
411 第1ID空間管理情報
412 第2ID空間管理情報
1000 分散処理システム
DESCRIPTION OF
Claims (3)
前記複数のサーバそれぞれは所定の3以上の複数の物理的な地域のいずれかに属しており、
第1ID空間が前記地域の数に分割されていて、当該分割されているそれぞれの部分には同じ地域の前記サーバが配置されている第1ID空間管理情報、および、
第2ID空間において同じ地域の前記サーバが隣り合わないように配置されている第2ID空間管理情報、を記憶する記憶部と、
前記負荷分散装置によって振り分けられた前記クライアントマシンからのリクエストを処理するとともに、前記第1ID空間管理情報を参照して前記第1ID空間における自身から前記所定方向回りに次の前記サーバに当該リクエストの処理に用いたデータの複製の記憶を要求し、かつ、前記第2ID空間管理情報を参照して前記第2ID空間における自身から前記所定方向回りに次の前記サーバに当該リクエストの処理に用いたデータの複製の記憶を要求する処理部と、
を備えることを特徴とするサーバ。 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 server for processing a request from a client machine distributed by the load balancer,
Each of the plurality of servers belongs to one of a plurality of predetermined physical areas of three or more,
1st ID space management information by which the 1st ID space is divided | segmented into the number of the said area | region, and the said server of the same area is arrange | positioned in each of the said division | segmentation, and
A storage unit for storing second ID space management information arranged so that the servers in the same region are not adjacent to each other in the second ID space;
The request from the client machine distributed by the load balancer is processed, and the request is processed from the self in the first ID space to the next server around the predetermined direction with reference to the first ID space management information. Requesting storage of a copy of the data used in the process, and referring to the second ID space management information from the self in the second ID space to the next server around the predetermined direction, the data used for processing the request A processing unit requesting storage of a copy;
A server comprising:
前記第1ID空間管理情報を参照して前記第1ID空間における自身から前記所定方向回りに次の前記サーバに当該リクエストの処理に用いたデータの複製の記憶を要求する場合は、当該リクエストの処理と同期的に行い
前記第2ID空間管理情報を参照して前記第2ID空間における自身から前記所定方向回りに次の前記サーバに当該リクエストの処理に用いたデータの複製の記憶を要求する場合は、当該リクエストの処理と非同期的に行う
ことを特徴とする請求項1に記載のサーバ。 The processor is
When referring to the first ID space management information and requesting the next server to store a copy of the data used for processing the request around the predetermined direction from itself in the first ID space, When synchronously referring to the second ID space management information and requesting the storage of a copy of the data used for processing the request to the next server around the predetermined direction from itself in the second ID space, The server according to claim 1, wherein the server performs the request asynchronously.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012047991A JP5723309B2 (en) | 2012-03-05 | 2012-03-05 | Server and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012047991A JP5723309B2 (en) | 2012-03-05 | 2012-03-05 | Server and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013182575A JP2013182575A (en) | 2013-09-12 |
JP5723309B2 true JP5723309B2 (en) | 2015-05-27 |
Family
ID=49273154
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012047991A Active JP5723309B2 (en) | 2012-03-05 | 2012-03-05 | Server and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5723309B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6197666B2 (en) * | 2014-01-27 | 2017-09-20 | 富士通株式会社 | Storage device, replication method, and replication program |
JP6305078B2 (en) * | 2014-01-29 | 2018-04-04 | キヤノン株式会社 | System and control method |
JP6053712B2 (en) * | 2014-02-27 | 2016-12-27 | 日本電信電話株式会社 | Management device and program |
JP6322161B2 (en) * | 2015-06-22 | 2018-05-09 | 日本電信電話株式会社 | Node, data relief method and program |
JP6387333B2 (en) * | 2015-09-07 | 2018-09-05 | 日本電信電話株式会社 | Node and slot optimization methods |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7925624B2 (en) * | 2006-03-31 | 2011-04-12 | Amazon Technologies, Inc. | System and method for providing high availability data |
JP5272927B2 (en) * | 2009-06-29 | 2013-08-28 | ブラザー工業株式会社 | Node device, program, and distributed storage method |
-
2012
- 2012-03-05 JP JP2012047991A patent/JP5723309B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013182575A (en) | 2013-09-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7590672B2 (en) | Identification of fixed content objects in a distributed fixed content storage system | |
CN107005596B (en) | Replicated database allocation for workload balancing after cluster reconfiguration | |
EP2998881B1 (en) | A computer implemented method for dynamic sharding | |
US10735545B2 (en) | Routing vault access requests in a dispersed storage network | |
US9442673B2 (en) | Method and apparatus for storing data using a data mapping algorithm | |
JP6073246B2 (en) | Large-scale storage system | |
JP5539683B2 (en) | Scalable secondary storage system and method | |
US9442671B1 (en) | Distributed consumer cloud storage system | |
US8661055B2 (en) | File server system and storage control method | |
JP5723309B2 (en) | Server and program | |
JP5629281B2 (en) | Management device and program | |
CN102483768A (en) | Policy-based storage structure distribution | |
KR20130118088A (en) | Distributed file system having multi mds architecture and method for processing data using the same | |
JP6055197B2 (en) | Database system | |
JP5745445B2 (en) | Management device and program | |
US11188258B2 (en) | Distributed storage system | |
JP6085266B2 (en) | Server resource management device | |
JP5690296B2 (en) | Load balancing program and load balancing apparatus | |
JP6093320B2 (en) | Distributed processing system | |
Ahn et al. | Dynamic erasure coding decision for modern block-oriented distributed storage systems | |
JP6053712B2 (en) | Management device and program | |
Huang et al. | A novel replica placement strategy for data center network | |
JP5815000B2 (en) | Nodes and programs | |
JP2011180658A (en) | Redundancy method in distributed file system | |
US10360107B2 (en) | Modifying allocation of storage resources in a dispersed storage network |
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: 20141027 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20141202 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150127 |
|
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: 20150324 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150327 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5723309 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |