KR101430239B1 - Method and Apparatus for Synchronizing Data in Active-Active Database Server System - Google Patents

Method and Apparatus for Synchronizing Data in Active-Active Database Server System Download PDF

Info

Publication number
KR101430239B1
KR101430239B1 KR1020070107236A KR20070107236A KR101430239B1 KR 101430239 B1 KR101430239 B1 KR 101430239B1 KR 1020070107236 A KR1020070107236 A KR 1020070107236A KR 20070107236 A KR20070107236 A KR 20070107236A KR 101430239 B1 KR101430239 B1 KR 101430239B1
Authority
KR
South Korea
Prior art keywords
log
transaction
data synchronization
database server
application servers
Prior art date
Application number
KR1020070107236A
Other languages
Korean (ko)
Other versions
KR20090041624A (en
Inventor
서정민
김미연
임미숙
Original Assignee
주식회사 케이티
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 주식회사 케이티 filed Critical 주식회사 케이티
Priority to KR1020070107236A priority Critical patent/KR101430239B1/en
Publication of KR20090041624A publication Critical patent/KR20090041624A/en
Application granted granted Critical
Publication of KR101430239B1 publication Critical patent/KR101430239B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

본 발명은 액티브-액티브 데이터베이스 서버 시스템에서 데이터 동기화 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and method for synchronizing data in an active-active database server system.

본 발명은 두 개의 스토리지가 존재하는 액티브-액티브 데이터베이스 서버 시스템에서 하나의 데이터베이스 노드에 장애가 발생하는 경우 응용 프로그램을 이용하여 두 데이터베이스 노드 간의 데이터 동기화를 맞추는 방법을 제공한다.The present invention provides a method of synchronizing data synchronization between two database nodes using an application program when a failure occurs in one database node in an active-active database server system in which two storages exist.

본 발명은 스토리지가 다수인 데이터베이스 서버 시스템에서 성능을 보장하면서 데이터베이스 서버 간 데이터 동기화를 보장할 수 있는 효과를 기대할 수 있다.The present invention can provide an effect of ensuring data synchronization between database servers while ensuring performance in a database server system having a plurality of storages.

트랜잭션, 데이터 동기화, 액티브-액티브 데이터베이스 시스템 Transaction, Data Synchronization, Active-Active Database System

Description

액티브-액티브 데이터베이스 서버 시스템에서 데이터 동기화 장치 및 방법{Method and Apparatus for Synchronizing Data in Active-Active Database Server System}[0001] The present invention relates to an apparatus and method for synchronizing data in an active-active database server system,

본 발명은 데이터 동기화 장치 및 방법에 관한 것으로서, 특히 액티브-액티브 데이터베이스 서버 시스템에서 데이터 동기화 장치 및 방법에 관한 것이다.The present invention relates to a data synchronization apparatus and method, and more particularly, to an apparatus and method for synchronizing data in an active-active database server system.

정보 기술 분야는 디스크 기반의 데이터베이스 관리 시스템(Database Management System, 이하 'DBMS'라 칭함)이 주로 활용되고 있다. 최근에는 응용 분야에 메인 메모리 DBMS도 활용되고 있는 추세이다.In the information technology field, a disk-based database management system (DBMS) is mainly utilized. In recent years, main memory DBMS has been used in applications.

상용 DBMS에서는 데이터 가용성, 신뢰성, 정합성을 제공하기 위해서 엔진 자체에 복제 기능, 동기화 기능을 제공한다.Commercial DBMS provides replication function and synchronization function in the engine itself to provide data availability, reliability, and consistency.

그러나 상용 DBMS는 실제 데이터베이스 서버 구축시 성능이 기대에 미치지 못하거나 사용자가 요구하는 기능을 만족하지 못하는 경우가 많기 때문에 응용 프로그램을 별도로 개발하여 복제 및 데이터 동기화를 수행하는 경우가 많았다.However, in commercial DBMS, there are many cases where the performance is not satisfied when the actual database server is constructed or the functions required by the user are not satisfied. Therefore, the application program is separately developed to perform replication and data synchronization.

특히, DBMS 서버뿐만 아니라 스토리지까지 이중화되어 있는 액티브-액티브 데이터베이스 서버 환경에서는 하나의 데이터베이스 노드에 장애가 발생하는 경우 다른 데이터베이스 노드가 계속 서비스를 수행하면서 장애 서버의 복구 이후에 두 데이터베이스 노드 간의 데이터 동기화를 보장하는 방법이 매우 중요하다.In particular, in an active-active database server environment that has redundant storage as well as DBMS servers, if one database node fails, another database node continues to serve, ensuring data synchronization between the two database nodes after recovery of the failed server Is very important.

상용 DBMS에 종래 기술로 2PC(2 Phase Commit)을 사용하는 경우 트랜잭션 일치성을 보장할 수 있으나 처리 속도가 느리기 때문에 상용 DBMS 서비스에 활용하기에 부적합하다. When 2PC (2 Phase Commit) is used as a conventional technology in commercial DBMS, transaction consistency can be guaranteed, but it is not suitable for commercial DBMS service due to its slow processing speed.

이와 같은 문제점을 해결하기 위하여, 본 발명은 액티브-액티브 데이터베이스 서버 시스템에서 하나의 데이터베이스 노드에 장애가 발생한 경우 응용 프로그램을 이용하여 두 데이터베이스 노드 간 데이터 동기화를 맞추는 데이터 동기화 장치 및 방법을 제공하기 위한 것이다.In order to solve such problems, the present invention provides a data synchronization apparatus and method for synchronizing data synchronization between two database nodes by using an application program when a failure occurs in one database node in an active-active database server system.

이러한 기술적 과제를 달성하기 위한 본 발명의 특징에 따른 데이터 동기화 방법은 (a) 장애가 발생한 데이터베이스 서버의 장애 상태를 체크하고 상기 데이터베이스 서버로부터 장애 회복 신호가 수신되는 경우, 트랜잭션을 수행하는 하나 이상의 애플리케이션 서버―각 애플리케이션 서버는 로그 기록기를 가진 미들웨어를 포함함―로부터 수신한 제1 로그를 질의문으로 변환하여 상기 데이터베이스 서버로 트랜잭션 처리를 요청하는 단계; (b) 상기 트랜잭션 처리를 완료하면, 트랜잭션 처리 완료 신호를 생성하여 상기 하나 이상의 애플리케이션 서버로 전송하는 단계; 및 (c) 상기 (a)단계에서 상기 트랜잭션 처리하는 동안, 상기 하나 이상의 애플리케이션 서버로부터 수신된 제2 로그를 질의문으로 변환하여 상기 데이터베이스 서버로 잔여 트랜잭션 처리를 요청함으로써 데이터 동기화를 맞추는 단계를 포함한다.According to an aspect of the present invention, there is provided a data synchronization method comprising the steps of: (a) checking a failure state of a database server in which a failure occurs and, when a failure recovery signal is received from the database server, - each application server including middleware with a log recorder - translating the first log received from the application server into a query message and requesting the database server for transaction processing; (b) upon completion of the transaction processing, generating and transmitting a transaction processing completion signal to the one or more application servers; And (c) during the transaction processing in step (a), converting the second log received from the one or more application servers into a query and requesting the database server to process the remaining transaction, do.

본 발명의 특징에 따른 데이터 동기화 장치는 연동하고 있는 하나 이상의 데이터베이스 서버를 폴링 방식으로 제어하여 서버의 장애 여부를 판단하는 장애 확 인부; 트랜잭션을 수행하는 하나 이상의 애플리케이션 서버―각 애플리케이션 서버는 로그 기록기를 가진 미들웨어를 포함함―로부터 제1 로그를 수신하여 저장하는 로그 수신부; 및 장애가 발생한 데이터베이스 서버로부터 장애 회복 신호를 수신하는 경우, 상기 저장한 제1 로그를 질의문으로 변환하여 상기 장애를 발생한 데이터베이스 서버로 제1 트랜잭션 처리를 요청하고, 상기 제1 트랜잭션 처리를 완료하면 상기 제1 트랜잭션 처리를 수행하는 동안 수신된 제2 로그를 질의문으로 변환하여 상기 장애를 발생한 데이터베이스 서버로 제2 트랜잭션 처리를 요청하는 트랜잭션 처리부를 포함한다.A data synchronization apparatus according to an embodiment of the present invention includes a failure confirmation unit for controlling at least one database server in cooperation with a polling method to determine whether a server has failed; A log receiver for receiving and storing a first log from one or more application servers that perform transactions, each application server including middleware with a logger; And a first transaction processing unit that requests the first database server to process the first transaction if the failure log is received from the database server in which the failure occurs, And a transaction processor for converting a second log received during the first transaction process into a query and requesting the database server that has generated the failure to perform a second transaction process.

전술한 구성에 의하여, 본 발명은 스토리지가 다수인 데이터베이스 서버 시스템에서 성능을 보장하면서 데이터베이스 서버 간 데이터 동기화를 보장할 수 있는 효과를 기대할 수 있다.According to the above-described configuration, it is possible to guarantee data synchronization between database servers while ensuring performance in a database server system having a plurality of storages.

본 발명은 액티브-액티브 데이터베이스 서버 시스템에서 하나의 데이터베이스 노드에 장애가 발생한 경우 응용 프로그램을 이용하여 두 서버 간의 트랜잭션 누수 없이 데이터 동기화를 맞추는 효과를 기대할 수 있다.The present invention can be expected to achieve data synchronization in an active-active database server system without causing transaction leaks between two servers by using an application program when a failure occurs in one database node.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설 명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present invention. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In order to clearly illustrate the present invention in the drawings, parts not related to the description are omitted, and like parts are denoted by similar reference numerals throughout the specification.

명세서 전체에서, 어떤 부분이 어떤 구성요소 "포함" 한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 "…부", "…기", "모듈", "블록" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.Throughout the specification, when a component is referred to as "comprising ", it means that it can include other components as well, without excluding other components unless specifically stated otherwise. Also, the terms " part, "" module," " module, "and " block" refer to units that process at least one function or operation, Lt; / RTI >

도 1은 본 발명의 실시예에 따른 액티브-액티브 이중화 데이터베이스 서버 시스템에서 정상 상태를 나타낸 도면이고, 도 2는 본 발명의 실시예에 따른 액티브-액티브 이중화 데이터베이스 서버 시스템에서 디스크 기반 제2 DBMS 서버(130)에 장애가 발생한 경우를 나타낸 도면이다.FIG. 1 is a diagram illustrating a normal state in an active-active redundant database server system according to an embodiment of the present invention. FIG. 2 is a block diagram illustrating an active-active redundant database server system according to an embodiment of the present invention. 130) in which a failure has occurred.

