KR101035857B1 - Method for data management based on cluster system and system using the same - Google Patents

Method for data management based on cluster system and system using the same Download PDF

Info

Publication number
KR101035857B1
KR101035857B1 KR1020080130226A KR20080130226A KR101035857B1 KR 101035857 B1 KR101035857 B1 KR 101035857B1 KR 1020080130226 A KR1020080130226 A KR 1020080130226A KR 20080130226 A KR20080130226 A KR 20080130226A KR 101035857 B1 KR101035857 B1 KR 101035857B1
Authority
KR
South Korea
Prior art keywords
partition
data
partition server
server
service
Prior art date
Application number
KR1020080130226A
Other languages
Korean (ko)
Other versions
KR20100071491A (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 KR1020080130226A priority Critical patent/KR101035857B1/en
Publication of KR20100071491A publication Critical patent/KR20100071491A/en
Application granted granted Critical
Publication of KR101035857B1 publication Critical patent/KR101035857B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명의 파일 복제를 제공하는 클러스터 시스템을 기초로한 데이터 관리 방법 및 이를 이용한 데이터 관리 시스템에서는, 동일한 파티션을 다수의 파티션 서버가 동시에 서비스하기 위하여 복제 파티션 서버군이 할당되고, 상기 복제 파티션 서버군을 이용하여 서비스를 제공한다. 이때, 노드 오류 발생시 데이터를 복구하여, 상기 복제 파티션 서버군을 재구성한다.

Figure R1020080130226

In the data management method based on the cluster system providing the file replication of the present invention and the data management system using the same, a replica partition server group is allocated so that a plurality of partition servers simultaneously serve the same partition, and the replica partition server group To provide services. At this time, in the event of a node failure, data is recovered and the replica partition server group is reconfigured.

Figure R1020080130226

Description

데이터 관리 방법 및 그 시스템{METHOD FOR DATA MANAGEMENT BASED ON CLUSTER SYSTEM AND SYSTEM USING THE SAME}METHOD FOR DATA MANAGEMENT BASED ON CLUSTER SYSTEM AND SYSTEM USING THE SAME

본 발명은 데이터 관리 방법 및 그 장치에 관한 것으로서, 구체적으로, 분산 데이터 관리 시스템을 기반으로 하는 데이터 관리 방법 및 그 시스템에 관한 것이다.The present invention relates to a data management method and apparatus, and more particularly, to a data management method and system based on a distributed data management system.

본 발명은 지식경제부 및 정보통신연구진흥원 IT성장동력핵심기술개발사업의 일환으로 수행한 연구로부터 도출된 것이다.[과제관리번호: 2007-S-016-02, 과제명: 저비용 대규모 글로벌 인터넷 서비스 솔루션 개발]The present invention is derived from a study conducted as part of the IT growth engine core technology development project of the Ministry of Knowledge Economy and the Ministry of Information and Telecommunications Research and Development. [Task management number: 2007-S-016-02, Title: Low-cost large-scale global Internet service solution Development]

웹 2.0의 등장으로 인터넷 서비스가 공급자 중심에서 사용자 중심으로 패러다임이 바뀌고 있다. 이에 따라 UCC(User Created Contents), 개인화 서비스와 같은 인터넷 서비스 시장이 급속도로 증가하고 있다. With the advent of Web 2.0, Internet services are changing the paradigm from provider to user. As a result, the market for Internet services such as User Created Contents (UCC) and Personalization Services is growing rapidly.

이와 같이, 인터넷 서비스가 공급자 중심에서 사용자 중심으로 바뀌는 패러다임 변화로 인해, 인터넷 서비스를 제공하기 위하여 관리해야되는 데이터의 양이 급속도로 증가하고 있는 추세이다. 따라서, 인터넷 서비스를 제공하기 위해서는 대용량의 데이터에 대한 효율적인 관리가 요구된다. As such, due to a paradigm shift in which Internet services are changed from provider to user, the amount of data to be managed in order to provide Internet services is rapidly increasing. Therefore, in order to provide an Internet service, efficient management of a large amount of data is required.

최근에는 저비용의 컴퓨팅 노드들을 대규모로 엮어서 컴퓨팅 파워 및 디스크 공간을 확보하여 대용량의 데이터에 대한 지원을 제공할 수 있는 시스템들이 개발되고 있다. 이러한 시스템들은 다수의 노드들로 구성되어, 노드에 이상이 발생하는 경우를 대비하여, 파일 복제 기술 및 로깅(Logging) 기술을 이용한 고가용성(High Availability)을 제공하고 있다. Recently, systems are being developed that can provide low-cost computing nodes on a large scale to provide computing power and disk space to support large amounts of data. These systems are composed of a plurality of nodes, and provide high availability using file replication technology and logging technology in case of a node failure.

이와 관련된 연구로 구글(google)의 "GFS", Apache Software Foundation의 "HDFS"와 같은 분산 파일 시스템 기술들이 있다. 이 분산 파일 시스템은 시스템의 고가용성을 제공하기 위해 파일에 대한 복제 기술을 채택하고 있다. Related research includes distributed file system technologies such as Google's "GFS" and Apache Software Foundation's "HDFS". This distributed file system employs replication techniques for files to provide high availability of the system.

또한 클러스터 기반의 분산 데이터 관리 시스템인 "Bigtable"과 "HBase"는 이와 같은 파일 복제를 제공하는 분산 파일 시스템을 기반으로 데이터 연산에 대한 로깅과 로깅 정보를 이용한 재수행 기법을 이용하여 데이터에 대한 고가용성을 제공하고 있다.In addition, cluster-based distributed data management systems such as "Bigtable" and "HBase" are based on distributed file systems that provide such file replication. It offers availability.

도 1은 일반적인 클러스터 기반의 분산 데이터 관리 시스템을 보여주는 도면이다.1 is a diagram illustrating a general cluster-based distributed data management system.

도 1을 참조하면, 일반적인 클러스터 기반의 분산 데이터 관리 시스템들은 하나의 마스터 서버(12)와 n개의 파티션 서버들(14-1, 14-2, ..., 14-n)로 구성된다.Referring to FIG. 1, general cluster-based distributed data management systems include one master server 12 and n partition servers 14-1, 14-2,..., 14-n.

마스터 서버(12)는 전체 부하 분산 및 메타 데이터 관리 등을 수행하다. The master server 12 performs overall load balancing and metadata management.

각 파티션 서버들(14-1, 14-2, ..., 14-n)는 실제 데이터 서비스를 담당한다. 각 파티션 서버(14-1, 14-2, ..., 14-n)는 데이터베이스의 특정 부분만 서비스 한다. 이와 같은 시스템은 이전의 데이터 관리 시스템들과 달리 다음과 같은 특징이 있다. Each partition server 14-1, 14-2, ..., 14-n is responsible for the actual data service. Each partition server 14-1, 14-2, ..., 14-n serves only a specific part of the database. Such a system has the following characteristics, unlike previous data management systems.

먼저, 첫 번째로 변경 연산에 대해서 하나의 행에 대한 싱글(single) 연산 트랜잭션만을 지원한다. 두 번째, 데이터에 대한 삽입, 삭제, 변경 발생시 이전 데이터에 대해 변경하는 것이 아니라 삭제가 되었다는 표시나 새로운 값을 가지는 데이터가 추가되는 형태로 처리한다. 세 번째, 데이터의 변경 연산은 메모리 상의 갱신 버퍼(update buffer)에서 수행되며, 이 갱신 버퍼는 일정 크기가 되거나 주기적으로 디스크에 기록된다. 네 번째, 갱신 버퍼의 기록에 의해 생성된 파일들은 주기적으로 통합되어 불필요한 데이터의 삭제 등을 실시한다. 다섯 번째, 시스템 오류에 대한 대처를 위해 메모리 내 수행된 변경 연산은 먼저 로그 파일에 기록한다. 여섯 번째, 디스크 오류에 대한 대처는 분산 파일 시스템의 파일 복제(file replication) 기능과 로그 파일에 저장된 정보를 이용한 재수행 기법을 이용한다.First, only single operation transactions for one row are supported for change operations. Second, when inserting, deleting, or changing data, it does not change the previous data, but instead marks it as deleted or adds a new value. Third, a change operation of data is performed in an update buffer in memory, which is a certain size or is periodically written to disk. Fourth, files generated by the recording of the update buffer are periodically integrated to delete unnecessary data. Fifth, change operations performed in memory to cope with system errors are first recorded in a log file. Sixth, to deal with disk failures, we use the file replication function of distributed file system and redo technique using information stored in log files.

도 2는 일반적인 클러스터 기반의 분산 데이터 관리 시스템의 관리 절차를 보여주는 흐름도이다. 2 is a flowchart illustrating a management procedure of a general cluster-based distributed data management system.

도 2를 참조하면, 사용자의 서비스 요청을 수행할 서버를 마스터 서버에게 요청한다(201), 마스터 서버는 파티션 할당 정보를 이용하여 서비스할 서버를 선정하고(202), 마스터 서버에 의해 선정된 서버로 서비스 요청이 전달되고, 서비스 타입에 따라 해당 파티션 서버에 변경 연산을 요청한다(211). 먼저 로그 파일에 변경 내역을 기록하고(212) 메모리 상에 변경을 수행한다(213). 메모리 상의 정보들이 일정 크기 이상으로 누적되거나 일정 시간이 경과 한 경우 등 디스크에 메모리 내 용을 반영할 시점인지 확인하여(214), 디스크에 반영할 시점이면 이를 디스크 파일로 반영하여(215) 데이터를 영구적으로 저장한다. 디스크 파일에 일정 크기 이상의 데이터가 기록이 되면 분산 파일 시스템에서 이에 대한 복제를 수행하고(216), 변경 연산을 완료한다(217). Referring to FIG. 2, a request is made to a master server to perform a service request of a user (201). The master server selects a server to be serviced using partition allocation information (202), and a server selected by the master server. The service request is transmitted, and a change operation is requested to the corresponding partition server according to the service type (211). First, the change history is recorded in the log file (212), and the change is performed on the memory (213). If the information on the memory is accumulated above a certain size or a predetermined time has elapsed, check whether it is time to reflect the memory content on the disk (214). Store permanently. When data of a predetermined size or more is recorded in the disk file, the distributed file system replicates it (216), and completes the change operation (217).

복제 방법은 데이터가 기록되는 시점에 복제까지 완료하는 동기 방법과 하나의 파일이 기록되면 사용자 요청을 완료한 것으로 보고 시스템 내부에서 알아서 복제를 수행하는 비동기 수행 방법이 가능하다.The replication method can be a synchronous method that completes replication at the point of data recording, and an asynchronous operation method that performs a replication in the system by reporting that a user request is completed when one file is recorded.

사용자의 검색 연산 요청(221)은 먼저 메모리 버퍼 내 내용을 확인하여 있으면(222) 이를 제공하고, 아니면 디스크에 저장되어 있던 정보를 읽어 들여(224) 이로부터 검색 결과를 제공한다(225).The user's search operation request 221 first checks the contents in the memory buffer (222), and provides the search result, or reads the information stored in the disk (224) and provides the search results therefrom (225).

도 3은 일반적인 클러스터 기반의 분산 데이터 관리 시스템에서의 데이터 복구 절차를 보여주는 흐름도이다. 3 is a flowchart illustrating a data recovery procedure in a general cluster-based distributed data management system.

도 3을 참조하면, 우선 마스터 서버(12)에서 노드 오류가 탐지되면(301), Referring to FIG. 3, if a node error is detected at the master server 12 (301),

오류가 발생한 노드에서 작성한 로그 파일을 파티션 분할에 사용된 기준과 로깅 기록 순서로 정렬하고(302), 로그를 파티션 별로 분할한다(303). 이후 오류가 발생한 노드에서 서비스 중인 파티션을 새로운 파티션 서버에서 서비스하도록 할당하면서 재수행 로그 경로 정보를 함께 전달한다(304). The log file created by the node having the error is sorted according to the criteria used for partitioning and the logging recording order (302), and the log is partitioned by partition (303). After that, the redo log path information is transmitted together with the redundancy log path being allocated to the new partition server.

해당 파티션 서버(14-1, 14-2, ..., 14-n)에서는 재수행 로그를 순차적으로 읽어서 갱신 사항을 갱신 버퍼에 반영한 후 디스크에 기록하는 과정을 통해 데이터를 복구하고(305), 데이터 서비스를 시작한다(306). The partition server 14-1, 14-2, ..., 14-n reads the redo logs sequentially, applies the updates to the update buffer, and then recovers the data by writing them to disk (305). Start the data service (306).

이와 같은 시스템은 대용량의 데이터에 대한 확장성과 데이터에 대한 고가용성을 제공한다. Such a system provides scalability for large amounts of data and high availability for the data.

하지만 사용자의 요청이 특정 데이터에 몰릴 경우에는 해당 파티션을 서비스하는 노드에 부하가 증가하여, 서비스를 제대로 수행할 수 없는 경우가 발생한다. 이를 해결하기 위해서는 같은 데이터를 복제하여 여러 노드에서 서비스하는 방법이 필요하다. 즉, 사용자가 집중되는 데이터를 여러 노드에 복제하여 여러 노드에서 서비스를 제공하는 방식으로 부하를 분산시켜야 한다. 이를 위해 기존 데이터 관리 시스템에서는 복제 시스템을 구축하고 원본 시스템과 복제 시스템 간의 데이터 동기화를 실시하여, 서비스를 제공하고 있다. However, when a user's request is concentrated on specific data, the load on the node serving the partition increases, and the service cannot be performed properly. To solve this problem, we need a way to replicate the same data and service it on multiple nodes. In other words, the load should be distributed in such a way that the user-intensive data is replicated to multiple nodes to provide services from multiple nodes. To this end, existing data management systems provide a service by building a replication system and synchronizing data between the original system and the replication system.

그러나, 기존 데이터 관리 시스템에서는 데이터 복제와 복제된 데이터의 변경 시에 동기화 등의 물리적인 복제를 직접 해당 시스템이 처리해야하므로, 고성능이 요구된다. 또한 기존의 데이터 관리 시스템은 테이블 단위의 데이터 복제 기능만을 제공함으로써, 데이터 복제의 낭비를 초래하고 있다. However, in the existing data management system, a high performance is required because the corresponding system must directly handle the physical replication such as synchronization when data replication and replicated data are changed. In addition, the existing data management system only provides a table-level data replication function, causing a waste of data replication.

따라서, 본 발명은 물리적 데이터 복제 기능을 이미 제공하는 클러스터 시스템의 분산 파일 시스템을 이용함으로써, 기존의 방식과는 달리 이미 분산 파일 시스템에서 복제된 파일들과 재수행 로그를 이용하는 논리적인 데이터 복제 방법을 통하여 고성능의 데이터 복제 방법을 제공할 수 있고, 더 나아가 테이블의 일부인 파티션 단위의 데이터 복제 기능을 제공할 수 있는 데이터 관리 방법 및 그 시스템을 제공하는 것이다.Accordingly, the present invention uses a distributed file system of a cluster system that already provides a physical data replication function, and thus, unlike the conventional method, a logical data replication method using files and redo logs that are already replicated in a distributed file system is provided. Through this method, a high performance data replication method can be provided, and furthermore, a data management method and system capable of providing a data replication function of a partition unit that is a part of a table can be provided.

상기와 같은 목적을 달성하기 위한 본 발명의 일면에 따른 데이터 관리 방법은, 동일한 파티션을 다수의 파티션 서버가 동시에 서비스하기 위하여 복제 파티션 서버군을 할당하는 단계와, 상기 복제 파티션 서버군을 이용하여 서비스를 제공하는 단계 및 노드 오류 발생시 데이터를 복구하여, 상기 복제 파티션 서버군을 재구성하는 단계를 포함한다. A data management method according to an aspect of the present invention for achieving the above object, the step of allocating a replica partition server group for a plurality of partition servers to service the same partition at the same time, the service using the replica partition server group Providing and recovering data in the event of a node failure, reconfiguring the replica partition server group.

본 발명의 다른 일면에 따른 데이터 관리 시스템은 동일한 파티션을 동시에 서비스하는 복제 파티션 서버군 및 상기 복제 파티션 서버군을 할당하는 마스터 서버를 포함한다. 이때, 상기 복제 파티션 서버군은 노드 오류 발생시 데이터를 복구하여, 메모리 내의 데이터를 재구성한다.According to another aspect of the present invention, a data management system includes a replica partition server group for simultaneously serving the same partition and a master server for allocating the replica partition server group. At this time, the replica partition server group recovers data when a node error occurs, and reconstructs data in memory.

이러한 본 발명에 의하면, 기본적으로 파일 복제 기능을 제공하는 클러스터 기반의 분산 파일 시스템을 이용하여 복제된 파일들과 재수행 로그를 이용하는 논리적인 데이터 복제 방법을 통하여 고성능의 데이터 복제 기능을 제공한다. 또한, 테이블 단위의 데이터 복제 기능을 제공하는 기존과는 달리 파티션 단위의 데이터 복제 기능을 제공함으로써, 데이터 복제의 낭비를 방지할 수 있다.According to the present invention, a high performance data replication function is provided through a logical data replication method using replicated files and a redo log using a cluster-based distributed file system that basically provides a file replication function. In addition, unlike the conventional table providing a data replication function, it is possible to prevent the waste of data replication by providing a data replication function in a partition unit.

이하, 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명하기로 한다. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 4는 본 발명의 실시예에 따른 클러스터 기반의 분산 데이터 관리 시스템의 관리 절차를 보여주는 흐름도이다. 단, 도 4에서는 점선을 기준으로 클라이언트와 마스터 서버가 구분된다.4 is a flowchart illustrating a management procedure of a cluster-based distributed data management system according to an embodiment of the present invention. However, in FIG. 4, the client and the master server are distinguished based on the dotted line.

도 4를 참조하면, 클라이언트가 마스터 서버에게 서비스 수행 서버에 대한 액세스을 요청하면(S401), 마스터 서버는 상기 액세스에 대한 요청을 수신한 후(S411), 파티션 할당 정보를 검색하고(S412), 해당 파티션을 서비스하는 파티션 서버군을 검색한다.Referring to FIG. 4, when a client requests a master server to access a service performing server (S401), the master server receives a request for the access (S411), and retrieves partition allocation information (S412). Search for a set of partition servers that serve partitions.

이후, 마스터 서버는 상기 파티션 할당 정보로부터 연산 유형을 판별하여, 파티션 서버를 결정한다(S414). 이때, 연산 유형이 변경 연산으로 판별되면(S413), 파티션 서버군에서 1차 파티션 서버(primary partition server)가 결정된다(S418). 연산 유형이 검색 연산으로 판별되면(S413), 노드의 부하 상태에 따라 1차 파티션 서버와 2차 서버(secondary partition server) 중 어느 하나의 파티션 서버가 결정된다(S416). Thereafter, the master server determines a partition server by determining an operation type from the partition allocation information (S414). At this time, if it is determined that the operation type is a change operation (S413), a primary partition server is determined in the partition server group (S418). If the operation type is determined as a search operation (S413), one partition server of the primary partition server and the secondary server (secondary partition server) is determined according to the load state of the node (S416).

클라이언트는 결정된 파티션 서버 정보를 수신하고(402), 해당 파티션 서버에 서비스 수행을 요청한다(403).The client receives the determined partition server information (402), and requests the partition server to perform a service (403).

위와 같이 동일한 파티션을 다수의 파티션 서버가 동시에 서비스하게 하기 위해서는 먼저 파티션 별로 파티션 서버 할당이 필요하다. As described above, in order for multiple partition servers to simultaneously serve the same partition, partition server allocation is required for each partition.

마스터 서버가 클라이언트에게 서비스를 제공하기 위하여 파티션 서버를 결정하는 경우, 핫 데이터(hot data)의 경우에서는 동일한 파티션들을 서비스하는 파티션 서버를 복제된 파일 개수만큼 할당한다. 여기서, 핫 데이터란 액세스 빈도가 높을 것으로 예상되는 데이터를 일컫는다. 참고로, 콜드 데이터(cold data)는 액세스 빈도가 낮을 것으로 예상되는 데이터를 일컫는다.When the master server determines a partition server to provide a service to a client, in case of hot data, a partition server serving the same partitions is allocated as many as the number of replicated files. Here, hot data refers to data that is expected to have high access frequency. For reference, cold data refers to data that is expected to have low access frequency.

결정된 복제 파티션 서버군에서 하나는 1차 파티션 서버로 지정되고, 나머지는 2차 파티션 서버로 지정된다. 1차 파티션 서버는 변경 및 검색 서비스 모두를 담당하고, 2차 파티션 서버는 검색 서비스만 담당하도록 한다.In the determined replica partition server group, one is designated as the primary partition server and the other is designated as the secondary partition server. The primary partition server is responsible for both change and retrieval services, and the secondary partition server is responsible for retrieval services only.

복제 파티션 서버군에 대한 정보는 기존 방식과 마찬가지로 파티션 할당 정보를 아래의 표 1과 같이 관리한다.As for the information on the replica partition server group, the partition allocation information is managed as shown in Table 1 below.

테이블 이름(Table Name) & 파티션 레인지(partition Range)Table Name & Partition Range 파티션 서비스 서버(Partition Service Server)Partition Service Server 1차서버(Primary Server)Primary Server T1 & from 1 to 100T1 & from 1 to 100 노드 1, 노드 2, 노드 3Node 1, Node 2, Node 3 노드 1Node 1 T1 & from 101 to 150  T1 & from 101 to 150 노드 2Node 2 노드 2Node 2 T2 & from 1 to 200T2 & from 1 to 200 노드 2, 노드 3, Node 4Node 2, Node 3, Node 4 노드 3Node 3

사용자의 서비스 요청이 들어오면, 서비스 타입, 해당 행의 키 정보 등을 고려하여 서비스할 파티션 서버를 결정한다. When a user's service request comes in, the partition server to be serviced is determined by considering the service type and key information of the corresponding row.

검색 서비스이고, 동시에 서비스 서버가 복제된 경우라면, 기존 작업(work) 로드 분배 방식을 따라 파티션 서버를 할당하고(S416), 변경 연산인 경우(S413)에는 1차 파티션 서버에게 할당이 된다(S418).If it is a search service and the service server is replicated at the same time, the partition server is allocated according to the existing work load distribution method (S416), and in the case of a change operation (S413), it is assigned to the primary partition server (S418). ).

