JP2012256240A - Duplex system and memory synchronization method - Google Patents

Duplex system and memory synchronization method Download PDF

Info

Publication number
JP2012256240A
JP2012256240A JP2011129477A JP2011129477A JP2012256240A JP 2012256240 A JP2012256240 A JP 2012256240A JP 2011129477 A JP2011129477 A JP 2011129477A JP 2011129477 A JP2011129477 A JP 2011129477A JP 2012256240 A JP2012256240 A JP 2012256240A
Authority
JP
Japan
Prior art keywords
server
memory
update
main memory
active
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.)
Pending
Application number
JP2011129477A
Other languages
Japanese (ja)
Inventor
Akinori Shiragami
彰則 白神
Koji Kishida
好司 岸田
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 JP2011129477A priority Critical patent/JP2012256240A/en
Publication of JP2012256240A publication Critical patent/JP2012256240A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Hardware Redundancy (AREA)

Abstract

PROBLEM TO BE SOLVED: To facilitate development of an application program and enhance program development efficiency in a duplex system which synchronizes memories of an active server and a stand-by server.SOLUTION: A duplex system comprises an active server 1 and a stand-by server 2. The active server 1 comprises: application processing means 101 and 103 which perform application processing; and first synchronization means 102 and 104 which, in response to a first update request generated in the application processing for updating a main memory 12 of the active server 1, transmit a second update request to the stand-by server 2 for updating a main memory 22 of the stand-by server 2. The stand-by server 2 comprises second synchronization means 202 and 204 which update the main memory 22 of the stand-by server 2 on receiving the second update request from the active server 1.

Description

本発明は、現用系サーバと待機系サーバとを備える二重化システムにおいて、現用系サーバのメモリと待機系サーバのメモリとを同期させる技術に関する。   The present invention relates to a technique for synchronizing a memory of an active server and a memory of a standby server in a duplex system including an active server and a standby server.

IP電話システムにおけるSIPサーバ等、信頼性が要求されるサーバにおいては二重化構成をとることが行われている。二重化構成では、現用系と待機系の同一の機能を備えた一対のサーバを一つのクラスタとし、系間を接続するネットワークを介して現用系から待機系へとメモリ内容を転送し、メモリを同期しながら運用することで系を切り替えることを可能とする。   A server requiring reliability, such as a SIP server in an IP telephone system, has a duplex configuration. In a redundant configuration, a pair of servers with the same functions of the active system and the standby system are used as one cluster, and the memory contents are transferred from the active system to the standby system via the network connecting the systems, and the memory is synchronized. It is possible to switch the system by operating it.

特許文献1には、多重化データベースシステムにおいて、新規データベースサーバをシステムに組み込む際に各データベースサーバのデータを同期化する方法が記載されている。   Patent Document 1 describes a method of synchronizing data of each database server when a new database server is incorporated into the system in a multiplexed database system.

特開2007-241323号公報JP 2007-241323 A

しかしながら、上述したような従来の技術では、呼処理などのアプリケーションプログラムを開発する際に、本来のアプリケーション処理の他に、系間のメモリデータ転送処理も考慮した実装を行わなければならず、実装が複雑になるという問題がある。すなわち、アプリケーションプログラムが複雑になり、プログラム開発に時間および負荷がかかる。   However, in the conventional technology as described above, when developing an application program such as call processing, in addition to the original application processing, it is necessary to perform implementation in consideration of memory data transfer processing between systems. There is a problem that becomes complicated. That is, the application program becomes complicated, and it takes time and load to develop the program.

本発明は、上記事情に鑑みてなされたものであり、本発明の目的は、現用系サーバと待機系サーバとでメモリ同期させる二重化システムにおいて、アプリケーションプログラムの開発を容易にし、プログラム開発効率を向上させることにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to facilitate development of an application program and improve program development efficiency in a duplex system in which memory synchronization is performed between an active server and a standby server. There is to make it.

上記目的を達成するため、本発明は、現用系サーバと待機系サーバとを備える二重化システムであって、前記現用系サーバは、アプリケーション処理を行うアプリケーション処理手段と、前記アプリケーション処理で発生した、当該現用系サーバの主メモリを更新させる第1の更新要求に応じて、前記待機系サーバの主メモリを更新するための第2の更新要求を前記待機系サーバに送信する第1の同期手段と、を備え、前記待機系サーバは、前記現用系サーバから前記第2の更新要求を受け付けると、当該待機系サーバの主メモリを更新する第2の同期手段と、を備える。   In order to achieve the above object, the present invention is a duplex system comprising an active server and a standby server, wherein the active server generates application processing means for performing application processing and the application processing, First synchronization means for transmitting a second update request for updating the main memory of the standby server to the standby server in response to a first update request for updating the main memory of the active server; The standby server includes second synchronization means for updating the main memory of the standby server when receiving the second update request from the active server.

本発明は、前記二重化システムが行う、現用系サーバの主メモリと待機系サーバの主メモリとを同期させるメモリ同期方法である。   The present invention is a memory synchronization method for synchronizing the main memory of the active server and the main memory of the standby server performed by the duplex system.

本発明によれば、現用系サーバと待機系サーバとでメモリ同期させる二重化システムにおいて、アプリケーションプログラムの開発を容易にし、プログラム開発効率を向上させることができる。   According to the present invention, development of an application program can be facilitated and program development efficiency can be improved in a duplex system in which memory synchronization is performed between an active server and a standby server.

本発明の実施形態に係る二重化システムの構成図である。It is a block diagram of the duplex system which concerns on embodiment of this invention. 各サーバ上のプログラム構成を示す図である。It is a figure which shows the program structure on each server. 第1の実施例のメモリ同期処理を示すシーケンスである。It is a sequence which shows the memory synchronization process of 1st Example. 第2の実施例のメモリ同期処理を示すシーケンスである。It is a sequence which shows the memory synchronization process of 2nd Example. 第3の実施例のメモリ同期処理を示すシーケンスである。It is a sequence which shows the memory synchronization process of a 3rd Example. 第4の実施例のメモリ同期処理を示すシーケンスである。It is a sequence which shows the memory synchronization process of a 4th Example.

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