본 발명의 실시예에서는 제1 애플리케이션 서버(100), 제2 애플리케이션 서버(110), 디스크 기반 제1 DBMS 서버(120), 디스크 기반 제2 DBMS 서버(130) 및 데이터 동기화 장치(140)를 포함한다.The first application server 100, the second application server 110, the disk-based first DBMS server 120, the disk-based second DBMS server 130, and the data synchronization device 140 are included in the embodiment of the present invention do.

제1 애플리케이션 서버(100) 및 제2 애플리케이션 서버(110)는 각각 미들웨어1(102) 및 미들웨어2(112)가 응용 프로그램으로 탑재되어 있다.The first application server 100 and the second application server 110 each have middleware 1 102 and middleware 2 112 installed as application programs.

제1 애플리케이션 서버(100)의 미들웨어1(102)과 제2 애플리케이션 서버(110)의 미들웨어2(112)에서 처리한 트랜잭션 데이터는 디스크 기반 제1 DBMS 서버(120)의 스토리지1(124)과 디스크 기반 제2 DBMS 서버(130)의 스토리지2(134)에 동시에 저장된다.The transaction data processed by the middleware 1 102 of the first application server 100 and the middleware 2 112 of the second application server 110 are stored in the storage 1 124 of the disk- Based second DBMS server 130 in the storage 2 134 of the second DBMS server 130. [

디스크 기반 제1 DBMS 서버(120)은 제1 DBMS 서버(122)와 스토리지1(124)을 포함하고, 디스크 기반 제2 DBMS 서버(130)은 제2 DBMS 서버(132)와 스토리지2(134)을 포함한다.The disk-based first DBMS server 120 includes a first DBMS server 122 and a storage 1 124. The disk-based second DBMS server 130 includes a second DBMS server 132 and a storage 2 134, .

제1 애플리케이션 서버(100)의 미들웨어1(102)과 제2 애플리케이션 서버(110)의 미들웨어2(112)는 각각 디스크 기반 제1 DBMS 서버(120)와 디스크 기반 제2 DBMS 서버(130)에 데이터를 읽고 쓸 수 있다.The middleware 1 102 of the first application server 100 and the middleware 2 112 of the second application server 110 are connected to the disk based first DBMS server 120 and the disk based second DBMS server 130, You can read and write.

예를 들어, 미들웨어1(102)에서 트랜잭션 데이터를 생성하여 라이트(Write)하면 디스크 기반 제1 DBMS 서버(120)와 디스크 기반 제2 DBMS 서버(130)에 동일한 트랜잭션 데이터를 전송한다. 따라서, 디스크 기반 제1 DBMS 서버(120)와 디스크 기반 제2 DBMS 서버(130)은 동일한 트랜잭션 데이터를 저장한다.For example, when the middleware 1 102 generates and writes transaction data, the same transaction data is transmitted to the disk-based first DBMS server 120 and the disk-based second DBMS server 130. Therefore, the disk-based first DBMS server 120 and the disk-based second DBMS server 130 store the same transaction data.

제1 애플리케이션 서버(100)의 미들웨어1(102)과 제2 애플리케이션 서버(110)의 미들웨어2(112)는 디스크 기반 제1 DBMS 서버(120) 또는 디스크 기반 제2 DBMS 서버(130)에 장애가 발생하는 경우, 디스크 기반 제1 DBMS 서버(120) 및 디스크 기반 제2 DBMS 서버(130)에서 수행된 트랜잭션이 그 순서를 유지하면서 데이터 동기화 장치(140)에 각각 로그를 전송한다.The middleware 1 102 of the first application server 100 and the middleware 2 112 of the second application server 110 fail in the disk based first DBMS server 120 or the disk based second DBMS server 130 , The transactions performed in the disk-based first DBMS server 120 and the disk-based second DBMS server 130 transmit logs to the data synchronizer 140 while maintaining the order.

데이터 동기화 장치(140)는 제1 애플리케이션 서버(100)의 미들웨어1(102)와 제2 애플리케이션 서버(110)의 미들웨어2(112)로부터 로그를 수신하고, 로그에 쌓여 있는 트랜잭션을 디스크 기반 제1 DBMS 서버(120) 또는 디스크 기반 제2 DBMS 서버(130)에 트랜잭션 처리를 요청한다.The data synchronization apparatus 140 receives the log from the middleware 1 102 of the first application server 100 and the middleware 2 112 of the second application server 110, And requests the DBMS server 120 or the disk-based second DBMS server 130 for transaction processing.

전술한 미들웨어1(102) 및 미들웨어2(112)는 구조적 질의 언어(Structured Query Language: SQL)를 파싱하여 오퍼레이션별로 로그를 저장하는 로그 기록기(응용 프로그램)를 포함한다.The middleware 1 102 and the middleware 2 112 described above include a log recorder (application program) for parsing a structured query language (SQL) and storing a log for each operation.

데이터 동기화 장치(140)에 저장할 로그의 형태는 다음과 같다.The type of log to be stored in the data synchronization apparatus 140 is as follows.

로그 스키마 = (일련번호, 수행 시간, 호출 서비스, 오퍼레이션명, 테이블명, 컬럼명, 값, 조건)Log schema = (serial number, execution time, call service, operation name, table name, column name, value, condition)

여기서, 일련번호는 수행되는 구조적 질의 언어문의 순서, 수행 시간은 로그를 기록하는 시간, 호출 서비스는 로그 기록을 호출한 미들웨어의 서비스, 오퍼레이션명은 쓰기 전용 DML(Data Manipulation Language)문의 종류(INSERT, UPDATE, DELETE), 테이블명은 테이블 이름, 컬럼명은 처리되는 컬럼 이름, 값은 컬럼에 반영되는 값, 조건은 쓰기 DML을 수행할 행의 조건을 의미한다.Here, the serial number is the sequence of the structured query language executed, the execution time is the time at which the log is recorded, the call service is the service of the middleware that called the log record, and the operation name is the type of the write-only DML (Data Manipulation Language) , DELETE), the table name is the table name, the column name is the column name to be processed, the value is the value to be reflected in the column, and the condition is the condition of the row to execute the write DML.