검색 서비스는 도 2를 참조하여 설명한 방식과 동일한 방식으로 서비스되고, 변경 연산에 대해서는 아래의 도 5에 도시된 바와 같이 수행된다. The search service is serviced in the same manner as described with reference to FIG. 2, and the change operation is performed as shown in FIG. 5 below.

도 5는 본 발명의 실시예에 따른 변경 연산에 대한 서비스 제공 방법을 나타내는 흐름도이다. 단, 도 5에서는 점선을 기준으로 프라이버리 파티션 서버와 2차 파티션 서버가 나타난다.5 is a flowchart illustrating a service providing method for a change operation according to an embodiment of the present invention. However, in FIG. 5, the private partition server and the secondary partition server are shown based on the dotted lines.

도 5를 참조하면, 클라이언트로부터 변경 연산에 대한 요청을 수신하면(S511), 1차 파티션 서버는 기존의 방법처럼 로그 파일에 정보를 기록한다(S512). 이후, 1차 파티션 서버는 2차 파티션 서버들에게 메모리 내의 데이터의 변경 연산을 요청한다(S513). Referring to FIG. 5, upon receiving a request for a change operation from a client (S511), the primary partition server records information in a log file as in the conventional method (S512). Thereafter, the primary partition server requests a change operation of data in memory to the secondary partition servers (S513).