図1は、本発明の実施形態に係る二重化システムの構成図である。図示する二重化システムでは、同一の機能を備える一対の現用系サーバ1(ACT系サーバ)と、待機系サーバ2(SBY系サーバ)とを備える。現用系サーバ1と待機系サーバ2は、一つのクラスタとしてサーバ間を接続するネットワーク9を介して現用系サーバ1から待機系サーバ2へとメモリの内容を転送し、メモリを同期しながら運用することで系を切替えることを可能とする。   FIG. 1 is a configuration diagram of a duplex system according to an embodiment of the present invention. The duplex system shown in the figure includes a pair of active server 1 (ACT server) having the same function and a standby server 2 (SBY server). The active server 1 and the standby server 2 transfer the contents of the memory from the active server 1 to the standby server 2 via the network 9 connecting the servers as one cluster, and operate while synchronizing the memories. This makes it possible to switch systems.

本実施形態の現用系サーバ1は、複数のCPU11と、主メモリ12(メモリ)と、ディスクコントローラ13と、ディスク14と、NIC(Network Interface Card)15とを備え、これらはバス16で接続されている。同様に、本実施形態の待機系サーバ2は、複数のCPU21と、主メモリ22と、ディスクコントローラ23と、ディスク24と、NIC25とを備え、これらはバス26で接続されている。   The active server 1 of the present embodiment includes a plurality of CPUs 11, a main memory 12 (memory), a disk controller 13, a disk 14, and a NIC (Network Interface Card) 15, which are connected by a bus 16. ing. Similarly, the standby server 2 of the present embodiment includes a plurality of CPUs 21, a main memory 22, a disk controller 23, a disk 24, and a NIC 25, which are connected by a bus 26.

このように、本実施形態の現用系サーバ1および待機系サーバ2は、筐体内(サーバ内)に複数のCPUを備えたマルチコアサーバである。   As described above, the active server 1 and the standby server 2 of the present embodiment are multi-core servers including a plurality of CPUs in a housing (inside the server).

図2は、現用系サーバ1および待機系サーバ2のプログラム構成の一例を示す図である。図示する例では、現用系サーバ1および待機系サーバ2のそれぞれが、4つのCPU111〜114、211〜214を備える。   FIG. 2 is a diagram illustrating an example of a program configuration of the active server 1 and the standby server 2. In the illustrated example, each of the active server 1 and the standby server 2 includes four CPUs 111 to 114 and 211 to 214.

そして、図示する例では、現用系サーバ1および待機系サーバ2のそれぞれは、2つのサーバプログラムのプロセス(サーバプロセス1、サーバプロセス2:アプリケーション処理手段)101、103、201、203が、並列で動作しているものとする。なお、サーバプログラムは、所定のアプリケーション処理を行うアプリケーションプログラムである。また、プロセスは、OSからメモリ領域などの割り当てを受けて処理を実行するプログラムの実行単位である。   In the illustrated example, each of the active server 1 and the standby server 2 includes two server program processes (server process 1, server process 2: application processing means) 101, 103, 201, 203 in parallel. It is assumed that it is operating. The server program is an application program that performs predetermined application processing. A process is an execution unit of a program that receives a memory area allocation from the OS and executes processing.

各サーバプロセス101、103、201、203は、OS105、205を介してCPUや主メモリ12、22などのリソースを利用する。図示する例では、現用系サーバ1のサーバプロセス1:101は、CPU1:111上で動作し、サーバプロセス2:103はCPU3:113上で動作するものとする。また、待機系サーバ2のサーバプロセス1:201は、CPU1:211上で動作し、サーバプロセス2:203はCPU3:213上で動作するものとする。   Each server process 101, 103, 201, 203 uses resources such as the CPU and main memories 12, 22 via the OSs 105, 205. In the illustrated example, it is assumed that the server process 1: 101 of the active server 1 operates on the CPU 1: 111, and the server process 2: 103 operates on the CPU 3: 113. Further, it is assumed that the server process 1: 201 of the standby server 2 operates on the CPU 1: 211 and the server process 2: 203 operates on the CPU 3: 213.

また、本実施形態では、現用系サーバ1と待機系サーバ2との間でメモリ同期処理を実行するメモリ同期プログラムのプロセス(メモリ同期プロセス1、メモリ同期プロセス2:同期手段)102、104、202、204を、サーバプロセス毎に備える。なお、メモリ同期プログラムは、OS105、205上で動作するミドルウェアとして用いられる。   In the present embodiment, the processes (memory synchronization process 1, memory synchronization process 2: synchronization means) 102, 104, 202 of the memory synchronization program for executing the memory synchronization processing between the active server 1 and the standby server 2 , 204 are provided for each server process. Note that the memory synchronization program is used as middleware that operates on the OSs 105 and 205.

図示する例では、現用系サーバ1では、サーバプロセス1:101のメモリ同期処理を実行するメモリ同期プロセス1:102と、サーバプロセス2:103のメモリ同期処理を実行するメモリ同期プロセス2:104とを備える。そして、メモリ同期プロセス1:102はCPU2:112上で動作し、メモリ同期プロセス2:104はCPU4:114上で動作するものとする。   In the illustrated example, in the active server 1, a memory synchronization process 1: 102 that executes a memory synchronization process of the server process 1: 101, and a memory synchronization process 2: 104 that executes a memory synchronization process of the server process 2: 103, Is provided. The memory synchronization process 1: 102 operates on the CPU 2: 112, and the memory synchronization process 2: 104 operates on the CPU 4: 114.

同様に、待機系サーバ2では、サーバプロセス1:201のメモリ同期処理を実行するメモリ同期プロセス1:202と、サーバプロセス2:203のメモリ同期処理を実行するメモリ同期プロセス2:204とを備える。そして、メモリ同期プロセス1:202はCPU2:212上で動作し、メモリ同期プロセス2:204はCPU4:214上で動作するものとする。   Similarly, the standby server 2 includes a memory synchronization process 1: 202 that executes a memory synchronization process of the server process 1: 201, and a memory synchronization process 2: 204 that executes a memory synchronization process of the server process 2: 203. . The memory synchronization process 1: 202 operates on the CPU 2: 212, and the memory synchronization process 2: 204 operates on the CPU 4: 214.