예를 들어, 아래와 같은 스키마가 있다고 가정할 때,For example, suppose you have the following schema:

create table AAA (a integer, b varchar(20));create table AAA (a integer, b varchar (20));

create table BBB (a integer, b varchar(20), c varchar(20));create table BBB (a integer, b varchar (20), c varchar (20));

create table CCC (x integer, y varchar(10));create table CCC (x integer, y varchar (10));

제1 애플리케이션 서버(100)의 미들웨어1(102)와 제2 애플리케이션 서버(110)의 미들웨어2(112)는 아래와 같은 트랜잭션을 디스크 기반 제1 DBMS 서버(120)에 수행하면서 동시에 로그 기록기를 호출하여 데이터 동기화 장치(140)에도 로그를 저장시킨다.The middleware 1 102 of the first application server 100 and the middleware 2 112 of the second application server 110 simultaneously execute the following transaction on the disk-based first DBMS server 120 while invoking the log recorder And stores the log in the data synchronization apparatus 140 as well.

Trans_beginTrans_begin

insert into AAA values (1, ' aaa');insert into AAA values (1, 'aaa');

update AAA set a = ' bbb' where a = ' aaa' ;update AAA set a = 'bbb' where a = 'aaa';

insert into BBB values (2, ' bbb' , ' ccc');insert into BBB values (2, 'bbb', 'ccc');

