KR101641799B1 - Failover system and method for restoring a TCP session - Google Patents

Failover system and method for restoring a TCP session Download PDF

Info

Publication number
KR101641799B1
KR101641799B1 KR1020140193517A KR20140193517A KR101641799B1 KR 101641799 B1 KR101641799 B1 KR 101641799B1 KR 1020140193517 A KR1020140193517 A KR 1020140193517A KR 20140193517 A KR20140193517 A KR 20140193517A KR 101641799 B1 KR101641799 B1 KR 101641799B1
Authority
KR
South Korea
Prior art keywords
packet
simulated
session
tcp
block
Prior art date
Application number
KR1020140193517A
Other languages
Korean (ko)
Other versions
KR20160080935A (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 KR1020140193517A priority Critical patent/KR101641799B1/en
Publication of KR20160080935A publication Critical patent/KR20160080935A/en
Application granted granted Critical
Publication of KR101641799B1 publication Critical patent/KR101641799B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0695Management of faults, events, alarms or notifications the faulty arrangement being the maintenance, administration or management system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management

Abstract

본 발명은 장애가 감지되면 페일오버 콜백(failover callback) 함수를 호출하고, 페일오버 콜백 함수가 호출되면 저장된 세션 정보를 이용하여 모의 SYN 패킷을 생성하여 백업 서버의 TCP 블록으로 송신하고, TCP 블록에서 ACK 요청 함수를 호출하면, 저장된 세션 정보를 이용하여 모의 ACK 패킷을 생성하여 TCP 블록으로 송신하여 장애 발생시 TCP 세션을 복원하는 장애조치 시스템 및 그 방법에 관한 것이다.When a failure is detected, a failover callback function is called. When a failover callback function is called, a simulated SYN packet is generated using the stored session information and transmitted to the TCP block of the backup server. In the TCP block, The present invention relates to a fail-over system and method for recovering a TCP session when a failure occurs by generating a simulated ACK packet using the stored session information and transmitting the simulated ACK packet to a TCP block.

Figure R1020140193517
Figure R1020140193517

Description

TCP 세션을 복원하는 장애조치 시스템 및 방법{Failover system and method for restoring a TCP session}[0001] The present invention relates to a failover system and method for restoring a TCP session,

이중화 통신을 제공하는 고장 허용 시스템(Fault Tolerant system)에서 마스터 서버에 고장이 발생하여도 백업 서버를 이용하여 사용자에게 끊어짐 없는(seamless) 서비스를 제공하는 기술에 관한 것이다.
And more particularly, to a technique for providing a seamless service to a user using a backup server even when a failure occurs in a master server in a fault tolerant system that provides redundant communication.

고장 허용 시스템(Fault Tolerant system)은 시스템을 구성하는 부품의 일부에서 결함(fault) 또는 고장(failure)이 발생하여도 정상적 혹은 부분적으로 기능을 수행할 수 있는 시스템이다.A fault tolerant system is a system that can perform normal or partial functions even if a fault or failure occurs in a part of the components constituting the system.

고장 허용 시스템은 고장에 발생하면 인명이나 재산에 피해를 초래하는 사고가 발생하는 안전필수(safety-critical) 및 임무필수(mission-critical) 임베디드 시스템에서 사용된다. 구체적으로는 원자력, 발전, 에너지, 국방, 항공, 우주, 자동차, 철도, 조선, 플랜트, 금융, 의료 등 다양한 분야의 임베디드 시스템에서 활용되고 있다.Fault tolerance systems are used in safety-critical and mission-critical embedded systems where accidents occur that cause damage to people or property if they occur in the event of a fault. Specifically, it is used in embedded systems in various fields such as nuclear power, power generation, energy, defense, aviation, space, automobile, railroad, shipbuilding, plant,

고장 허용 시스템에서 장애를 복구하는 방식 중에서 이중화 시스템은 대표적으로 다음의 3가지 방식으로 운용된다.Among the methods of restoring the fault in the fault tolerant system, the redundant system is typically operated in the following three ways.

첫째로, 리플리케이션(Replication) 방식은 동일한 시스템을 복수로 준비하여 병렬로 실행시켜 다수를 만족한 결과를 올바른 결과적으로 적용하는 방식이다.First, a replication method is a method in which a plurality of identical systems are prepared and executed in parallel, and a result satisfying a majority is applied as a correct result.

둘째로, 다중화(Redundancy) 방식은 동일한 시스템의 복수로 준비하여 장애가 일어나면 보조 시스템으로 전환하는 방식이다.Second, the redundancy method is a method of preparing a plurality of the same system and switching to the auxiliary system when a failure occurs.

셋째로, 다양화(Diversity) 방식은 복수의 시스템이 똑같은 장애를 일으키지 않는다는 전제 조건을 기반으로, 같은 사양에 다른 하드웨어 시스템을 복수로 준비하여 복제화와 같이 그것을 운용하는 방식이다.Third, the diversity scheme is based on the precondition that a plurality of systems do not cause the same failure, and a plurality of different hardware systems are prepared in the same specification and operated as duplication.

다중화 방식을 이용하는 이중화 통신 시스템은 마스터 서버에 장애가 발생시 마스터 서버에서 교환했던 모든 TCP 패킷을 백업 서버에서 클라이언트와 직접 동기화 하여 세션을 재생성하여 복구하는 방식으로 복원하는 경우, 패킷 손실의 위험이 있으며, 세션 정보 동기화에 많은 시간이 소요된다. In the duplicated communication system using the multiplexing method, when a failure occurs in the master server, there is a risk of packet loss when restoring to a method in which all the TCP packets exchanged at the master server are directly synchronized with the client at the backup server, Information synchronization takes a lot of time.

또한 본 시스템에서 이미 수립(Establish)된 TCP 세션과 동일하게 복원을 진행할 경우 각각의 TCP 파라미터에 대한 동기화 루틴을 구현하여야 하며 추후 커널 변경 시 많은 수정이 필요한 문제를 가지고 있다.In addition, when restoration is performed in the same manner as the established TCP session in the present system, a synchronization routine for each TCP parameter must be implemented.

따라서, 클라이언트와의 직접적인 동기화와 커널의 많은 수정을 최소화하면서 TCP 세션을 복원하는 기술이 요구된다.
Therefore, there is a need for a technique for restoring a TCP session while minimizing direct synchronization with the client and many modifications of the kernel.

본 발명은 상기와 같은 종래 기술의 문제점을 해결하고자 도출된 것으로서, 제공하는 것을 목적으로 한다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems of the prior art.

구체적으로, 본 발명은 TCP 세션을 복원하는 장애조치 시스템 및 방법을 제공하는 것을 목적으로 한다.Specifically, the present invention aims to provide a failover system and method for restoring a TCP session.

또한, 본 발명은 이중화 통신을 제공하는 고장 허용 시스템(Fault Tolerant system) 시스템에서 마스터 서버에 고장이 발생하여도 백업 서버를 이용하여 사용자에게 끊어짐 없는(seamless) 서비스를 제공하는 것을 목적으로 한다.It is another object of the present invention to provide a seamless service to a user by using a backup server even if a failure occurs in a master server in a fault tolerant system for providing redundant communication.

또한, 본 발명은 마스터 서버에서 TCP 기반의 통신 중 고장 발생 시 TCP 세션 정보를 백업 서버에서 동일하게 복원하여 연결되어 있는 교신 상대방과의 세션을 유지하여 사용자에게 끊어짐 없는(seamless) 서비스를 제공하는 것을 목적으로 한다.
The present invention also provides a method for restoring TCP session information from a backup server when a failure occurs during TCP-based communication in a master server, maintaining a session with a connected communication partner, and providing a seamless service to a user The purpose.

상기와 같은 목적을 달성하기 위하여, 본 발명의 일 실시 예에 따른 장애 발생시 TCP 세션을 복원하는 장애조치 시스템은 마스터 서버(Master Server)가 TCP 연결 설정한 모든 클라이언트(client)와의 세션 정보를 저장하는 세션 저장 블록; 장애가 감지되면 페일오버 콜백(failover callback) 함수를 호출하는 어플리케이션 래퍼 블록; 상기 세션 저장 블록에 저장된 세션 정보를 이용하여 모의 SYN 패킷을 생성하고, 상기 모의 SYN 패킷을 백업 서버의 TCP 블록으로 송신하는 세션 핸들링 블록을 포함하고, 상기 어플리케이션 래퍼 블록은 상기 TCP 블록에서 상기 모의 SYN 패킷을 수신하면, ACK 요청 함수를 호출하고, 상기 세션 핸들링 블록은 상기 ACK 요청 함수가 호출되면, 상기 저장된 세션 정보를 이용하여 모의 ACK 패킷을 생성한다.In order to achieve the above object, a failover system for restoring a TCP session when a failure occurs according to an embodiment of the present invention stores session information with all clients that a master server establishes a TCP connection Session store block; An application wrapper block that calls a failover callback function if a failure is detected; And a session handling block for generating a simulated SYN packet using the session information stored in the session storage block and transmitting the simulated SYN packet to a TCP block of the backup server, Upon receipt of the packet, an ACK request function is called. When the ACK request function is called, the session handling block generates a simulated ACK packet using the stored session information.

상기 장애조치 시스템은 상기 마스터 서버가 클라이언트와 TCP연결을 설정하면, 상기 TCP 연결에 대한 세션 정보를 상기 세션 저장 블록으로 전달하고, 상기 세션 핸들링 블록의 요청에 따라 상기 세션 저장 블록에 저장된 상기 저장된 세션 정보를 상기 세션 핸들링 블록으로 전달하는 세션 동기화 블록을 더 포함하는 Wherein the failover system transfers session information for the TCP connection to the session storage block when the master server establishes a TCP connection with the client, Further comprising a session synchronization block for communicating information to the session handling block

이때, 상기 세션 동기화 블록은, 기설정된 주기로 박동신호를 상기 마스터 서버로 송신하여 상기 마스터 서버의 장애를 판단할 수 있다.At this time, the session synchronization block may transmit a beep signal to the master server at a predetermined cycle to determine the failure of the master server.

이때, 상기 저장된 세션 정보는, 소스 포트 넘버(source port number), 목적지 포트 넘버(destination port number) 및 시퀀스 넘버(sequence number)를 포함할 수 있다.At this time, the stored session information may include a source port number, a destination port number, and a sequence number.

그리고, 상기 저장된 세션 정보는, 확인 응답 넘버(acknowledgement number) 및 윈도우 크기(window size) 정보 중에서 적어도 하나를 더 포함할 수 있다.The stored session information may further include at least one of an acknowledgment number and window size information.

이때, 상기 세션 핸들링 블록은, 상기 저장된 세션 정보를 이용하여 상기 모의 SYN 패킷의 소스 포트 넘버(source port number) 필드에 복구할 세션의 클라이언트 포트 넘버를 기재하고, 상기 모의 SYN 패킷의 목적지 포트 넘버(destination port number) 필드에 상기 백업 서버 포트 넘버를 기재하고, 상기 모의 SYN 패킷의 시퀀스 넘버(sequence number) 필드에 상기 저장된 세션 정보에 포함된 저장된 시퀀스 넘버에서 1을 뺀 값을 기재하고, 모의 패킷임을 알리는 플래그 비트(flag bit)와 SYN 패킷임을 알리는 플래그 비트를 설정하여 상기 모의 SYN 패킷을 생성할 수 있다.In this case, the session handling block writes the client port number of the session to be restored in the source port number field of the simulated SYN packet using the stored session information, and updates the destination port number of the simulated SYN packet and a value obtained by subtracting 1 from the stored sequence number included in the stored session information is written in the sequence number field of the simulated SYN packet, The simulated SYN packet can be generated by setting a flag bit for notifying and a flag bit for indicating that the packet is a SYN packet.

이때, 상기 세션 핸들링 블록은, 상기 저장된 세션 정보를 이용하여 상기 모의 ACK 패킷의 소스 포트 넘버(source port number) 필드에 복구할 세션의 클라이언트 포트 넘버를 기재하고, 상기 모의 ACK 패킷의 목적지 포트 넘버(destination port number) 필드에 상기 백업 서버 포트 넘버를 기재하고, 상기 모의 ACK 패킷의 시퀀스 넘버(sequence number) 필드에 상기 저장된 세션 정보에 포함된 저장된 시퀀스 넘버를 기재하고, 모의 패킷임을 알리는 플래그 비트(flag bit)와 ACK 패킷임을 알리는 플래그 비트를 설정하여 상기 모의 ACK 패킷을 생성할 수 있다.In this case, the session handling block writes the client port number of the session to be restored in the source port number field of the simulated ACK packet using the stored session information, and updates the destination port number of the simulated ACK packet a sequence number field of the mock ACK packet is recorded in the field number field, and a stored sequence number contained in the stored session information is described in a field number field of the mock ACK packet. bit) and a flag bit indicating that the packet is an ACK packet, thereby generating the simulated ACK packet.