このように、本実施形態の現用系サーバ1および待機系サーバ2は、各筐体内に複数のCPUを備えたマルチコアサーバであって、系間でデータ転送を行うメモリ同期プロセスと、アプリケーション処理を行うサーバプロセスとを分けてそれぞれにCPUを割り当てることにより、アプリケーションサービスの中断時間を短縮することが可能である。   As described above, the active server 1 and the standby server 2 of the present embodiment are multi-core servers having a plurality of CPUs in each case, and perform a memory synchronization process for transferring data between systems, and an application process. By dividing the server process to be performed and allocating a CPU to each, it is possible to shorten the interruption time of the application service.

なお、各サーバプログラムおよび各メモリ同期プログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD−ROMなどのコンピュータ読取り可能な記録媒体に記憶することも、ネットワークを介して配信することもできる。   Each server program and each memory synchronization program can be stored in a computer-readable recording medium such as a hard disk, flexible disk, CD-ROM, MO, DVD-ROM, or distributed via a network.

次に、本実施形態におけるメモリ同期方法について説明する。メモリ同期方法には、以下に示す4つ実施例がある。以下の各実施例では、図2に示すサーバプロセス1:101、201に割り当てられた主メモリを、メモリ同期プロセス1:102、202が同期させる場合を例として説明する。   Next, the memory synchronization method in this embodiment will be described. There are the following four examples of the memory synchronization method. In each of the following embodiments, a case where the memory synchronization processes 1: 102 and 202 synchronize the main memory allocated to the server processes 1: 101 and 201 shown in FIG. 2 will be described as an example.

<第1の実施例>
図3は、第1の実施例のメモリ同期処理のシーケンスである。
<First embodiment>
FIG. 3 is a sequence of memory synchronization processing of the first embodiment.

まず、現用系サーバ1および待機系サーバ2は、それぞれ初期処理を行う(S11〜S14)。すなわち、サーバプロセス1は、OSに対して処理に必要なメモリの確保要求を行う(S11)。OSは、主メモリ上の空き領域を確保し、確保した領域のメモリを初期化する(S12)。   First, the active server 1 and the standby server 2 each perform initial processing (S11 to S14). That is, the server process 1 requests the OS to secure memory necessary for processing (S11). The OS secures a free area in the main memory and initializes the memory in the secured area (S12).

また、OSは、メモリ確保に伴い、サーバプロセス1のメモリ参照要求およびメモリ更新要求を受け付けるためのメモリ同期プロセス1の処理を起動する(S13)。この際、OSは、メモリ参照要求およびメモリ更新要求を受け付けてアクセス制御できるように、サーバプロセス1のプロセスIDと、割り当てたメモリ領域の情報(アドレス等)を、メモリ同期プロセス1に通知する。   Further, the OS activates the process of the memory synchronization process 1 for accepting the memory reference request and the memory update request of the server process 1 along with the memory reservation (S13). At this time, the OS notifies the memory synchronization process 1 of the process ID of the server process 1 and the information (address, etc.) of the allocated memory area so that the memory reference request and the memory update request can be received and controlled.

そして、OSは、サーバプロセス1に対してメモリ割り当てが完了したことを通知する(S14)。この際、OSは、メモリ同期プロセス1のプロセスIDをサーバプロセス1に通知する。   Then, the OS notifies the server process 1 that the memory allocation has been completed (S14). At this time, the OS notifies the server process 1 of the process ID of the memory synchronization process 1.

現用系サーバ1および待機系サーバ2のそれぞれで初期処理が終了した後、現用系サーバ1のサーバプロセス1は、アプリケーション処理の中でメモリ参照が必要になった場合、S14で通知されたプロセスIDに基づいて、メモリ同期プロセス1にメモリ参照要求を送出する(S15)。このメモリ参照要求には、サーバプロセス1のプロセスIDと、参照したいメモリ領域の情報とが含まれる。   After the initial processing is completed in each of the active server 1 and the standby server 2, the server process 1 of the active server 1 determines that the process ID notified in S14 is necessary when memory reference is required during application processing. Based on the above, a memory reference request is sent to the memory synchronization process 1 (S15). This memory reference request includes the process ID of the server process 1 and information on the memory area to be referred to.

メモリ同期プロセス1は、S13でOSから通知された情報と、メモリ参照要求に含まれる情報とを比較し、サーバプロセス1のメモリ参照要求が正当か否かを判定するアクセス制御を行う。例えば、OSから通知されたプロセスIDとメモリ参照要求に含まれるプロセスIDとが一致し、OSから通知されたメモリ領域にメモリ参照要求で指定されたメモリ領域が含まれる場合、正当であると判別し、アクセスを許可する。   The memory synchronization process 1 compares the information notified from the OS in S13 with the information included in the memory reference request, and performs access control to determine whether the memory reference request of the server process 1 is valid. For example, when the process ID notified from the OS matches the process ID included in the memory reference request and the memory area specified by the memory reference request is included in the memory area notified from the OS, it is determined to be valid. And grant access.

メモリ同期プロセス1は、アクセスを許可すると判別した場合、メモリ参照要求で指定されたメモリ内容を、OSを介して主メモリから取得する(S16)。   If it is determined that access is permitted, the memory synchronization process 1 acquires the memory contents specified by the memory reference request from the main memory via the OS (S16).

そして、メモリ同期プロセス1は、取得したメモリ内容(メモリ参照結果)をサーバプロセス1に応答・送出する(S17)。   Then, the memory synchronization process 1 responds and sends the acquired memory contents (memory reference result) to the server process 1 (S17).