delete from CCC where x=1 and y <> ' zzz' ;delete from CCC where x = 1 and y <> 'zzz';

Trans_endTrans_end

Figure 112007076188315-pat00001
Figure 112007076188315-pat00001

다음, 도 3을 참조하여 액티브-액티브 이중화 데이터베이스 서버 시스템에서 데이터 동기화 장치(140)의 내부 구성을 상세하게 설명한다.Next, the internal configuration of the data synchronization apparatus 140 in the active-active duplication database server system will be described in detail with reference to FIG.

도 3은 본 발명의 실시예에 따른 액티브-액티브 이중화 데이터베이스 서버 시스템에서 데이터 동기화 장치(140)의 내부 구성을 간략하게 나타낸 블록 구성도이다.3 is a block diagram schematically illustrating an internal structure of a data synchronization apparatus 140 in an active-active duplication database server system according to an embodiment of the present invention.

본 발명의 실시예에 따른 데이터 동기화 장치(140)는 장애 확인부(142), 로그 수신부(144), 트랜잭션 처리부(146) 및 신호 처리부(148)를 포함한다.The data synchronization apparatus 140 according to the embodiment of the present invention includes a failure confirmation unit 142, a log reception unit 144, a transaction processing unit 146, and a signal processing unit 148.

장애 확인부(142)는 연동되어 있는 디스크 기반 제1 DBMS 서버(120)와 디스크 기반 제2 DBMS 서버(130)를 폴링 방식으로 제어하여 서버의 장애 여부를 체크한다.The failure checking unit 142 controls the disk-based first DBMS server 120 and the disk-based second DBMS server 130 in a polling manner to check whether the server has failed.

로그 수신부(144)는 제1 애플리케이션 서버(100)의 로그 기록기1(104)과 제2 애플리케이션 서버(110)의 로그 기록기2(114)로부터 로그를 수신하여 로그 형식으로 저장한다.The log receiving unit 144 receives logs from the log recorder 1 104 of the first application server 100 and the log recorder 2 114 of the second application server 110 and stores them in a log format.

트랜잭션 처리부(146)는 장애가 발생한 디스크 기반 제1 DBMS 서버(120) 또는 디스크 기반 제2 DBMS 서버(130)에서 장애 상태가 회복되는 경우(장애 회복 신호를 수신하는 경우), 제1 애플리케이션 서버(100)의 로그 기록기1(104)과 제2 애플리케이션 서버(110)의 로그 기록기2(114)로부터 수신한 로그를 질의문으로 변환하여 디스크 기반 제2 DBMS 서버(130)로 트랜잭션 처리를 요청한다. 또한, 트랜잭션 처리부(146)는 트랜잭션 처리하는 동안 제1 애플리케이션 서버(100)의 로그 기록기1(104)과 제2 애플리케이션 서버(110)의 로그 기록기2(114)로부터 수신한 잔여 로그를 질의문으로 변환하여 디스크 기반 제2 DBMS 서버(130)로 트랜잭션 처리를 요청한다.The transaction processing unit 146 may be configured such that when the failure state is recovered in the failed disk based first DBMS server 120 or the disk based second DBMS server 130 The second DB server 130 converts the log received from the log recorder 1 104 of the first application server 110 and the log recorder 2 114 of the second application server 110 into a query message and requests transaction processing to the disk- In addition, the transaction processing unit 146 queries the remaining log received from the log recorder 1 104 of the first application server 100 and the log recorder 2 114 of the second application server 110 during the transaction processing as a query And requests transaction processing to the disk-based second DBMS server 130.

신호 처리부(148)는 트랜잭션 처리부(146)에서 로그에 대한 트랜잭션 처리를 완료하면 트랜잭션 처리 완료 신호를 생성하여 제1 애플리케이션 서버(100)의 미들웨어1(102) 및 제2 애플리케이션 서버(110)의 미들웨어2(112)로 전송한다. 또한, 신호 처리부(148)는 데이터 동기화를 위한 로그를 모두 처리한 경우, 정상 복제 완료 신호를 생성하여 제1 애플리케이션 서버(100)의 미들웨어1(102) 및 제2 애플리케이션 서버(110)의 미들웨어2(112)로 전송한다.When the transaction processing unit 146 completes the transaction processing for the log, the signal processing unit 148 generates a transaction processing completion signal and transmits the transaction processing completion signal to the middleware 1 102 of the first application server 100 and the middleware of the second application server 110 2 (112). When all the logs for data synchronization have been processed, the signal processing unit 148 generates a normal duplication completion signal and transmits the normal duplication completion signal to the middleware 1 102 of the first application server 100 and the middleware 2 of the second application server 110 (112).