2차 파티션 서버들은 메모리 내 변경 요청을 수신하면(S521), 메모리 변경 연산을 수행하고(S522), 1차 파티션 서버에 상기 변경 연산에 대한 수행 완료 메시지를 송신한다(523). When the secondary partition servers receive an in-memory change request (S521), the secondary partition servers perform a memory change operation (S522), and transmit a performance completion message for the change operation to the primary partition server (523).

1차 파티션 서버는 2차 파티션 서버들로부터 상기 수행 완료 메시지를 받으면(S514), 자신의 메모리 내의 데이터에 대한 변경 연산을 수행한다(S515). When the primary partition server receives the execution completion message from the secondary partition servers (S514), the primary partition server performs a change operation on data in its memory (S515).

메모리 내의 갱신 버퍼의 데이터는 특정 조건이 만족하면 디스크에 반영(또는 저장)되고, 동시에 갱신 버퍼의 데이터는 삭제된다. 이때, 1차 파티션 서버가 관리하는 파티션과 2차 파티션 서버가 관리하는 파티션에 대해 달리 동작한다.Data of the update buffer in the memory is reflected (or stored) on the disk if a specific condition is satisfied, and data of the update buffer is deleted at the same time. At this time, it operates differently for the partition managed by the primary partition server and the partition managed by the secondary partition server.