また、サーバプロセス1は、アプリケーション処理の中でメモリ更新が必要になった場合、S14で通知されたプロセスIDに基づいてメモリ同期プロセス1にメモリ更新要求を送出する(S18)。このメモリ更新要求には、サーバプロセス1のプロセスIDと、更新したいメモリ領域の情報と、メモリ更新内容とが含まれる。   Further, when the memory update is required during the application process, the server process 1 sends a memory update request to the memory synchronization process 1 based on the process ID notified in S14 (S18). This memory update request includes the process ID of the server process 1, information on the memory area to be updated, and the memory update content.

メモリ同期プロセス1は、S13でOSから通知された情報に基づいて、S16と同様のアクセス制御を行い、アクセスを許可すると判別した場合、OSを介してメモリ更新要求のメモリ更新内容で、現用系サーバ1の主メモリを更新する(S19)。   If the memory synchronization process 1 performs access control similar to S16 based on the information notified from the OS in S13 and determines that access is permitted, the memory synchronization process 1 uses the memory update content of the memory update request via the OS to The main memory of the server 1 is updated (S19).

そして、メモリ同期プロセス1は、NICとネットワークを介して待機系サーバ2のメモリ同期プロセス1に更新要求を送信し、待機系サーバ2からの更新応答を待ち合わせる(S20)。すなわち、更新応答を受信するまで、サーバプロセス1にメモリ更新結果を通知せず、待ち状態となる。なお、S20の更新要求には、更新したいメモリ領域の情報、メモリ更新内容などが含まれる。   Then, the memory synchronization process 1 transmits an update request to the memory synchronization process 1 of the standby server 2 via the NIC and the network, and waits for an update response from the standby server 2 (S20). That is, until the update response is received, the server process 1 is not notified of the memory update result, and enters a wait state. Note that the update request in S20 includes information on the memory area to be updated, memory update contents, and the like.

待機系サーバ2のメモリ同期プロセス1は、OSを介して更新要求で指定された内容で、待機系サーバ2の主メモリを更新する(S21)。そして、待機系サーバ2のメモリ同期プロセス1は、更新応答を現用系サーバ1のメモリ同期プロセス1に、NICとネットワークを介して送信する(S22)。更新応答には、待機系サーバ2の主メモリの更新結果(OK、NGなど)が含まれる。   The memory synchronization process 1 of the standby server 2 updates the main memory of the standby server 2 with the contents specified by the update request via the OS (S21). Then, the memory synchronization process 1 of the standby server 2 transmits an update response to the memory synchronization process 1 of the active server 1 via the NIC and the network (S22). The update response includes an update result (OK, NG, etc.) of the main memory of the standby server 2.

現用系サーバ1のメモリ同期プロセス1は、待機系サーバ2から更新応答を受信し、S19のメモリ更新の結果をおよびS22の更新応答に基づくメモリ更新結果を、サーバプロセス1に通知する(S23)。例えば、S19およびS22のメモリ更新がともに正常に行われた場合、メモリ更新が正常に完了した旨のメモリ更新結果を通知する。このように、現用系サーバ1のメモリ同期プロセス1は、待機系サーバ2から更新応答を受信し、かつ、現用系サーバ1の主メモリの更新が完了していることを条件に、サーバプロセス1に更新結果を通知する。   The memory synchronization process 1 of the active server 1 receives the update response from the standby server 2, and notifies the server process 1 of the memory update result of S19 and the memory update result based on the update response of S22 (S23). . For example, when both the memory updates in S19 and S22 are normally performed, a memory update result indicating that the memory update has been normally completed is notified. As described above, the memory synchronization process 1 of the active server 1 receives the update response from the standby server 2 and is updated on the condition that the update of the main memory of the active server 1 is completed. Notify the update result.

以上説明した第1の実施例では、現用系サーバ1のメモリ更新と、待機系サーバ2のメモリ更新とを同期させた後に、現用系サーバ1のサーバプロセス1にメモリ更新が終了したことを通知する。   In the first embodiment described above, after the memory update of the active server 1 and the memory update of the standby server 2 are synchronized, the server process 1 of the active server 1 is notified of the completion of the memory update. To do.

なお、本実施例では、S19で現用系サーバ1の主メモリを更新した後に、S21で待機系サーバ2の主メモリを更新することとしたが、待機系サーバ2の主メモリを更新した後に、現用系サーバ1の主メモリを更新することとしてもよい。例えば、待機系サーバ2からの更新応答を受信した後に、現用系サーバ1の主メモリを更新してもよい。   In this embodiment, after updating the main memory of the active server 1 in S19, the main memory of the standby server 2 is updated in S21. However, after updating the main memory of the standby server 2, The main memory of the active server 1 may be updated. For example, the main memory of the active server 1 may be updated after receiving an update response from the standby server 2.

<第2の実施例>
図4は、第2の実施例のメモリ同期処理のシーケンスである。
<Second embodiment>
FIG. 4 is a sequence of memory synchronization processing according to the second embodiment.

図4に示す第2の実施例のS31〜S39までの処理については、図3に示す第1の実施例のS11〜S19と同様であるため、ここでは説明を省略する。
現用系サーバ1のメモリ同期プロセス1は、現用系サーバ1のメモリ更新が終了すると(S39)、メモリ更新結果をサーバプロセス1に通知する(S40)。
Since the processes from S31 to S39 of the second embodiment shown in FIG. 4 are the same as S11 to S19 of the first embodiment shown in FIG. 3, the description thereof is omitted here.
When the memory update process 1 of the active server 1 completes the memory update of the active server 1 (S39), it notifies the server process 1 of the memory update result (S40).

そして、メモリ同期プロセス1は、NICとネットワークを介して、待機系サーバ2のメモリ同期プロセス1に更新要求を送信し、待機系サーバ2から送信される更新応答を待つ(S41)。なお、メモリ同期プロセス1は、以降のS42およびS43の処理で異常が発生した場合に備えて、メモリ更新要求の内容をメモリ同期プロセス1内に保持しておき、一定期間応答が得られない場合はS41のメモリ更新要求を再送することにより確実に待機系サーバ2のメモリを更新するようにすることが望ましい。   Then, the memory synchronization process 1 transmits an update request to the memory synchronization process 1 of the standby server 2 via the NIC and the network, and waits for an update response transmitted from the standby server 2 (S41). Note that the memory synchronization process 1 retains the contents of the memory update request in the memory synchronization process 1 and cannot obtain a response for a certain period in case an abnormality occurs in the subsequent processing of S42 and S43. It is desirable to reliably update the memory of the standby server 2 by resending the memory update request in S41.