본 발명의 다른 일 실시 예에 따른 장애조치 시스템에서 장애 발생시 TCP 세션을 복원하는 방법은, 장애가 감지되면 페일오버 콜백(failover callback) 함수를 호출하는 단계; 상기 페일오버 콜백 함수가 호출되면 저장된 세션 정보를 이용하여 모의 SYN 패킷을 생성하는 단계; 상기 모의 SYN 패킷을 백업 서버의 TCP 블록으로 송신하는 단계; 상기 TCP 블록에서 ACK 요청 함수를 호출하는 단계; 상기 ACK 요청 함수가 호출되면, 상기 저장된 세션 정보를 이용하여 모의 ACK 패킷을 생성하는 단계; 및 상기 모의 ACK 패킷을 상기 TCP 블록으로 송신하는 단계를 포함한다.A method for restoring a TCP session when a failure occurs in a failover system according to another embodiment of the present invention includes: calling a failover callback function when a failure is detected; Generating a simulated SYN packet using the stored session information when the failover callback function is called; Transmitting the simulated SYN packet to a TCP block of a backup server; Calling an ACK request function in the TCP block; Generating a simulated ACK packet using the stored session information when the ACK request function is called; And transmitting the simulated ACK packet to the TCP block.

장애 발생시 TCP 세션을 복원하는 방법은, 상기 장애가 감지되기 이전에, 마스터 서버(Master Server)가 클라이언트(client)와 TCP연결을 설정하면, 상기 TCP 연결에 대한 세션 정보를 저장하고, 상기 TCP 연결 해제하면 해당 세션 정보 삭제하는 단계를 더 포함할 수 있다.A method of restoring a TCP session when a failure occurs includes the steps of storing session information for the TCP connection when the master server establishes a TCP connection with a client before the failure is detected, A step of deleting the corresponding session information.

이때, 상기 모의 SYN 패킷을 생성하는 단계는, 상기 저장된 세션 정보를 이용하여 상기 모의 SYN 패킷의 소스 포트 넘버(source port number) 필드에 복구할 세션의 클라이언트 포트 넘버를 기재하고, 상기 모의 SYN 패킷의 목적지 포트 넘버(destination port number) 필드에 상기 백업 서버 포트 넘버를 기재하고, 상기 모의 SYN 패킷의 시퀀스 넘버(sequence number) 필드에 상기 저장된 세션 정보에 포함된 저장된 시퀀스 넘버에서 1을 뺀 값을 기재하고, 모의 패킷임을 알리는 플래그 비트(flag bit)와 SYN 패킷임을 알리는 플래그 비트를 설정하여 상기 모의 SYN 패킷을 생성할 수 있다.The generating of the simulated SYN packet may include writing the client port number of the session to be restored in the source port number field of the simulated SYN packet using the stored session information, The backup server port number is written in the destination port number field and a value obtained by subtracting 1 from the stored sequence number included in the stored session information is written in the sequence number field of the simulated SYN packet , The simulated SYN packet can be generated by setting a flag bit indicating that the packet is a simulation packet and a flag bit indicating that the packet is a SYN packet.