즉, 1차 파티션 서버로서 관리하던 파티션에 대해서만 해당 정보들을 디스크에 반영하도록 한다. 상기 해당 정보들을 디스크에 반영하는 과정(S516, S517, S518, S519)은 도 2에서 설명한 디스크에 반영하는 과정(S214, S215, S216, S217)과 각각 동일하다. 따라서 이에 대한 구체적인 설명은 생략된다.That is, the information is reflected on the disk only for the partition managed as the primary partition server. The process of reflecting the corresponding information on the disk (S516, S517, S518, S519) is the same as the process (S214, S215, S216, S217) of the disk described in FIG. Therefore, detailed description thereof will be omitted.

본 실시예에서, 노드 오류 시의 데이터 복구 방법은 오류가 발생한 노드에서 관리하던 로그 파일 정보를 파티션 별로 분할한 다음 각 파티션을 새로운 서버들에게 할당하는 경우, 서버의 역할이 1차(primary)인지, 2차(secondary)인지에 따라 다르다.In this embodiment, the data recovery method in case of a node failure is to divide the log file information managed by the failed node into partitions and then assign each partition to new servers. It depends on whether it is secondary or not.

서버의 역할이 1차적인 경우, 기존 시스템에서 복구하는 방법과 동일하게 파티션에 대한 로깅 정보를 이용하여 메모리 내의 데이터를 복구한 후 디스크에 반영한다. When the role of the server is primary, the data in the memory is recovered and reflected on the disk by using the logging information on the partition in the same way as the recovery in the existing system.