다음, 도 4를 참조하여 액티브-액티브 이중화 데이터베이스 서버 시스템에서 데이터 동기화 방법을 상세하게 설명한다.Next, a data synchronization method in an active-active duplication database server system will be described in detail with reference to FIG.

도 4는 본 발명의 실시예에 따른 액티브-액티브 이중화 데이터베이스 서버 시스템에서 데이터 동기화 방법을 설명하기 위한 도면이다.4 is a diagram for explaining a data synchronization method in an active-active duplication database server system according to an embodiment of the present invention.

도 4에 도시된 바와 같이, 액티브-액티브 이중화 데이터베이스 서버 시스템에서 디스크 기반 제2 DBMS 서버(130)에 장애가 발생한 후 정상으로 다시 장애 회복하는 경우 데이터 동기화를 맞추는 방법을 나타낸 것이다.As shown in FIG. 4, in the active-active redundant database server system, a method of adjusting data synchronization when a failure occurs in the disk-based second DBMS server 130 and then the failure recovers normally.

제1 애플리케이션 서버(100)의 미들웨어1(102) 및 제2 애플리케이션 서버(110)의 미들웨어2(112)는 각각 디스크 기반 제1 DBMS 서버(120)와 디스크 기반 제2 DBMS 서버(130)와 연결되어 주기적으로 장애 여부를 체크한다(S100).The middleware 1 102 of the first application server 100 and the middleware 2 112 of the second application server 110 are connected to the disk based first DBMS server 120 and the disk based second DBMS server 130, And periodically checks for a failure (S100).

제2 애플리케이션 서버(110)의 미들웨어2(112)는 디스크 기반 제2 DBMS 서버(130)에 장애가 발생한다고 판단하는 경우 디스크 기반 제2 DBMS 서버(130)에 연결하는 대신에 데이터 동기화를 위한 버퍼 공간인 데이터 동기화 장치(140)에 연결한다(S102).The middleware 2 112 of the second application server 110 determines that a failure occurs in the disk-based second DBMS server 130, instead of connecting to the disk-based second DBMS server 130, To the data synchronization apparatus 140 (S102).

제1 애플리케이션 서버(100)의 로그 기록기1(104)과 제2 애플리케이션 서버(110)의 로그 기록기2(114)는 각각 제1 애플리케이션 서버(100) 및 제2 애플리케이션 서버(110)에서 수행된 트랜잭션 데이터를 그 순서를 유지하면서 데이터 동기화 장치(140)에 제1 로그를 전송한다(S104).The log recorder 1 104 of the first application server 100 and the log recorder 2 114 of the second application server 110 are connected to the first application server 100 and the second application server 110, And transmits the first log to the data synchronization apparatus 140 while maintaining the order of the data (S104).

데이터 동기화 장치(140)는 제1 애플리케이션 서버(100) 및 제2 애플리케이션 서버(110)로부터 수신한 제1 로그를 로그 형식으로 저장한다.The data synchronization apparatus 140 stores the first log received from the first application server 100 and the second application server 110 in a log format.

장애 확인부(142)는 연동된 디스크 기반 제1 DBMS 서버(120) 및 디스크 기반 제2 DBMS 서버(130)와 폴링하면서 장애 상태를 계속 체크한다(S106). 이어서, 트랜잭션 처리부(146)는 디스크 기반 제2 DBMS 서버(130)가 장애가 회복되어 연결이 된다고 판단하는 경우(즉 장애 회복 신호가 수신되는 경우), 기저장되어 있는 제1 로그를 질의문으로 변환하여 디스크 기반 제2 DBMS 서버(130)로 트랜잭션 처리를 요청한다(S108).The fault checking unit 142 continuously polls the interoperable disk-based first DBMS server 120 and the disk-based second DBMS server 130 (S106). If the disk-based second DBMS server 130 determines that the disk-based second DBMS server 130 has recovered from a failure (that is, a failure recovery signal is received), the transaction processing unit 146 converts the first stored log into a query And requests the disk-based second DBMS server 130 for transaction processing (S108).

디스크 기반 제2 DBMS 서버(130)는 데이터 동기화 장치(140)로부터 수신된 제1 로그에 쌓여 있는 트랜잭션들을 순서대로 실행한다.The disk-based second DBMS server 130 sequentially executes the transactions accumulated in the first log received from the data synchronization apparatus 140.

신호 처리부(148)는 제1 로그에 쌓여 있는 트랜잭션들을 모두 처리하면 트랜잭션 처리 완료 신호를 생성하여 제1 애플리케이션 서버(100)의 미들웨어1(102) 및 제2 애플리케이션 서버(110)의 미들웨어2(112)로 전송한다(S110). 이어서, 제1 애플리케이션 서버(100)의 미들웨어1(102) 및 제2 애플리케이션 서버(110)의 미들웨어2(112)는 트랜잭션 처리 완료 신호를 수신하는 경우, 기설정된 시간 동안 트랜잭션을 처리하지 않고 슬립 타임(Sleep Time)을 가진다(S112).The signal processing unit 148 generates a transaction processing completion signal to process the middleware 1 102 of the first application server 100 and the middleware 2 112 of the second application server 110 (S110). The middleware 1 102 of the first application server 100 and the middleware 2 112 of the second application server 110 receive the transaction processing completion signal and do not process the transaction for the preset time, (Sleep Time) (S112).

트랜잭션 처리부(146)는 전술한 슬립 타임 동안 제2 로그를 질의문으로 변환하여 디스크 기반 제2 DBMS 서버(130)로 잔여 트랜잭션 처리를 요청한다(S114).The transaction processor 146 converts the second log into a query message during the sleep time described above and requests the disk-based second DBMS server 130 to process the remaining transaction (S114).