待機系サーバ2のメモリ同期プロセス2は、OSを介して更新要求で指定された内容で、待機系サーバ2の主メモリを更新する(S42)。そして、待機系サーバ2のメモリ同期プロセス1は、更新応答(更新結果)を現用系サーバ1のメモリ同期プロセス1に送信する(S43)。   The memory synchronization process 2 of the standby server 2 updates the main memory of the standby server 2 with the content specified in the update request via the OS (S42). Then, the memory synchronization process 1 of the standby server 2 transmits an update response (update result) to the memory synchronization process 1 of the active server 1 (S43).

第2の実施例では、現用系サーバ1のメモリ同期プロセス1は、待機系サーバ2のメモリ更新を待たずに非同期で、現用系サーバ1のサーバプロセス1に現用系サーバ1のメモリ更新が終了したことを通知する。   In the second embodiment, the memory synchronization process 1 of the active server 1 is asynchronous without waiting for the memory update of the standby server 2, and the memory update of the active server 1 is completed by the server process 1 of the active server 1. Notify you.

<第3の実施例>
図5は、第3の実施例のメモリ同期処理のシーケンスである。
<Third embodiment>
FIG. 5 is a sequence of memory synchronization processing according to the third embodiment.

まず、現用系サーバ1および待機系サーバ2は、それぞれ初期処理を行う(S51〜S54)。すなわち、サーバプロセス1は、OSに対して処理に必要なメモリの確保要求を行う(S51)。OSは、主メモリ上の空き領域を確保し、確保した領域のメモリを初期化する(S52)。また、OSは、メモリ確保に伴い、メモリ同期処理を行うメモリ同期プロセス1の処理を起動する(S53)。そして、OSは、サーバプロセス1に対してメモリ割り当てが完了したことを通知する(S54)。   First, the active server 1 and the standby server 2 respectively perform initial processing (S51 to S54). That is, the server process 1 requests the OS to secure memory necessary for processing (S51). The OS secures a free area in the main memory and initializes the memory in the secured area (S52). Further, the OS activates the process of the memory synchronization process 1 that performs the memory synchronization process in accordance with the memory reservation (S53). Then, the OS notifies the server process 1 that the memory allocation has been completed (S54).

現用系サーバ1および待機系サーバ2のそれぞれで初期処理が終了した後、現用系サーバ1のサーバプロセス1は、アプリケーション処理の中でメモリ参照が必要になった場合、OSを介して直接、主メモリにメモリ参照要求を送出する(S55)。このメモリ参照要求には、参照したいメモリ領域の情報が含まれる。主メモリは、要求された領域のメモリ内容を取得し、取得したメモリ内容(メモリ参照結果)をOSを介してサーバプロセス1に応答・送出する(S56)。   After the initial processing is completed in each of the active server 1 and the standby server 2, the server process 1 of the active server 1 directly accesses the main server via the OS when memory reference is required during application processing. A memory reference request is sent to the memory (S55). This memory reference request includes information on a memory area to be referred to. The main memory acquires the memory contents of the requested area, and responds / sends the acquired memory contents (memory reference result) to the server process 1 via the OS (S56).

また、サーバプロセス1は、アプリケーション処理の中でメモリ更新が必要になった場合、OSを介して直接、主メモリにメモリ更新要求を送出する(S57)。このメモリ更新要求には、更新したいメモリ領域の情報と、メモリ更新内容とが含まれる。   Further, when a memory update is required during application processing, the server process 1 sends a memory update request directly to the main memory via the OS (S57). This memory update request includes information on the memory area to be updated and the memory update contents.

主メモリは、メモリ更新要求を受け付けると、例外処理の起動などにより、OSに対してメモリ更新内容、更新領域などを含む更新通知を送出する(S58)。OSは、受け付けた更新通知をメモリ同期プロセス1に送出する(S59)。   When the main memory accepts the memory update request, it sends an update notification including the memory update contents, the update area, etc. to the OS by starting exception processing (S58). The OS sends the received update notification to the memory synchronization process 1 (S59).

メモリ同期プロセス1は、OSから受け付けた更新通知に基づいて主メモリに対する更新が発生したことを検知し、待機系サーバ2の主メモリを更新するための更新要求をNICとネットワークを介して待機系サーバ2のメモリ同期プロセス1に送信し、待機系サーバ2からの更新応答を待ち合わせる(S60)。   The memory synchronization process 1 detects that the main memory has been updated based on the update notification received from the OS, and sends an update request for updating the main memory of the standby server 2 via the NIC and the network. It transmits to the memory synchronization process 1 of the server 2 and waits for an update response from the standby server 2 (S60).

待機系サーバ2のメモリ同期プロセス1は、OSを介して更新要求で指定された内容で、待機系サーバ2の主メモリを更新する(S61)。そして、待機系サーバ2のメモリ同期プロセス1は、更新応答を現用系サーバ1のメモリ同期プロセス1に、NICとネットワークを介して送信する(S62)。更新応答には、待機系サーバ2の主メモリの更新結果(OK、NGなど)が含まれる。   The memory synchronization process 1 of the standby server 2 updates the main memory of the standby server 2 with the content specified in the update request via the OS (S61). The memory synchronization process 1 of the standby server 2 transmits an update response to the memory synchronization process 1 of the active server 1 via the NIC and the network (S62). The update response includes an update result (OK, NG, etc.) of the main memory of the standby server 2.