서버의 역할이 2차적인 경우, 오류가 발생한 서버에서는 변경 연산은 발생하지 않으므로, 로깅 정보는 존재하지 않는다. 따라서 2차 파티션 서버로서 할당된 새로운 파티션 서버는 해당 파티션을 서비스하던 1차 파티션 서버로부터 현재까지 메모리 내에 누적된 데이터들에 대한 변경 내역을 모두 디스크에 반영한다. In the case where the role of the server is secondary, the change operation does not occur in the server where the error occurs, and thus no logging information exists. Therefore, the new partition server allocated as the secondary partition server reflects all changes on the data accumulated in the memory up to now from the primary partition server serving the partition.

도 6은 본 발명의 실시예에 따른 데이터 관리 시스템에서의 노드 오류시 데이터 복구 방법을 보여주기 위한 흐름도이다. 6 is a flowchart illustrating a data recovery method in the event of a node failure in a data management system according to an embodiment of the present invention.

도 6을 참조하면, 마스터 서버는 오류가 발생한 노드에서 관리하던 로그 파일을 파티션 별로 분할하고(S601), 분할된 각 파티션을 서비스할 노드들을 선정한다(S602). 이후, 각 파티션 별로 오류가 발생한 노드의 역할이 무엇인지를 판별한다(S603). 이때, 오류가 발생한 노드가 1차적인 역할로 판별되면, 파티션 로그 정보를 1차 파티션 서버로 전달하여(S604), 새롭게 선정된 노드가 해당 파티션에 대한 데이터의 복구를 수행한다(S605). 만일 오류가 발생한 노드가 2차적인 역할로 판별되면, 해당 파티션의 1차 파티션 서버에 대한 정보를 2차 파티션 서버에 전달하고(S606), 2차 파티션 서버로서 데이터의 복구(607)가 수행된다.Referring to FIG. 6, the master server divides the log file managed by the node in which the error occurs by partition (S601), and selects nodes to service each partition (S602). Thereafter, it is determined what the role of the node where the error occurs for each partition (S603). At this time, when the node in which the error occurs is determined to be the primary role, the partition log information is transmitted to the primary partition server (S604), and the newly selected node recovers data for the corresponding partition (S605). If the failed node is determined to be a secondary role, information about the primary partition server of the corresponding partition is transmitted to the secondary partition server (S606), and data recovery 607 is performed as the secondary partition server. .

