JP5079561B2 - Database system and replica data updating method in database system - Google Patents
Database system and replica data updating method in database system Download PDFInfo
- Publication number
- JP5079561B2 JP5079561B2 JP2008074187A JP2008074187A JP5079561B2 JP 5079561 B2 JP5079561 B2 JP 5079561B2 JP 2008074187 A JP2008074187 A JP 2008074187A JP 2008074187 A JP2008074187 A JP 2008074187A JP 5079561 B2 JP5079561 B2 JP 5079561B2
- Authority
- JP
- Japan
- Prior art keywords
- replica
- node
- master
- data
- request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、マスタサイトのある時点におけるマスタデータを、スレーブサイトにコピーしてレプリカデータとして保存する技術に関し、特にマスタサイト及びスレーブサイトに配置した複数のノードにおいて、レプリカデータをコピーする処理の負荷分散をする技術に関する。 The present invention relates to a technique for copying master data at a certain point in a master site to a slave site and storing it as replica data, and in particular, processing load for copying replica data in a plurality of nodes arranged at the master site and the slave site. It is related to the technology of dispersion.
従来、マスタサイトにマスタデータを保存し、スレーブサイトにある時点のマスタデータをレプリカデータとして保存するデータベースシステムがある。これをORACLE(登録商標)データベースにおいて実現する場合、マテリアライズド・ビュー(Materialized View:以下、M−Viewと称する)を用いることができる。 Conventionally, there is a database system that stores master data at a master site and stores master data at a point in time at a slave site as replica data. When this is realized in the ORACLE (registered trademark) database, a materialized view (hereinafter referred to as M-View) can be used.
このM−Viewでは、図6に示すような手順でレプリカデータの更新(リフレッシュ)が行われる。すなわち、レプリカノード600がマスタノード500へA表のレプリカデータ(レプリカA)のリフレッシュ要求を発行する(S510)と、マスタノード500がA表のマスタデータ(マスタA)の更新履歴を示すログAを参照する(S520)。そして、マスタノード500がログAに基づいて、前回のリフレッシュ後に更新されたデータを特定し、前回のリフレッシュ後に更新されたデータをマスタAから取得する(S530)。マスタノード500は、マスタAから取得したデータをレプリカノード600へ通知し(S540)、レプリカノード600がレプリカAを更新する(S550)。
In this M-View, replica data is updated (refreshed) according to the procedure shown in FIG. That is, when
ここで、システムの規模が大きくなると、リフレッシュ処理の負荷も大きくなる。そこで、リフレッシュ処理を複数のノードで負荷分散して実現したい。 Here, as the scale of the system increases, the load of refresh processing also increases. Therefore, we want to implement the refresh process by distributing the load among multiple nodes.
しかしながら、特にM−Viewにおいては、ORACLE(登録商標)の仕様により、ノードが固定されてしまうという問題があった。 However, particularly in M-View, there is a problem that the node is fixed due to the specifications of ORACLE (registered trademark).
そこで、本発明の目的は、マスタサイトのマスタデータを、スレーブサイトのレプリカデータとしてコピーするリフレッシュ処理の負荷分散をすることである。 Accordingly, an object of the present invention is to distribute the load of refresh processing for copying master data at a master site as replica data at a slave site.
本発明の一つの実施態様に従うデータベースシステムは、マスタデータを管理する複数のマスタノードと、前記マスタデータをコピーしたレプリカデータを管理する複数のレプリカノードと、負荷分散装置と、を備える。前記負荷分散装置は、前記複数のレプリカノードの中から、前記レプリカデータのリフレッシュ要求を発行させる一のレプリカノードを選択する第1の選択手段と、前記第1の選択手段によって選択されたレプリカノードが発行したリフレッシュ要求を受け付けると、前記受け付けたリフレッシュ要求に応答する一のマスタノードを、前記複数のマスタノードの中から選択する第2の選択手段と、を備え、前記第1の選択手段によって選択されたレプリカノードがリフレッシュ要求を発行することによって、前記第2の選択手段によって選択されたマスタノードから前記マスターデータを取得し、取得した前記マスターデータに基づいて、前記レプリカデータを更新する。 A database system according to an embodiment of the present invention includes a plurality of master nodes that manage master data, a plurality of replica nodes that manage replica data obtained by copying the master data, and a load balancer. The load balancer includes: a first selection unit that selects one replica node that issues a refresh request for the replica data from the plurality of replica nodes; and the replica node selected by the first selection unit When receiving the refresh request issued by the first, the second selecting means for selecting one master node responding to the accepted refresh request from the plurality of master nodes, the first selecting means When the selected replica node issues a refresh request, the master data is acquired from the master node selected by the second selection means, and the replica data is updated based on the acquired master data.
好適な実施形態では、前記負荷分散装置が、前記複数のレプリカノードのうちのいずれかからレプリカノード選択要求を受け付けると、前記第1の選択手段が、前記複数のレプリカノードの中から、前記リフレッシュ要求を発行させる一のレプリカノードを選択するようにしてもよい。 In a preferred embodiment, when the load balancer receives a replica node selection request from any of the plurality of replica nodes, the first selection unit selects the refresh from the plurality of replica nodes. One replica node that issues a request may be selected.
好適な実施形態では、前記複数のレプリカノードのそれぞれは、他のレプリカノードを監視する監視手段を備え、第1のレプリカノードの監視手段が、前記レプリカノード選択要求を発行すべき第2のレプリカノードが前記レプリカノード選択要求を発行できないことを検知すると、前記第1のレプリカノードが前記レプリカノード選択要求を発行するようにしてもよい。 In a preferred embodiment, each of the plurality of replica nodes includes a monitoring unit that monitors other replica nodes, and the monitoring unit of the first replica node issues a second replica to which the replica node selection request should be issued. When it is detected that a node cannot issue the replica node selection request, the first replica node may issue the replica node selection request.
好適な実施形態では、前記複数のレプリカノードには、予め、前記レプリカノード選択要求発行の優先順位が割り当てられていて、前記第1のレプリカノードに割り当てられている優先順位が、前記第2のレプリカノードに割り当てられている優先順位の次に高い順位であるときに、第1のレプリカノードの監視手段が、前記レプリカノード選択要求を発行すべき第2のレプリカノードが前記レプリカノード選択要求を発行できないことを検知すると、前記第1のレプリカノードが前記レプリカノード選択要求を発行してもよい。 In a preferred embodiment, the plurality of replica nodes are assigned in advance the priority of the replica node selection request issuance, and the priority assigned to the first replica node is the second priority. When the priority is the second highest priority assigned to the replica node, the monitoring means of the first replica node causes the second replica node to issue the replica node selection request to issue the replica node selection request. When it is detected that it cannot be issued, the first replica node may issue the replica node selection request.
好適な実施形態では、第1のレプリカノードは、前記レプリカノード選択要求を、第1の周期で発行する第1のプロセスと、前記レプリカデータがリフレッシュされてから、前記第1の周期よりも長い第2の時間が経過したときに、前記負荷分散装置へレプリカノード選択要求を行う第2のプロセスと、を有していてもよい。 In a preferred embodiment, the first replica node has a first process for issuing the replica node selection request in a first period, and is longer than the first period after the replica data is refreshed. And a second process for making a replica node selection request to the load balancer when the second time has elapsed.
好適な実施形態では、前記第1のプロセスは、各レプリカノードのOS(Operating System)上のプロセスであり、前記第2のプロセスは、前記レプリカデータを管理するデータベース管理システム上のプロセスであってもよい。 In a preferred embodiment, the first process is a process on an OS (Operating System) of each replica node, and the second process is a process on a database management system that manages the replica data. Also good.
以下、本発明の一実施形態に係るデータベースシステムについて、図面を参照して説明する。 Hereinafter, a database system according to an embodiment of the present invention will be described with reference to the drawings.
図1は、本実施形態に係るデータベースシステムの構成図である。本システムは、マスタサイト10と、スレーブサイト30と、負荷分散装置50とを備える。
FIG. 1 is a configuration diagram of a database system according to the present embodiment. This system includes a
各マスタノード11及び各レプリカノード31は、いずれも例えば汎用的なコンピュータシステムにより構成され、以下に説明する各ノード11,31内の個々の構成要素または機能は、例えば、コンピュータプログラムを実行することにより実現される。さらに、マスタデータベース15及びレプリカデータベース35は、何れもコンピュータシステムの記憶装置上に実現される。特に本実施形態では、ORACLE(登録商標)データベースなどのようなデータベースシステムにより実現されたデータであってもよい。
Each master node 11 and each replica node 31 are each configured by, for example, a general-purpose computer system, and each component or function in each node 11, 31 described below executes, for example, a computer program. It is realized by. Furthermore, both the
マスタサイト10は、複数台のマスタノード11と、マスタデータ151を記憶したマスタデータベース15とを備える。本実施形態では、マスタノード11は4台構成(11a〜11d)とするが、マスタノード11の台数は任意に定めることができる。各マスタノード11は同一の構成を有する。マスタデータベース15には、複数のデータ表に別れているマスタデータ151及び各データ表の更新履歴を示すログデータ153が記憶されている。図1の例では、マスタデータベース15に、A表、B表及びC表のマスタデータ151であるマスタA,B,C及びマスタA,B,Cのログデータ153であるログA,B,Cが格納されている。
The
マスタデータベース15に記憶されているマスタA,B,Cは、図示しない所定のアプリケーションプログラムが参照及び更新をする。マスタA,B,Cが更新されたときには、対応するログA,B,Cに、それぞれ更新内容が追加される。後述するリフレッシュ要求に応じてスレーブサイト30へ送ったマスタデータに対応するログは、ログA,B,Cから消去される。
The masters A, B, and C stored in the
スレーブサイト30は、複数台のレプリカノード31と、マスタデータのある時点におけるコピーであるレプリカデータ351を記憶したレプリカデータベース35とを備える。本実施形態では、レプリカノード31も4台構成(31a〜31d)とするが、レプリカノード31の台数は任意に定めることができる。各レプリカノード31は同一の構成を有する。レプリカデータベース35には、レプリカデータ351と、リフレッシュ時刻37と、管理テーブル39とが記憶されている。
The
レプリカデータ351には、マスタA,B,CのそれぞれのレプリカデータであるレプリカA,B,Cが記憶されている。本実施形態では、レプリカデータ351は、ORACLE(登録商標)データベースのM−Viewを用いて生成する。
The
リフレッシュ時刻37は、レプリカデータ351を更新した時刻を示す。リフレッシュ時刻37は、レプリカデータ351の各データ表別の更新時刻を含む。
The
管理テーブル39は、例えば図2に示すような構成を有する。すなわち、同図に示すように、管理テーブル39は、ノードID391と、タイムスタンプ393と、優先順位395とをデータ項目として有する。タイムスタンプ393は、各レプリカノード31が正常に動作していることを確認するために、各レプリカノード31によって定期的書き込まれるタイムスタンプである。優先順位395は、いずれか一つのレプリカノード31が行う処理について、各レプリカノード31に割り当てられた優先順位である。ここでは、レプリカノード選択処理の優先順位3951が登録されている。
The management table 39 has a configuration as shown in FIG. 2, for example. That is, as shown in the figure, the management table 39 has a
図3は、スレーブサイト30の詳細な構成図である。
FIG. 3 is a detailed configuration diagram of the
レプリカノード31(31a〜31d)は、何れも共通の構成を有するので、まずは、その共通の構成について説明する。すなわち、レプリカノード31は、レプリカデータベース35を管理するデータベースデータベース管理システム(DBMS)32(32a〜32d)と、レプリカノード選択要求プロセス33(33a〜33d)と、他のレプリカノード31を監視する監視プロセス34(34a〜d)とを有する。ここで、レプリカノード選択要求プロセス33及び監視プロセス34は、OS(Operating System)上で動作するプロセスである。
Since the replica nodes 31 (31a to 31d) all have a common configuration, first, the common configuration will be described. That is, the replica node 31 monitors a database database management system (DBMS) 32 (32a to 32d) that manages the
データベース管理システム32上では、コピー処理部321(321a〜321d)と、データベース処理部323(323a〜323d)と、自動ジョブ実行部325(325a〜325d)とが動作している。 On the database management system 32, a copy processing unit 321 (321a to 321d), a database processing unit 323 (323a to 323d), and an automatic job execution unit 325 (325a to 325d) operate.
コピー処理部321は、リフレッシュ要求を発行する。リフレッシュ要求とは、レプリカデータ351を最新のマスタデータ151と同期させるための更新要求である。リフレッシュ要求には、リフレッシュ対象となるデータ表を示す情報が含まれる。本実施形態では、リフレッシュ要求は負荷分散装置50に対して発行される。リフレッシュ要求に対する応答として、コピー処理部321は、リフレッシュ要求で指定したデータ表のマスタデータをマスタノード11から取得する。コピー処理部321が取得するマスタデータは、レプリカデータの前回のリフレッシュからの差分データである。
The copy processing unit 321 issues a refresh request. The refresh request is an update request for synchronizing the
コピー処理部321は、負荷分散装置50からリフレッシュ要求発行指示を受けたときに、リフレッシュ要求を発行する。つまり、どのレプリカノード31がリフレッシュ要求を発行するかは、負荷分散装置50が決定する。これにより、レプリカノード11a〜11dの負荷分散が実現される。コピー処理部321は、リフレッシュ要求発行指示に含まれるリフレッシュ対象のデータ表を示す情報を、リフレッシュ要求に含める。
The copy processing unit 321 issues a refresh request when receiving a refresh request issuance instruction from the
データベース処理部323は、コピー処理部321が取得したマスタデータの差分データを、レプリカデータベース35に格納して、レプリカデータ351を更新(リフレッシュ)する。データベース処理部323は、レプリカデータ351を更新したときは、その更新したデータ表のリフレッシュ時刻37もあわせて更新する。
The database processing unit 323 stores the difference data of the master data acquired by the copy processing unit 321 in the
自動ジョブ実行部325は、予め定められた周期で予め登録されているジョブを実行する。例えば、本実施形態では、自動ジョブ実行部325は、レプリカデータ351がリフレッシュされた時刻を監視し、最後のリフレッシュ時刻から、予め定められた時間(自動ジョブ実行時間)が経過すると、負荷分散装置50に対してレプリカノード選択要求を発行する。自動ジョブ実行部325が発行するレプリカノード選択要求では、レプリカデータ351の全データ表を対象として指定してもよい。ここで、本実施形態では、後述するように、自動ジョブ実行部325によるレプリカノード選択要求の発行は、次に説明するレプリカノード選択要求プロセス33が行う処理のバックアップの位置づけである。
The automatic job execution unit 325 executes a job registered in advance at a predetermined cycle. For example, in this embodiment, the automatic job execution unit 325 monitors the time when the
なお、自動ジョブ実行部325は、何れのレプリカノード11a〜11dでも実行可能であるが、データベース管理システム32a〜32d間で調整を行って、いずれか一つのレプリカノード11で動作するようにしてもよい。
The automatic job execution unit 325 can be executed by any of the
レプリカノード選択要求プロセス33は、予め定められた周期で負荷分散装置50に対してレプリカノード選択要求を発行する。例えば、本実施形態では、レプリカノード選択要求プロセス33は、前回のレプリカノード選択要求発行時刻を保持していて、その時刻から予め定められた時間(リフレッシュ時間)が経過すると、レプリカノード選択要求を発行する。レプリカノード選択要求には、同一のリフレッシュグループに属する一以上のデータ表を示す情報が含まれる。リフレッシュグループとは、同じ周期でリフレッシュを行うデータ表のグループである。本実施形態では、リフレッシュ時間が異なる複数のリフレッシュグループを登録することができ、レプリカノード選択要求プロセス33は、リフレッシュグループごとに、それぞれの周期に従いレプリカノード選択要求を発行する。
The replica node selection request process 33 issues a replica node selection request to the
ここで、どのリフレッシュグループのリフレッシュ時間も、自動ジョブ実行部325の自動ジョブ実行時間よりも短い。つまり、レプリカノード選択要求プロセス33が正常に動作している限り、自動ジョブ実行部325からレプリカノード選択要求が発行されることはない。何らかの事情でレプリカノード選択要求プロセス33からレプリカノード選択要求が発行されず、レプリカデータ351のリフレッシュが行われなかったときに、自動ジョブ実行部325がレプリカノード選択要求を発行し、レプリカデータ351がリフレッシュされる。
Here, the refresh time of any refresh group is shorter than the automatic job execution time of the automatic job execution unit 325. In other words, as long as the replica node selection request process 33 operates normally, the automatic job execution unit 325 does not issue a replica node selection request. When a replica node selection request is not issued from the replica node selection request process 33 for some reason and the
監視プロセス34は、他のレプリカノード31を監視する。例えば、監視プロセス34は、管理テーブル39のタイムスタンプ393に定期的に現在時刻(タイムスタンプ393)を書き込む。このときに、他のレプリカノード31が書き込んだタイムスタンプ393を確認することによって、他のレプリカノード31が正常に動作しているか否かの確認を行う。つまり、タイムスタンプ393に記憶されている時刻から所定以上の時間が経過しているレプリカノード31があれば、そのレプリカノード31は何らかのトラブルが発生していると考えられる。監視プロセス34は、同じノードで特定のプロセス(例えば、レプリカノード選択要求プロセス33)が正常動作していることが確認されたときに、タイムスタンプ393を更新してもよい。これにより、その特定のプロセスだけがダウンしている場合であっても、他のレプリカノード31は、その特定のプロセスのダウンを検出できる。
The monitoring process 34 monitors other replica nodes 31. For example, the monitoring process 34 periodically writes the current time (time stamp 393) in the
上述したように、各レプリカノード31は共通の構成を有しているが、一部の設定の相違により、異なる動作をする場合がある。例えば、レプリカノード選択要求プロセス33は、いずれか一つのレプリカノード31だけで動作する。レプリカノード選択要求プロセス33が動作するレプリカノード31は、優先順位395によって定まる。つまり、稼働中のレプリカノード31の中で、優先順位395の「レプリカノード選択」における優先順位が最も上位の1台でレプリカノード選択要求プロセス33が動作する。各レプリカノード31の監視プロセス34が、管理テーブル39を参照して、自ノードの優先順位395を確認し、それよりも上位のノードが動作していないときは、自ノードのレプリカノード選択要求プロセス33を起動するようにしてもよい。
As described above, each replica node 31 has a common configuration, but may operate differently due to a difference in some settings. For example, the replica node selection request process 33 operates only on any one replica node 31. The replica node 31 on which the replica node selection request process 33 operates is determined by the
例えば、図3の例では、正常時には、レプリカノード31aのレプリカノード選択要求プロセス33aだけで動作している。そして、レプリカノード31bの監視プロセス34bが管理テーブル39を参照して、レプリカノード31aのタイムスタンプ393が更新されていないことを検知すると、レプリカノード選択要求プロセス33bを起動して、レプリカノード31bがレプリカノード選択要求を発行する。
For example, in the example of FIG. 3, at the normal time, only the replica node
次に、図1に戻ると、負荷分散装置50は、いずれかのレプリカノード31が発行するレプリカノード選択要求を受けると、レプリカノード31a〜dのいずれかを選択するレプリカ選択部52を有する。そして、レプリカ選択部52は、選択したレプリカノード31に対してリフレッシュ要求発行指示を行う。このリフレッシュ要求発行指示には、レプリカノード選択要求に含まれている表を指定する情報が含まれる。
Next, returning to FIG. 1, the
また、負荷分散装置50は、選択されたレプリカノード31がリフレッシュ要求発行指示に応じて発行したリフレッシュ要求を受け付けると、マスタノード11a〜dのいずれかを選択するマスタ選択部54を有する。そして、マスタ選択部54は、選択したマスタノード11に対してリフレッシュ要求を送信する。このリフレッシュ要求には、リフレッシュ対象となる表を特定する情報が含まれる。
In addition, the
なお、レプリカ選択部52及びマスタ選択部54がレプリカノード31またはマスタノード11を選択する際のアルゴリズムには任意のものを用いることができ、例えば、ラウンドロビンあるいは疑似乱数による選択などでもよい。
Note that any algorithm can be used for the
負荷分散装置50は、いずれかのマスタノード11からリフレッシュ要求に係る差分データを取得すると、リフレッシュ要求発行元のレプリカノード11へ送信する。
When the
マスタノード11(11a〜d)は、何れも共通の構成を有する。マスタサイト10では、負荷分散装置50によって選択されたいずれか一つのレプリカノード11が、リフレッシュ要求を受け付ける。選択されたマスタノード11は、リフレッシュ要求で指定されたデータ表のログデータ153を参照する。ここで、ログデータ153が存在する場合、前回のリフレッシュ以降、マスタデータ151が更新されたことを意味する。従って、リフレッシュ要求を受け付けたマスタノード11は、リフレッシュ要求において指定されたデータ表のログデータ153を参照し、更新履歴が含まれていれば、対応するマスタデータ151を取得する。そして、選択されたマスタノード11は、取得した差分のマスタデータを負荷分散装置50へ送信する。このとき、指定されたデータ表のログデータ153は削除される。
The master nodes 11 (11a to 11d) all have a common configuration. In the
次に、図4に、A表(レプリカA)のリフレッシュを行う手順に係るフローチャートを示す。図1、図3及び図4を参照しながら、このリフレッシュ処理を説明する。 Next, FIG. 4 shows a flowchart relating to the procedure for refreshing table A (replica A). This refresh process will be described with reference to FIG. 1, FIG. 3, and FIG.
まず、この例では、レプリカノード31aにおいてレプリカノード選択要求プロセス33aが動作している。そこで、レプリカノード選択要求プロセス33aが、前回のリフレッシュ時刻(前回のレプリカノード選択要求発行時刻)からリフレッシュ時間が経過したか否かを判定する(S10)。前回のリフレッシュ時刻からリフレッシュ時間が経過すると(S10:Yes)、レプリカノード選択要求プロセス33aが負荷分散装置50に対してレプリカノード選択要求を発行する(S11)。
First, in this example, the replica node
負荷分散装置50では、レプリカ選択部52がこのレプリカノード選択要求を受け付けると、レプリカノード31a〜dからいずれか一つのレプリカノード31を選択して、選択したレプリカノード31へリフレッシュ要求発行指示を送る(S12)。この例では、レプリカノード31bが選択されたものとする。
In the
負荷分散装置50からのリフレッシュ要求発行指示に従って、レプリカノード31bがリフレッシュ要求を負荷分散装置50に対して発行する(S13)。
In accordance with the refresh request issuance instruction from the
負荷分散装置50では、マスタ選択部54がこのリフレッシュ要求を受け付けると、このリフレッシュ要求の送信先をマスタノード11a〜dの中から選択する(S14)。この例では、マスタノード11cが選択されたものとする。そして、負荷分散装置50は、選択したマスタノード11cに対して、リフレッシュ要求を送信する(S15)。
In the
マスタノード11cは、リフレッシュ要求で指定されたデータ表(ここではB表)のログデータ153を参照して、差分データの有無を判定する。そして、差分データがあれば、マスタノード11cは、その差分のマスタデータ151を取得する(S16)。そして、マスタノード11cは、差分のマスタデータを負荷分散装置50へ送信する。さらに、負荷分散装置50は、マスタノード11cから送信された差分のマスタデータを、リフレッシュ要求の発行元であるレプリカノード31bへ送信する(S17)。
The master node 11c refers to the
レプリカノード31bでは、データベース処理部323bがレプリカデータ351を更新する(S18)。なお、このときに、データベース処理部323bは、リフレッシュ時刻37もあわせて更新する。
In the
これにより、M−Viewを用いてレプリカデータのリフレッシュ処理において、負荷分散をすることができる。 As a result, load distribution can be performed in the replica data refresh processing using M-View.
次に、図5は、各レプリカノード31の監視プロセス34によるレプリカデータ選択要求のバックアップ処理の手順を示すフローチャートである。同図の処理は、所定時間(監視時間)周期で起動される。 Next, FIG. 5 is a flowchart showing a procedure of backup processing of a replica data selection request by the monitoring process 34 of each replica node 31. The process of FIG. 6 is started at a predetermined time (monitoring time) cycle.
監視プロセス34が、管理テーブル39のタイムスタンプ393を、現在の時刻に更新する(S20)。さらに、監視プロセス34は、自ノードの「レプリカノード選択」の優先順位を確認する(S21)。
The monitoring process 34 updates the
ここで、監視プロセス34は、レプリカノード選択要求プロセス33が自ノードで既に起動されているか否かを判定する(S22)。 Here, the monitoring process 34 determines whether or not the replica node selection request process 33 has already been activated on its own node (S22).
そして、既にレプリカノード選択要求プロセス33が自ノードで起動されていれば(S22:Yes)、処理を終了する。 If the replica node selection request process 33 has already been started on the own node (S22: Yes), the process is terminated.
これに対して、レプリカノード選択要求プロセス33が自ノードで起動されていないときは(S22:No)、レプリカノード選択の優先順位3951に関して、自ノードよりも優先順位が上位のノードが正常に稼働しているか否かを判定する(S23)。この判定は、自ノードよりも優先順位の高いノードのタイムスタンプ393と現在時刻との差が一定時間(例えば、監視時間の2倍)内であるか否かで行う。
On the other hand, when the replica node selection request process 33 is not started on the own node (S22: No), the node having a higher priority than the own node operates normally with respect to the
そして、自ノードよりも優先順位の高いレプリカノード31が正常に稼働しているときは(S23:Yes)、処理を終了する。 Then, when the replica node 31 having a higher priority than the local node is operating normally (S23: Yes), the process is terminated.
一方、自ノードよりも優先順位の高いノードが正常に稼働していないときは(S23:No)、監視プロセス34は、自ノードのレプリカノード選択要求プロセス33を起動する(S24)。 On the other hand, when a node having a higher priority than the own node is not operating normally (S23: No), the monitoring process 34 starts the replica node selection request process 33 of the own node (S24).
これにより、管理テーブル39に設定されている優先順位に従って、いずれかのレプリカノード31でレプリカノード選択要求プロセス33を動作させることができる。 As a result, the replica node selection request process 33 can be operated on any one of the replica nodes 31 in accordance with the priority order set in the management table 39.
上述した本発明の実施形態は、本発明の説明のための例示であり、本発明の範囲をそれらの実施形態にのみ限定する趣旨ではない。当業者は、本発明の要旨を逸脱することなしに、他の様々な態様で本発明を実施することができる。 The above-described embodiments of the present invention are examples for explaining the present invention, and are not intended to limit the scope of the present invention only to those embodiments. Those skilled in the art can implement the present invention in various other modes without departing from the gist of the present invention.
例えば、本実施形態では、レプリカノード選択要求を何れかのレプリカノードが発行しているが、いずれかのマスタノードや他のシステムなど、レプリカノード以外がレプリカノード選択要求を発行してもよい。 For example, in the present embodiment, any replica node issues a replica node selection request. However, a replica node selection request may be issued by a non-replica node such as any master node or other system.
10 マスタサイト
11a-d マスタノード
15 マスタデータベース
30 スレーブサイト
31a-d レプリカノード
32 データベース管理システム
33 レプリカノード選択要求プロセス
34 監視プロセス
35 レプリカデータベース
37 リフレッシュ時刻
39 管理テーブル
50 負荷分散装置
52 レプリカ選択部
54 マスタ選択部
10
Claims (7)
前記マスタデータをコピーしたレプリカデータを管理する複数のレプリカノードと、
負荷分散装置と、を備え、
前記負荷分散装置は、
前記複数のレプリカノードの中から、前記レプリカデータのリフレッシュ要求を発行させる一のレプリカノードを選択する第1の選択手段と、
前記第1の選択手段によって選択されたレプリカノードが発行したリフレッシュ要求を受け付けると、前記受け付けたリフレッシュ要求に応答する一のマスタノードを、前記複数のマスタノードの中から選択する第2の選択手段と、を備え、
前記第1の選択手段によって選択されたレプリカノードがリフレッシュ要求を発行することによって、前記第2の選択手段によって選択されたマスタノードから前記マスターデータを取得し、取得した前記マスターデータに基づいて、前記レプリカデータを更新するデータベースシステム。 Multiple master nodes that manage the master data;
A plurality of replica nodes that manage replica data obtained by copying the master data;
A load balancer,
The load balancer is:
A first selection means for selecting one replica node for issuing a refresh request for the replica data from the plurality of replica nodes;
Upon receiving a refresh request issued by the replica node selected by the first selection means, second selection means for selecting one master node responding to the accepted refresh request from the plurality of master nodes. And comprising
The replica node selected by the first selection unit issues a refresh request to acquire the master data from the master node selected by the second selection unit, and based on the acquired master data, A database system for updating the replica data.
第1のレプリカノードの監視手段が、前記レプリカノード選択要求を発行すべき第2のレプリカノードが前記レプリカノード選択要求を発行できないことを検知すると、前記第1のレプリカノードが前記レプリカノード選択要求を発行することを特徴とする請求項1または2に記載のデータベースシステム。 Each of the plurality of replica nodes includes monitoring means for monitoring other replica nodes,
When the monitoring means of the first replica node detects that the second replica node that should issue the replica node selection request cannot issue the replica node selection request, the first replica node requests the replica node selection request. The database system according to claim 1, wherein the database system is issued.
前記第1のレプリカノードに割り当てられている優先順位が、前記第2のレプリカノードに割り当てられている優先順位の次に高い順位であるときに、第1のレプリカノードの監視手段が、前記レプリカノード選択要求を発行すべき第2のレプリカノードが前記レプリカノード選択要求を発行できないことを検知すると、前記第1のレプリカノードが前記レプリカノード選択要求を発行する請求項3記載のデータベースシステム。 Priorities of the replica node selection request issuance are assigned to the plurality of replica nodes in advance,
When the priority assigned to the first replica node is the next higher priority than the priority assigned to the second replica node, the monitoring means of the first replica node provides the replica 4. The database system according to claim 3, wherein when detecting that a second replica node that should issue a node selection request cannot issue the replica node selection request, the first replica node issues the replica node selection request.
前記レプリカノード選択要求を、第1の周期で発行する第1のプロセスと、
前記レプリカデータがリフレッシュされてから、前記第1の周期よりも長い第2の時間が経過したときに、前記負荷分散装置へレプリカノード選択要求を行う第2のプロセスと、を有することを特徴とする請求項1または2に記載のデータベースシステム。 The first replica node is
A first process for issuing the replica node selection request in a first period;
And a second process for making a replica node selection request to the load balancer when a second time longer than the first period has elapsed since the replica data was refreshed. The database system according to claim 1 or 2.
前記第2のプロセスは、前記レプリカデータを管理するデータベース管理システム上のプロセスであることを特徴とする請求項5記載のデータベースシステム。 The first process is a process on the OS (Operating System) of each replica node;
6. The database system according to claim 5, wherein the second process is a process on a database management system that manages the replica data.
前記負荷分散装置が、前記複数のレプリカノードの中から、前記レプリカデータのリフレッシュ要求を発行させる一のレプリカノードを選択し、
前記選択されたレプリカノードがリフレッシュ要求を発行し、
前記負荷分散装置が、前記発行されたリフレッシュ要求を受け付けると、前記受け付けたリフレッシュ要求に応答する一のマスタノードを、前記複数のマスタノードの中から選択して、選択されたマスタノードへ前記リフレッシュ要求を送信し、
前記選択されたレプリカノードが、前記負荷分散装置を介して前記選択されたマスタノードから前記マスターデータを取得し、取得した前記マスターデータに基づいて、前記レプリカデータを更新する、データベースシステムにおけるレプリカデータの更新方法。 In a database system comprising a plurality of master nodes for managing master data, a plurality of replica nodes for managing replica data copied from the master data, and a load balancer,
The load balancer selects one replica node that issues a refresh request for the replica data from the plurality of replica nodes,
The selected replica node issues a refresh request;
When the load distribution apparatus accepts the issued refresh request, the master distribution node selects one master node that responds to the accepted refresh request from the plurality of master nodes, and then refreshes the selected master node. Send a request,
Replica data in a database system in which the selected replica node acquires the master data from the selected master node via the load balancer and updates the replica data based on the acquired master data Update method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008074187A JP5079561B2 (en) | 2008-03-21 | 2008-03-21 | Database system and replica data updating method in database system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008074187A JP5079561B2 (en) | 2008-03-21 | 2008-03-21 | Database system and replica data updating method in database system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009230404A JP2009230404A (en) | 2009-10-08 |
JP5079561B2 true JP5079561B2 (en) | 2012-11-21 |
Family
ID=41245722
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008074187A Expired - Fee Related JP5079561B2 (en) | 2008-03-21 | 2008-03-21 | Database system and replica data updating method in database system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5079561B2 (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5530878B2 (en) * | 2010-09-17 | 2014-06-25 | 株式会社日立製作所 | Data replication management method in distributed system |
WO2012056734A1 (en) * | 2010-10-26 | 2012-05-03 | 株式会社Murakumo | Database management method |
WO2012070292A1 (en) | 2010-11-22 | 2012-05-31 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Information processing system achieving connection distribution for load balancing of distributed database, information processing device, load balancing method, database deployment plan method and program |
US9251195B2 (en) | 2011-07-05 | 2016-02-02 | Murakumo Corporation | Method of managing database |
EP2824576B1 (en) | 2012-03-08 | 2018-11-21 | Murakumo Corporation | Method for managing database |
EP2840501A4 (en) * | 2012-04-18 | 2015-12-09 | Murakumo Corp | Database management method, database system and program |
JP5750090B2 (en) * | 2012-11-14 | 2015-07-15 | ビッグローブ株式会社 | Database management system and database management method |
JP7137072B2 (en) * | 2018-12-10 | 2022-09-14 | 富士通株式会社 | Information processing system, load distribution processing device, and load distribution processing program |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3467750B2 (en) * | 1997-01-17 | 2003-11-17 | 日本電信電話株式会社 | Distributed object processing system |
JP2005115685A (en) * | 2003-10-08 | 2005-04-28 | Nippon Telegr & Teleph Corp <Ntt> | Distributed calculation system and load distribution method thereof |
-
2008
- 2008-03-21 JP JP2008074187A patent/JP5079561B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2009230404A (en) | 2009-10-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5079561B2 (en) | Database system and replica data updating method in database system | |
US9892183B2 (en) | Computer system, computer system management method, and program | |
JP5724735B2 (en) | Database update control device, database management system, and database update control program | |
TWI677797B (en) | Management method, system and equipment of master and backup database | |
JP6434131B2 (en) | Distributed processing system, task processing method, storage medium | |
US9367261B2 (en) | Computer system, data management method and data management program | |
CN112579101B (en) | Task script management and control method and device, electronic equipment and storage medium | |
JP2007286860A (en) | Data transfer method and information processing apparatus | |
CN107153660B (en) | Fault detection processing method and system for distributed database system | |
KR20130038517A (en) | System and method for managing data using distributed containers | |
JP2009021788A (en) | Information storage system | |
JP5862246B2 (en) | Data management program, data management method, and storage apparatus | |
CN111630500B (en) | Information distributed storage system, method, and program | |
JP2013025765A (en) | Master/slave system, control device, master/slave switching method and master/slave switching program | |
JP2015106377A (en) | Information processor, information processing method, and information processing program | |
JP5956940B2 (en) | Redundant system and working machine determination method | |
CN104572754B (en) | A kind of Database Systems, Database Systems access method and device | |
JP4042783B2 (en) | Information storage system | |
CN116662040B (en) | A message distribution method, device, electronic equipment and storage medium | |
KR20130043823A (en) | Distributed storage system for maintaining data consistency based on log, and method for the same | |
JP2014106785A (en) | Computer | |
WO2013073022A1 (en) | Computer system and fault detection method | |
CN112398694B (en) | Flow detection system, method and storage medium | |
US20150347239A1 (en) | Global backup lock manager | |
JP6091449B2 (en) | Control system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110113 |
|
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: 20120828 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120829 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150907 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |