JP6200387B2 - Redundant system and replication method - Google Patents

Redundant system and replication method Download PDF

Info

Publication number
JP6200387B2
JP6200387B2 JP2014164431A JP2014164431A JP6200387B2 JP 6200387 B2 JP6200387 B2 JP 6200387B2 JP 2014164431 A JP2014164431 A JP 2014164431A JP 2014164431 A JP2014164431 A JP 2014164431A JP 6200387 B2 JP6200387 B2 JP 6200387B2
Authority
JP
Japan
Prior art keywords
server
master
shared
slave
replication
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
JP2014164431A
Other languages
Japanese (ja)
Other versions
JP2016040675A (en
Inventor
信一 河村
信一 河村
秋山 悟
悟 秋山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2014164431A priority Critical patent/JP6200387B2/en
Publication of JP2016040675A publication Critical patent/JP2016040675A/en
Application granted granted Critical
Publication of JP6200387B2 publication Critical patent/JP6200387B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、マスタ‐スレーブの冗長化システム、およびレプリケーション方法に関する。   The present invention relates to a master-slave redundancy system and a replication method.

マスタ/スレーブの2重化の冗長構成のDB(データベース)システムにおいて、2重故障対策を実施する場合、3重化(マスタ/スレーブ/スレーブ)の冗長構成とする場合と、N+1(予備機)構成とすることが考えられる。   In a DB / database system with a redundant configuration of master / slave, when double countermeasures are implemented, a redundant configuration of triple (master / slave / slave) and N + 1 (spare unit) It is conceivable to have a configuration.

また、特許文献1には、マスタ/スレーブの2重化の冗長構成において、DBの差分情報を記憶するために必要な記憶領域の肥大化を防ぐ技術が開示されている。   Patent Document 1 discloses a technique for preventing an enlargement of a storage area necessary for storing DB difference information in a master / slave redundant configuration.

特開2013-171483号公報JP 2013-171483 A

3重化(マスタ/スレーブ/スレーブ)の冗長構成とする場合、図8に示すように、ファミリー毎に分散されたDBシステムにおいては、ファミリー毎にスレーブが必要となるため、スレーブの構築費用が増大するという問題がある。   In the case of a triple (master / slave / slave) redundant configuration, as shown in FIG. 8, in the DB system distributed for each family, a slave is required for each family. There is a problem of increasing.

また、N+1構成とする場合、図9に示すように、ファミリー#1のスレーブが故障して、故障発生後に予備機をスレーブとしてファミリー#1に組み込むための作業が発生し、時間と操作負荷を要するという問題がある。なお、予備機をファミリー#1に組み込むため作業としては、マスタのデータのレプリケーション作業、IPアドレスなどの所データの設定作業などがある。   Further, in the case of the N + 1 configuration, as shown in FIG. 9, the slave of the family # 1 fails, and after the failure occurs, work for incorporating the spare machine into the family # 1 as a slave occurs. There is a problem that it takes. The work for incorporating the spare machine into the family # 1 includes a master data replication work, a place data setting work such as an IP address, and the like.

本発明は、上記の事情に鑑みなされたものであって、本発明の目的は、冗長化システムの構築費用を削減するとともに、2重故障時でも処理を止めることなく運用することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to reduce the construction cost of a redundant system and to operate without stopping processing even in the case of a double failure.

上記の課題を解決するために、本発明は、冗長化システムであって、複数の冗長化サブシステムと、共用DBサーバとを備え、各冗長化サブシステムは、マスタDBサーバと、第1スレーブDBサーバとを備え、前記共用DBサーバは、前記複数の冗長化サブシステムで共用する第2スレーブDBサーバであり、各冗長化サブシステムのマスタDBサーバは、当該マスタDBサーバが備えるマスタDBへの更新が発生した場合、第1スレーブDBサーバおよび前記共用DBサーバへのレプリケーションを行い、前記冗長化サブシステムのマスタDBサーバおよび第1スレーブDBサーバが故障した場合、前記共用DBサーバが当該冗長化サブシステムのマスタDBサーバとして動作するとともに、他の冗長化サブシステムからの当該共用DBサーバへのレプリケーションを停止する。 In order to solve the above problems, the present invention is a redundant system comprising a plurality of redundant subsystems and a shared DB server, wherein each redundant subsystem includes a master DB server and a first slave. The shared DB server is a second slave DB server shared by the plurality of redundant subsystems, and the master DB server of each redundant subsystem is transferred to the master DB included in the master DB server. If the update has occurred, have rows replication to the first slave DB server and the shared DB server, if the master DB server and the first slave DB server of the redundant sub-system fails, the shared DB server the Operates as a master DB server of a redundant subsystem and the shared DB from other redundant subsystems To stop the replication of the over server.

本発明は、複数の冗長化サブシステムと、共用DBサーバとを備える冗長化システムが行うレプリケーション方法であって、各冗長化サブシステムは、マスタDBサーバと、第1スレーブDBサーバとを備え、前記共用DBサーバは、各冗長化サブシステムで共用する第2スレーブDBサーバであり、各冗長化サブシステムのマスタDBサーバは、前記マスタDBサーバへの更新を行う更新ステップと、第1スレーブDBサーバおよび前記共用DBサーバへのレプリケーションを行うレプリケーションステップと、を行い、前記冗長化サブシステムのマスタDBサーバおよび第1スレーブDBサーバが故障した場合、前記共用DBサーバは、当該冗長化サブシステムをマスタDBサーバとして切り替える切替ステップと、他の冗長化サブシステムからの当該共用DBサーバへのレプリケーションを停止する停止ステップと、を行う。 The present invention is a replication method performed by a redundant system comprising a plurality of redundant subsystems and a shared DB server, each redundant subsystem comprising a master DB server and a first slave DB server, The shared DB server is a second slave DB server shared by each redundant subsystem, and the master DB server of each redundant subsystem includes an update step for updating to the master DB server , and a first slave DB There lines and replication step, the performing replication to the server and the shared DB server, if the master DB server and the first slave DB server of the redundant sub-system fails, the shared DB server, the redundant subsystem Switching step to switch as a master DB server and other redundant subsystems A stop step of stopping the replication to the shared DB server from beam, is carried out.

本発明によれば、冗長化システムの構築費用を削減することができるとともに、2重故障時でも処理を止めることなく運用することができる。   According to the present invention, it is possible to reduce the construction cost of a redundant system and to operate without stopping processing even in the case of a double failure.

本発明の実施形態の冗長化システムの全体構成図である。1 is an overall configuration diagram of a redundant system according to an embodiment of the present invention. マスタDBサーバ構成を示すブロック図である。It is a block diagram which shows a master DB server structure. 第1スレーブDBサーバの構成を示すブロック図である。It is a block diagram which shows the structure of a 1st slave DB server. 共用DBサーバの構成を示すブロック図である。It is a block diagram which shows the structure of a shared DB server. 通常時の冗長化システムの動作を説明するための図である。It is a figure for demonstrating operation | movement of the redundancy system at the time of normal. 片系故障時の冗長化システムの動作を説明するための図である。It is a figure for demonstrating operation | movement of the redundancy system at the time of a one-system failure. 2重故障時の冗長化システムの動作を説明するための図である。It is a figure for demonstrating operation | movement of the redundancy system at the time of a double failure. 3重化(マスタ/スレーブ/スレーブ)の冗長構成を示す図である。It is a figure which shows the redundant structure of triple (master / slave / slave). N+1の冗長構成を示す図である。It is a figure which shows the redundant structure of N + 1.

以下、本発明の実施の形態を、図面を参照して説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本実施形態のDBサーバシステム(冗長化システム)の全体構成図である。   FIG. 1 is an overall configuration diagram of a DB server system (redundant system) of this embodiment.

図示するDBサーバシステムは、複数のファミリー#1、#2、#3(複数の冗長化サブシステム)1、2、3と、共用DBサーバ4とを備え、ファミリー毎にDBが分散された分散DBサーバシステムである。   The illustrated DB server system includes a plurality of families # 1, # 2, and # 3 (a plurality of redundant subsystems) 1, 2, and 3, and a shared DB server 4, and the DB is distributed for each family. This is a DB server system.

各ファミリー1、2、3は、それぞれ対応するSIPサーバ5、6、7(アプリケーションサーバ)の冗長構成のDBとして動作し、マスタDBサーバと、第1スレーブサーバとを備える。図示する例では、ファミリー#1_1は、SIPサーバ5のDBサブシステムであって、マスタDBサーバ11と第1スレーブDBサーバ12とを備える。ファミリー#2_2は、SIPサーバ6のDBサブシステムであって、マスタDBサーバ21と第1スレーブDBサーバ22とを備える。ファミリー#3_3は、SIPサーバ7のDBサブシステムであって、マスタDBサーバ31と第1スレーブDBサーバ32とを備える。   Each family 1, 2, and 3 operates as a redundant DB of the corresponding SIP servers 5, 6, and 7 (application servers), and includes a master DB server and a first slave server. In the illustrated example, the family # 1_1 is a DB subsystem of the SIP server 5 and includes a master DB server 11 and a first slave DB server 12. Family # 2_2 is a DB subsystem of the SIP server 6 and includes a master DB server 21 and a first slave DB server 22. Family # 3_3 is a DB subsystem of the SIP server 7 and includes a master DB server 31 and a first slave DB server 32.

なお、本実施形態では、アプリケーションサーバとして、呼処理を行うSIP(Session Initiation Protocol)サーバ5、6、7を用いることとするが、SIPサーバ5、6、7に限定されるものではない。図示する例では、電話番号に応じてSIPサーバが振り分けられ、各ファミリー1、2、3には対応する電話番号の電話番号情報(加入者情報など)が記憶されているものとする。   In the present embodiment, SIP (Session Initiation Protocol) servers 5, 6, and 7 that perform call processing are used as application servers. However, the application server is not limited to the SIP servers 5, 6, and 7. In the illustrated example, it is assumed that SIP servers are allocated according to telephone numbers, and telephone numbers information (subscriber information, etc.) of corresponding telephone numbers are stored in the families 1, 2, and 3.

共用DBサーバ4は、複数のファミリー1、2、3の第2スレーブDBサーバとして、ネットワーク上に構築される。これにより、各ファミリー1、2、3は、マスタDBサーバと、第1スレーブDBサーバと、第2スレーブDBサーバ(共用DBサーバ4)の3重化の冗長構成となり、2重故障対策を実現することができる。   The shared DB server 4 is constructed on the network as a second slave DB server of a plurality of families 1, 2, and 3. As a result, each family 1, 2, 3 has a triple redundant configuration of the master DB server, the first slave DB server, and the second slave DB server (shared DB server 4), and implements countermeasures against double failures. can do.

図2は、ファミリー#1_1のマスタDBサーバ11の構成を示すブロック図である。図示するマスタDBサーバ11は、宛先解決部110と、更新部111と、レプリケーション部112と、マスタDB113とを備える。   FIG. 2 is a block diagram illustrating a configuration of the master DB server 11 of the family # 1_1. The illustrated master DB server 11 includes a destination resolution unit 110, an update unit 111, a replication unit 112, and a master DB 113.

宛先解決部110は、SIPサーバ5から、電話番号を含む宛先解決要求(データ参照要求)を受信すると、要求された電話番号の電話番号情報をマスタDB113から読み出し、SIPサーバ5に送信する。更新部111は、SIPサーバ5から、データ更新要求を受信すると、マスタDB113の要求されたデータを更新する。   Upon receiving a destination resolution request (data reference request) including a telephone number from the SIP server 5, the destination resolution unit 110 reads the telephone number information of the requested telephone number from the master DB 113 and transmits it to the SIP server 5. When receiving the data update request from the SIP server 5, the update unit 111 updates the requested data in the master DB 113.

レプリケーション部112は、更新部111によるマスタDB113のデータ更新処理が発生した場合、当該更新内容を第1スレーブDBサーバ12および共用DBサーバ4に送信し、マスタDB113への更新内容を第1および第2スレーブDBに反映させるレプリケーション(同期処理)を行う。これにより、マスタDB113と、第1および第2スレーブDBとが常に同期した状態になる。マスタDB113は、元となるオリジナルデータが格納されるDBである。   When the data update process of the master DB 113 by the update unit 111 occurs, the replication unit 112 transmits the update content to the first slave DB server 12 and the shared DB server 4, and updates the update content to the master DB 113 to the first and first 2. Perform replication (synchronization processing) to be reflected in the slave DB. Thereby, the master DB 113 and the first and second slave DBs are always synchronized. The master DB 113 is a DB that stores original original data.

なお、ファミリー#2_2およびファミリー#3のマスタDBサーバ21、31は、図2に示すマスタDBサーバ11と同様であるため、ここでは説明を省略する。   The master DB servers 21 and 31 of the family # 2_2 and the family # 3 are the same as the master DB server 11 shown in FIG.

図3は、ファミリー#1_1の第1スレーブDBサーバ12の構成を示すブロック図である。図示する第1スレーブDBサーバ12は、宛先解決部120と、更新部121と、レプリケーション部122と、第1スレーブDB123とを備える。   FIG. 3 is a block diagram illustrating a configuration of the first slave DB server 12 of the family # 1_1. The illustrated first slave DB server 12 includes a destination resolution unit 120, an update unit 121, a replication unit 122, and a first slave DB 123.

宛先解決部120および更新部121は、マスタDBサーバ11の宛先解決部110および更新部111と同様である。なお、宛先解決部120および更新部121は、通常時においては動作しない。第1スレーブDBサーバ12は、マスタDBサーバ11が故障し、自身がマスタDBサーバとして動作する場合に、宛先解決部120および更新部121を起動する。   The destination resolution unit 120 and the update unit 121 are the same as the destination resolution unit 110 and the update unit 111 of the master DB server 11. Note that the destination resolution unit 120 and the update unit 121 do not operate during normal times. The first slave DB server 12 activates the destination resolution unit 120 and the update unit 121 when the master DB server 11 fails and operates as a master DB server.

レプリケーション部122は、マスタDBサーバ11のレプリケーション部112から送信される更新データを受信し、第1スレーブDB123をマスタDB113と同期させるように、第1スレーブDB123を更新する。第1スレーブDB123は、マスタDB113のレプリカ(複製データ)が格納されるDBである。   The replication unit 122 receives the update data transmitted from the replication unit 112 of the master DB server 11 and updates the first slave DB 123 so that the first slave DB 123 is synchronized with the master DB 113. The first slave DB 123 is a DB in which a replica (replicated data) of the master DB 113 is stored.

なお、ファミリー#2_2およびファミリー#3_3の第1スレーブDBサーバ22、32は、図3に示す第1スレーブDBサーバ12と同様であるため、ここでは説明を省略する。   Note that the first slave DB servers 22 and 32 of the family # 2_2 and family # 3_3 are the same as the first slave DB server 12 shown in FIG.

図4は、共用DBサーバ4の構成を示すブロック図である。図示する共用DBサーバ4は、宛先解決部40と、更新部41と、レプリケーション部42と、レプリケーション要求部43と、マスタ切替部44と、共用DB45とを備える。   FIG. 4 is a block diagram showing the configuration of the shared DB server 4. The shared DB server 4 shown includes a destination resolution unit 40, an update unit 41, a replication unit 42, a replication request unit 43, a master switching unit 44, and a shared DB 45.

宛先解決部40および更新部41は、マスタDBサーバ11の宛先解決部110と、更新部111と同様である。なお、1台のサーバで複数ファミリーの共用第2スレーブとして使用するため、リソースの枯渇を回避する必要があることから、宛先解決部40および更新部41は、通常時においては動作しない。共用DBサーバ4は、マスタDBサーバ11および第1スレーブDBサーバ12が故障し、自身がマスタDBサーバとして動作する場合に、宛先解決部40および更新部41を起動する。   The destination resolution unit 40 and the update unit 41 are the same as the destination resolution unit 110 and the update unit 111 of the master DB server 11. Since one server is used as a shared second slave of a plurality of families, it is necessary to avoid resource depletion. Therefore, the destination resolving unit 40 and the updating unit 41 do not operate during normal times. The shared DB server 4 activates the destination resolution unit 40 and the update unit 41 when the master DB server 11 and the first slave DB server 12 fail and operate as a master DB server.

レプリケーション部122は、マスタDBサーバ11のレプリケーション部112から送信される更新データを受信し、共用DB45のファミリー#1用データをマスタDB113と同期させるように、共用DB45のファミリー#1用データを更新する。   The replication unit 122 receives the update data transmitted from the replication unit 112 of the master DB server 11 and updates the family # 1 data of the shared DB 45 so as to synchronize the family # 1 data of the shared DB 45 with the master DB 113. To do.

レプリケーション要求部43は、所定の時間、マスタDBサーバからのレプリケーションがない場合に、当該マスタDBサーバにレプリケーション要求を送信する。マスタ切替部44は、あるファミリーにおいて、マスタDBサーバおよび第1スレーブDBサーバの2重故障が発生した場合、自身が当該ファミリーのマスタDBサーバとして動作するよう切り替える。   The replication request unit 43 transmits a replication request to the master DB server when there is no replication from the master DB server for a predetermined time. When a double failure occurs in the master DB server and the first slave DB server in a certain family, the master switching unit 44 switches itself so that it operates as a master DB server of the family.

共用DB45は、全てのファミリーが共用する第2スレーブDBであって、図示する共用DB45には、ファミリー#1のマスタDB113のレプリカ(複製データ)であるファミリー#1用データと、ファミリー#2のマスタDBのレプリカであるファミリー#2用データと、ファミリー#3のマスタDBのレプリカであるファミリー#3用データとが格納される。   The shared DB 45 is a second slave DB shared by all families. The shared DB 45 shown in the figure includes data for the family # 1, which is a replica (replicated data) of the master DB 113 of the family # 1, and the family # 2. Data for family # 2, which is a replica of the master DB, and data for family # 3, which is a replica of the master DB of family # 3, are stored.

上記説明した、マスタDBサーバ11、21、31、第1スレーブDBサーバ12、22、32および共用DBサーバ4は、例えば、CPUと、メモリと、ハードディスク等の外部記憶装置と、入力装置と、出力装置とを備えた汎用的なコンピュータシステムを用いることができる。このコンピュータシステムにおいて、CPUがメモリ上にロードされた所定のプログラムを実行することにより、各部の各機能が実現される。例えば、マスタDBサーバ、第1スレーブDBサーバおよび共用DBサーバの各機能は、マスタDBサーバ用のプログラムの場合はマスタDBサーバのCPUが、第1スレーブDBサーバ用のプログラムの場合は第1スレーブDBサーバのCPUが、そして、共用DBサーバ用のプログラムの場合は共用DBサーバのCPUがそれぞれ実行することにより実現される。   The master DB servers 11, 21, 31, the first slave DB servers 12, 22, 32 and the shared DB server 4 described above include, for example, a CPU, a memory, an external storage device such as a hard disk, an input device, A general-purpose computer system including an output device can be used. In this computer system, each function of each unit is realized by the CPU executing a predetermined program loaded on the memory. For example, the functions of the master DB server, the first slave DB server, and the shared DB server are as follows: the master DB server CPU in the case of the master DB server program, and the first slave in the case of the first slave DB server program. This is realized by executing the CPU of the DB server and, in the case of a program for the shared DB server, the CPU of the shared DB server.

また、マスタDBサーバ用のプログラム、第1スレーブDBサーバ用のプログラムおよび共用DBサーバ用のプログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD−ROMなどのコンピュータ読取り可能な記録媒体に記憶することも、ネットワークを介して配信することもできる。   The master DB server program, the first slave DB server program, and the shared DB server program are stored in a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD-ROM. Or distributed over a network.

次に、本実施形態の動作について説明する。   Next, the operation of this embodiment will be described.

図5は、本実施形態の通常時の動作を説明するための図である。図示する例では、ファミリー#1において、データ更新処理が発生した場合を例に説明する。   FIG. 5 is a diagram for explaining the normal operation of the present embodiment. In the illustrated example, a case where data update processing occurs in the family # 1 will be described as an example.

マスタDBサーバ11の更新部111は、SIPサーバ5からのデータ更新要求を受信すると、マスタDB113を更新する(S11)。そして、レプリケーション部112は、第1スレーブDBサーバ12へのレプリケーションを行うとともに(S12)、共用DBサーバ4へのレプリケーションを行う(S13)。すなわち、マスタDB113への更新内容を第1スレーブDB123および共用DB45(ファミリー#1用の第2スレーブDB)に反映させるために、更新内容を含むレプリケーション指示を送信する。   When receiving the data update request from the SIP server 5, the update unit 111 of the master DB server 11 updates the master DB 113 (S11). The replication unit 112 performs replication to the first slave DB server 12 (S12) and replication to the shared DB server 4 (S13). That is, in order to reflect the update contents to the master DB 113 in the first slave DB 123 and the shared DB 45 (second slave DB for family # 1), a replication instruction including the update contents is transmitted.

これにより、第1スレーブDBサーバ12のレプリケーション部122は、マスタDBサーバ11から送信された更新内容に基づいて、第1スレーブDB123を更新する。また、共用DBサーバ4のレプリケーション部42は、マスタDBサーバ11から送信された更新内容に基づいて、共用DB45を更新する。このような処理により、マスタDB113と、第1スレーブDB123と、第2スレーブDBである共用DB45とが同期される。   Thereby, the replication unit 122 of the first slave DB server 12 updates the first slave DB 123 based on the update content transmitted from the master DB server 11. Further, the replication unit 42 of the shared DB server 4 updates the shared DB 45 based on the update content transmitted from the master DB server 11. By such processing, the master DB 113, the first slave DB 123, and the shared DB 45 that is the second slave DB are synchronized.

また、共用DBサーバ4のレプリケーション要求部43は、所定の時間、マスタDBサーバ11からのレプリケーション指示を受信しない場合、自律的にマスタDBサーバ11にレプリケーション要求を送信する(S14)。   Further, when the replication request unit 43 of the shared DB server 4 does not receive a replication instruction from the master DB server 11 for a predetermined time, it autonomously transmits a replication request to the master DB server 11 (S14).

これにより、マスタDBサーバ11のレプリケーション部112は、未送信のレプリケーションがある場合は、レプリケーション指示を共用DBサーバ4に送信する。一方、マスタDBサーバ11からの応答がない場合、共用DBサーバ4のレプリケーション要求部43は、マスタDBサーバ11が故障したこと(障害発生)を検知する。故障検知後の処理については、後述する。   Thereby, the replication unit 112 of the master DB server 11 transmits a replication instruction to the shared DB server 4 when there is unsent replication. On the other hand, when there is no response from the master DB server 11, the replication request unit 43 of the shared DB server 4 detects that the master DB server 11 has failed (failure occurs). Processing after failure detection will be described later.

図6は、本実施形態の片系故障時(第1スレーブDBサーバ故障時)の動作を説明するための図である。図示する例では、ファミリー#1の第1スレーブDBサーバ12が故障した場合を例に説明する。   FIG. 6 is a diagram for explaining the operation when a single system failure occurs (when the first slave DB server fails) according to this embodiment. In the illustrated example, a case where the first slave DB server 12 of the family # 1 fails will be described as an example.

第1スレーブDBサーバ12が故障すると(S21)、マスタDBサーバ11は、当該故障を検知し、その後は、マスタDB113および共用DB45(第2スレーブDB)の2重化の冗長構成として動作する。   When the first slave DB server 12 fails (S21), the master DB server 11 detects the failure, and thereafter operates as a redundant redundant configuration of the master DB 113 and the shared DB 45 (second slave DB).

すなわち、その後、マスタDBサーバ11の更新部111は、SIPサーバ5からのデータ更新要求を受信すると、マスタDB113を更新する(S22)。そして、レプリケーション部112は、共用DBサーバ4へのレプリケーションを行う(S23)。すなわち、マスタDB113への更新内容を共用DB45(ファミリー#1用の第2スレーブDB)に反映させるために、更新内容を含むレプリケーション指示を送信する。   That is, after that, when receiving the data update request from the SIP server 5, the update unit 111 of the master DB server 11 updates the master DB 113 (S22). Then, the replication unit 112 performs replication to the shared DB server 4 (S23). That is, in order to reflect the update contents to the master DB 113 in the shared DB 45 (second slave DB for family # 1), a replication instruction including the update contents is transmitted.

これにより、共用DBサーバ4のレプリケーション部42は、マスタDBサーバ11から送信された更新内容に基づいて、共用DB45を更新する。このような処理により、マスタDB113と、第2スレーブDBである共用DB45とが同期される。   Thereby, the replication unit 42 of the shared DB server 4 updates the shared DB 45 based on the update content transmitted from the master DB server 11. By such processing, the master DB 113 and the shared DB 45 that is the second slave DB are synchronized.

図7は、本実施形態の2重故障時(両系故障時)の動作を説明するための図である。図示する例では、ファミリー#1のマスタDBサーバ11および第1スレーブDBサーバ12が故障した場合を例に説明する。   FIG. 7 is a diagram for explaining the operation at the time of double failure (during both system failures) according to the present embodiment. In the illustrated example, a case where the master DB server 11 and the first slave DB server 12 of the family # 1 have failed will be described as an example.

マスタDBサーバ11および第1スレーブDBサーバ12がともに故障する(S31、S32)。これにより、共用DBサーバ4には、所定の時間、マスタDBサーバ11からのレプリケーション指示が送信されない状態となるため、共用DBサーバ4のレプリケーション要求部43は、マスタDBサーバ11にレプリケーション要求を送信する(S33)。   Both the master DB server 11 and the first slave DB server 12 fail (S31, S32). As a result, since the replication instruction from the master DB server 11 is not transmitted to the shared DB server 4 for a predetermined time, the replication request unit 43 of the shared DB server 4 transmits a replication request to the master DB server 11. (S33).

この場合、マスタDBサーバ11および第1スレーブDBサーバ12が故障しているため、S33のレプリケーション要求に対する応答が無いため、レプリケーション要求部43は、マスタDBサーバ11および第1スレーブDBサーバ12の両系が故障中であることを検知する。   In this case, since the master DB server 11 and the first slave DB server 12 are out of order and there is no response to the replication request in S33, the replication request unit 43 is connected to both the master DB server 11 and the first slave DB server 12. Detect that the system is in failure.

故障を検知した場合、マスタ切替部44は、当該共用DBサーバ4をファミリー#1のマスタDBサーバ11として動作するように切り替える(S34)。すなわち、マスタDBサーバへ格上げするために、宛先解決部40および更新部41を起動する。   When a failure is detected, the master switching unit 44 switches the shared DB server 4 to operate as the master DB server 11 of the family # 1 (S34). That is, in order to upgrade to the master DB server, the destination resolution unit 40 and the update unit 41 are activated.

また、マスタ切替部44は、他のファミリー#2、#3のマスタDBサーバ21、31に、当該共用DBサーバ4がファミリー#1のマスタDBサーバとして動作することを通知し、他のファミリー#2、#3から共用DBサーバ4に対するアクセスを禁止する(S35)。他のファミリー#2、#3のマスタDBサーバ21、31は、共用DBサーバ4からの当該通知を受信すると、共用DBサーバ4(第2スレーブDB)へのレプリケーションを停止する。これにより、共用DBサーバ4が、マスタDBサーバとして動作することによるリソースの枯渇を回避することができる。   In addition, the master switching unit 44 notifies the master DB servers 21 and 31 of the other families # 2 and # 3 that the shared DB server 4 operates as the master DB server of the family # 1. 2, access to the shared DB server 4 from # 3 is prohibited (S35). When the master DB servers 21 and 31 of the other families # 2 and # 3 receive the notification from the shared DB server 4, the replication to the shared DB server 4 (second slave DB) is stopped. Thereby, it is possible to avoid resource depletion due to the shared DB server 4 operating as a master DB server.

また、マスタ切替部44は、対応するSIPサーバ5に当該共用DBサーバ4がファミリー#1のマスタDBサーバとして動作することを通知する。これにより、SIPサーバ5は、宛先解決要求およびデータ更新要求を共用DBサーバ4に送信する。宛先解決部40は、SIPサーバ5からの宛先解決要求を受信し、共用DB45に格納されたファミリー#1用のデータを参照し、当該宛先解決要求で指定された電話番号に関する情報を読み出し、SIPサーバ5に送信する。また、更新部41は、SIPサーバ5からのデータ更新要求を受信すると、共用DB45のファミリー#1用のデータを更新する(S36)。   In addition, the master switching unit 44 notifies the corresponding SIP server 5 that the shared DB server 4 operates as a master DB server of family # 1. As a result, the SIP server 5 transmits a destination resolution request and a data update request to the shared DB server 4. The destination resolution unit 40 receives the destination resolution request from the SIP server 5, refers to the data for family # 1 stored in the shared DB 45, reads out information related to the telephone number specified in the destination resolution request, Send to server 5. Further, when receiving the data update request from the SIP server 5, the updating unit 41 updates the data for family # 1 in the shared DB 45 (S36).

なお、2重故障の復旧後は、共用DBサーバ4のマスタ切替部44は、自身をマスタDBサーバから共用DBサーバに切り替え、宛先解決部40および更新部41を停止する。また、マスタ切替部44は、アクセスを禁止していた他のファミリー#2、#3に、自身が共用DBサーバ4としての動作を再開したこと(アクセスの再開)を通知する。これにより、他のファミリー#2、#3のマスタDBサーバ21、31は、アクセスが禁止されていた期間のレプリケーションを共用DBサーバ4に対して行い、マスタDBと共用DB45(第2スレーブDB)とを同期させる。   After the double failure is recovered, the master switching unit 44 of the shared DB server 4 switches itself from the master DB server to the shared DB server, and stops the destination resolution unit 40 and the update unit 41. Further, the master switching unit 44 notifies the other families # 2 and # 3 that have been prohibited from accessing that the operation as the shared DB server 4 has been resumed (resumption of access). As a result, the master DB servers 21 and 31 of the other families # 2 and # 3 perform replication during the period during which access is prohibited to the shared DB server 4, and the master DB and the shared DB 45 (second slave DB). Synchronize with.

以上説明した本実施形態では、1台のDBサーバ4を複数ファミリーの共用第2スレーブサーバとして利用させることにより、2重化(マスタ/スレーブ)の冗長構成をとっているDBサーバシステムにおいて、冗長構成の効率化を実現することができる。すなわち、冗長化システムの構築費用を削減することができるとともに、マスタ/スレーブの2重故障が発生した場合であっても、処理を停止させることなく運用することができる。   In the present embodiment described above, redundancy is achieved in a DB server system having a redundant configuration (master / slave) by using one DB server 4 as a shared second slave server of a plurality of families. The efficiency of the configuration can be realized. That is, the construction cost of the redundant system can be reduced, and even if a master / slave double failure occurs, it can be operated without stopping the processing.

また、本実施形態では、常時、各ファミリーのマスタDBサーバは、共用DBサーバ4へのレプリケーションを行い、マスタDBと共用DBとを同期させている。このため、本実施形態では、故障発生後に、マスタDBのデータを共用DBにレプリケーションする処理が不要であり、迅速に、共用DBサーバ4をマスタDBサーバに切り替えることができる。すなわち、常時行われているマスタDBサーバからのレプリケーションによりバックアップを取得しているため、故障時の組み込み設定が不要である。   Moreover, in this embodiment, the master DB server of each family always performs replication to the shared DB server 4 to synchronize the master DB and the shared DB. For this reason, in this embodiment, the process of replicating the data in the master DB to the shared DB is not required after a failure occurs, and the shared DB server 4 can be quickly switched to the master DB server. In other words, since the backup is acquired by the replication from the master DB server that is always performed, there is no need for the built-in setting at the time of failure.

また、本実施形態では、マスタ/スレーブの2重故障発生時においても、共用DBサーバ4をマスタDBサーバに格上げすることにより、アプリケーション処理を中断させることなく安定した運用を継続することができる。   Further, in the present embodiment, even when a master / slave double failure occurs, stable operation can be continued without interrupting application processing by upgrading the shared DB server 4 to a master DB server.

なお、本発明は上記実施形態に限定されるものではなく、特許請求の範囲内において、種々変更・応用が可能である。   In addition, this invention is not limited to the said embodiment, A various change and application are possible within a claim.

11、21、31:マスタDBサーバ
12、22、32:第1スレーブDBサーバ
110、120 :宛先解決部
111、121:更新部
112、122:レプリケーション部
113:マスタDB
123:第1スレーブDB
4 :共用DBサーバ
40 :宛先解決部
41 :更新部
42 :レプリケーション部
43 :レプリケーション要求部
44 :マスタ切替部
45 :共用DB
11, 21, 31: Master DB server 12, 22, 32: First slave DB server 110, 120: Destination resolution unit 111, 121: Update unit 112, 122: Replication unit 113: Master DB
123: First slave DB
4: Shared DB server 40: Destination resolution unit 41: Update unit 42: Replication unit 43: Replication request unit 44: Master switching unit 45: Shared DB

Claims (6)

冗長化システムであって、
複数の冗長化サブシステムと、共用DBサーバとを備え、
各冗長化サブシステムは、マスタDBサーバと、第1スレーブDBサーバとを備え、
前記共用DBサーバは、前記複数の冗長化サブシステムで共用する第2スレーブDBサーバであり、
各冗長化サブシステムのマスタDBサーバは、当該マスタDBサーバが備えるマスタDBへの更新が発生した場合、第1スレーブDBサーバおよび前記共用DBサーバへのレプリケーションを行い、
前記冗長化サブシステムのマスタDBサーバおよび第1スレーブDBサーバが故障した場合、前記共用DBサーバが当該冗長化サブシステムのマスタDBサーバとして動作するとともに、他の冗長化サブシステムからの当該共用DBサーバへのレプリケーションを停止すること
を特徴とする冗長化システム。
A redundant system,
A plurality of redundant subsystems and a shared DB server;
Each redundant subsystem includes a master DB server and a first slave DB server,
The shared DB server is a second slave DB server shared by the plurality of redundant subsystems;
Master DB server of each redundant subsystem, if the update to the master DB of the master DB server comprises occurs, have rows replication to the first slave DB server and the shared DB server,
When the master DB server and the first slave DB server of the redundant subsystem fail, the shared DB server operates as the master DB server of the redundant subsystem and the shared DB from other redundant subsystems. A redundant system characterized by stopping replication to the server .
請求項1記載の冗長化システムであって、
前記冗長化サブシステムの第1スレーブDBサーバが故障した場合、当該冗長化サブシステムのマスタDBサーバは、前記共用DBサーバのみにレプリケーションを行うこと
を特徴とする冗長化システム。
The redundant system according to claim 1 , wherein
When the first slave DB server of the redundant subsystem fails, the master DB server of the redundant subsystem replicates only to the shared DB server.
請求項1または2記載の冗長化システムであって、
前記共用DBサーバは、所定の時間、マスタDBサーバからのレプリケーションがない場合、当該マスタDBサーバにレプリケーション要求を送信すること
を特徴とする冗長化システム。
The redundancy system according to claim 1 or 2 ,
The redundant system, wherein the shared DB server transmits a replication request to the master DB server when there is no replication from the master DB server for a predetermined time.
複数の冗長化サブシステムと、共用DBサーバとを備える冗長化システムが行うレプリケーション方法であって、
各冗長化サブシステムは、マスタDBサーバと、第1スレーブDBサーバとを備え、
前記共用DBサーバは、各冗長化サブシステムで共用する第2スレーブDBサーバであり、
各冗長化サブシステムのマスタDBサーバは、
前記マスタDBサーバへの更新を行う更新ステップと、
第1スレーブDBサーバおよび前記共用DBサーバへのレプリケーションを行うレプリケーションステップと、を行い、
前記冗長化サブシステムのマスタDBサーバおよび第1スレーブDBサーバが故障した場合、前記共用DBサーバは、
当該冗長化サブシステムをマスタDBサーバとして切り替える切替ステップと、
他の冗長化サブシステムからの当該共用DBサーバへのレプリケーションを停止する停止ステップと、を行うこと
を特徴とするレプリケーション方法。
A replication method performed by a redundant system including a plurality of redundant subsystems and a shared DB server,
Each redundant subsystem includes a master DB server and a first slave DB server,
The shared DB server is a second slave DB server shared by each redundant subsystem,
The master DB server of each redundant subsystem is
An update step for updating the master DB server ;
And replication step of replicating the first slave DB server and the shared DB server, gastric row,
When the master DB server and the first slave DB server of the redundant subsystem fail, the shared DB server
A switching step of switching the redundant subsystem as a master DB server;
And a stopping step of stopping replication from the other redundant subsystem to the shared DB server .
請求項4記載のレプリケーション方法であって、
前記レプリケーションステップは、前記第1スレーブDBサーバが故障した場合、前記共用DBサーバのみにレプリケーションを行うこと
を特徴とするレプリケーション方法。
The replication method according to claim 4 , wherein
In the replication method, when the first slave DB server fails, replication is performed only on the shared DB server.
請求項4または5記載のレプリケーション方法であって、
前記共用DBサーバは、所定の時間、マスタDBサーバからのレプリケーションがない場合、当該マスタDBサーバにレプリケーション要求を送信する要求ステップをさらに行うこと
を特徴とするレプリケーション方法。
The replication method according to claim 4 or 5 , wherein
The shared DB server further includes a request step of transmitting a replication request to the master DB server when there is no replication from the master DB server for a predetermined time.
JP2014164431A 2014-08-12 2014-08-12 Redundant system and replication method Active JP6200387B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014164431A JP6200387B2 (en) 2014-08-12 2014-08-12 Redundant system and replication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014164431A JP6200387B2 (en) 2014-08-12 2014-08-12 Redundant system and replication method

Publications (2)

Publication Number Publication Date
JP2016040675A JP2016040675A (en) 2016-03-24
JP6200387B2 true JP6200387B2 (en) 2017-09-20

Family

ID=55540993

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014164431A Active JP6200387B2 (en) 2014-08-12 2014-08-12 Redundant system and replication method

Country Status (1)

Country Link
JP (1) JP6200387B2 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07114481A (en) * 1993-10-15 1995-05-02 Nippon Avionics Co Ltd Backup method for plural systems
JP2606107B2 (en) * 1993-12-08 1997-04-30 日本電気株式会社 Processor redundancy
JPH08185330A (en) * 1994-12-28 1996-07-16 Nippon Telegr & Teleph Corp <Ntt> Method for switching redundant computer system
US6973486B2 (en) * 2003-01-31 2005-12-06 Blakeney Kenneth M Alternate server system
US7437598B2 (en) * 2004-12-23 2008-10-14 Xiv Ltd. System, method and circuit for mirroring data
JP4592511B2 (en) * 2005-06-22 2010-12-01 沖電気工業株式会社 IP network server backup system

Also Published As

Publication number Publication date
JP2016040675A (en) 2016-03-24

Similar Documents

Publication Publication Date Title
US11194679B2 (en) Method and apparatus for redundancy in active-active cluster system
KR102145136B1 (en) Data processing method and device
US9569517B1 (en) Fault tolerant distributed key-value storage
CN108345617B (en) Data synchronization method and device and electronic equipment
CN103856357A (en) Stack system fault processing method and stack system
JP2012208896A (en) Disk array device, connection path control method, and connection path control program
JP6083480B1 (en) Monitoring device, fault tolerant system and method
CN113326251B (en) Data management method, system, device and storage medium
JP6200387B2 (en) Redundant system and replication method
JP5716460B2 (en) Cluster system and control method thereof
JP2009265973A (en) Data synchronization system, failure recovery method, and program
JP2008276281A (en) Data synchronization system, method, and program
JP6773345B1 (en) Fault-tolerant systems, servers, and how they operate
JP6237925B2 (en) Cluster system and cluster control method
JP5956940B2 (en) Redundant system and working machine determination method
WO2018230332A1 (en) Distributed processing system and method for management of distributed processing system
JP5636695B2 (en) Fault tolerant system and virtual machine construction method
JP6954693B2 (en) Fault-tolerant systems, servers, how they operate, and programs
JP6093320B2 (en) Distributed processing system
JP5703860B2 (en) Fault tolerant system, memory control method, and program
CN115421971B (en) ETCD disaster recovery fault recovery method and application
JP2010237989A (en) Ha cluster system and clustering method thereof
JP2011159222A (en) Server system and control method thereof
JP6431498B2 (en) Subscriber accommodation device redundancy system, redundancy control device, and redundancy control method
JP2015138987A (en) Communication system and service restoration method in communication system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160916

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170609

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170620

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170809

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170825

R150 Certificate of patent or registration of utility model

Ref document number: 6200387

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150