現用系サーバ1のメモリ同期プロセス1は、待機系サーバ2から更新応答(メモリ更新結果)を受信し、受信した更新応答をS59の更新通知に対する応答としてOSに送出する(S63)。OSは、S58で通知された更新通知に基づいて、現用系サーバ1の主メモリを更新する(S64)。主メモリは、OSを介してメモリ更新結果をサーバプロセス1に通知する(S65)。すなわち、現用系サーバ1の主メモリおよび待機系サーバの主メモリの更新が完了したことを条件に、主メモリは、サーバプロセス1に更新結果を通知する。   The memory synchronization process 1 of the active server 1 receives the update response (memory update result) from the standby server 2, and sends the received update response to the OS as a response to the update notification in S59 (S63). The OS updates the main memory of the active server 1 based on the update notification notified in S58 (S64). The main memory notifies the server process 1 of the memory update result via the OS (S65). That is, the main memory notifies the server process 1 of the update result on the condition that the update of the main memory of the active server 1 and the main memory of the standby server has been completed.

このように、第3の実施例では、待機系サーバ2のメモリ更新の応答を受け付けた後に、現用系サーバ1のメモリ更新を行うことで、現用系サーバ1の主メモリと待機系サーバ2の主メモリとを同期させる。   As described above, in the third embodiment, the memory update of the active server 1 is performed after the response of the memory update of the standby server 2 is received, so that the main memory of the active server 1 and the standby server 2 are updated. Synchronize with main memory.

なお、本実施例では、S61で待機系サーバ2の主メモリを更新した後に、S64で現用系サーバ1の主メモリを更新することとしたが、現用系サーバ1の主メモリを更新した後に、待機系サーバ2の主メモリを更新することとしてもよい。例えば、待機系サーバ2に更新要求を送信する前に現用系サーバ1の主メモリを更新してもよい。   In this embodiment, after updating the main memory of the standby server 2 in S61, the main memory of the active server 1 is updated in S64. However, after updating the main memory of the active server 1, The main memory of the standby server 2 may be updated. For example, the main memory of the active server 1 may be updated before an update request is transmitted to the standby server 2.

また、本実施例では、S58、S59のメモリおよびOSから受け付けた更新通知に基づいて主メモリに対する更新を検知することとしたが、これに限定されず、例えば、主メモリの更新を監視する監視プロセスを設けて主メモリに対する更新を検知することとしてもよい。   In this embodiment, the update to the main memory is detected based on the update notifications received from the memory and the OS in S58 and S59. However, the present invention is not limited to this. For example, monitoring for monitoring the update of the main memory. A process may be provided to detect updates to the main memory.

<第4の実施例>
図6は、第4の実施例のメモリ同期処理のシーケンスである。
<Fourth embodiment>
FIG. 6 is a sequence of memory synchronization processing according to the fourth embodiment.

図6に示す第4の実施例のS71〜S79までの処理については、図5に示す第3の実施例のS51〜S59と同様であるため、ここでは説明を省略する。   The processing from S71 to S79 of the fourth embodiment shown in FIG. 6 is the same as S51 to S59 of the third embodiment shown in FIG.

OSは、S79で更新通知をメモリ同期プロセス1に送出すると、メモリ同期プロセス1からの更新通知応答を待ち合わせることなく、現用系サーバ1の主メモリを更新する(S80)。そして、主メモリは、OSを介してメモリ更新結果をサーバプロセス1に通知する(S81)。   When the OS sends an update notification to the memory synchronization process 1 in S79, the OS updates the main memory of the active server 1 without waiting for an update notification response from the memory synchronization process 1 (S80). Then, the main memory notifies the server process 1 of the memory update result via the OS (S81).

一方、メモリ同期プロセス1は、OSから受け付けた更新通知(S79)に基づいて、待機系サーバ2の主メモリを更新するための更新要求をNICとネットワークを介して待機系サーバ2のメモリ同期プロセス1に送信する(S82)。   On the other hand, the memory synchronization process 1 sends an update request for updating the main memory of the standby server 2 via the NIC and the network based on the update notification (S79) received from the OS. 1 (S82).

待機系サーバ2のメモリ同期プロセス1は、OSを介して更新要求で指定された内容で、待機系サーバ2の主メモリを更新する(S83)。そして、待機系サーバ2のメモリ同期プロセス1は、更新応答を現用系サーバ1のメモリ同期プロセス1に、NICとネットワークを介して送信する(S84)。更新応答には、待機系サーバ2の主メモリの更新結果(OK、NGなど)が含まれる。   The memory synchronization process 1 of the standby server 2 updates the main memory of the standby server 2 with the contents specified by the update request via the OS (S83). Then, the memory synchronization process 1 of the standby server 2 transmits an update response to the memory synchronization process 1 of the active server 1 via the NIC and the network (S84). The update response includes an update result (OK, NG, etc.) of the main memory of the standby server 2.

現用系サーバ1のメモリ同期プロセス1は、待機系サーバ2から更新応答(メモリ更新結果)を受信し、受信した更新応答をS79の更新通知に対する応答としてOSに送出する(S65)。   The memory synchronization process 1 of the active server 1 receives the update response (memory update result) from the standby server 2, and sends the received update response to the OS as a response to the update notification in S79 (S65).

第4の実施例では、待機系サーバ2のメモリ更新を待たずに非同期で、現用系サーバ1の主メモリを更新する。   In the fourth embodiment, the main memory of the active server 1 is updated asynchronously without waiting for the memory update of the standby server 2.

以上説明した本実施形態では、アプリケーション処理を行うサーバプロセスとは別に、サーバプロセスに対応したメモリ同期プロセスを備える。これにより、本実施形態のアプリケーションプログラムは、メモリ同期処理を考慮したプログラムを開発する必要がなくなり、プログラムの開発を容易にし、プログラム開発効率を向上させることができる。   In the present embodiment described above, a memory synchronization process corresponding to the server process is provided separately from the server process that performs application processing. As a result, the application program of the present embodiment does not need to develop a program that takes into account memory synchronization processing, facilitates program development, and improves program development efficiency.