이때, 상기 TCP 블록에서 ACK 요청 함수를 호출 하는 단계는, 상기 TCP 블록에서 상기 모의 SYN 패킷에 포함된 모의 패킷임을 알리는 플래그 비트(flag bit)와 SYN 패킷임을 알리는 플래그 비트를 확인하여 상기 모의 SYN 패킷임을 확인하면, SYN/ACK 패킷을 송신하지 않고, 상기 ACK 요청 함수를 호출할 수 있다.The calling of the ACK request function in the TCP block may include checking a flag bit indicating a mock packet included in the simulated SYN packet and a flag bit indicating a SYN packet in the TCP block, It is possible to call the ACK request function without transmitting the SYN / ACK packet.

이때, 상기 모의 ACK 패킷을 생성하는 단계는, 상기 저장된 세션 정보를 이용하여 상기 모의 ACK 패킷의 소스 포트 넘버(source port number) 필드에 복구할 세션의 클라이언트 포트 넘버를 기재하고, 상기 모의 ACK 패킷의 목적지 포트 넘버(destination port number) 필드에 상기 백업 서버 포트 넘버를 기재하고, 상기 모의 ACK 패킷의 시퀀스 넘버(sequence number) 필드에 상기 저장된 세션 정보에 포함된 저장된 시퀀스 넘버를 기재하고, 모의 패킷임을 알리는 플래그 비트(flag bit)와 ACK 패킷임을 알리는 플래그 비트를 설정하여 상기 모의 ACK 패킷을 생성할 수 있다.The generating of the mock ACK packet includes writing the client port number of the session to be restored in a source port number field of the mock ACK packet using the stored session information, The backup server port number in the destination port number field, the stored sequence number contained in the stored session information in the sequence number field of the simulated ACK packet, The simulated ACK packet can be generated by setting a flag bit and a flag bit indicating that the packet is an ACK packet.

이때, 상기 TCP 블록에서 ACK 요청 함수를 호출 하는 단계는, 상기 ACK 요청 함수를 호출하지 않고, 모의 SYN/ACK 패킷을 생성하여 세션 핸들링 블록으로 송신할 수 있다.
At this time, the step of calling the ACK request function in the TCP block may generate a simulated SYN / ACK packet without sending the ACK request function and transmit the simulated SYN / ACK packet to the session handling block.

본 발명은 마스터 서버와 백업 서버를 가진 이중화를 통한 고가용성을 제공하는 고장 허용 시스템에서 TCP 연결을 사용하는 어플리케이션 및 라우팅 프로토콜에 적용하여 고장 발생 시에도 안정적인 네트워크 환경을 제공할 수 있다.The present invention can be applied to an application and a routing protocol using a TCP connection in a fault tolerant system that provides high availability through redundancy with a master server and a backup server, thereby providing a stable network environment even in the event of a failure.

또한 TCP 세션 연결 방식인 쓰리웨이 핸드쉐이크(3-way handshake) 연결 방법을 활용한 복구 방식으로, 안정적인 TCP 세션 복원이 가능하며 동기화 시 필요한 세션 정보의 최소화로 인하여 복구 시간을 단축할 수 있고, 기존의 소켓(socket) API(Application Programing Interface)를 그대로 사용이 가능하다.
In addition, it is a recovery method that utilizes a 3-way handshake connection method, which is a TCP session connection method. Thus, stable TCP session restoration is possible, and recovery time can be shortened due to minimization of session information required for synchronization. It is possible to use the socket API (Application Programming Interface) of the present invention as it is.

도 1은 본 발명의 일 실시예에 따른 장애조치 시스템의 구성을 도시한 도면이다.
도 2는 본 발명의 일 실시예에 따른 장애조치 시스템에서 송신하는 TCP 패킷의 포멧을 도시한 도면이다.
도 3은 본 발명의 일 실시예에 따라 장애 조치를 수행하는 개략적인 과정을 도시한 도면이다.
도 4은 본 발명의 일 실시예에 따른 장애조치 시스템에서 백업 서버를 통해 TCP 세션을 복원하는 과정을 도시한 흐름도이다.
1 is a diagram illustrating a configuration of a fail-over system according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a format of a TCP packet transmitted in a fail-over system according to an embodiment of the present invention.
FIG. 3 is a schematic view illustrating a process of performing a failover according to an exemplary embodiment of the present invention. Referring to FIG.
4 is a flowchart illustrating a process of restoring a TCP session through a backup server in a failover system according to an embodiment of the present invention.

상기 목적 외에 본 발명의 다른 목적 및 특징들은 첨부 도면을 참조한 실시 예에 대한 설명을 통하여 명백히 드러나게 될 것이다.Other objects and features of the present invention will become apparent from the following description of embodiments with reference to the accompanying drawings.

본 발명의 바람직한 실시예를 첨부된 도면들을 참조하여 상세히 설명한다. 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear.

그러나, 본 발명이 실시예들에 의해 제한되거나 한정되는 것은 아니다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.However, the present invention is not limited to or limited by the embodiments. Like reference symbols in the drawings denote like elements.

이하에서는, 본 발명의 일 실시 예에 따른 TCP(Transport Control Protocol) 세션을 복원하는 장애조치 시스템 및 방법을 첨부된 도 1 내지 도 4을 참조하여 상세히 설명한다.Hereinafter, a failover system and method for restoring a TCP (Transport Control Protocol) session according to an embodiment of the present invention will be described in detail with reference to FIGS. 1 to 4. FIG.

도 1은 본 발명의 일 실시예에 따른 장애조치 시스템의 구성을 도시한 도면이다.1 is a diagram illustrating a configuration of a fail-over system according to an embodiment of the present invention.

도 1을 참조하면, 장애조치 시스템은 어플리케이션 블록(110), 세션 동기화 블록(120), 세션 저장 블록(130), 어플리케이션 래퍼 블록(140), 세션 핸들링 블록(150) 및 TCP 블록(160)을 포함할 수 있다.1, the failover system includes an application block 110, a session synchronization block 120, a session storage block 130, an application wrapper block 140, a session handling block 150, and a TCP block 160 .

세션 동기화 블록(120)은 기설정된 주기로 박동신호를 마스터 서버로 송신하여 마스터 서버의 장애를 판단한다.The session synchronization block 120 transmits a beep signal to the master server in a predetermined cycle to determine a failure of the master server.