여기서, 제2 로그는 단계 S108에서 트랜잭션 처리하는 동안 제1 애플리케이션 서버(100)의 로그 기록기1(104)과 제2 애플리케이션 서버(110)의 로그 기록기2(114)로부터 수신되는 로그를 의미한다. Here, the second log means a log received from the log recorder 1 104 of the first application server 100 and the log recorder 2 114 of the second application server 110 during transaction processing in step S108.

더욱 자세하게 설명하면, 제2 로그는 단계 S108에서 트랜잭션 처리하고, 트랜잭션 처리 완료 신호가 제1 애플리케이션 서버(100)의 미들웨어1(102)과 제2 애플리케이션 서버(110)의 미들웨어2(112)로 수신할 때까지 제1 애플리케이션 서버(100)의 로그 기록기1(104)과 제2 애플리케이션 서버(110)의 로그 기록기2(114)로부터 수신되는 로그를 의미한다.More specifically, the second log is processed in step S108, and a transaction process completion signal is received by the middleware 1 102 of the first application server 100 and the middleware 2 112 of the second application server 110 Means a log received from the log recorder 1 104 of the first application server 100 and the log recorder 2 114 of the second application server 110 until the second application server 110 receives the log.

잔여 트랜잭션 처리를 요청하는 이유는 디스크 기반 제2 DBMS 서버(130)가 장애를 회복한 후, 단계 S108에서 저장된 제1 로그를 기초로 트랜잭션 처리를 수행하게 되는데, 이때에도 미들웨어1(102) 및 미들웨어2(112)에서 계속하여 트랜잭션을 발생시켜 데이터 동기화 장치(140)에 로그를 남기기 때문이다.The reason for requesting the residual transaction processing is that after the disk-based second DBMS server 130 recovers from the failure, the transaction processing is performed based on the first log stored in step S108. At this time, the middleware 1 102 and the middleware 2 112 continues to generate a transaction to leave a log in the data synchronization device 140.