도 7은 본 발명의 실시예에 따른 2차 파티션 서버로서 데이트를 복구하는 방법을 보여주는 흐름도이다.7 is a flowchart illustrating a method of recovering data as a secondary partition server according to an embodiment of the present invention.

도 7을 참조하면, 먼저, 2차 파티션 서버는 1차 파티션 서버에게 현재까지 기록된 로깅 정보를 요청한다(S701). Referring to FIG. 7, first, the secondary partition server requests logging information recorded so far from the primary partition server (S701).

1차 파티션 서버는 로깅 파일로부터 해당 파티션에 속하는 로깅 정보만을 추출하고(702), 추출된 로깅 정보를 다시 2차 파티션 서버에 전달한다(703). 이때, 1차 파티션 서버는 계속 서비스를 실시한다(S704).The primary partition server extracts only logging information belonging to the partition from the logging file (702), and passes the extracted logging information back to the secondary partition server (703). At this time, the primary partition server continues to service (S704).

2차 파티션 서버는 1차 파티션 서버로부터 로깅 정보 파일을 전달받아(705) 메모리 내에 데이터를 재구성하고(S706). 메모리내의 데이터의 재구성이 완료되면, 재구성이 완료되었음을 알리는 제1 완료 메시지를 1차 파티션 서버에 통지한다(S707). The secondary partition server receives the logging information file from the primary partition server (705) and reconstructs the data in the memory (S706). When the reconstruction of the data in the memory is completed, the primary partition server notifying the completion of the reconstruction is notified to the primary partition server (S707).

1차 파티션 서버는 상기 완료 메시지를 수신하면(708), 로깅 정보 파일을 전달 후 변경 연산에 의해 추가된 로깅 정보만을 수집하여, 이를 2차 파티션 서버에 재전달한다(S709). 이때, 1차 파티션 서버는 2차 파티션 서버로부터 완료 통지를 받을 때(714)까지 서비스를 중단한다(S710).When the primary partition server receives the completion message (708), the primary partition server collects only the logging information added by the change operation after transferring the logging information file and re-delivers it to the secondary partition server (S709). At this time, the primary partition server stops the service until it receives a completion notification from the secondary partition server (714) (S710).

2차 파티션 서버는 1차 파티션 서버로부터 상기 추가된 로깅 정보를 다시 전달받고(S711), 추가된 로깅 정보를 메모리 내에서 재구성하여, 상기 추가된 로깅 정보와 메모리 내의 데이터를 일치시킨다(S712).The secondary partition server receives the added logging information from the primary partition server again (S711), reconstructs the added logging information in the memory, and matches the added logging information with the data in the memory (S712).

상기 메모리 내에서 재구성된 추가된 로깅 정보와 상기 메모리 내의 데이터 간의 일치가 완료되면, 완료되었음을 알리는 제2 완료 메시지를 1차 파티션 서버측에 통지한다(713). When the matching between the reconstructed added logging information in the memory and the data in the memory is completed, a second completion message indicating completion is notified to the primary partition server side (713).

1차 파티션 서버는 2차 파티션 서버로부터 제2 재구성 완료 메시지를 통지받으면(S714), 새로운 제2 파티션 서버가 해당 파티션을 서비스함으로써, 서비스가 재개된다(S715).When the primary partition server is notified of the second reconfiguration complete message from the secondary partition server (S714), the service is resumed by the new second partition server servicing the corresponding partition (S715).

한편, 상술한 바와 같이, 2 단계로 메모리 내의 정보를 복구하는 것은 복구하는 동안 1차 파티션 서버에 의한 서비스 중단시간을 최소화하기 위함이다.On the other hand, as described above, restoring information in the memory in two steps is to minimize service downtime by the primary partition server during the recovery.

지금까지 살펴본 바와 같이, 본 발명의 데이터 관리 방법에서는 기존의 방식과는 달리 이미 분산 파일 시스템에서 복제된 파일들과 재수행 로깅 정보를 이용한 논리적인 데이터 복제 방법을 제공한다. As described above, the data management method of the present invention, unlike the conventional method, provides a logical data replication method using files already replicated in a distributed file system and redo logging information.

더욱이, 본 발명에서는 테이블 단위보다 작은 파티션 단위로 데이터를 복제함으로써, 테이블 단위로 복제하는 종래와는 달리 파티션 단위로 데이터를 복제함으로써, 데이터 복제에 따른 낭비를 최소화시킬 수 있다.Furthermore, in the present invention, by copying data in a smaller partition unit than in a table unit, unlike the conventional copying in a table unit, data is copied in a partition unit, thereby minimizing waste due to data replication.

도 1은 일반적인 클러스터 기반의 분산 데이터 관리 시스템을 보여주는 도면이다.1 is a diagram illustrating a general cluster-based distributed data management system.

도 2는 일반적인 클러스터 기반의 분산 데이터 관리 시스템의 관리 절차를 보여주는 흐름도이다.2 is a flowchart illustrating a management procedure of a general cluster-based distributed data management system.