また、本実施形態の現用系サーバ1および待機系サーバ2は、各筐体内に複数のCPUを備えたマルチコアサーバであり、メモリ同期プロセスと、サーバプロセスとを分けてそれぞれにCPUを割り当てる。これにより、アプリケーションサービスの中断時間を短縮することが可能である。   The active server 1 and the standby server 2 of the present embodiment are multi-core servers each having a plurality of CPUs in each case, and the CPU is assigned to each of the memory synchronization process and the server process separately. Thereby, it is possible to shorten the interruption time of the application service.

なお、本発明は上記実施形態に限定されるものではなく、その要旨の範囲内で数々の変形が可能である。   In addition, this invention is not limited to the said embodiment, Many deformation | transformation are possible within the range of the summary.

例えば、上記第1から第4の実施例では、メモリ同期処理を実行するメモリ同期プロセスをOSとは別のプロセスとし、サーバプロセスからみたミドルウェアとして実装する例を説明したが、これらの実施例に限定されるものではなく、OSやハードウェアの一部としてメモリ同期プロセスと同等の機能を実装することとしてもよい。   For example, in the first to fourth embodiments described above, the memory synchronization process for executing the memory synchronization processing is a process separate from the OS and implemented as middleware as viewed from the server process. However, in these embodiments, The function is not limited, and a function equivalent to the memory synchronization process may be implemented as a part of the OS or hardware.

また、上記第1から第4の実施例では、サーバプロセスがメモリ確保要求した際にメモリ同期プロセスを起動する例を示したが、これに限定されるものではなく、あらかじめメモリ同期プロセスを起動しておいてもよい。   In the first to fourth embodiments described above, an example is shown in which the memory synchronization process is started when the server process makes a memory reservation request. However, the present invention is not limited to this, and the memory synchronization process is started in advance. You may keep it.

また、本実施形態では、サーバプロセスとメモリ同期プロセスとが1対1に対応している例を示しているが、これに限定されるものではなく、複数のサーバプロセスに対して1つのメモリ同期プロセスを割り当ててもよいし、1つのサーバプロセスに対して複数のメモリ同期プロセスを割り当てるようにしてもよい。また、サーバプロセスとメモリ同期プロセスとの割り当て関係を固定的にするのではなく、処理負荷の状況などに応じて動的に切り替えられるようにしてもよい。   In this embodiment, the server process and the memory synchronization process correspond to each other on a one-to-one basis. However, the present invention is not limited to this, and one memory synchronization process is performed for a plurality of server processes. A process may be assigned, or a plurality of memory synchronization processes may be assigned to one server process. Further, the allocation relationship between the server process and the memory synchronization process may not be fixed, but may be dynamically switched according to the processing load status.

また、第3および第4の実施例では、ハードウェアである主メモリにおいてメモリ更新要求を検知する例を説明したが、OSやメモリ同期プロセスなどのミドルウェアにおいてメモリへのアクセスを監視するようにして、サーバプロセスからのメモリ更新要求を検知するようにしてもよい。   In the third and fourth embodiments, an example in which a memory update request is detected in the main memory which is hardware has been described, but access to the memory is monitored in middleware such as an OS or a memory synchronization process. The memory update request from the server process may be detected.

また、第2および第4の実施例では、現用系サーバ1のメモリ更新の度に非同期にメモリ同期プロセスが待機系サーバ2のメモリ更新処理を行う例を説明したが、これに限定されるものではなく、現用系サーバ1のメモリ更新が一定量溜まったタイミングで一括して待機系サーバ2の主メモリを同期して更新してもよいし、周期的に更新状況を確認して一括で同期してもよい。   In the second and fourth embodiments, the example in which the memory synchronization process performs the memory update process of the standby server 2 asynchronously each time the memory of the active server 1 is updated has been described. However, the present invention is not limited to this. Instead, the main memory of the standby server 2 may be updated synchronously at a time when a certain amount of memory update of the active server 1 has accumulated, or the update status may be checked periodically and synchronized at once. May be.

1 :現用系サーバ
2 :待機系サーバ
11、21:CPU
12、22:主メモリ
13、23:ディスクコントローラ
14、24:ディスク
15、25:NIC
101、201:サーバプロセス1
102、202:メモリ同期プロセス1
103、203:サーバプロセス2
104、204:メモリ同期プロセス2
105、205:OS
9:ネットワーク
1: Active server 2: Standby server 11, 21: CPU
12, 22: Main memory 13, 23: Disk controller 14, 24: Disk 15, 25: NIC
101, 201: Server process 1
102, 202: Memory synchronization process 1
103, 203: Server process 2
104, 204: Memory synchronization process 2
105, 205: OS
9: Network

Claims (7)