신호 처리부(148)는 디스크 기반 제2 DBMS 서버(130)로부터 잔여 트랜잭션 처리 완료 신호를 수신하는 경우, 모든 로그들을 처리했음을 알리는 정상 복제 완료 신호를 생성하여 제1 애플리케이션 서버(100)의 미들웨어1(102) 및 제2 애플리케이션 서버(110)의 미들웨어2(112)로 전송한다(S116). 이어서, 데이터 동기화 장치(140)는 정상적으로 복구된 로그를 삭제한다(S118).Upon receiving the remaining transaction processing completion signal from the disk-based second DBMS server 130, the signal processing unit 148 generates a normal replication completion signal indicating that all the logs have been processed and transmits the normal replication completion signal to the middleware 1 ( 102 and the middleware 2 112 of the second application server 110 (S116). Subsequently, the data synchronization apparatus 140 deletes the log that has been normally recovered (S118).

이상에서 설명한 본 발명의 실시예는 장치 및/또는 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시예의 구성에 대응하는 기능을 실현하기 위한 프로그램, 그 프로그램이 기록된 기록 매체 등을 통해 구현될 수도 있으며, 이러한 구현은 앞서 설명한 실시예의 기재로부터 본 발명이 속하는 기술분야의 전문가라면 쉽게 구현할 수 있는 것이다.The embodiments of the present invention described above are not implemented only by the apparatus and / or method, but may be implemented through a program for realizing functions corresponding to the configuration of the embodiment of the present invention, a recording medium on which the program is recorded And such an embodiment can be easily implemented by those skilled in the art from the description of the embodiments described above.

이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, It belongs to the scope of right.

도 1은 본 발명의 실시예에 따른 액티브-액티브 이중화 데이터베이스 서버 시스템에서 정상 상태를 나타낸 도면이다.1 illustrates a steady state in an active-active redundancy database server system according to an embodiment of the present invention.

도 2는 본 발명의 실시예에 따른 액티브-액티브 이중화 데이터베이스 서버 시스템에서 디스크 기반 제2 DBMS 서버에 장애가 발생한 경우를 나타낸 도면이다.2 is a diagram illustrating a case where a failure occurs in a disk-based second DBMS server in an active-active duplication database server system according to an embodiment of the present invention.

도 3은 본 발명의 실시예에 따른 액티브-액티브 이중화 데이터베이스 서버 시스템에서 데이터 동기화 장치의 내부 구성을 간략하게 나타낸 블록 구성도이다.3 is a block diagram schematically illustrating an internal configuration of a data synchronization apparatus in an active-active duplication database server system according to an embodiment of the present invention.

도 4는 본 발명의 실시예에 따른 액티브-액티브 이중화 데이터베이스 서버 시스템에서 데이터 동기화 방법을 설명하기 위한 도면이다.4 is a diagram for explaining a data synchronization method in an active-active duplication database server system according to an embodiment of the present invention.

Claims (6)

(a) 하나 이상의 애플리케이션 서버에 의해 수행되는 트랙잭션 데이터를 이중화하여 저장하는 복수의 데이터베이스 서버 중 하나의 데이터베이스 서버에 장애가 발생하는 경우 상기 하나 이상의 애플리케이션 서버는 각자에 의해 수행되는 트랜잭션을 로그화한 제1 로그를 데이터 동기화 장치로 전달하는 단계;(a) when a failure occurs in one of the plurality of database servers that duplicate and store the transaction data performed by one or more application servers, the one or more application servers execute the first Forwarding the log to a data synchronization device; (b) 상기 데이터 동기화 장치는 장애가 발생한 데이터베이스 서버의 장애 상태를 체크하고 상기 장애가 발생한 데이터베이스 서버로부터 장애 회복 신호가 수신되는 경우, 상기 제1 로그를 질의문으로 변환하여 상기 장애가 발생한 데이터베이스 서버로 트랜잭션 처리를 요청하는 단계;(b) The data synchronization device checks the failure status of the failed database server and, when receiving a failure recovery signal from the failed database server, converts the first log into a query message, ; (c) 상기 장애가 발생한 데이터베이스 서버에 의해 상기 제1 로그에 따른 상기 트랜잭션 처리가 완료되면, 상기 데이터 동기화 장치는 트랜잭션 처리 완료 신호를 생성하여 상기 하나 이상의 애플리케이션 서버로 전송하는 단계; 및(c) when the transaction processing according to the first log is completed by the database server in which the failure occurs, the data synchronization device generates and transmits a transaction processing completion signal to the one or more application servers; And (d) 상기 장애가 발생한 데이터베이스 서버에 의해 상기 제1 로그에 따른 트랜잭션 처리가 수행되는 동안에 상기 하나 이상의 애플리케이션 서버에서 수행된 트랜잭션을 로그화한 제2 로그를 수신한 상기 데이터 동기화 장치가 상기 제2 로그를 질의문으로 변환하여 상기 장애가 발생한 데이터베이스 서버로 잔여 트랜잭션 처리를 요청함으로써 데이터 동기화를 맞추는 단계를 포함하며,(d) the data synchronization apparatus, which has received the second log in which the transactions performed in the one or more application servers are logged while the transaction processing according to the first log is performed by the database server in which the failure occurs, To a query message, and requesting the database server in which the failure occurred to process the remaining transaction, thereby matching data synchronization, 상기 하나 이상의 애플리케이션 서버는 상기 장애가 발생한 데이터베이스 서버가 상기 제2 로그에 따른 트랜잭션을 처리하도록 기설정된 시간동안 트랜잭션 처리를 수행하지 않는Wherein the one or more application servers do not perform transaction processing for a predetermined period of time such that the failed database server processes a transaction according to the second log 것을 특징으로 하는 데이터 동기화 방법.The data synchronization method comprising: 제1 항에 있어서,The method according to claim 1, 상기 (d)단계 이후에,After the step (d) 상기 장애가 발생한 데이터베이스 서버에 의해 상기 잔여 트랜잭션 처리가 완료되면, 상기 데이터 동기화 장치는 데이터 동기화를 위한 모든 로그를 처리했음을 나타내는 정상 복제 완료 신호를 생성하여 상기 하나 이상의 애플리케이션 서버로 전송하는 단계; 및When the remaining transaction processing is completed by the failed database server, generating a normal replication completion signal indicating that all logs for data synchronization have been processed and transmitting the signal to the one or more application servers; And 상기 하나 이상의 애플리케이션 서버는 데이터 동기화를 위해 처리된 로그를 삭제하는 단계Wherein the one or more application servers delete the processed log for data synchronization 를 더 포함하는 데이터 동기화 방법.Further comprising the steps of: 하나 이상의 애플리케이션 서버에 의해 수행되는 트랙잭션 데이터를 이중화하여 저장하는 복수의 데이터베이스 서버를 폴링 방식으로 제어하여 장애 여부를 판단하는 장애 확인부;A fault checking unit for controlling a plurality of database servers, which duplicate and store transaction data performed by one or more application servers, in a polling manner to determine a fault; 상기 장애 확인부에 의해 상기 복수의 데이터베이스 서버 중 하나에 장애가 발생한 것으로 판단되는 경우, 상기 하나 이상의 애플리케이션 서버에 의해 수행되는 트랜잭션을 로그화한 제1 로그를 각 애플리케이션 서버로부터 수신하여 저장하는 로그 수신부; 및A log receiving unit for receiving and storing a first log of a transaction performed by the at least one application server from each application server when it is determined by the failure check unit that one of the plurality of database servers has failed; And 장애가 발생한 데이터베이스 서버로부터 장애 회복 신호를 수신하는 경우, 상기 로그 수신부에 저장한 제1 로그를 질의문으로 변환하여 상기 장애가 발생한 데이터베이스 서버로 제1 트랜잭션 처리를 요청하고, 상기 장애가 발생한 데이터베이스 서버에 의해 상기 제1 트랜잭션 처리가 완료되면 상기 제1 트랜잭션 처리를 수행하는 동안 상기 하나 이상의 애플리케이션 서버에서 수행된 트랜잭션을 로그화한 제2 로그를 각 애플리케이션 서버로부터 수신하여 질의문으로 변환하여 상기 장애가 발생한 데이터베이스 서버로 제2 트랜잭션 처리를 요청하는 트랜잭션 처리부를 포함하며,Wherein when a failure recovery signal is received from the database server in which the failure occurs, the first log stored in the log receiving unit is converted into a query message to request a first transaction processing to the failed database server, When the first transaction processing is completed, a second log, which is a log of a transaction performed by the one or more application servers during the first transaction processing, is received from each application server, converted into a query statement, And a transaction processing unit for requesting a second transaction processing, 상기 장애가 발생한 데이터베이스 서버가 상기 제2 트랜잭션을 처리하도록 상기 하나 이상의 애플리케이션 서버는 기설정된 시간동안 트랜잭션 처리를 수행하지 않는Wherein the one or more application servers do not perform transaction processing for a predetermined time so that the failed database server processes the second transaction 것을 특징으로 하는 데이터 동기화 장치.The data synchronization device comprising: 제3 항에 있어서,The method of claim 3, 상기 제1 트랜잭션 처리를 완료하면 트랜잭션 처리 완료 신호를 생성하여 상기 하나 이상의 애플리케이션 서버로 전송하고, 상기 제2 트랜잭션 처리를 완료하면 데이터 동기화를 위한 모든 로그를 처리했음을 나타내는 정상 복제 완료 신호를 생성하여 상기 하나 이상의 애플리케이션 서버로 전송하는 신호 처리부Generating a transaction completion signal by transmitting a transaction completion signal to the one or more application servers when the first transaction process is completed and generating a normal replication completion signal indicating that all logs for data synchronization have been processed when the second transaction process is completed, A signal processor for transmitting to one or more application servers 를 더 포함하는 데이터 동기화 장치.Further comprising: 제3 항 또는 제4 항에 있어서,The method according to claim 3 or 4, 상기 제1 로그는 상기 장애가 발생한 데이터베이스 서버로부터 상기 상기 장애 회복 신호를 수신할 때까지, 상기 하나 이상의 애플리케이션 서버로부터 수신되는 로그를 의미하는 것을 특징으로 하는 데이터 동기화 장치.Wherein the first log means a log received from the one or more application servers until receiving the failure recovery signal from the failed database server. 제4 항에 있어서,5. The method of claim 4, 상기 제2 로그는 상기 제1 트랜잭션 처리를 수행하고 상기 트랜잭션 처리 완료 신호가 상기 하나 이상의 애플리케이션 서버로 수신할 때까지 상기 하나 이상의 애플리케이션 서버로부터 수신되는 로그를 의미하는 것을 특징으로 하는 데이터 동기화 장치.Wherein the second log means a log received from the one or more application servers until the first transaction processing is performed and the transaction processing completion signal is received by the one or more application servers.
KR1020070107236A 2007-10-24 2007-10-24 Method and Apparatus for Synchronizing Data in Active-Active Database Server System KR101430239B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020070107236A KR101430239B1 (en) 2007-10-24 2007-10-24 Method and Apparatus for Synchronizing Data in Active-Active Database Server System

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020070107236A KR101430239B1 (en) 2007-10-24 2007-10-24 Method and Apparatus for Synchronizing Data in Active-Active Database Server System

Publications (2)

Publication Number Publication Date
KR20090041624A KR20090041624A (en) 2009-04-29
KR101430239B1 true KR101430239B1 (en) 2014-08-19

Family

ID=40764624

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070107236A KR101430239B1 (en) 2007-10-24 2007-10-24 Method and Apparatus for Synchronizing Data in Active-Active Database Server System

Country Status (1)

Country Link
KR (1) KR101430239B1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101662212B1 (en) * 2014-05-30 2016-10-04 주식회사 알티베이스 Database Management System providing partial synchronization and method for partial synchronization thereof
KR101582802B1 (en) * 2014-06-12 2016-01-08 주식회사 리얼타임테크 Method for synchronizing data between dds nodes using real-time dbms based on in-memory
CN113949704B (en) * 2021-10-15 2024-03-08 北京奇艺世纪科技有限公司 User information processing method and server cluster

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020036502A (en) * 2000-11-10 2002-05-16 오길록 Duplicated Database Management System for Main Memory Resident DBMS
KR20030048503A (en) * 2001-12-12 2003-06-25 주식회사 엘지이아이 Communication system and method for data synchronization of duplexing server
US20040193625A1 (en) 2003-03-27 2004-09-30 Atsushi Sutoh Data control method for duplicating data between computer systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020036502A (en) * 2000-11-10 2002-05-16 오길록 Duplicated Database Management System for Main Memory Resident DBMS
KR20030048503A (en) * 2001-12-12 2003-06-25 주식회사 엘지이아이 Communication system and method for data synchronization of duplexing server
US20040193625A1 (en) 2003-03-27 2004-09-30 Atsushi Sutoh Data control method for duplicating data between computer systems

Also Published As

Publication number Publication date
KR20090041624A (en) 2009-04-29

Similar Documents

Publication Publication Date Title
EP3968175B1 (en) Data replication method and apparatus, and computer device and storage medium
JP7208967B2 (en) Systems and methods for capturing change data from distributed data sources for use against heterogeneous targets
US10114710B1 (en) High availability via data services
CN110209726B (en) Distributed database cluster system, data synchronization method and storage medium
US7363444B2 (en) Method for taking snapshots of data
US7330859B2 (en) Database backup system using data and user-defined routines replicators for maintaining a copy of database on a secondary server
US8150800B2 (en) Advanced clock synchronization technique
KR101662212B1 (en) Database Management System providing partial synchronization and method for partial synchronization thereof
US7490113B2 (en) Database log capture that publishes transactions to multiple targets to handle unavailable targets by separating the publishing of subscriptions and subsequently recombining the publishing
KR101352959B1 (en) Apparatus and method for database management in active and standby nodes of main memory database management system
US20120278429A1 (en) Cluster system, synchronization controlling method, server, and synchronization controlling program
CN109298978B (en) Recovery method and system for database cluster of specified position
CN110569269A (en) data synchronization method and system
US11995099B2 (en) System and method for switching from consistent database to an eventual consistent database replica in real time while preventing reads of past versions of the data
US7197519B2 (en) Database system including center server and local servers
KR101430239B1 (en) Method and Apparatus for Synchronizing Data in Active-Active Database Server System
US20230315713A1 (en) Operation request processing method, apparatus, device, readable storage medium, and system
KR20050060803A (en) Xml database duplicating apparatus for copying xml document to remote server without loss of structure and attribute information of xml document and method therefor
CN114328749A (en) Business data processing method and device and computer readable storage medium
JP4844743B2 (en) Data multiplexing system
JP2001034518A (en) Master-slave relation information synchronization system in decentralized database
CN110121712A (en) A kind of blog management method, server and Database Systems
US20210240351A1 (en) Remote copy system and remote copy management method
KR100526221B1 (en) Method and System for Restoring Database Synchronization in Independent Mated Pair System
CN115766856A (en) Dump and retrieval method for service bus message stream log

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
FPAY Annual fee payment

Payment date: 20180801

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20190731

Year of fee payment: 6