도 3은 일반적인 클러스터 기반의 분산 데이터 관리 시스템에서의 데이터 복구 절차를 보여주는 흐름도이다.3 is a flowchart illustrating a data recovery procedure in a general cluster-based distributed data management system.

도 4는 본 발명의 실시예에 따른 클러스터 기반의 분산 데이터 관리 시스템의 관리 절차를 보여주는 흐름도이다.4 is a flowchart illustrating a management procedure of a cluster-based distributed data management system according to an embodiment of the present invention.

도 5는 본 발명의 실시예에 따른 변경 연산에 대한 서비스 제공 방법을 나타내는 흐름도이다.5 is a flowchart illustrating a service providing method for a change operation according to an embodiment of the present invention.

도 6은 본 발명의 실시예에 따른 데이터 관리 시스템에서의 노드 오류시 데이터 복구 방법을 보여주기 위한 흐름도이다.6 is a flowchart illustrating a data recovery method in the event of a node failure in a data management system according to an embodiment of the present invention.

도 7은 본 발명의 실시예에 따른 2차 파티션 서버로서 데이트를 복구하는 방법을 보여주는 흐름도이다.7 is a flowchart illustrating a method of recovering data as a secondary partition server according to an embodiment of the present invention.

Claims (10)

파일 복제를 제공하는 클러스터 시스템 기반의 데이터 관리 방법에 있어서,In the cluster system-based data management method that provides file replication, 동일한 파티션을 다수의 파티션 서버가 동시에 서비스하기 위하여 복제 파티션 서버군을 할당하는 단계;Allocating a replica partition server group so that a plurality of partition servers simultaneously serve the same partition; 상기 복제 파티션 서버군을 이용하여 서비스를 제공하는 단계 및Providing a service using the replica partition server group; and 노드 오류 발생시 데이터를 복구하여, 상기 복제 파티션 서버군을 재구성하는 단계Reconstructing the replica partition server group by recovering data in case of node failure 를 포함하는 클러스터 시스템 기반의 데이터 관리 방법.Cluster system based data management method comprising a. 제1항에 있어서, 상기 복제 파티션 서버군을 할당하는 단계는,The method of claim 1, wherein the step of assigning a replica partition server group, 상기 동일한 파티션을 서비스하는 파티션 서버를 복제된 파일 개수만큼 할당하는 단계; 및Allocating a partition server serving the same partition by the number of replicated files; And 상기 할당된 파티션 서버의 역할이 변경 서비스 및 검색 서비스를 모두 담당하는 1차 파티션 서버(Primary partition sever)인지 오직 상기 검색 서비스만을 담당하는 2차 파티션 서버(Secondary partition sever)인지를 판별하는 단계Determining whether a role of the assigned partition server is a primary partition server that is in charge of both a change service and a search service or a secondary partition server that is responsible only for the search service 를 포함하는 것인 클러스터 시스템 기반의 데이터 관리 방법.Cluster system-based data management method comprising a. 제2항에 있어서, 복제 파티션 서버군을 이용하여 서비스를 제공하는 단계는,The method of claim 2, wherein the providing of the service by using a replica partition server group includes: 상기 변경 서비스를 제공하는 경우, 복제 파티션 서버군에 속하는 모든 2차 파티션 서버들의 각 메모리들이 변경 연산을 통해 동일한 데이터 정보를 저장하는 단계; 및When providing the change service, storing the same data information through the change operations of the memories of all the secondary partition servers belonging to the replica partition server group; And 상기 1차 파티션 서버에 의해 서비스가 제공되는 파티션만을 디스크에 반영하는 단계Reflecting only the partition provided with the service by the primary partition server on the disk 를 포함하는 것인 데이터 관리 방법. Data management method comprising a. 제1항에 있어서, 상기 복제 파티션 서버군을 이용하여 서비스를 제공하는 단계는,The method of claim 1, wherein providing a service using the replica partition server group includes: 사용자의 서비스 요구에 대한 해당 행의 키값 정보뿐만 아니라 서비스 타입을 고려하여 파티션 서버가 선정되어, 상기 서비스를 제공하는 단계인 것인 데이터 관리 방법.And selecting a partition server in consideration of a service type as well as key value information of a corresponding row of a user's service request, and providing the service. 제2항에 있어서, 노드 오류 발생시 데이터를 복구하여, 상기 복제 파티션 서버군을 재구성하는 단계에 있어서, The method of claim 2, wherein the reconstructing the replica partition server group by recovering data in the event of a node failure comprises: 상기 1차 파티션 서버에 의한 상기 데이터의 복구 절차와 상기 2차 파티션 서버에 의한 상기 데이터 복구 절차는 서로 다른 것인 데이터 관리 방법.The data recovery procedure by the primary partition server and the data recovery procedure by the secondary partition server are different. 제5항에 있어서, 상기 2차 파티션 서버에 의한 데이터 복구 절차는 2단계의 절차로 수행되고, The data recovery procedure by the secondary partition server is performed in a two-step procedure, 상기 2단계의 절차는,The procedure of the two steps, 상기 1차 파티션 서버로부터의 로깅 정보 파일에 근거하여 상기 2차 파티션 서버 내의 메모리를 재구성하는 단계; 및Reconfiguring memory in the secondary partition server based on a logging information file from the primary partition server; And 상기 1차 파티션 서버로부터 추가된 로깅 정보 파일에 근거하여 상기 2차 파티션 서버의 메모리 내의 데이터를 재구성하여, 최신 데이터로 상기 메모리 내의 데이터를 일치화시키는 단계를 포함하는 것인 데이터 관리 방법. Reconstructing the data in the memory of the secondary partition server based on the logging information file added from the primary partition server to match the data in the memory with the latest data. 파일 복제를 제공하는 클러스터 시스템 기반의 데이터 관리 시스템에 있어서,A data management system based on cluster system that provides file replication, 동일한 파티션을 동시에 서비스하는 복제 파티션 서버군; 및A replica partition server group serving the same partition at the same time; And 상기 복제 파티션 서버군을 할당하는 마스터 서버를 포함하고,A master server for allocating the replica partition server group; 상기 복제 파티션 서버군은 노드 오류 발생시 데이터를 복구하여, 메모리 내의 데이터를 재구성하는 것인 데이터 관리 시스템.And said replica partition server group recovers data in the event of a node failure and reconstructs data in memory. 제7항에 있어서, 상기 복제 파티션 서버군은 상기 마스터 서버에 의해 8. The server of claim 7, wherein the replica partition server group is configured by the master server. 변경 서비스 및 검색 서비스를 모두를 제공하는 1차 파티션 서버와, 오직 검색 서비스만을 제공하는 2차 파티션 서버로 지정되는 것인 데이터 관리 시스템.A data management system, which is designated as a primary partition server providing both change service and search service, and a secondary partition server providing only search service. 제8항에 있어서, The method of claim 8, 상기 노드 오류 발생시, 상기 1차 파티션 서버의 경우, 파티션에 대한 로깅 정보를 이용하여 메모리 내의 데이터를 복구한 후, 이를 디스크에 반영하는 것인 데이터 관리 시스템.When the node error occurs, in the case of the primary partition server, after recovering the data in the memory by using the logging information for the partition, and reflecting it on the disk. 제8항에 있어서,The method of claim 8, 상기 노드 오류 발생시, 상기 2차 파티션 서버의 경우, 해당 파티션을 서비스하는 상기 1차 파티션 서버로부터 현재까지 메모리 내에 누적된 데이터들에 대한 변경 내역을 모두 디스크에 반영하는 것인 데이터 관리 시스템.When the node error occurs, in the case of the secondary partition server, the data management system reflects all changes of data accumulated in the memory up to now from the primary partition server serving the partition.
KR1020080130226A 2008-12-19 2008-12-19 Method for data management based on cluster system and system using the same KR101035857B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080130226A KR101035857B1 (en) 2008-12-19 2008-12-19 Method for data management based on cluster system and system using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080130226A KR101035857B1 (en) 2008-12-19 2008-12-19 Method for data management based on cluster system and system using the same