現用系サーバと待機系サーバとを備える二重化システムであって、
前記現用系サーバは、
アプリケーション処理を行うアプリケーション処理手段と、
前記アプリケーション処理で発生した、当該現用系サーバの主メモリを更新させる第1の更新要求に応じて、前記待機系サーバの主メモリを更新するための第2の更新要求を前記待機系サーバに送信する第1の同期手段と、を備え、
前記待機系サーバは、
前記現用系サーバから前記第2の更新要求を受け付けると、当該待機系サーバの主メモリを更新する第2の同期手段と、を備えること
を特徴とする二重化システム。
A duplex system comprising an active server and a standby server,
The active server is
Application processing means for performing application processing;
A second update request for updating the main memory of the standby server is transmitted to the standby server in response to a first update request generated by the application process for updating the main memory of the active server. First synchronizing means to
The standby server is
A duplex system comprising: a second synchronization unit configured to update a main memory of the standby server when receiving the second update request from the active server.
請求項1記載の二重化システムであって、
前記アプリケーション処理手段は、前記第1の更新要求を前記第1の同期手段に送出し、
前記第1の同期手段は、前記第1の更新要求を受け付けて、当該現用系サーバの主メモリを更新するとともに、前記待機系サーバに前記第2の更新要求を送信すること
を特徴とする二重化システム。
The duplex system according to claim 1, wherein
The application processing means sends the first update request to the first synchronization means,
The first synchronization means receives the first update request, updates the main memory of the active server, and transmits the second update request to the standby server. system.
請求項1記載の二重化システムであって、
前記アプリケーション処理手段は、前記第1の更新要求を当該現用系サーバの主メモリに送出し、
前記第1の同期手段は、前記主メモリに対する更新を検知して、前記待機系サーバに前記第2の更新要求を送信すること
を特徴とする二重化システム。
The duplex system according to claim 1, wherein
The application processing means sends the first update request to the main memory of the active server,
The duplex system according to claim 1, wherein the first synchronization unit detects an update to the main memory and transmits the second update request to the standby server.
請求項2記載の二重化システムであって、
前記第1の同期手段は、前記第2の同期手段から前記第2の更新要求に対する更新応答を受信し、前記現用系サーバの主メモリの更新が完了している場合、前記アプリケーション処理手段に更新結果を通知すること
を特徴とする二重化システム。
The duplex system according to claim 2, wherein
The first synchronization means receives an update response to the second update request from the second synchronization means, and updates the application processing means when the update of the main memory of the active server is completed. A duplex system characterized by notification of results.
請求項3記載の二重化システムであって、
前記主メモリは、前記現用系サーバの主メモリおよび前記待機系サーバの主メモリの更新が完了した場合、前記アプリケーション処理手段に更新結果を通知すること
を特徴とする二重化システム。
The duplex system according to claim 3, wherein
The duplex system is characterized in that the main memory notifies the application processing means of an update result when the update of the main memory of the active server and the main memory of the standby server is completed.
請求項1から請求項5のいずれか1項に記載の二重化システムであって、
前記現用系サーバは、
前記アプリケーション処理手段に割り当てられた第1の演算処理装置と、
前記第1の同期手段に割り当てられた第2の演算処理装置と、をさらに備えること、
を特徴とする二重化システム。
A duplex system according to any one of claims 1 to 5, wherein
The active server is
A first arithmetic processing unit assigned to the application processing means;
A second arithmetic processing unit assigned to the first synchronization means,
Dual system characterized by.
請求項1からは請求項6のいずれか1項に記載の二重化システムが行う、前記現用系サーバの主メモリと前記待機系サーバの主メモリとを同期させるメモリ同期方法。   A memory synchronization method for synchronizing a main memory of the active server and a main memory of the standby server, which is performed by the duplex system according to any one of claims 1 to 6.
JP2011129477A 2011-06-09 2011-06-09 Duplex system and memory synchronization method Pending JP2012256240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011129477A JP2012256240A (en) 2011-06-09 2011-06-09 Duplex system and memory synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011129477A JP2012256240A (en) 2011-06-09 2011-06-09 Duplex system and memory synchronization method

Publications (1)

Publication Number Publication Date
JP2012256240A true JP2012256240A (en) 2012-12-27

Family

ID=47527741

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011129477A Pending JP2012256240A (en) 2011-06-09 2011-06-09 Duplex system and memory synchronization method

Country Status (1)

Country Link
JP (1) JP2012256240A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0764602A (en) * 1993-08-25 1995-03-10 Fuji Facom Corp Duplex controller
JPH08328891A (en) * 1995-06-02 1996-12-13 Mitsubishi Electric Corp Duplex system using standby redundant configuration
JP2007241323A (en) * 2004-05-11 2007-09-20 Nippon Telegr & Teleph Corp <Ntt> Multiplex database system and its data synchronization method, mediation device, mediation program, database server and database server program
JP2008009797A (en) * 2006-06-30 2008-01-17 Fujitsu Ltd Uninterruptible memory replication method
JP2009211517A (en) * 2008-03-05 2009-09-17 Nec Corp Virtual computer redundancy system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0764602A (en) * 1993-08-25 1995-03-10 Fuji Facom Corp Duplex controller
JPH08328891A (en) * 1995-06-02 1996-12-13 Mitsubishi Electric Corp Duplex system using standby redundant configuration
JP2007241323A (en) * 2004-05-11 2007-09-20 Nippon Telegr & Teleph Corp <Ntt> Multiplex database system and its data synchronization method, mediation device, mediation program, database server and database server program
JP2008009797A (en) * 2006-06-30 2008-01-17 Fujitsu Ltd Uninterruptible memory replication method
JP2009211517A (en) * 2008-03-05 2009-09-17 Nec Corp Virtual computer redundancy system

Similar Documents

Publication Publication Date Title
US10983880B2 (en) Role designation in a high availability node
CN111368002A (en) Data processing method, system, computer equipment and storage medium
US10826812B2 (en) Multiple quorum witness
EP3087483B1 (en) System and method for supporting asynchronous invocation in a distributed data grid
JP2012173996A (en) Cluster system, cluster management method and cluster management program
JP2007304845A (en) Virtual computer system and software update method
US9043283B2 (en) Opportunistic database duplex operations
JP4612714B2 (en) Data processing method, cluster system, and data processing program
JP2009223368A (en) Cluster control apparatus, control system, control method, and control program
JP5613119B2 (en) Master / slave system, control device, master / slave switching method, and master / slave switching program
JP4259390B2 (en) Parallel processing unit
JP5716460B2 (en) Cluster system and control method thereof
JP2012256240A (en) Duplex system and memory synchronization method
JP2008009797A (en) Uninterruptible memory replication method
JP5544516B2 (en) Highly available server system, high availability server system failure recovery method, and highly available server
JP2002312333A (en) Multiprocessor initializing/parallel diagnosing method
JP2011248737A (en) Task takeover program, processing device and computer system
JP5449471B2 (en) Method for synchronous processing of update processing for shared data, data sharing system, and data sharing program
CN115103011B (en) Cross-data center service processing method, device and equipment
JP2015014929A (en) Master server, information synchronization method, and information synchronization program
CN117493024B (en) Multi-process heterogeneous program migration method, storage medium and electronic equipment
JP5262492B2 (en) Cluster system and command conflict control method
US10542127B2 (en) Fault tolerant communication in a distributed system
WO2016151654A1 (en) Parallel processing system
JP6733417B2 (en) Information processing apparatus, information processing system, information processing method, and information processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130624

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140423

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140507

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140703

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150106