세션 동기화 블록(120)은 마스터 서버가 클라이언트와 TCP연결을 설정하면, TCP 연결에 대한 세션 정보를 세션 저장 블록(130)으로 전달하고, 세션 핸들링 블록(150)의 요청에 따라 세션 저장 블록에 저장된 세션 정보를 세션 핸들링 블록(150)으로 전달한다.When the master server establishes a TCP connection with the client, the session synchronization block 120 delivers the session information for the TCP connection to the session storage block 130, and stores the session information in the session storage block 130 at the request of the session handling block 150. [ And transfers the session information to the session handling block 150.

세션 저장 블록(130)은 마스터 서버(Master Server)가 TCP 연결 설정한 모든 클라이언트(client)와의 세션 정보를 저장한다.The session storage block 130 stores session information with all clients established by the master server in the TCP connection.

이때, 저장된 세션 정보는 소스 포트 넘버(source port number), 목적지 포트 넘버(destination port number) 및 시퀀스 넘버(sequence number)를 포함하고, 확인 응답 넘버(acknowledgement number) 및 윈도우 크기(window size) 정보를 더 포함할 수 있다.At this time, the stored session information includes a source port number, a destination port number, and a sequence number, and includes an acknowledgment number and window size information .

어플리케이션 래퍼 블록(140)은 TCP 세션 복구 기능을 활용할 수 있는 API(Application Programing Interface)를 제공한다. The application wrapper block 140 provides an API (Application Programming Interface) that can utilize the TCP session recovery function.

어플리케이션 래퍼 블록(140)은 TCP 기반 패킷 수신시 동기화를 위해 어플리케이션 블록(110)에서 TCP 데이터를 처리하기 전까지 TCP 세션 갱신을 일시 보류하고, 어플리케이션 블록(110)에서 데이터 처리후 발생되는 플러시(Flush) 메시지를 받은 이후 세션 저장 블록(130)으로 세션 정보를 저장하도록 세션 동기화 블록(120) 에게 알린다. The application wrapper block 140 temporarily suspends the TCP session update until the application block 110 processes the TCP data for synchronization at the time of receiving a TCP based packet and temporarily stores the flush generated after the data processing at the application block 110. [ And then notifies the session synchronization block 120 to store the session information in the session storage block 130 after receiving the message.

어플리케이션 래퍼 블록(140)은 TCP 기반 패킷 송신시 데이터 처리를 일시 보류하고, 세션 핸들링 블록(150)을 통해 세션 저장 블록(130)으로 송신 패킷을 저장하는 처리 절차를 완료한 이후 다음 절차에 따라 송신 패킷을 처리한다.The application wrapper block 140 temporarily suspends data processing at the time of transmitting a TCP-based packet, and after completing a processing procedure of storing a transmission packet in the session storage block 130 through the session handling block 150, Packets are processed.

어플리케이션 래퍼 블록(140)은 장애가 감지되어 어플리케이션 블록(110)으로부터 TCP 세션 복원 요청을 수신하면 페일오버 콜백(failover callback) 함수를 호출한다. The application wrapper block 140 calls a failover callback function when a failure is detected and a TCP session restoration request is received from the application block 110.

어플리케이션 래퍼 블록(140)은 TCP 블록으로부터 모의 SYN 패킷을 수신하면, SYN/ACK 패킷을 송신하지 않고, ACK 요청 함수를 호출한다.When the application wrapper block 140 receives the simulated SYN packet from the TCP block, it calls the ACK request function without transmitting the SYN / ACK packet.

이때, 모의 SYN 패킷의 확인은 패킷에 포함된 모의 패킷임을 알리는 플래그 비트(flag bit)와 SYN 패킷임을 알리는 플래그 비트를 확인하여 모의 SYN 패킷임을 확인할 수 있다.At this time, the confirmation of the simulation SYN packet can be confirmed by confirming the flag bit indicating that it is a simulation packet included in the packet and the flag bit indicating that it is a SYN packet.

한편, 어플리케이션 래퍼 블록(140)은 ACK 요청 함수를 호출하는 것 대신에, 모의 SYN/ACK 패킷을 생성하여 세션 핸들링 블록(150)으로 송신할 수도 있다.Alternatively, the application wrapper block 140 may generate a simulated SYN / ACK packet and send it to the session handling block 150, instead of calling the ACK request function.

세션 핸들링 블록(150)은 커널 공간에서 동작하며 TCP 세션, 패킷 정보를 관리하고 오류발생시 갱신된 TCP 세션 및 패킷 정보를 세션 동기화 블록(120)을 통해 세션 저장 블록(130)으로 전달하는 역할을 수행한다.The session handling block 150 operates in the kernel space and manages the TCP session and the packet information and transmits the updated TCP session and packet information to the session storage block 130 through the session synchronization block 120 do.

세션 핸들링 블록(150)은 커널 공간 상위의 유저 공간의 세션 동기화 블록(120)과는 세션 핸들링 블록(150)에서 내부적으로 정의된 스택에 의해 시스템 내부 통신 기능을 사용하여 통신한다.The session handling block 150 communicates with the session synchronization block 120 in the user space above the kernel space using the system internal communication function by the internally defined stack in the session handling block 150.

세션 핸들링 블록(150)은 세션 저장 블록(130)에 저장된 세션 정보를 이용하여 모의 SYN 패킷을 생성하고, 모의 SYN 패킷을 백업 서버의 TCP 블록(160)으로 송신한다.The session handling block 150 generates a simulated SYN packet using the session information stored in the session storage block 130 and transmits the simulated SYN packet to the TCP block 160 of the backup server.

세션 핸들링 블록(150)은 ACK 요청 함수가 호출되면, 저장된 세션 정보를 이용하여 모의 ACK 패킷을 생성한다.When the ACK request function is called, the session handling block 150 generates a simulated ACK packet using the stored session information.

세션 핸들링 블록(150)은 TCP 세션 복구시 세션 저장 블록(130)에 저장된 세션정보를 세션 동기화 블록(120)을 통해 전달 받은 후 TCP 세션을 복구하고, ACK를 받지 못한 송신(Send) 패킷이 존재하면 재전송한다.The session handling block 150 receives the session information stored in the session store block 130 through the session synchronization block 120 and restores the TCP session when the TCP session is restored. If there is a send packet that does not receive the ACK And retransmits it.

세션 핸들링 블록(150)에서 생성하는 모의 SYN 패킷과 모의 ACK 패킷을 아래의 도 2를 참조하여 후술하고자 한다.The simulated SYN packet and the simulated ACK packet generated by the session handling block 150 will be described below with reference to FIG.

도 2는 본 발명의 일 실시예에 따른 장애조치 시스템에서 송신하는 TCP 패킷의 포멧을 도시한 도면이다.FIG. 2 is a diagram illustrating a format of a TCP packet transmitted in a fail-over system according to an embodiment of the present invention.

도 2를 참조하면, 모의 패킷의 TCP 헤더(header)는 소스 포트 넘버(source port number) 필드, 목적지 포트 넘버(destination port number) 필드, 시퀀스 넘버(sequence number) 필드, 오프셋(offset) 필드, 예약(Reserve) 필드, TCP 플래그(Flags) 필드, 윈도우 크기(Window) 필드, 채크섬(Checksum) 필드, 긴급 포인터(Urgent Pointer) 필드 및 TCP 옵션(TCP Options) 필드를 포함하여 구성됩니다.2, the TCP header of the simulated packet includes a source port number field, a destination port number field, a sequence number field, an offset field, A TCP field, a Reserve field, a TCP flags field, a Window field, a Checksum field, an Urgent Pointer field, and a TCP option field.

소스 포트 넘버(source port number) 필드는 출발지의 포트 넘버를 나타내는 것으로, 본 발명의 모의 패킷의 경우 복구할 세션의 클라이언트 포트 넘버를 나타낸다.The source port number field indicates the port number of the source port. In the case of the mock packet of the present invention, the source port number field indicates the client port number of the session to be recovered.

목적지 포트 넘버(destination port number) 필드는 도착지의 포트 넘버를 나타내는 것으로, 본 발명의 모의 패킷의 경우 복구할 세션의 마스터 서버/ 백업서버의 포트 넘버를 나타낸다.The destination port number field indicates the port number of the destination. In the case of the simulated packet of the present invention, the destination port number field indicates the port number of the master server / backup server of the session to be recovered.

시퀀스 넘버(sequence number) 필드는 분할된 데이터를 식별하기 위한 순서번호를 나타낸다.The sequence number field indicates a sequence number for identifying the divided data.

오프셋(offest) 필드는 헤더의 길이 또는 데이터가 시작되는 부분을 알리는 역할로 사용된다. The offest field is used to inform the length of the header or the beginning of the data.

예약(Reserve) 필드는 예약된 비트로서 본 발명에서는 예약(Reserve) 필드의 한 비트를 이용하여 모의 패킷인지 여부를 확인할 수 있는 플래그 비트로 사용된다.A reserved field is a reserved bit. In the present invention, the reserved field is used as a flag bit to check whether a packet is a simulated packet by using one bit of a reserved field.

TCP 플래그(Flags) 필드는 TCP의 제어를 위한 플래그 비트들의 집합을 나타내는 것으로, SYN 패킷임을 알리는 플래그 비트와 ACK 패킷임을 알리는 플래그 비트를 포함한다.The TCP flags field indicates a set of flag bits for TCP control, and includes a flag bit indicating that the packet is a SYN packet and a flag bit indicating that the packet is an ACK packet.

윈도우 크기(Window) 필드는 TCP 흐름제어를 위해 통신의 상대편에게 자신의 버퍼 여유용량 크기를 제공하는데 사용된다.The Window field is used to provide the opponent of the communication with its buffer free capacity size for TCP flow control.

채크섬(Checksum) 필드는 합을 이용하여 오류가 일어났는지 확인하는데 사용된다.The Checksum field is used to check whether an error has occurred using the sum.

긴급 포인터(Urgent Pointer) 필드는 TCP 세그먼트에 포함된 긴급 데이터의 마지막 바이트에 대한 일련번호를 나타낸다.The Urgent Pointer field indicates the serial number of the last byte of the emergency data contained in the TCP segment.

TCP 옵션(TCP Options) 필드는 최대 40바이트까지 옵션데이터를 포함할 수 있다.The TCP Options field can contain up to 40 bytes of optional data.

다시 도 1의 설명으로 돌아와서, 세션 핸들링 블록(150)은 저장된 세션 정보를 이용하여 모의 SYN 패킷의 소스 포트 넘버(source port number) 필드에 복구할 세션의 클라이언트 포트 넘버를 기재하고, 모의 SYN 패킷의 목적지 포트 넘버(destination port number) 필드에 백업 서버 포트 넘버를 기재하고, 모의 SYN 패킷의 시퀀스 넘버(sequence number) 필드에 저장된 세션 정보에 포함된 저장된 시퀀스 넘버에서 1을 뺀 값을 기재하고, 모의 패킷임을 알리는 플래그 비트(flag bit)와 SYN 패킷임을 알리는 플래그 비트를 설정하여 모의 SYN 패킷을 생성한다.Returning to FIG. 1, the session handling block 150 records the client port number of the session to be restored in the source port number field of the simulated SYN packet using the stored session information, A backup server port number is written in the destination port number field, a value obtained by subtracting 1 from the stored sequence number contained in the session information stored in the sequence number field of the simulated SYN packet is written, And a flag bit indicating that the packet is a SYN packet, thereby generating a simulated SYN packet.

모의 SYN 패킷을 생성할 때, 시퀀스 넘버에서 1을 빼는 이유는 When generating a simulated SYN packet, the reason for subtracting 1 from the sequence number is

정상적인 쓰리웨이 핸드쉐이크 과정에서 시퀀스 넘버에 1이 더해졌기 때문에, 모의 쓰리웨이 핸드쉐이크 과정에서 동일한 시퀀스 넘버를 할당하기 위해서는 1을 빼고 진행하여야 한다.Since 1 is added to the sequence number in the normal 3-way handshake process, 1 should be subtracted to assign the same sequence number in the simulation 3-way handshake process.

세션 핸들링 블록(150)은 저장된 세션 정보를 이용하여 모의 ACK 패킷의 소스 포트 넘버(source port number) 필드에 복구할 세션의 클라이언트 포트 넘버를 기재하고, 모의 ACK 패킷의 목적지 포트 넘버(destination port number) 필드에 백업 서버 포트 넘버를 기재하고, 모의 ACK 패킷의 시퀀스 넘버(sequence number) 필드에 저장된 세션 정보에 포함된 저장된 시퀀스 넘버를 기재하고, 모의 패킷임을 알리는 플래그 비트(flag bit)와 ACK 패킷임을 알리는 플래그 비트를 설정하여 모의 ACK 패킷을 생성한다.
The session handling block 150 records the client port number of the session to be restored in the source port number field of the simulated ACK packet using the stored session information and outputs the destination port number of the simulated ACK packet, Field, a backup server port number, a stored sequence number contained in the session information stored in the sequence number field of the simulated ACK packet, a flag bit indicating that the packet is a simulated packet, and an ACK packet And sets a flag bit to generate a simulated ACK packet.

도 3은 본 발명의 일 실시예에 따라 장애 조치를 수행하는 개략적인 과정을 도시한 도면이다.FIG. 3 is a schematic view illustrating a process of performing a failover according to an exemplary embodiment of the present invention. Referring to FIG.

도 3을 참조하면, 마스터 서버(320)는 클라이언트(310)와 SYN 패킷(341), SYN/ACK 패킷(342) 및 ACK 패킷(343)을 송수신하는 쓰리웨이 핸드쉐이크(3-way handshake)를 통해 TCP 세션을 연결하고, 이후 데이터를 송수신한다(344).3, the master server 320 includes a 3-way handshake for transmitting and receiving a SYN packet 341, a SYN / ACK packet 342, and an ACK packet 343 with the client 310 And then transmits / receives data (344).

마스터 서버(320)가 클라이언트(310)와 TCP 세션을 설립하고 데이터를 통신을 하는 중에 고장이 발생하면(345), 장애조치 시스템(330)은 장애를 감지(350)할 수 있다If the master server 320 establishes a TCP session with the client 310 and a failure occurs while communicating data 345, the failover system 330 may detect the failure 350

백업 서버(332)를 통해 클라이언트(310)와의 통신을 재개하기 위해서 백업 서버(332)에 마스터 서버(320)에서 연결 중이던 TCP 세션이 복구되어야 한다.The TCP session that was being connected to the backup server 332 by the master server 320 must be restored in order to resume communication with the client 310 via the backup server 332. [

백업 서버(332)는 세션 핸들링 블록(334)로 페일오버 콜백(failover callback) 함수를 호출한다.The backup server 332 calls the failover callback function with the session handling block 334. [

이후, 백업 서버(332)는 세션 핸들링 블록(334)과 모의 쓰리웨이 핸드쉐이크를 수행한다. 모의 쓰리웨이 핸드쉐이크는 세션 핸들링 블록(334)에서 모의 SYN 패킷을 백업 서버(332)로 송신하고, 백업 서버(332)에서 SYN/ACK 패킷을 송신하지 않고, ACK 요청 함수를 호출하고, 세션 핸들링 블록(334)에서 모의 ACK 패킷을 백업 서버(332)로 송신하는 절차를 나타낸다.Thereafter, the backup server 332 performs a simulated three-way handshake with the session handling block 334. [ The simulated three way handshake sends a simulated SYN packet to the backup server 332 in the session handling block 334 and calls the ACK request function without sending the SYN / ACK packet at the backup server 332, And sends a simulated ACK packet to the backup server 332 at block 334. FIG.

그리고, 세션 핸들링 블록(334)은 전송 메시지를 백업 서버(332)로 전송하면(355), 백업 서버(332)는 클라이언트(310)로 송신한다(360).Then, the session handling block 334 transmits the transmission message to the backup server 332 (355), and the backup server 332 transmits the transmission message to the client 310 (360).

이후, 클라이언트(310)는 백업 서버(332)와 통신을 재개한다(361)Thereafter, the client 310 resumes communication with the backup server 332 (361)

한편, 백업 서버(332)는 페일오버 콜백(failover callback) 함수를 호출하고, TCP 세션의 복구가 완료되기 전에 수신되는 패킷은 모두 폐기한다. 이것은 TCP 세션을 복구 중에 다른 TCP 패킷을 처리하면, 오류가 발생할 수 있기 때문이다.
On the other hand, the backup server 332 calls a failover callback function and discards all packets received before the recovery of the TCP session is completed. This is because if another TCP packet is processed during TCP session recovery, an error may occur.

이하, 상기와 같이 구성된 본 발명에 따른 장애조치 시스템에서 장애 발생시 TCP 세션을 복원하는 방법을 아래에서 도면을 참조하여 설명한다.Hereinafter, a method for restoring a TCP session when a failure occurs in the fail-over system according to the present invention will be described with reference to the drawings.

도 4은 본 발명의 일 실시예에 따른 장애조치 시스템에서 백업 서버를 통해 TCP 세션을 복원하는 과정을 도시한 흐름도이다.4 is a flowchart illustrating a process of restoring a TCP session through a backup server in a failover system according to an embodiment of the present invention.

도 4을 참조하면, 장애 조치 시스템은 마스터 서버(Master Server)가 클라이언트(client)와 TCP연결을 설정하면, TCP 연결에 대한 세션 정보를 저장하고, TCP 연결 해제하면 해당 세션 정보 삭제하여 TCP 연결을 설정한 모든 세션 정보를 관리한다(410).4, when the master server establishes a TCP connection with the client, the failover system stores the session information for the TCP connection, deletes the corresponding session information when the TCP connection is released, And manages all the set session information (410).

장애 조치 시스템은 장애를 감지하면(412), 페일오버 콜백(failover callback) 함수를 호출한다(414).If the failover system detects a failure (412), it calls the failover callback function (414).

장애 조치 시스템은 페일오버 콜백 함수가 호출되면 저장된 세션 정보를 이용하여 모의 SYN 패킷을 생성한다(416).When the failover callback function is called, the failover system generates a simulated SYN packet using the stored session information (416).

장애 조치 시스템은 저장된 세션 정보를 이용하여 모의 SYN 패킷의 소스 포트 넘버(source port number) 필드에 복구할 세션의 클라이언트 포트 넘버를 기재하고, 모의 SYN 패킷의 목적지 포트 넘버(destination port number) 필드에 백업 서버 포트 넘버를 기재하고, 모의 SYN 패킷의 시퀀스 넘버(sequence number) 필드에 저장된 세션 정보에 포함된 저장된 시퀀스 넘버에서 1을 뺀 값을 기재하고, 모의 패킷임을 알리는 플래그 비트(flag bit)와 SYN 패킷임을 알리는 플래그 비트를 설정하여 모의 SYN 패킷을 생성할 수 있다.The failover system uses the stored session information to describe the client port number of the session to be restored in the source port number field of the simulated SYN packet and to backup the destination port number field of the simulated SYN packet A server port number, a value obtained by subtracting 1 from the stored sequence number included in the session information stored in the sequence number field of the simulated SYN packet, and a flag bit indicating that the packet is a simulated packet and a SYN packet A simulated SYN packet can be generated.

장애 조치 시스템은 모의 SYN 패킷을 백업 서버의 TCP 블록으로 송신한다(418). The failover system sends the simulated SYN packet to the backup server's TCP block (418).

TCP 블록에서 모의 SYN 패킷을 수신하면, SYN/ACK 패킷을 송신하지 않고, ACK 요청 함수를 호출한다(420).When the simulated SYN packet is received from the TCP block, the SYN / ACK packet is not transmitted and the ACK request function is called (420).

장애 조치 시스템은 ACK 요청 함수가 호출되면, 저장된 세션 정보를 이용하여 모의 ACK 패킷을 생성한다(422).When the ACK request function is called, the failover system generates a mock ACK packet using the stored session information (422).

장애 조치 시스템은 저장된 세션 정보를 이용하여 모의 ACK 패킷의 소스 포트 넘버(source port number) 필드에 복구할 세션의 클라이언트 포트 넘버를 기재하고, 모의 ACK 패킷의 목적지 포트 넘버(destination port number) 필드에 백업 서버 포트 넘버를 기재하고, 모의 ACK 패킷의 시퀀스 넘버(sequence number) 필드에 저장된 세션 정보에 포함된 저장된 시퀀스 넘버를 기재하고, 모의 패킷임을 알리는 플래그 비트(flag bit)와 ACK 패킷임을 알리는 플래그 비트를 설정하여 모의 ACK 패킷을 생성할 수 있다.The failover system records the client port number of the session to be restored in the source port number field of the simulated ACK packet using the stored session information, and stores the backup port number in the destination port number field of the simulated ACK packet The server port number, the stored sequence number included in the session information stored in the sequence number field of the simulated ACK packet, and a flag bit indicating that the packet is a simulated packet and a flag bit indicating that the packet is an ACK packet It is possible to generate a simulated ACK packet.

장애 조치 시스템은 모의 ACK 패킷을 TCP 블록으로 송신한다(424).The failover system sends a simulated ACK packet to the TCP block (424).

모의 쓰리웨이 핸드쉐이크를 통해 TCP 세션을 복원한 백업 서버는 클라이언트와 통신을 재개한다(426).
The backup server restores the TCP session through the mock three-way handshake and resumes communication with the client (426).

본 발명의 일 실시 예에 따른 TCP 세션을 복원하는 장애조치 시스템 및 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 본 발명의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.A failover system and method for restoring a TCP session according to an embodiment of the present invention may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions recorded on the medium may be those specially designed and constructed for the present invention or may be available to those skilled in the art of computer software. Examples of computer-readable media include magnetic media such as hard disks, floppy disks and magnetic tape; optical media such as CD-ROMs and DVDs; magnetic media such as floppy disks; Magneto-optical media, and hardware devices specifically configured to store and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.

이상과 같이 본 발명에서는 구체적인 구성 요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. As described above, the present invention has been described with reference to particular embodiments, such as specific elements, and specific embodiments and drawings. However, it should be understood that the present invention is not limited to the above- And various modifications and changes may be made thereto by those skilled in the art to which the present invention pertains.

따라서, 본 발명의 사상은 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등하거나 등가적 변형이 있는 모든 것들은 본 발명 사상의 범주에 속한다고 할 것이다.
Accordingly, the spirit of the present invention should not be construed as being limited to the embodiments described, and all of the equivalents or equivalents of the claims, as well as the following claims, belong to the scope of the present invention .

110; 어플리케이션 블록
120; 세션 동기화 블록
130; 세션 저장 블록
140; 어플리케이션 래퍼 블록
150; 세션 핸들링 블록
160; TCP 블록
110; Application block
120; Session synchronization block
130; Session store block
140; Application wrapper block
150; Session handling block
160; TCP block

Claims (14)

마스터 서버(Master Server)가 TCP 연결 설정한 모든 클라이언트(client)와의 세션 정보를 저장하는 세션 저장 블록;
장애가 감지되면 페일오버 콜백(failover callback) 함수를 호출하는 어플리케이션 래퍼 블록; 및
상기 세션 저장 블록에 저장된 세션 정보를 이용하여 TCP 세션을 복구하는 세션 핸들링 블록을 포함하고,
상기 세션 핸들링 블록은,
상기 저장된 세션 정보를 이용하여 모의 SYN 패킷의 소스 포트 넘버(source port number) 필드에 복구할 세션의 클라이언트 포트 넘버를 기재하고,
상기 모의 SYN 패킷의 목적지 포트 넘버(destination port number) 필드에 백업 서버 포트 넘버를 기재하고,
상기 모의 SYN 패킷의 시퀀스 넘버(sequence number) 필드에 상기 저장된 세션 정보에 포함된 저장된 시퀀스 넘버에서 1을 뺀 값을 기재하고,
모의 패킷임을 알리는 플래그 비트(flag bit)와 SYN 패킷임을 알리는 플래그 비트를 설정하여 상기 모의 SYN 패킷을 생성하여 TCP 블록에 전달하고
상기 TCP 블록에서 상기 모의 SYN 패킷을 수신하면 TCP 세션을 생성한 이후 모의 SYN 패킷일 경우 SYN/ACK 패킷을 송신하는 대신 ACK 요청 함수를 호출하고
상기 ACK 요청 함수가 호출되면, 상기 저장된 세션 정보를 이용하여 모의 ACK 패킷의 소스 포트 넘버(source port number) 필드에 복구할 세션의 클라이언트 포트 넘버를 기재하고,
상기 모의 ACK 패킷의 목적지 포트 넘버(destination port number) 필드에 상기 백업 서버 포트 넘버를 기재하고,
상기 모의 ACK 패킷의 시퀀스 넘버(sequence number) 필드에 상기 저장된 세션 정보에 포함된 저장된 시퀀스 넘버를 기재하고,
모의 패킷임을 알리는 플래그 비트(flag bit)와 ACK 패킷임을 알리는 플래그 비트를 설정하여 상기 모의 ACK 패킷을 생성하여 TCP 블록에 전달하고
상기 TCP 블록은 상기 모의 ACK 패킷을 수신하면 모의 SYN에 의해 생성된 세션에 대한 복구 절차를 완료하고 상기 어플리케이션 래퍼 블록을 통해 복구된 세션 정보를 전달하는
장애 발생시 TCP 세션을 복원하는 장애조치 시스템.
A session storage block for storing session information with all the clients connected to the TCP connection by the master server;
An application wrapper block that calls a failover callback function if a failure is detected; And
And a session handling block for restoring a TCP session using session information stored in the session storage block,
The session handling block includes:
The client port number of the session to be restored is described in the source port number field of the simulated SYN packet using the stored session information,
A backup server port number is written in a destination port number field of the simulated SYN packet,
A value obtained by subtracting 1 from a stored sequence number included in the stored session information is written in a sequence number field of the simulated SYN packet,
Generates a simulated SYN packet by setting a flag bit indicating that the packet is a simulated packet and a flag bit indicating that the packet is a SYN packet, and transmits the simulated SYN packet to the TCP block
Upon receipt of the simulated SYN packet from the TCP block, if a simulated SYN packet is generated after the TCP session is generated, an ACK request function is called instead of transmitting a SYN / ACK packet
When the ACK request function is called, the client port number of the session to be restored is written in the source port number field of the mock ACK packet using the stored session information,
The backup server port number is written in a destination port number field of the simulated ACK packet,
A sequence number field of the mock ACK packet is stored in the stored sequence information included in the stored session information,
Generates a simulated ACK packet by setting a flag bit indicating that the packet is a simulated packet and a flag bit indicating that the packet is an ACK packet, and transmits the generated simulated ACK packet to the TCP block
Upon receiving the simulated ACK packet, the TCP block completes the recovery procedure for the session generated by the simulated SYN and transmits the recovered session information through the application wrapper block
Failover system that restores TCP sessions on failure.
제1항에 있어서,
상기 마스터 서버가 클라이언트와 TCP연결을 설정하면, 상기 TCP 연결에 대한 세션 정보를 상기 세션 저장 블록으로 전달하고, 상기 세션 핸들링 블록의 요청에 따라 상기 세션 저장 블록에 저장된 상기 저장된 세션 정보를 상기 세션 핸들링 블록으로 전달하는 세션 동기화 블록을 더 포함하는
장애 발생시 TCP 세션을 복원하는 장애조치 시스템.
The method according to claim 1,
When the master server establishes a TCP connection with the client, transfers the session information for the TCP connection to the session storage block, and stores the stored session information stored in the session storage block in the session handling block, Further comprising a session synchronization block
Failover system that restores TCP sessions on failure.
제2항에 있어서,
상기 세션 동기화 블록은,
기설정된 주기로 박동신호를 상기 마스터 서버로 송신하여 상기 마스터 서버의 장애를 판단하는
장애 발생시 TCP 세션을 복원하는 장애조치 시스템.
3. The method of claim 2,
Wherein the session synchronization block comprises:
Transmits a beep signal to the master server at a predetermined cycle to determine the failure of the master server
Failover system that restores TCP sessions on failure.
제1항에 있어서,
상기 저장된 세션 정보는,
소스 포트 넘버(source port number), 목적지 포트 넘버(destination port number) 및 시퀀스 넘버(sequence number)를 포함하는
장애 발생시 TCP 세션을 복원하는 장애조치 시스템.
The method according to claim 1,
Wherein the stored session information comprises:
A source port number, a destination port number, and a sequence number.
Failover system that restores TCP sessions on failure.
제4항에 있어서,
상기 저장된 세션 정보는,
확인 응답 넘버(acknowledgement number) 및 윈도우 크기(window size) 정보 중에서 적어도 하나를 더 포함하는
장애 발생시 TCP 세션을 복원하는 장애조치 시스템.

5. The method of claim 4,
Wherein the stored session information comprises:
An acknowledgment number, and window size information.
Failover system that restores TCP sessions on failure.

삭제delete 삭제delete 백업 서버에서 마스터 서버의 장애가 감지되면 페일오버 콜백(failover callback) 함수를 호출하는 단계;
상기 페일오버 콜백 함수가 호출되면 저장된 세션 정보를 이용하여 모의 SYN 패킷을 생성하는 단계;
상기 모의 SYN 패킷을 TCP 블록으로 송신하는 단계;
상기 TCP 블록에서 ACK 요청 함수를 호출하는 단계;
상기 ACK 요청 함수가 호출되면, 상기 저장된 세션 정보를 이용하여 모의 ACK 패킷을 생성하는 단계;
상기 모의 ACK 패킷을 상기 TCP 블록으로 송신하는 단계; 및
상기 TCP 블록에서 세션 복구 및 어플리케이션 래퍼 블록을 통해 세션을 전달하는 단계를 포함하고,
상기 모의 SYN 패킷을 생성하는 단계는,
상기 저장된 세션 정보를 이용하여 상기 모의 SYN 패킷의 소스 포트 넘버(source port number) 필드에 복구할 세션의 클라이언트 포트 넘버를 기재하고,
상기 모의 SYN 패킷의 목적지 포트 넘버(destination port number) 필드에 상기 백업 서버 포트 넘버를 기재하고,
상기 모의 SYN 패킷의 시퀀스 넘버(sequence number) 필드에 상기 저장된 세션 정보에 포함된 저장된 시퀀스 넘버에서 1을 뺀 값을 기재하고,
모의 패킷임을 알리는 플래그 비트(flag bit)와 SYN 패킷임을 알리는 플래그 비트를 설정하여 상기 모의 SYN 패킷을 생성하고,
상기 TCP 블록에서 ACK 요청 함수를 호출하는 단계는,
상기 TCP 블록에서 상기 모의 SYN 패킷을 수신하면 TCP 세션을 생성한 이후 모의 SYN 패킷일 경우 SYN/ACK 패킷을 송신하는 대신 ACK 요청 함수를 호출하고,
상기 모의 ACK 패킷을 생성하는 단계는,
상기 저장된 세션 정보를 이용하여 상기 모의 ACK 패킷의 소스 포트 넘버(source port number) 필드에 복구할 세션의 클라이언트 포트 넘버를 기재하고,
상기 모의 ACK 패킷의 목적지 포트 넘버(destination port number) 필드에 상기 백업 서버 포트 넘버를 기재하고,
상기 모의 ACK 패킷의 시퀀스 넘버(sequence number) 필드에 상기 저장된 세션 정보에 포함된 저장된 시퀀스 넘버를 기재하고,
모의 패킷임을 알리는 플래그 비트(flag bit)와 ACK 패킷임을 알리는 플래그 비트를 설정하여 상기 모의 ACK 패킷을 생성하고,
상기 TCP 블록에서 세션 복구 및 상기 어플리케이션 래퍼 블록을 통해 세션을 전달하는 단계는,
상기 TCP 블록에서 상기 모의 ACK 패킷을 수신하면 상기 모의 SYN 패킷에 의해 생성된 세션에 대한 복구 절차를 완료하고 상기 어플리케이션 래퍼 블록을 통해 복구된 세션 정보를 전달하는
장애조치 시스템에서 장애 발생시 TCP 세션을 복원하는 방법.
Calling a failover callback function if a failure of the master server is detected in the backup server;
Generating a simulated SYN packet using the stored session information when the failover callback function is called;
Transmitting the simulated SYN packet to a TCP block;
Calling an ACK request function in the TCP block;
Generating a simulated ACK packet using the stored session information when the ACK request function is called;
Transmitting the simulated ACK packet to the TCP block; And
And delivering the session through the session recovery and application wrapper block in the TCP block,
Wherein the generating the simulated SYN packet comprises:
The client port number of the session to be restored is described in the source port number field of the simulated SYN packet using the stored session information,
The backup server port number is written in a destination port number field of the simulated SYN packet,
A value obtained by subtracting 1 from a stored sequence number included in the stored session information is written in a sequence number field of the simulated SYN packet,
Generates a simulated SYN packet by setting a flag bit indicating that the packet is a simulation packet and a flag bit indicating that the packet is a SYN packet,
The step of calling an ACK request function in the TCP block comprises:
Upon receipt of the simulated SYN packet in the TCP block, if the SYN packet is a simulated SYN packet after the TCP session is created, an ACK request function is called instead of transmitting a SYN / ACK packet,
Wherein the generating the simulated ACK packet comprises:
A client port number of a session to be restored is written in a source port number field of the simulated ACK packet using the stored session information,
The backup server port number is written in a destination port number field of the simulated ACK packet,
A sequence number field of the simulated ACK packet is stored in the stored sequence information,
Generates a simulated ACK packet by setting a flag bit indicating that the packet is a simulated packet and a flag bit indicating that the packet is an ACK packet,
Wherein the step of restoring the session in the TCP block and delivering the session through the application wrapper block comprises:
Upon receiving the simulated ACK packet from the TCP block, the recovery process for the session generated by the simulated SYN packet is completed and the recovered session information is delivered through the application wrapper block
How to restore TCP sessions on failover systems.
제8항에 있어서,
상기 장애가 감지되기 이전에,
마스터 서버(Master Server)가 클라이언트(client)와 TCP연결을 설정하면, 상기 TCP 연결에 대한 세션 정보를 저장하고, 상기 TCP 연결 해제하면 해당 세션 정보 삭제하는 단계를 더 포함하는
장애조치 시스템에서 장애 발생시 TCP 세션을 복원하는 방법.
9. The method of claim 8,
Before the failure is detected,
When the master server establishes a TCP connection with a client, storing the session information for the TCP connection, and deleting the session information when the TCP connection is released
How to restore TCP sessions on failover systems.
삭제delete 제8항에 있어서,
상기 TCP 블록에서 ACK 요청 함수를 호출 하는 단계는,
상기 TCP 블록에서 상기 모의 SYN 패킷에 포함된 모의 패킷임을 알리는 플래그 비트(flag bit)와 SYN 패킷임을 알리는 플래그 비트를 확인하여 상기 모의 SYN 패킷임을 확인하면, SYN/ACK 패킷을 송신하지 않고, 상기 ACK 요청 함수를 호출하는
장애조치 시스템에서 장애 발생시 TCP 세션을 복원하는 방법.
9. The method of claim 8,
The step of calling an ACK request function in the TCP block comprises:
The TCP block checks a flag bit indicating that the packet is a simulated packet included in the simulated SYN packet and a flag bit indicating that it is a SYN packet and confirms that the packet is the simulated SYN packet. If the SYN / ACK packet is not transmitted, Calling the request function
How to restore TCP sessions on failover systems.
삭제delete 제8항에 있어서,
상기 TCP 블록에서 ACK 요청 함수를 호출 하는 단계는,
상기 ACK 요청 함수를 호출하지 않고, 모의 SYN/ACK 패킷을 생성하여 세션 핸들링 블록으로 송신하는
장애조치 시스템에서 장애 발생시 TCP 세션을 복원하는 방법.
9. The method of claim 8,
The step of calling an ACK request function in the TCP block comprises:
Generates a simulated SYN / ACK packet without invoking the ACK request function, and transmits the simulated SYN / ACK packet to the session handling block
How to restore TCP sessions on failover systems.
제8항, 제9항, 제11항 및 제13항 중 어느 한 항의 방법을 실행하기 위한 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터에서 판독 가능한 기록 매체.A computer-readable recording medium having recorded thereon a program for executing the method according to any one of claims 8, 9, 11 and 13.
KR1020140193517A 2014-12-30 2014-12-30 Failover system and method for restoring a TCP session KR101641799B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140193517A KR101641799B1 (en) 2014-12-30 2014-12-30 Failover system and method for restoring a TCP session

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140193517A KR101641799B1 (en) 2014-12-30 2014-12-30 Failover system and method for restoring a TCP session

Publications (2)

Publication Number Publication Date
KR20160080935A KR20160080935A (en) 2016-07-08
KR101641799B1 true KR101641799B1 (en) 2016-07-29

Family

ID=56503254

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140193517A KR101641799B1 (en) 2014-12-30 2014-12-30 Failover system and method for restoring a TCP session

Country Status (1)

Country Link
KR (1) KR101641799B1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107995022B (en) * 2017-10-25 2021-03-05 东软集团股份有限公司 Session synchronization method and device, storage medium and electronic equipment
CN108111350B (en) * 2017-12-25 2021-07-13 北京格林伟迪科技股份有限公司 Method for implementing hot backup of TCP main/standby switching
CN115865734A (en) * 2022-12-02 2023-03-28 上海浦东发展银行股份有限公司 Fault detection method, data generation method, device, equipment and medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009002318A1 (en) * 2007-06-26 2008-12-31 Thomson Licensing Real time protocol stream migration
KR101104599B1 (en) * 2009-08-18 2012-01-12 삼성에스디에스 주식회사 Apparatus and method for defending TCP SYN flooding attacks

Also Published As

Publication number Publication date
KR20160080935A (en) 2016-07-08

Similar Documents

Publication Publication Date Title
EP2119184B1 (en) Virtualization and high availability of network connections
KR101641799B1 (en) Failover system and method for restoring a TCP session
US20140298078A1 (en) SYNCHRONOUS MIRRORING OF NVLog TO MULTIPLE DESTINATIONS (ARCHITECTURE LEVEL)
US9723074B2 (en) Method and apparatus for in the middle primary backup replication
US20180131627A1 (en) Socket state transfer
CN103856511B (en) Data packet method for uploading, client, node, information server and system
US7533289B1 (en) System, method, and computer program product for performing live cloning
US9497097B2 (en) Inserting sequence numbers into data blocks merged from data streams
KR101766446B1 (en) Duplex system and methods for synchronizing data and restoring data
US9307005B2 (en) Communication control system, method, and apparatus
CN112948484A (en) Distributed database system and data disaster recovery drilling method
KR102031484B1 (en) Server and Recovery server for performing failure recovery of service server using block chain, Method for controlling the server
KR20180099143A (en) Apparatus and method for recovering tcp-session
WO2022001705A1 (en) Method, apparatus and device for supporting tcp dynamic migration, and storage medium
KR101511841B1 (en) Fault tolerance system based on virtual machine and method for arbitrating packets
US11537480B1 (en) Systems and methods of backup and recovery of journaling systems
KR101961792B1 (en) Duplex system and methods for synchronizing data and restoring data considering packet type
CN111464514A (en) TCP hot backup method and system
JP6182779B1 (en) Transfer device, transfer method, and program
JP5863383B2 (en) Communication node device, system, and method
US10652146B1 (en) System and method for high availability of ethernet network during storage system failure
CN111414411A (en) High availability database system
KR20060019439A (en) Device and method for database synchronization interface
US9036656B1 (en) Lightweight reliability protocol over fibre-channel to provide for load-balancing and resiliency
US11334443B1 (en) Trusted data restoration and authentication

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