Publications (2)

Publication Number Publication Date
KR20100071491A KR20100071491A (en) 2010-06-29
KR101035857B1 true KR101035857B1 (en) 2011-05-19

Family

ID=42368982

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080130226A KR101035857B1 (en) 2008-12-19 2008-12-19 Method for data management based on cluster system and system using the same

Country Status (1)

Country Link
KR (1) KR101035857B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190113366A (en) 2018-03-28 2019-10-08 주식회사 리얼타임테크 Distributed cluster management system and method for thereof

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101696911B1 (en) * 2011-11-01 2017-01-17 한국전자통신연구원 Distributed Database Apparatus and Method for Processing Stream Data Thereof
KR101662728B1 (en) 2014-06-24 2016-10-05 삼성중공업 주식회사 Open rack vaporizer assembly of ship

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100478346B1 (en) 2003-10-21 2005-03-25 한국전자통신연구원 Load balancing method based on graph-partitioning for cluster sever and the system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100478346B1 (en) 2003-10-21 2005-03-25 한국전자통신연구원 Load balancing method based on graph-partitioning for cluster sever and the system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190113366A (en) 2018-03-28 2019-10-08 주식회사 리얼타임테크 Distributed cluster management system and method for thereof

Also Published As

Publication number Publication date
KR20100071491A (en) 2010-06-29

Similar Documents

Publication Publication Date Title
US7546486B2 (en) Scalable distributed object management in a distributed fixed content storage system
CN105447075B (en) The computer implemented method divided for dynamic
CN109074306B (en) Hybrid garbage collection in a distributed storage system
US10248356B2 (en) Using scratch extents to facilitate copying operations in an append-only storage system
US11841844B2 (en) Index update pipeline
EP2619695B1 (en) System and method for managing integrity in a distributed database
KR101453425B1 (en) Metadata Server And Metadata Management Method
US9507843B1 (en) Efficient replication of distributed storage changes for read-only nodes of a distributed database
US7330859B2 (en) Database backup system using data and user-defined routines replicators for maintaining a copy of database on a secondary server
CN106547859B (en) Data file storage method and device under multi-tenant data storage system
JP5823037B2 (en) Index construction method, search method, search device, and search system
US9547706B2 (en) Using colocation hints to facilitate accessing a distributed data storage system
KR20110082529A (en) Partition management in a partitioned, scalable, and available structured storage
JP2016524750A5 (en)
JP2013544386A5 (en)
CN101334797A (en) Distributed file systems and its data block consistency managing method
KR100936238B1 (en) Lazy Replication System And Method For Balanced I/Os Between File Read/Write And Replication
US20190196918A1 (en) Methods and systems of operating a database management system dmbs in a strong consistency mode
JP2004164401A (en) Database system, center server, and access method for database
CN113905054B (en) RDMA (remote direct memory access) -based Kudu cluster data synchronization method, device and system
US20130006920A1 (en) Record operation mode setting
KR101035857B1 (en) Method for data management based on cluster system and system using the same
CN116303789A (en) Parallel synchronization method and device for multi-fragment multi-copy database and readable medium
CN115687250A (en) Storage method, equipment, system and computer storage medium
CN113495807A (en) Data backup method, data recovery method and device

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
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20140430

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20150427

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20160427

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20180426

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20190503

Year of fee payment: 9