JP7209784B1 - Redundant system and redundant method - Google Patents
Redundant system and redundant method Download PDFInfo
- Publication number
- JP7209784B1 JP7209784B1 JP2021135452A JP2021135452A JP7209784B1 JP 7209784 B1 JP7209784 B1 JP 7209784B1 JP 2021135452 A JP2021135452 A JP 2021135452A JP 2021135452 A JP2021135452 A JP 2021135452A JP 7209784 B1 JP7209784 B1 JP 7209784B1
- Authority
- JP
- Japan
- Prior art keywords
- server
- switching unit
- unit
- switching
- 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
Abstract
【課題】プロセス単位での切り替えを前提とするソフトウェアを用いつつ、サーバ単位での切り替えを可能にする。【解決手段】冗長化システム100は、主系で動作する第1サーバ10と、従系で動作する第2サーバ20とを備える。第1サーバ10と第2サーバ20とでは、処理機能を実現するプロセスである処理部と、主系と従系との切り替えを実現するプロセスである切替部とが動作する。第2サーバ20における切替部は、第1サーバにおける処理部と切替部との少なくともいずれかに障害が発生すると、第2サーバ20を主系で動作させる。【選択図】図1The present invention enables switching on a server-by-server basis while using software that assumes switching on a process-by-process basis. A redundant system (100) includes a first server (10) operating in a master system and a second server (20) operating in a slave system. In the first server 10 and the second server 20, a processing unit, which is a process for realizing processing functions, and a switching unit, which is a process for realizing switching between the master system and the slave system, operate. The switching unit in the second server 20 causes the second server 20 to operate as the main system when at least one of the processing unit and the switching unit in the first server fails. [Selection drawing] Fig. 1
Description
本開示は、サーバ単位での切替を行う冗長化技術に関する。 The present disclosure relates to redundancy technology for performing switching on a server-by-server basis.
費用面から、現行システムで利用されているソフトウェアを、有償のソフトウェアからOSS(Open Source Software)へ移行させたいという要望がある。例えば、有償のデータベース(以下、DBと書く)を、OSSのDBへ移行させたいという要望がある。 In terms of cost, there is a demand to migrate the software used in current systems from paid software to OSS (Open Source Software). For example, there is a demand to migrate a paid database (hereinafter referred to as DB) to an OSS DB.
オンプレミスで稼働している現行システムは、サーバ単位での切り替えを行う運用が行われていることが多い。OSSを利用した場合には、プロセス単位で切り替えを行う運用になってしまう場合がある。その結果、現行システムの運用を変更しなければならない場合がある。 Current systems operating on-premises are often switched over on a server-by-server basis. When OSS is used, there are cases where switching is performed on a process-by-process basis. As a result, the operation of current systems may have to be changed.
特許文献1には、サーバ単位ではなく、業務単位で待機系に切り替えする分散システムについて記載されている。 Patent Literature 1 describes a distributed system that switches to a standby system not for each server but for each business.
プロセス単位で切り替えを行う運用では、管理が複雑になってしまう。そのため、オンプレミスで稼働しているシステム等の場合には、プロセス単位での切り替えではなく、サーバ単位での切り替えが望まれることがある。しかし、価格面からOSSを選択し、その選択したOSSがプロセス単位で切り替えを行う場合、サーバ単位で切り替えることはできない。
本開示は、プロセス単位での切り替えを前提とするソフトウェアを用いつつ、サーバ単位での切り替えを可能にすることを目的とする。
In the operation of switching by process, management becomes complicated. Therefore, in the case of a system operating on-premises, it may be desirable to switch on a server-by-server basis instead of switching on a process-by-process basis. However, if an OSS is selected from a cost standpoint and the selected OSS performs switching on a process-by-process basis, it is not possible to switch on a server-by-server basis.
An object of the present disclosure is to enable switching in units of servers while using software that assumes switching in units of processes.
本開示に係る冗長化システムは、
主系で動作する第1サーバと、従系で動作する第2サーバとを備える冗長化システムであり、
前記第1サーバと前記第2サーバとでは、処理機能を実現するプロセスである処理部と、主系と従系との切り替えを実現するプロセスである切替部とが動作し、
前記第2サーバにおける前記切替部は、前記第1サーバにおける前記処理部と前記切替部との少なくともいずれかに障害が発生すると、前記第2サーバを主系で動作させる。
The redundant system according to the present disclosure is
A redundant system comprising a first server operating as a master system and a second server operating as a slave system,
In the first server and the second server, a processing unit, which is a process for realizing processing functions, and a switching unit, which is a process for realizing switching between a master system and a slave system, operate,
The switching unit in the second server causes the second server to operate as a main system when at least one of the processing unit and the switching unit in the first server fails.
本開示では、主系で動作する第1サーバにおける処理部と切替部との少なくともいずれかに障害が発生すると、第2サーバを主系で動作させる。これにより、処理部と切替部とをプロセス単位での切り替えを前提とするソフトウェアで実現した場合にも、サーバ単位での切り替えが可能になる。 In the present disclosure, when a failure occurs in at least one of the processing unit and the switching unit in the first server operating as the main system, the second server is operated as the main system. As a result, even when the processing unit and the switching unit are realized by software that assumes switching on a per-process basis, switching on a server-by-server basis is possible.
実施の形態1.
***構成の説明***
図1を参照して、実施の形態1に係る冗長化システム100の構成を説明する。
冗長化システム100は、第1サーバ10と、第2サーバ20と、アプリケーションサーバ30とを備える。
第1サーバ10と第2サーバ20とは、同一の機能を実現したサーバである。実施の形態1では、第1サーバ10と第2サーバ20とは、データベース機能を実現したデータベースサーバであるとする。アプリケーションサーバ30は、仮想IP(Internet
Protocol)アドレスを用いて、第1サーバ10と第2サーバ20とのうち主系で動作する方へアクセスする。実施の形態1では、初期状態においては、第1サーバ10は主系で動作し、第2サーバ20は従系で動作するものとする。
Embodiment 1.
*** Configuration description ***
A configuration of a
A
The
Protocol) address is used to access whichever of the
図2を参照して、実施の形態1に係る第1サーバ10の構成を説明する。
第1サーバ10は、コンピュータである。
第1サーバ10は、プロセッサ11と、メモリ12と、ストレージ13と、通信インタフェース14とのハードウェアを備える。プロセッサ11は、信号線を介して他のハードウェアと接続され、これら他のハードウェアを制御する。
A configuration of the
The
The
第1サーバ10は、機能構成要素として、処理部111と、切替部112と、内部監視部113とが動作する。切替部112は、外部監視部114と、切替実行部115と、障害検知部116とを備える。第1サーバ10の各機能構成要素の機能はソフトウェアにより実現される。
ストレージ13には、第1サーバ10の各機能構成要素の機能を実現するプログラムが格納されている。このプログラムは、プロセッサ11によりメモリ12に読み込まれ、プロセッサ11によって実行される。これにより、第1サーバ10の各機能構成要素の機能が実現される。
In the
The
ストレージ13には、運用スクリプト131が記憶されている。運用スクリプト131は、停止スクリプト132と、昇格スクリプト133と、同期解除スクリプト134とを含む。
An
図3を参照して、実施の形態1に係る第2サーバ20の構成を説明する。
第2サーバ20は、コンピュータである。
第2サーバ20は、プロセッサ21と、メモリ22と、ストレージ23と、通信インタフェース24とのハードウェアを備える。プロセッサ21は、信号線を介して他のハードウェアと接続され、これら他のハードウェアを制御する。
The configuration of the
The
The
第2サーバ20は、機能構成要素として、処理部211と、切替部212と、内部監視部213とが動作する。切替部212は、外部監視部214と、切替実行部215と、障害検知部216とを備える。第2サーバ20の各機能構成要素の機能はソフトウェアにより実現される。
ストレージ23には、第2サーバ20の各機能構成要素の機能を実現するプログラムが格納されている。このプログラムは、プロセッサ21によりメモリ22に読み込まれ、プロセッサ21によって実行される。これにより、第2サーバ20の各機能構成要素の機能が実現される。
In the
The
ストレージ23には、運用スクリプト231が記憶されている。運用スクリプト231は、停止スクリプト232と、昇格スクリプト233と、同期解除スクリプト234とを含む。
An
処理部111及び処理部211は、処理機能を実現するプロセスである。実施の形態1では、処理機能は、データベース機能である。処理機能は、データベース機能に限らず、何らかの業務処理を実現する機能等の他の機能であってもよい。切替部112及び切替部212は、処理部111及び処理部211についての主系と従系との切り替えを実現するプロセスである。内部監視部113及び内部監視部213は、それぞれ切替部112と切替部212とを監視するプロセスである。
処理部111及び切替部112と、処理部211及び切替部212とは、OSSによって実現される。実施の形態1では、処理部111及び処理部211は、PostgreSQLにより実現され、切替部112及び切替部212は、pgpoolにより実現されるものとする。内部監視部113及び内部監視部213は、OSSによって実現されてもよいし、他のソフトウェアによって実現されてもよい。
The
The
プロセッサ11,21は、プロセッシングを行うIC(Integrated Circuit)である。プロセッサ11,21は、具体例としては、CPU(Central
Processing Unit)、DSP(Digital Signal Processor)、GPU(Graphics Processing Unit)である。
The
Processing Unit), DSP (Digital Signal Processor), and GPU (Graphics Processing Unit).
メモリ12,22は、データを一時的に記憶する記憶装置である。メモリ12,22は、具体例としては、SRAM(Static Random Access Memory)、DRAM(Dynamic Random Access Memory)である。
The
ストレージ13,23は、データを保管する記憶装置である。ストレージ13,23は、具体例としては、HDD(Hard Disk Drive)、SSD(Solid State Drive)である。また、ストレージ13,23は、SD(登録商標,Secure Digital)メモリカード、CF(CompactFlash,登録商標)、NANDフラッシュ、フレキシブルディスク、光ディスク、コンパクトディスク、ブルーレイ(登録商標)ディスク、DVD(Digital Versatile Disk)といった可搬記録媒体であってもよい。
The
通信インタフェース14,24は、外部の装置と通信するためのインタフェースである。通信インタフェース14,24は、具体例としては、Ethernet(登録商標)、USB(Universal Serial Bus)のポートである。 Communication interfaces 14 and 24 are interfaces for communicating with external devices. The communication interfaces 14 and 24 are, for example, Ethernet (registered trademark) and USB (Universal Serial Bus) ports.
図2では、プロセッサ11は、1つだけ示されていた。しかし、プロセッサ11は、複数であってもよく、複数のプロセッサ11が、各機能を実現するプログラムを連携して実行してもよい。同様に、図3では、プロセッサ21は、1つだけ示されていた。しかし、プロセッサ21は、複数であってもよく、複数のプロセッサ21が、各機能を実現するプログラムを連携して実行してもよい。
Only one
***動作の説明***
図4から図9を参照して、実施の形態1に係る冗長化システム100の動作を説明する。
実施の形態1に係る冗長化システム100の動作手順は、実施の形態1に係る冗長化方法に相当する。また、実施の形態1に係る冗長化システム100の動作を実現するプログラムは、実施の形態1に係る冗長化プログラムに相当する。
***Description of operation***
The operation of the
The operating procedure of the
冗長化システム100の動作は、第1サーバ10の切替部112に障害が発生した場合の第1障害処理と、第1サーバ10の処理部111に障害が発生した場合の第2障害処理と、第2サーバ20の切替部212に障害が発生した場合の第3障害処理と、第2サーバ20の処理部211に障害が発生した場合の第4障害処理とに分けられる。
The operation of the
図4及び図5を参照して、実施の形態1に係る冗長化システム100の処理の概要を説明する。
処理部111は、切替部112もしくは切替部212から主系で動作するか、従系で動作するかの指示を受け、切り替えが行われる。同様に、処理部211は、切替部212もしくは切替部112から主系で動作するか、従系で動作するかの指示を受け、切り替えが行われる。また、切替部112は、主系で動作しているか、従系で動作しているかを切り替える。同様に、切替部212は、主系で動作しているか、従系で動作しているかを切り替える。
図4に示すように、アプリケーションサーバ30は、切替部112及び切替部212のうち主系で動作している方を介して、処理部111及び処理部211のうち主系で動作している方にアクセスする。
An overview of the processing of the
The
As shown in FIG. 4, the
ここで、処理部111は、切替部112とは独立して、主系で動作しているか、従系で動作しているかの切り替えが行われる。同様に、処理部211は、切替部212とは独立して、主系で動作しているか、従系で動作しているかの切り替えが行われる。また、切替部112は、処理部111とは独立して、主系で動作しているか、従系で動作しているかを切り替える。同様に、切替部212は、処理部211とは独立して、主系で動作しているか、従系で動作しているかを切り替える。
つまり、処理部111及び切替部112と、処理部211及び切替部212とは、プロセス単位での主系と従系との切り替えを行う。PostgreSQL及びpgpoolでは、このような制御が実装されている。
Here, the
That is, the
したがって、何の制御もしなければ、図5に示すように、アプリケーションサーバ30が、切替部212を介して、処理部111にアクセスする状態も起こり得る。実施の形態1に係る冗長化システム100は、アプリケーションサーバ30が、切替部112を介して処理部111にアクセスする状態と、切替部212を介して処理部211にアクセスする状態とのいずれかになるように制御する。つまり、実施の形態1に係る冗長化システム100は、処理部111と切替部112との両方が主系で動作している状態と、処理部211と切替部212との両方が主系で動作している状態とのいずれかになるように制御する。
処理部111と切替部112との両方が主系で動作している場合には、第1サーバ10が主系で動作していると言う。同様に、処理部211と切替部212との両方が主系で動作している場合には、第2サーバ20が主系で動作していると言う。
Therefore, without any control, the
When both the
図6を参照して、実施の形態1に係る第1障害処理を説明する。
第1サーバ10の切替部112に障害が発生する(ステップS10)。
The first failure processing according to the first embodiment will be described with reference to FIG.
A failure occurs in the
(ステップS11:第1障害検知処理)
第2サーバ20の切替部212は、第1サーバ10の切替部112に障害が発生したことを検知する。切替部212は、切替部112に障害が発生したことを検知すると主系として動作する。
具体的には、第1サーバ10の切替部112における外部監視部114と、第2サーバ20の切替部212における外部監視部214とは、互いに状態を知らせる情報を定期的に送信しあうハートビート通信を行っている。ここでは、外部監視部114は、処理部111及び切替部112の状態を示す第1状態情報を切替部212に送信し、外部監視部214は、処理部211及び切替部212の状態を示す第2状態情報を切替部112に送信している。切替部112に障害が発生すると、外部監視部114から第1状態情報が送信されなくなる。外部監視部214は、基準時間以上に渡って第1状態情報の送信が途絶えた場合に、切替部112に障害が発生したと判定する。
第1障害検知処理はpgpoolに予め実装された機能により実現される。
(Step S11: first failure detection process)
The
Specifically, the
The first failure detection process is realized by a function pre-implemented in pgpool.
(ステップS12:停止処理)
第2サーバ20の切替部212は、運用スクリプト231における停止スクリプト232を起動して、第1サーバ10の処理部111を停止させる。
具体的には、停止スクリプト232は、プログラムを停止させる停止コマンドを発行するスクリプトである。第2サーバ20の切替部212における切替実行部215は、第1サーバ10の処理部111を指定して、停止スクリプト232を実行することにより、処理部111を停止させる。
処理部111及び処理部211がPostgreSQLにより実現される場合には、処理部111又は処理部211を停止させる停止コマンドは、「${PGPATH%/}/pg_ctl stop-D${PGDATA}である。${PGPATH}は、停止させるデータベース機能のフォルダのパスである。したがって、ここでは、${PGPATH}は、処理部111のプログラムが記憶されたフォルダのパスである。
(Step S12: stop processing)
The
Specifically, the
When the
(ステップS13:第2障害検知処理)
第2サーバ20の切替部212は、第1サーバ10の処理部111に障害が発生したことを検知する。
具体的には、第2サーバ20の切替部212における障害検知部216は、第1サーバ10の処理部111の状態を監視している。障害検知部216は、ステップS12の処理で処理部111が停止されると、処理部111に障害が発生したと検知する。
第2障害検知処理はpgpoolに予め実装された機能により実現される。
(Step S13: second failure detection process)
The
Specifically, the
The second failure detection process is realized by a function pre-implemented in pgpool.
(ステップS14:昇格処理)
第2サーバ20の切替部212は、運用スクリプト231における昇格スクリプト233を起動して、第2サーバ20の処理部211を主系に昇格させる。
具体的には、昇格スクリプト233は、処理部111又は処理部211を主系に昇格させる昇格コマンドを発行するスクリプトである。第2サーバ20の切替部212における切替実行部215は、第2サーバ20の処理部211を指定して、昇格スクリプト233を実行することにより、処理部211を主系に昇格させる。
処理部111及び処理部211がPostgreSQLにより実現される場合には、昇格コマンドは、「${PGPATH%/}/pg_ctl“promote-D”${new_master_node_pgdata}」である。${new_master_node_pgdata}は、昇格させるデータベース機能のフォルダのパスである。したがって、ここでは、${new_master_node_pgdata}は、処理部211のプログラムが記憶されたフォルダのパスである。
(Step S14: promotion process)
The
Specifically, the
When the
ステップS11の処理で、切替部212が主系になり、ステップS14の処理で、処理部211が主系になる。その結果、第2サーバ20が主系で動作する状態になる。つまり、主系で動作するサーバが第1サーバ10から第2サーバ20に切り替わる。
処理機能がデータベースの場合、同期処理は、予め実装された機能(PostgreSQL)により実現され、従系で稼働している間、主系のデータを同期している。従系であれば読み込みしかできないが、昇格スクリプトを実行することにより主系に昇格するため、読み込みに加えて書き込みが可能となる。
In the processing of step S11, the
When the processing function is a database, the synchronous processing is realized by a pre-implemented function (PostgreSQL), synchronizing the master data while the slave system is running. If it is a slave system, it can only read, but by executing the promotion script, it will be promoted to the master system, so it will be possible to write in addition to reading.
図7を参照して、実施の形態1に係る第2障害処理を説明する。
第1サーバ10の処理部111に障害が発生する(ステップS20)。
The second failure processing according to the first embodiment will be described with reference to FIG.
A failure occurs in the
(ステップS21:第1障害検知処理)
第1サーバ10の切替部112は、第1サーバ10の処理部111に障害が発生したことを検知する。
具体的には、第1サーバ10の切替部112における障害検知部116は、第1サーバ10の処理部111の状態を監視している。障害検知部116は、処理部111が停止する等すると、処理部111に障害が発生したと検知する。
第1障害検知処理はpgpoolに予め実装された機能により実現される。
(Step S21: first failure detection process)
The
Specifically, the
The first failure detection process is realized by a function pre-implemented in pgpool.
なお、この際、第2サーバ20の切替部212も、第1サーバ10の切替部112と同様に、第1サーバ10の処理部111に障害が発生したことを検知する。
At this time, the
(ステップS22:停止処理)
第1サーバ10の切替部112は、運用スクリプト131における停止スクリプト132を起動して、第1サーバ10の切替部112を停止させる。
具体的には、停止スクリプト132は、停止スクリプト232と同様に、プログラムを停止させる停止コマンドを発行するスクリプトである。第1サーバ10の切替部112における切替実行部115は、第1サーバ10の切替部112を指定して、停止スクリプト132を実行することにより、切替部112を停止させる。
(Step S22: stop processing)
The
Specifically, the
(ステップS23:第2障害検知処理)
第2サーバ20の切替部212は、第1サーバ10の切替部112に障害が発生したことを検知する。切替部212は、切替部112に障害が発生したことを検知すると主系として動作する。
具体的には、ステップS22の処理で切替部112が停止したため、切替部112における外部監視部114から第1状態情報の送信が途絶える。第2サーバ20の切替部212における外部監視部214は、基準時間以上に渡って第1状態情報の送信が途絶えた場合に、切替部112に障害が発生したと判定する。
第2障害検知処理はpgpoolに予め実装された機能により実現される。
(Step S23: second failure detection process)
The
Specifically, since the
The second failure detection process is realized by a function pre-implemented in pgpool.
(ステップS24:昇格処理)
第2サーバ20の切替部212は、図6のステップS14の処理と同様に、運用スクリプト231における昇格スクリプト233を起動して、第2サーバ20の処理部211を主系に昇格させる。
(Step S24: promotion process)
The
ステップS23の処理で、切替部212が主系になり、ステップS24の処理で、処理部211が主系になる。その結果、第2サーバ20が主系で動作する状態になる。つまり、主系で動作するサーバが第1サーバ10から第2サーバ20に切り替わる。
In the processing of step S23, the
図8を参照して、実施の形態1に係る第3障害処理を説明する。
第2サーバ20の切替部212に障害が発生する(ステップS30)。
The third failure processing according to the first embodiment will be described with reference to FIG.
A failure occurs in the
(ステップS31:第1障害検知処理)
第2サーバ20の内部監視部213は、第2サーバ20の切替部212に障害が発生したことを検知する。
具体的には、内部監視部213は、切替部212の状態を監視している。内部監視部213は、切替部212が停止する等すると、切替部212に障害が発生したと検知する。
(Step S31: First failure detection process)
The
Specifically, the
(ステップS32:停止処理)
第2サーバ20の内部監視部213は、運用スクリプト231における停止スクリプト232を起動して、第2サーバ20の処理部211を停止させる。
具体的には、第2サーバ20の内部監視部213は、第2サーバ20の処理部211を指定して、停止スクリプト232を実行することにより、処理部211を停止させる。
(Step S32: stop processing)
The
Specifically, the
(ステップS33:第2障害検知処理)
第1サーバ10の切替部112は、第2サーバ20の処理部211に障害が発生したことを検知する。
具体的には、切替部212に障害が発生すると、外部監視部214から第2状態情報が送信されなくなる。第1サーバ10の切替部112における外部監視部114は、基準時間以上に渡って第2状態情報の送信が途絶えた場合に、切替部212に障害が発生したと判定する。
第2障害検知処理はpgpoolに予め実装された機能により実現される。
(Step S33: Second failure detection process)
The
Specifically, when a failure occurs in the
The second failure detection process is realized by a function pre-implemented in pgpool.
(ステップS34:同期解除処理)
第1サーバ10の切替部112は、運用スクリプト131における同期解除スクリプト134を起動して、第2サーバ20の処理部211との間のデータの同期を停止させる。
具体的には、同期解除スクリプト134は、第1サーバ10の処理部111と第2サーバ20の処理部211との間のデータの同期を停止させるスクリプトである。なお、前提として、処理部111と処理部211とのうち主系で動作している方から従系で動作している方へデータの更新情報が送信され、データの同期が行われる。これは、PostgreSQLで予め実装された機能である。第1サーバ10の切替部112は、第2サーバ20の処理部211を指定して、同期解除スクリプト134を実行することにより、データの同期を停止する。
(Step S34: Synchronization Release Processing)
The
Specifically, the
ステップS32の処理で、障害が発生した切替部212に加え、処理部211が停止される。これにより、第2サーバ20の処理が停止した状態になる。
In the processing of step S32, the
図9を参照して、実施の形態1に係る第4障害処理を説明する。
第2サーバ20の処理部211に障害が発生する(ステップS40)。
A fourth failure process according to the first embodiment will be described with reference to FIG.
A failure occurs in the
(ステップS41:第1障害検知処理)
第2サーバ20の切替部212は、第2サーバ20の処理部211に障害が発生したことを検知する。
具体的には、第2サーバ20の切替部212における障害検知部216は、第2サーバ20の処理部211の状態を監視している。障害検知部216は、処理部211が停止する等すると、処理部211に障害が発生したと検知する。
第1障害検知処理はpgpoolに予め実装された機能により実現される。
(Step S41: First failure detection process)
The
Specifically, the
The first failure detection process is realized by a function pre-implemented in pgpool.
なお、この際、第1サーバ10の切替部112も、第2サーバ20の切替部212と同様に、第2サーバ20の処理部211に障害が発生したことを検知する。
At this time, the
(ステップS42:停止処理)
第2サーバ20の切替部212は、運用スクリプト231における停止スクリプト232を起動して、第2サーバ20の切替部212を停止させる。
具体的には、第2サーバ20の切替部212における切替実行部215は、第2サーバ20の切替部212を指定して、停止スクリプト232を実行することにより、切替部212を停止させる。
(Step S42: stop processing)
The
Specifically, the switching
ステップS42の処理で、障害が発生した処理部211に加え、切替部212が停止される。これにより、第2サーバ20の処理が停止した状態になる。
In the processing of step S42, the
(ステップS43:同期解除処理)
第1サーバ10の切替部112が、処理部211の障害を検知する。そして、第1サーバ10の切替部112は、運用スクリプト131における同期解除スクリプト134を起動して、第2サーバ20の処理部211との間のデータの同期を停止させる。
(Step S43: Synchronization Release Processing)
The
***実施の形態1の効果***
以上のように、実施の形態1に係る冗長化システム100は、プロセス単位での切り替えを行うソフトウェアを用いて、サーバ単位での切り替えを実現可能である。これにより、例えばそのソフトウェアがOSSの場合、費用を抑えつつ、サーバ単位での切り替えにより運用の複雑化を防ぐことが可能になる。
*** Effect of Embodiment 1 ***
As described above, the
図10に示すように、単純にPostgreSQL及びpgpoolを用いて冗長化されたデータベースシステムを実現すると、プロセス単位での切り替えが行われることになる。図10では、サーバ#1のPostgreSQL及びpgpoolが主系で動作しているときに、サーバ#1のpgpoolに障害が発生した場合を示している。サーバ#1のpgpoolに障害が発生すると、サーバ#2のpgpoolが主系に切り替わる。しかし、サーバ#1のPostgreSQLは主系で動作したままである。したがって、アプリケーションサーバ30は、サーバ#2のpgpoolを介して、サーバ#1のPostgreSQLにアクセスすることになる。
これに対して、図11に示すように、実施の形態1に係る冗長化システム100では、サーバ#1のpgpoolに障害が発生すると、サーバ#1のPostgreSQLが停止され、サーバ#2のPostgreSQL及びpgpoolが主系に切り替わる。その結果、アプリケーションサーバ30は、サーバ#2のpgpoolを介して、サーバ#2のPostgreSQLにアクセスすることになる。
As shown in FIG. 10, if a redundant database system is realized simply by using PostgreSQL and pgpool, switching will be performed on a process-by-process basis. FIG. 10 shows a case where a failure occurs in pgpool of server #1 while PostgreSQL and pgpool of server #1 are operating in the main system. When a failure occurs in the pgpool of server #1, the pgpool of server #2 switches over to the main system. However, PostgreSQL on server #1 is still running on the main system. Therefore, the
On the other hand, as shown in FIG. 11, in the
図6を用いて説明した、第1障害処理のように、第2サーバ20の切替部212は第1サーバ10の切替部112に障害が発生したことを検知すれば、処理部111を停止させる。
図7を用いて説明した、第2障害処理のように、第1サーバ10の切替部112は第1サーバ10の処理部111に障害が発生したことを検知すれば、切替部112自身を停止する。その後、第2サーバ20の切替部212は処理部211に対して主系への昇格処理を実施する。
図8を用いて説明した、第3障害処理のように、第2サーバ20の内部監視部213は、第2サーバ20の切替部212に障害が発生したことを検知すれば、処理部211を停止させる。その後、切替部112は処理部111にデータの同期を停止させる。
図9を用いて説明した、第4障害処理のように、第2サーバ20の切替部212は、第2サーバ20の処理部211に障害が発生したことを検知すれば、切替部212自身を停止する。その後、切替部112は処理部111にデータの同期を停止させる。
このように本実施の形態では、第1サーバ10又は第2サーバ20のプロセスに障害を検知すると、同一サーバ上のもう一方のプロセスを停止させる。それにより、サーバ単位での切り替えを可能とする。
6, the
If the
As in the third failure process described using FIG. stop. After that, the
As in the fourth failure process described with reference to FIG. 9, when the
As described above, in this embodiment, when a failure is detected in a process of the
運用の複雑化について説明する。
ここでは、オンプレミスでシステムが稼働しており、ユーザ側で運用が行われているとする。ユーザ側で運用が行われているため、障害が発生した場合の1次対応はユーザ側で行われる。
サーバ単位で切り替えを行う場合には、ユーザは、障害が発生しているのが、どのサーバであるかを特定し、特定されたサーバを例えば再起動する等するという対応を行う。これに対して、プロセス単位で切り替えを行う場合には、ユーザは、障害が発生しているのが、どのサーバのどのプロセスかを特定する必要がある。そして、特定されたプロセスを再起動する等するという対応が必要である。ユーザにとっては、障害が発生しているプロセスを特定することは困難である場合がある。また、プロセスを再起動するという対応も困難である場合がある。
このように、プロセス単位での切り替えを行う場合には、運用が複雑になり、ユーザ側で対応を行うといったことが困難になる場合がある。
Describe operational complexity.
Here, it is assumed that the system is running on-premises and operated by the user. Since operation is performed on the user side, the primary response in the event of a failure is performed on the user side.
When performing switching on a server-by-server basis, the user specifies which server is in trouble, and responds by, for example, restarting the specified server. On the other hand, when the process switching is performed in units of processes, the user needs to specify which process of which server is causing the failure. Then, it is necessary to take measures such as restarting the specified process. It may be difficult for the user to identify the failing process. It may also be difficult to respond by restarting the process.
In this way, when switching is performed on a process-by-process basis, the operation becomes complicated, and it may be difficult for the user to take action.
***他の構成***
<変形例1>
実施の形態1では、処理部111及び処理部211が実現する処理機能は、データベース機能であるとした。しかし、処理部111及び処理部211が実現する処理機能は、データベース機能に限定されるものではない。
例えば、負荷分散を行うために、複数のアプリケーションサーバ30を用いる場合がある。この場合には、処理部111及び処理部211が実現する処理機能は、アプリケーションサーバ30の機能であってもよい。処理機能がアプリケーションサーバ30の機能である場合にも、原則として、実施の形態1で説明した処理により、プロセス単位での切り替えを行うOSSを用いて、サーバ単位での切り替えを実現可能である。但し、図9のステップS42では、データベースの間のデータの同期ではなく、アプリケーションサーバ30の機能間でのセッション情報の同期を停止するようにする必要がある。
***Other Configurations***
<Modification 1>
In the first embodiment, the processing functions realized by the
For example,
以上、本開示の実施の形態及び変形例について説明した。これらの実施の形態及び変形例のうち、いくつかを組み合わせて実施してもよい。また、いずれか1つ又はいくつかを部分的に実施してもよい。なお、本開示は、以上の実施の形態及び変形例に限定されるものではなく、必要に応じて種々の変更が可能である。 The embodiments and modifications of the present disclosure have been described above. Some of these embodiments and modifications may be combined and implemented. Also, any one or some may be partially implemented. It should be noted that the present disclosure is not limited to the above embodiments and modifications, and various modifications are possible as necessary.
100 冗長化システム、10 第1サーバ、11 プロセッサ、12 メモリ、13 ストレージ、14 通信インタフェース、15 電子回路、111 処理部、112 切替部、113 内部監視部、114 外部監視部、115 切替実行部、116 障害検知部、131 運用スクリプト、132 停止スクリプト、133 昇格スクリプト、134 同期解除スクリプト、20 第2サーバ、21 プロセッサ、22 メモリ、23 ストレージ、24 通信インタフェース、25 電子回路、211 処理部、212 切替部、213 内部監視部、214 外部監視部、215 切替実行部、216 障害検知部、231 運用スクリプト、232 停止スクリプト、233 昇格スクリプト、234 同期解除スクリプト、30 アプリケーションサーバ。
100 redundant system, 10 first server, 11 processor, 12 memory, 13 storage, 14 communication interface, 15 electronic circuit, 111 processing unit, 112 switching unit, 113 internal monitoring unit, 114 external monitoring unit, 115 switching execution unit, 116 failure detection unit, 131 operation script, 132 stop script, 133 promotion script, 134 synchronization release script, 20 second server, 21 processor, 22 memory, 23 storage, 24 communication interface, 25 electronic circuit, 211 processing unit, 212 switching 213
Claims (7)
前記第1サーバと前記第2サーバとでは、処理機能を実現するプロセスである処理部と、主系と従系との切り替えを実現するプロセスである切替部とが動作し、
前記第2サーバにおける前記切替部は、前記第1サーバにおける前記処理部と前記切替部との少なくともいずれかに障害が発生すると、前記第2サーバを主系で動作させ、
前記第2サーバにおける前記切替部は、前記第1サーバにおける前記切替部の障害が検知されると、前記第1サーバにおける前記処理部を停止させることにより、前記第2サーバを主系で動作させる冗長化システム。 A redundant system comprising a first server operating as a master system and a second server operating as a slave system,
In the first server and the second server, a processing unit, which is a process for realizing processing functions, and a switching unit, which is a process for realizing switching between a master system and a slave system, operate,
the switching unit in the second server causes the second server to operate as a main system when a failure occurs in at least one of the processing unit and the switching unit in the first server ;
The switching unit in the second server causes the second server to operate as a main system by stopping the processing unit in the first server when a failure of the switching unit in the first server is detected. redundant system.
前記第2サーバにおける前記切替部は、前記第1サーバにおける前記切替部が停止すると、前記第1サーバにおける前記切替部の障害として検知して、前記第2サーバを主系で動作させる
請求項1に記載の冗長化システム。 The switching unit in the first server stops when a failure of the processing unit in the first server is detected,
2. When the switching unit in the first server stops, the switching unit in the second server detects a failure of the switching unit in the first server and causes the second server to operate as a main system. The redundant system described in .
前記第2サーバにおける前記内部監視部は、前記第2サーバにおける前記切替部の障害を検知すると、前記第2サーバにおける前記処理部を停止させる
請求項1又は2に記載の冗長化システム。 In the second server, an internal monitoring unit, which is a process for monitoring the state of the switching unit in the second server, operates;
3. The redundancy system according to claim 1 , wherein the internal monitoring unit in the second server stops the processing unit in the second server when detecting a failure in the switching unit in the second server.
請求項1から3までのいずれか1項に記載の冗長化システム。 4. The method according to any one of claims 1 to 3 , wherein the switching unit in the second server issues a promotion command to the main system to the processing unit in the second server when operating the second server as the main system. The redundancy system according to any one of items 1 and 2.
前記第2サーバにおける前記切替部は、前記第2サーバにおけるデータベース機能の障害が検知されると、停止し、
前記第1サーバにおける前記切替部は、前記第2サーバにおけるデータベース機能の障害が検知されると、前記第1サーバにおけるデータベース機能との間のデータの同期を停止させる
請求項1から4までのいずれか1項に記載の冗長化システム。 the processing function is a database function;
The switching unit in the second server stops when a failure of the database function in the second server is detected,
5. Any one of claims 1 to 4 , wherein the switching unit in the first server stops synchronization of data with the database function in the first server when a failure in the database function in the second server is detected. or the redundant system according to item 1.
前記第2サーバにおける前記切替部は、前記第2サーバにおけるアプリケーションサーバ機能の障害が検知されると、前記第1サーバにおけるアプリケーションサーバ機能との間のセッション情報の同期を停止させた上で、停止する
請求項1から4までのいずれか1項に記載の冗長化システム。 the processing function is an application server function;
When a failure of the application server function of the second server is detected, the switching unit of the second server stops synchronization of the session information with the application server function of the first server, and then stops. The redundancy system according to any one of claims 1 to 4 .
前記第1サーバと前記第2サーバとでは、処理機能を実現するプロセスである処理部と、主系と従系との切り替えを実現するプロセスである切替部とが動作し、
前記第2サーバにおける前記切替部が、前記第1サーバにおける前記処理部と前記切替部との少なくともいずれかに障害が発生すると、前記第2サーバを主系で動作させ、
前記第2サーバにおける前記切替部が、前記第1サーバにおける前記切替部の障害が検知されると、前記第1サーバにおける前記処理部を停止させることにより、前記第2サーバを主系で動作させる冗長化方法。 A redundancy method in a redundant system comprising a first server operating as a master system and a second server operating as a slave system,
In the first server and the second server, a processing unit, which is a process for realizing processing functions, and a switching unit, which is a process for realizing switching between a master system and a slave system, operate,
When at least one of the processing unit and the switching unit in the first server fails, the switching unit in the second server causes the second server to operate as a main system ;
When a failure of the switching unit in the first server is detected, the switching unit in the second server stops the processing unit in the first server, thereby causing the second server to operate as a main system. redundancy method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021135452A JP7209784B1 (en) | 2021-08-23 | 2021-08-23 | Redundant system and redundant method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021135452A JP7209784B1 (en) | 2021-08-23 | 2021-08-23 | Redundant system and redundant method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP7209784B1 true JP7209784B1 (en) | 2023-01-20 |
JP2023030364A JP2023030364A (en) | 2023-03-08 |
Family
ID=84974974
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021135452A Active JP7209784B1 (en) | 2021-08-23 | 2021-08-23 | Redundant system and redundant method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7209784B1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000250771A (en) | 1999-02-25 | 2000-09-14 | Nec Corp | Server duplication system |
JP2002116920A (en) | 2000-10-05 | 2002-04-19 | Toshiba Corp | Cluster system, monitoring method in cluster system, and computer program |
JP2012008934A (en) | 2010-06-28 | 2012-01-12 | Kddi Corp | Distributed file system and redundancy method in distributed file system |
JP2014504392A (en) | 2010-11-17 | 2014-02-20 | アルカテル−ルーセント | Method and system for service recovery of network elements |
-
2021
- 2021-08-23 JP JP2021135452A patent/JP7209784B1/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000250771A (en) | 1999-02-25 | 2000-09-14 | Nec Corp | Server duplication system |
JP2002116920A (en) | 2000-10-05 | 2002-04-19 | Toshiba Corp | Cluster system, monitoring method in cluster system, and computer program |
JP2012008934A (en) | 2010-06-28 | 2012-01-12 | Kddi Corp | Distributed file system and redundancy method in distributed file system |
JP2014504392A (en) | 2010-11-17 | 2014-02-20 | アルカテル−ルーセント | Method and system for service recovery of network elements |
Non-Patent Citations (4)
Title |
---|
OSSをベースにしたデータベースパッケージ"H@DB",三菱電機技報,日本,三菱電機エンジニアリング株式会社,2021年01月20日,第95巻,第1号(通巻1076号),p.79,ISSN 0369-2302 |
The Pgpool Global Development Group,第8章 設定の例;8.3. Pgpool-II+Watchdogの構築の例,Pgpool-II 4.1.4 文書,リリース4.1.4,2020年09月17日,https://www.pgpool.net/docs/pgpool-II-4.1.4/ja/html/example-cluster.html |
市原俊治、矢作 浩,LAMP/LAPP事例に見る"これがオープンソース案件だ!"(2) ただ使うだけじゃない!具体的な活用例から学ぶ「組み合わせの妙」,開発の現場 vol.005,日本,株式会社翔泳社,2006年07月12日,初版,pp.44-51,ISBN4-7981-1077-9 |
鈴木和行、大山紗貴子、原田雅史,OSSをベースとしたデータベースパッケージ"H@DB",三菱電機技報,日本,三菱電機エンジニアリング株式会社,2021年08月20日,第95巻,第8号(通巻1083号),pp.12-15,ISSN 0369-2302 |
Also Published As
Publication number | Publication date |
---|---|
JP2023030364A (en) | 2023-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI567559B (en) | System and method for power loss protection | |
JP5600361B2 (en) | Hypervisor-based server duplication system, method thereof, and recording medium on which server duplication computer program is recorded | |
US8498967B1 (en) | Two-node high availability cluster storage solution using an intelligent initiator to avoid split brain syndrome | |
US9298566B2 (en) | Automatic cluster-based failover handling | |
JP5959733B2 (en) | Storage system and storage system failure management method | |
WO2017162177A1 (en) | Redundant storage system, redundant storage method and redundant storage device | |
JP6098778B2 (en) | Redundant system, redundancy method, redundancy system availability improving method, and program | |
JP5561622B2 (en) | Multiplexing system, data communication card, state abnormality detection method, and program | |
US11409471B2 (en) | Method and apparatus for performing data access management of all flash array server | |
US8683258B2 (en) | Fast I/O failure detection and cluster wide failover | |
JP2005196490A (en) | System and method for data duplication | |
JP7209784B1 (en) | Redundant system and redundant method | |
US8819481B2 (en) | Managing storage providers in a clustered appliance environment | |
JP2002123406A (en) | High reliability system | |
US11210034B2 (en) | Method and apparatus for performing high availability management of all flash array server | |
JP2010204885A (en) | Disk array device and method for controlling the same | |
CN112912848B (en) | Power supply request management method in cluster operation process | |
JP4468395B2 (en) | Cluster system and program | |
US11216348B2 (en) | All flash array server and control method thereof | |
US11366618B2 (en) | All flash array server and control method thereof | |
US20170289005A1 (en) | System and method for managing multiple remote-office and branch-office (robo) sites | |
JP7056057B2 (en) | Information processing equipment, information processing methods, information processing systems, and computer programs | |
JP2011076528A (en) | Method and device for providing redundancy to raid card | |
JPH083807B2 (en) | Automatic switching device for dual magnetic disk device | |
JP2021082052A (en) | Controller and control program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210823 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20221004 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20221115 |
|
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: 20221213 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230110 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7209784 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |