KR20230124249A - Apparatus and method for processing of establishment of connection for transmission control protocol - Google Patents

Apparatus and method for processing of establishment of connection for transmission control protocol Download PDF

Info

Publication number
KR20230124249A
KR20230124249A KR1020220021310A KR20220021310A KR20230124249A KR 20230124249 A KR20230124249 A KR 20230124249A KR 1020220021310 A KR1020220021310 A KR 1020220021310A KR 20220021310 A KR20220021310 A KR 20220021310A KR 20230124249 A KR20230124249 A KR 20230124249A
Authority
KR
South Korea
Prior art keywords
packet
client device
request
connection
transmission control
Prior art date
Application number
KR1020220021310A
Other languages
Korean (ko)
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 KR1020220021310A priority Critical patent/KR20230124249A/en
Publication of KR20230124249A publication Critical patent/KR20230124249A/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/28Timers or timing mechanisms used in protocols

Abstract

전송 제어 프로토콜 연결 처리 장치 및 방법에 관한 것으로, 전송 제어 프로토콜 연결 처리 장치는 적어도 하나의 SYNACK 패킷 및 상기 적어도 하나의 SYNACK 패킷에 대응하는 적어도 하나의 리퀘스트 소켓을 보관하는 보관소 및 클라이언트 장치로부터 SYN 패킷이 수신되면, 상기 보관소를 열람하고, 상기 보관소로부터 상기 SYN 패킷에 대응하는 SYNACK 패킷 및 상기 SYN 패킷에 대응하는 리퀘스트 소켓을 검출하는 처리부를 포함하고, 상기 SYN 패킷은 상기 클라이언트 장치로 전송되고, 상기 리퀘스트 소켓은 상기 클라이언트 장치가 상기 SYN 패킷에 대한 응답으로 전송한 ACK 패킷을 수신함으로써, 상기 클라이언트 장치와 전송 제어 프로토콜 연결을 수립할 수 있다.A transmission control protocol connection processing apparatus and method, wherein the transmission control protocol connection processing apparatus stores at least one SYNACK packet and at least one request socket corresponding to the at least one SYNACK packet, and a SYN packet from a client device. and a processing unit for browsing the storage, and detecting a SYNACK packet corresponding to the SYN packet and a request socket corresponding to the SYN packet from the storage, the SYN packet is transmitted to the client device, and the request The socket may establish a transmission control protocol connection with the client device by receiving an ACK packet transmitted by the client device in response to the SYN packet.

Description

전송 제어 프로토콜 연결 처리 장치 및 방법{APPARATUS AND METHOD FOR PROCESSING OF ESTABLISHMENT OF CONNECTION FOR TRANSMISSION CONTROL PROTOCOL}Transmission control protocol connection processing apparatus and method

전송 제어 프로토콜 연결 처리 장치 및 방법에 관한 것이다.Transmission control protocol connection processing device and method.

전송 제어 프로토콜(TCP: Transmission Control Protocol)은 컴퓨터나 서버 장치와 같은 둘 이상의 정보 처리 장치 간의 데이터 통신을 위한 통신 프로토콜로, 통상 인터넷 프로토콜(IP: Internet Protocol)과 함께 사용된다. 전송 제어 프로토콜은, 송수신 데이터에 대한 순서를 보장하고 에러 없이 신뢰성 있는 연결을 맺을 수 있어 통상적으로 많이 사용되고 있다. 전송 제어 프로토콜은 연결 수립 과정을 필요로 하는데, 이러한 연결 수립 과정은 클라이언트로부터의 SYN 패킷의 전송, 서버 장치로부터의 SYNACK 패킷의 전송 및 클라이언트의 ACK 패킷 전송의 과정(3-way handshake)을 거쳐 수행된다. 이 경우, 서버 장치 내에서는 메모리 할당 과정이 수행된다. 구체적으로 리눅스 커널의 경우, 클라이언트가 서버로 SYN 패킷을 보내 전송 제어 프로토콜 연결을 요청하면, 서버는 해당 패킷을 수신할 리슨 소켓(listen socket)을 결정하고, 메모리 할당자는 연결 지속을 위해 두 개의 인스턴스(instance)(연결 수립에 이용될 패킷인 SYNACK 패킷과, SYNACK 패킷에 대한 ACK 패킷을 수신하기 위한 소켓인 Request 소켓)를 할당한다. 두 인스턴스의 상태가 초기화되면, 서버는 클라이언트와 SYNACK 패킷과 ACK 패킷을 각각 교환하고, 수신한 ACK 패킷에 이상이 없으면 클라이언트와 연결을 생성한다. 이때, 두 인스턴스는 초기화된 상태들을 해제하고 메모리 할당자로 반환된다. 이와 같은 연결 수립 과정은 서버의 중앙 처리 장치(CPU: Central Processing Unit) 부하의 원인으로 알려져 있다. 특히 이러한 전송 제어 프로토콜의 연결 수립 과정은, 하이퍼텍스트 전송 프로토콜(HTTP: hypertext transfer protocol)을 이용하는 경우에 더 큰 문제가 될 수 있다. 하이퍼텍스트 전송 프로토콜은 단기 연결(short-lived connection) 특성을 가질 뿐만 아니라, 상술한 전송 제어 프로토콜 연결 수립 과정을 반복적으로 발생시키는 특성도 가지고 있기 때문에, 실제 데이터 패킷 교환 성능을 저하시킨다. 종래에는 이러한 문제점들을 해결하기 위해서 소켓 인터페이스의 자료 구조를 경량화하거나, 시스템 콜(System call)을 일괄 처리하고 특정한 장치를 사용하여 전송 제어 프로토콜 처리를 오프-로드하는 등의 방법으로 단기 연결 시 발생하는 부하를 해결하려고 하였다. 그러나 이들은 전송 제어 프로토콜은 유지한 상태에서 외부적인 다른 요소를 이용하는 것이므로, 다른 기능에도 영향을 미쳐 이들의 성능 저하를 야기할 뿐만 아니라, 기존 애플리케이션과의 호환성이 부족한 문제점이 있었다.Transmission Control Protocol (TCP) is a communication protocol for data communication between two or more information processing devices such as computers or server devices, and is usually used together with Internet Protocol (IP). The transmission control protocol is commonly used because it guarantees the order of transmitted and received data and can establish a reliable connection without errors. The transmission control protocol requires a connection establishment process. This connection establishment process is performed through the process of transmitting a SYN packet from a client, transmitting a SYNACK packet from a server device, and transmitting an ACK packet from a client (3-way handshake). do. In this case, a memory allocation process is performed in the server device. Specifically, in the case of the Linux kernel, when a client sends a SYN packet to the server to request a transmission control protocol connection, the server determines a listen socket to receive the packet, and the memory allocator creates two instances for connection persistence. Allocates (instance) (SYNACK packet, which is the packet to be used for connection establishment, and Request socket, which is the socket for receiving the ACK packet for the SYNACK packet). When the states of the two instances are initialized, the server exchanges SYNACK and ACK packets with the client, respectively, and creates a connection with the client if there is nothing wrong with the received ACK packet. At this time, the two instances release their initialized states and return to the memory allocator. Such a connection establishment process is known to be a cause of a server's central processing unit (CPU) load. In particular, the connection establishment process of such a transmission control protocol may be a bigger problem when using a hypertext transfer protocol (HTTP). The hypertext transmission protocol not only has a short-lived connection characteristic, but also has a characteristic of repeatedly generating the above-described transmission control protocol connection establishment process, thereby degrading actual data packet exchange performance. Conventionally, in order to solve these problems, the data structure of the socket interface is lightweight, system calls are processed in batches, and transmission control protocol processing is off-loaded using a specific device to reduce the number of short-term connections that occur during short-term connections. I was trying to solve the load. However, since they use other external elements while maintaining the transmission control protocol, they affect other functions, causing performance degradation, and lack compatibility with existing applications.

전송 제어 프로토콜 연결의 반복 생성에 기인한 처리 장치의 불필요한 처리 병목 현상을 해결하기 위한 전송 제어 프로토콜 연결 처리 장치 및 방법을 제공하는 것을 해결하고자 하는 과제로 한다.An object to be solved is to provide a transmission control protocol connection processing device and method for solving an unnecessary processing bottleneck of a processing device due to repetitive creation of transmission control protocol connections.

상술한 과제를 해결하기 위하여 전송 제어 프로토콜 연결 처리 장치 및 방법이 제공된다.In order to solve the above problems, a transmission control protocol connection processing apparatus and method are provided.

전송 제어 프로토콜 연결 처리 장치는, 적어도 하나의 SYNACK 패킷 및 상기 적어도 하나의 SYNACK 패킷에 대응하는 적어도 하나의 리퀘스트 소켓을 보관하는 보관소 및 클라이언트 장치로부터 SYN 패킷이 수신되면, 상기 보관소를 열람하고, 상기 보관소로부터 상기 SYN 패킷에 대응하는 SYNACK 패킷 및 상기 SYN 패킷에 대응하는 리퀘스트 소켓을 검출하는 처리부를 포함하고, 상기 SYN 패킷은 상기 클라이언트 장치로 전송되고, 상기 리퀘스트 소켓은 상기 클라이언트 장치가 상기 SYN 패킷에 대한 응답으로 전송한 ACK 패킷을 수신함으로써, 상기 클라이언트 장치와 전송 제어 프로토콜 연결이 수립될 수 있다.The transmission control protocol connection processing device, when a SYN packet is received from a repository storing at least one SYNACK packet and at least one request socket corresponding to the at least one SYNACK packet and a client device, browses the repository, and a processing unit for detecting a SYNACK packet corresponding to the SYN packet and a request socket corresponding to the SYN packet from By receiving the ACK packet transmitted as a response, a transmission control protocol connection with the client device may be established.

상기 처리부는, 상기 클라이언트 장치와의 반복 연결이 미리 정의된 임계 값을 초과하면, 상기 클라이언트 장치와의 전송 제어 프로토콜 연결에 이용된 상기 SYN 패킷 및 상기 리퀘스트 소켓을 상기 보관소에 보관할 수도 있다.The processing unit may store the SYN packet and the request socket used for the transmission control protocol connection with the client device in the storage when the repeated connection with the client device exceeds a predefined threshold.

상기 처리부는, SYN 패킷 및 리퀘스트 소켓의 재사용 가능 여부를 판단하고, 재사용 가능 여부에 따라서 상기 SYN 패킷 및 상기 리퀘스트 소켓을 상기 보관소에 보관하는 것도 가능하다.The processing unit may determine whether the SYN packet and the request socket can be reused, and store the SYN packet and the request socket in the storage according to whether the SYN packet and the request socket can be reused.

상기 처리부는, 상기 보관소에 저장 가능한 SYN 패킷 및 리퀘스트 소켓의 개수를 동시 수립이 가능한 전송 제어 프로토콜의 최대 개수로 유지할 수도 있다.The processing unit may maintain the number of SYN packets and request sockets that can be stored in the storage as the maximum number of transmission control protocols that can be simultaneously established.

상기 처리부는, 타이머의 구동 및 만료가 적어도 일 회 수행되는 동안, 적어도 하나의 클라이언트 장치와의 연결이 부재한지 여부를 판단하고, 만약 상기 적어도 하나의 클라이언트 장치와의 연결이 부재하다면, 상기 적어도 하나의 클라이언트 장치와의 연결에 이용된 SYN 패킷 및 리퀘스트 소켓을 상기 보관소에서 제거할 수도 있다.The processing unit determines whether a connection with at least one client device is absent while the timer runs and expires at least once, and if there is no connection with the at least one client device, the at least one client device is not connected. SYN packets and request sockets used for connection with the client device of may be removed from the storage.

전송 제어 프로토콜 연결 처리 장치는, 상기 적어도 하나의 SYNACK 패킷에 상기 적어도 하나의 리퀘스트 소켓의 대응 여부에 대한 정보를 저장하는 연결 리스트를 더 포함할 수도 있다.The transmission control protocol connection processing apparatus may further include a connection list storing information on whether the at least one request socket corresponds to the at least one SYNACK packet.

전송 제어 프로토콜 연결 처리 방법은, 클라이언트 장치로부터 SYN 패킷이 수신되는 단계, SYN 패킷의 수신에 따라 보관소를 열람하고, 상기 보관소는 적어도 하나의 SYNACK 패킷 및 상기 적어도 하나의 SYNACK 패킷에 대응하는 적어도 하나의 리퀘스트 소켓을 보관하는 단계, 상기 보관소로부터 상기 SYN 패킷에 대응하는 SYNACK 패킷 및 상기 SYN 패킷에 대응하는 리퀘스트 소켓을 검출하는 단계, 상기 SYN 패킷이 상기 클라이언트 장치로 전송되는 단계, 상기 클라이언트 장치가 상기 SYN 패킷에 대한 응답으로 ACK 패킷을 전송하는 단계, 상기 리퀘스트 소켓을 통해 상기 ACK 패킷이 수신되는 단계 및 상기 클라이언트 장치와 전송 제어 프로토콜 연결이 수립되는 단계를 포함할 수도 있다.A transmission control protocol connection processing method includes: receiving a SYN packet from a client device, browsing a storage according to the reception of the SYN packet, wherein the storage includes at least one SYNACK packet and at least one SYNACK packet corresponding to the at least one SYNACK packet. Storing a request socket; detecting a SYNACK packet corresponding to the SYN packet and a request socket corresponding to the SYN packet from the storage; transmitting the SYN packet to the client device; Transmitting an ACK packet as a response to the packet, receiving the ACK packet through the request socket, and establishing a transmission control protocol connection with the client device.

전송 제어 프로토콜 연결 처리 방법은, 상기 클라이언트 장치와의 반복 연결이 미리 정의된 임계 값을 초과하면, 상기 클라이언트 장치와의 전송 제어 프로토콜 연결에 이용된 상기 SYN 패킷 및 상기 리퀘스트 소켓을 상기 보관소에 보관하는 단계를 더 포함할 수도 있다.The transmission control protocol connection processing method includes storing the SYN packet and the request socket used for the transmission control protocol connection with the client device in the storage when the repeated connection with the client device exceeds a predefined threshold. It may include more steps.

상기 SYN 패킷 및 상기 리퀘스트 소켓을 상기 보관소에 보관하는 단계는, SYN 패킷 및 리퀘스트 소켓의 재사용 가능 여부를 판단하는 단계 및 재사용 가능 여부에 따라서 상기 SYN 패킷 및 상기 리퀘스트 소켓을 상기 보관소에 보관하는 단계를 포함할 수도 있다.Storing the SYN packet and the request socket in the storage includes determining whether the SYN packet and the request socket can be reused, and storing the SYN packet and the request socket in the storage according to whether the SYN packet and the request socket can be reused. may also include

전송 제어 프로토콜 연결 처리 방법은, 상기 보관소에 저장 가능한 SYN 패킷 및 리퀘스트 소켓의 개수를 동시 수립이 가능한 전송 제어 프로토콜의 최대 개수로 유지하는 단계를 더 포함하는 것도 가능하다.The transmission control protocol connection processing method may further include maintaining the number of SYN packets and request sockets that can be stored in the storage as the maximum number of transmission control protocols that can be simultaneously established.

전송 제어 프로토콜 연결 처리 방법은, 타이머의 구동 및 만료가 적어도 일 회 수행되는 동안, 적어도 하나의 클라이언트 장치와의 연결이 부재한지 여부를 판단하는 단계 및 만약 상기 적어도 하나의 클라이언트 장치와의 연결이 부재하다면, 상기 적어도 하나의 클라이언트 장치와의 연결에 이용된 SYN 패킷 및 리퀘스트 소켓을 상기 보관소에서 제거하는 단계를 더 포함할 수도 있다.The transmission control protocol connection processing method includes determining whether a connection with at least one client device is absent while a timer is started and expired at least once, and if the connection with the at least one client device is absent. If so, the method may further include removing SYN packets and request sockets used for connection with the at least one client device from the storage.

상술한 전송 제어 프로토콜 연결 처리 장치 및 방법에 의하면, 전송 제어 프로토콜 연결의 반복 생성에 기인한 프로세서의 불필요한 처리 병목 현상을 해결할 수 있게 되고, 이에 따라 더 많은 전송 제어 프로토콜 연결과 패킷을 처리할 수 있게 되어, 서버 장치 등과 같은 장치의 성능을 보다 개선할 수 있게 되는 장점을 얻을 수 있다.According to the transmission control protocol connection processing apparatus and method described above, it is possible to solve the unnecessary processing bottleneck of the processor due to the repetitive creation of transmission control protocol connections, and thus to process more transmission control protocol connections and packets. Therefore, it is possible to obtain an advantage of being able to further improve the performance of a device such as a server device.

상술한 전송 제어 프로토콜 연결 처리 장치 및 방법에 의하면, 전송 제어 프로토콜 연결 수립에 사용하는 자료 구조를 재사용함으로써, 메모리 할당과 초기화에 의한 오버헤드를 줄이고, 캐싱(Caching) 효과를 극대화하여 프로세서의 퍼포먼스를 향상시킬 수 있게 된다.According to the transmission control protocol connection processing apparatus and method described above, by reusing data structures used to establish a transmission control protocol connection, overhead due to memory allocation and initialization is reduced, and processor performance is improved by maximizing a caching effect. be able to improve

상술한 전송 제어 프로토콜 연결 처리 장치 및 방법에 의하면, 하이퍼텍스트 전송 프로토콜과 같이 전송 제어 프로토콜 연결이 대량으로 반복 발생하여 전송 제어 프로토콜 트래픽이 큰 경우에도, 서버 장치는 성능 저하 없이 클라이언트가 요구하는 서비스를 안정적으로 제공할 수 있게 되는 효과도 얻을 수 있다.According to the above-described transmission control protocol connection processing apparatus and method, even when transmission control protocol traffic is large due to a large number of repetitions of transmission control protocol connections such as hypertext transmission protocol, the server device provides services requested by clients without performance degradation. You can also get the effect of being able to provide it stably.

본 발명의 상세한 설명에서 인용되는 도면을 보다 충분히 이해하기 위하여 각 도면의 상세한 설명이 제공된다.
도 1은 전송 제어 프로토콜 연결 처리 시스템의 일 실시예에 대한 개요도이다.
도 2는 전송 제어 프로토콜 연결 처리 장치의 일 실시예에 대한 블록도이다.
도 3은 코어마다 인스턴스 보관소를 할당하는 일례를 도시한 도면이다.
도 4는 전송 제어 프로토콜 연결 처리 방법의 일 실시예에 대한 흐름도이다.
도 5는 반복 사용되는 인스턴스의 보관 여부를 결정하기 위한 과정의 일 실시예를 설명하기 위한 흐름도이다.
도 6은 사용되지 않는 인스턴스를 제거하기 위한 과정의 일 실시예를 설명하기 위한 흐름도이다.
A detailed description of each drawing is provided in order to more fully understand the drawings cited in the detailed description of the present invention.
1 is a schematic diagram of one embodiment of a transmission control protocol connection processing system.
2 is a block diagram of an embodiment of a transmission control protocol connection processing device.
3 is a diagram showing an example of allocating instance storage for each core.
4 is a flow chart of an embodiment of a transmission control protocol connection processing method.
5 is a flowchart illustrating an embodiment of a process for determining whether to store an instance that is repeatedly used.
6 is a flowchart illustrating an embodiment of a process for removing unused instances.

이하 명세서 전체에서 동일 참조 부호는 특별한 사정이 없는 한 동일 구성요소를 지칭한다. 이하에서 사용되는 '부'가 부가된 용어는, 소프트웨어 및/또는 하드웨어로 구현될 수 있으며, 실시예에 따라 하나의 '부'가 하나의 물리적 또는 논리적 부품으로 구현되거나, 복수의 '부'가 하나의 물리적 또는 논리적 부품으로 구현되거나, 하나의 '부'가 복수의 물리적 또는 논리적 부품들로 구현되는 것도 가능하다. 명세서 전체에서 어떤 부분이 다른 부분과 연결되어 있다고 할 때, 이는 어떤 부분과 다른 부분이 상호 간에 물리적으로 연결되었음을 의미할 수도 있고, 및/또는 전기적으로 연결되었음을 의미할 수도 있다. 또한, 어떤 부분이 다른 부분을 포함한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 부분 이외의 또 다른 부분을 제외하는 것이 아니며, 설계자의 선택에 따라서 또 다른 부분을 더 포함할 수 있음을 의미한다. 제1 내지 제N(N은 1 이상의 자연수) 등의 표현은, 적어도 하나의 부분(들)을 다른 부분(들)으로부터 구분하기 위한 것으로, 특별한 기재가 없는 이상 이들이 순차적임을 반드시 의미하지는 않는다. 또한 단수의 표현은 문맥상 명백하게 예외가 있지 않는 한, 복수의 표현을 포함할 수 있다.In the entire specification below, the same reference numerals refer to the same components unless otherwise specified. A term with an added 'unit' used below may be implemented in software and/or hardware, and depending on an embodiment, one 'unit' may be implemented as one physical or logical component, or a plurality of 'units' may be implemented as one physical or logical component. It is possible to implement one physical or logical component, or one 'unit' to implement a plurality of physical or logical components. When a part is said to be connected to another part throughout the specification, this may mean that a part and another part are physically connected to each other and/or electrically connected. In addition, when a part includes another part, this means that it does not exclude another part other than the other part unless otherwise stated, and may further include another part according to the designer's choice. do. Expressions such as the first to Nth (N is a natural number of 1 or more) are for distinguishing at least one part (s) from other part (s), and do not necessarily mean that they are sequential unless otherwise specified. In addition, singular expressions may include plural expressions, unless there is a clear exception from the context.

이하 도 1 내지 도 3을 참조하여 전송 제어 프로토콜 연결 처리 시스템 및 전송 제어 프로토콜 연결 처리 장치의 일 실시예에 대해 설명하도록 한다.An embodiment of a transmission control protocol connection processing system and a transmission control protocol connection processing apparatus will be described with reference to FIGS. 1 to 3 .

도 1은 전송 제어 프로토콜 연결 처리 시스템의 일 실시예에 대한 개요도이다.1 is a schematic diagram of one embodiment of a transmission control protocol connection processing system.

도 1에 도시된 바에 의하면, 전송 제어 프로토콜 연결 처리 시스템(1, 이하 처리 시스템)은, 일 실시예에 있어서, 클라이언트 장치(10)와, 클라이언트 장치(10)와 통신 가능하게 연결된 서버 장치를 포함하는 제어 프로토콜 연결 수립 제어 장치(100, 이하 TCP 연결 처리 장치라 함)를 포함할 수 있다. 클라이언트 장치(10)와 TCP 연결 처리 장치(100)는 상호 유선 통신 네트워크 및 무선 통신 네트워크 중 적어도 하나를 기반으로 통신을 수행할 수 있다. 여기서, 무선 통신 네트워크는 근거리 통신 네트워크(예를 들어, 와이파이(Wi-Fi), 와이파이 다이렉트(Wi-Fi Direct), 블루투스(Bluetooth), 저전력 블루투스(Bluetooth Low Energy), 지그비(zigbee) 통신, 초광대역(UWB: Ultra-WideBand) 통신, 알에프아이디(RFID: Radio-Frequency IDentification), 캔(CAN) 통신 및/또는 엔에프씨(NFC: Near Field Communication) 등) 또는 원거리 통신 네트워크(예를 들어, 3GPP, 3GPP2, 와이브로 또는 와이맥스 계열 등의 이동 통신 표준을 기반으로 구현된 이동 통신 네트워크 등)를 포함할 수도 있다.As shown in FIG. 1, the transmission control protocol connection processing system 1 (hereinafter referred to as processing system) includes, in one embodiment, a client device 10 and a server device communicatively connected to the client device 10. It may include a control protocol connection establishment control device (100, hereinafter referred to as a TCP connection processing device) that The client device 10 and the TCP connection processing device 100 may perform communication based on at least one of a mutual wired communication network and a wireless communication network. Here, the wireless communication network is a short-distance communication network (eg, Wi-Fi, Wi-Fi Direct, Bluetooth, Bluetooth Low Energy, zigbee communication, seconds Ultra-WideBand (UWB) communications, Radio-Frequency IDentification (RFID), CAN communications, and/or Near Field Communication (NFC), etc.) or telecommunication networks (e.g., 3GPP) , 3GPP2, a mobile communication network implemented based on a mobile communication standard such as WiBro or WiMAX series, etc.).

클라이언트 장치(10) 및 TCP 연결 처리 장치(100) 중 적어도 하나는, 실시예에 따라, 하나 또는 둘 이상의 정보처리장치를 이용하여 구현된 것일 수도 있고, 또는 후술하는 동작 및 기능의 수행을 위해 별도로 특별히 고안된 장치를 포함할 수도 있다. 여기서, 정보처리장치는, 예를 들어, 서버용 하드웨어 장치, 데스크톱 컴퓨터, 랩톱 컴퓨터, 스마트 폰, 태블릿 피씨, 스마트 시계, 스마트 태그, 스마트 밴드, 두부 장착형 디스플레이(HMD: Head Mounted Display) 장치, 휴대용 게임기, 내비게이션 장치, 개인용 디지털 보조기(PDA: Personal Digital Assistant), 보이스 레코더, 동영상 촬영 장치(캠코더나 액션캠 등), 스캐너 장치, 프린터 장치, 삼차원 프린터 장치, 스마트 키, 원격 제어 장치(리모컨), 디지털 텔레비전, 셋 톱 박스, 디지털 미디어 플레이어 장치, 미디어 스트리밍 장치, 디브이디 재생 장치, 컴팩트 디스크 재생 장치, 음향 재생 장치(인공 지능 스피커 등), 가전 기기, 유인/무인 이동체(차량, 이동성 로봇 또는 무선 모형 차량 등), 유인/무인 비행체(항공기, 드론 또는 모형 비행기 등), 의료 기기, 가정용/산업용/군사용 로봇 또는 산업용/군사용 기계 등을 포함할 수 있으나 이에 한정되는 것은 아니다. Depending on the embodiment, at least one of the client device 10 and the TCP connection processing device 100 may be implemented using one or more information processing devices, or separately for performing operations and functions described later. It may also include specially designed devices. Here, the information processing device is, for example, a hardware device for a server, a desktop computer, a laptop computer, a smart phone, a tablet PC, a smart watch, a smart tag, a smart band, a head mounted display (HMD) device, and a handheld game machine. , navigation device, personal digital assistant (PDA), voice recorder, video recording device (camcorder or action cam, etc.), scanner device, printer device, 3D printer device, smart key, remote control device (remote control), digital Televisions, set-top boxes, digital media player devices, media streaming devices, DVD playback devices, compact disc playback devices, sound playback devices (artificial intelligence speakers, etc.), home appliances, manned/unmanned mobile vehicles (vehicles, mobile robots or wireless model vehicles) etc.), manned/unmanned aerial vehicles (aircraft, drones or model airplanes, etc.), medical devices, household/industrial/military robots, or industrial/military machines, etc., but are not limited thereto.

도 1에 도시된 바에 의하면, 클라이언트 장치(10)와 TCP 연결 처리 장치(100)는 상호 간의 통신을 위해 먼저 전송 제어 프로토콜 기반 연결(이하 TCP 연결)을 수립한다. 이 경우, 클라이언트 장치(10)는 먼저 TCP 연결을 위한 SYN 패킷을 TCP 연결 처리 장치(100)로 전달하고(p1), TCP 연결 처리 장치(100)는 이에 응하여 후술하는 일련의 동작을 수행한 후, SYN 패킷을 수신하였음을 확인하기 위해, SYN 패킷에 대한 응답으로, SYN 패킷에 대응하는 SYNACK 패킷(도 2의 191)을 클라이언트 장치(10)로 전송한다(p2). 클라이언트 장치(10)는 SYNACK 패킷(191)에 대한 응답으로, SYNACK 패킷(191)을 수신하였음을 확인하기 위한 ACK 패킷을 TCP 연결 처리 장치(100)로 전송하고(p3), 이에 따라 클라이언트 장치(10)와 TCP 연결 처리 장치(100) 양자 간의 TCP 연결이 수립된다. 이후, 클라이언트 장치(10)와 TCP 연결 처리 장치(100)는 TCP 연결을 기반으로 일방으로 또는 쌍방으로 데이터, 명령/지시 또는 프로그램 등을 전송할 수 있게 된다. As shown in FIG. 1 , the client device 10 and the TCP connection processing device 100 first establish a transmission control protocol-based connection (hereinafter referred to as TCP connection) for mutual communication. In this case, the client device 10 first transfers the SYN packet for the TCP connection to the TCP connection processing device 100 (p1), and the TCP connection processing device 100 performs a series of operations to be described later in response thereto , In order to confirm that the SYN packet has been received, as a response to the SYN packet, a SYNACK packet (191 in FIG. 2) corresponding to the SYN packet is transmitted to the client device 10 (p2). In response to the SYNACK packet 191, the client device 10 transmits an ACK packet for confirming that the SYNACK packet 191 has been received to the TCP connection processing device 100 (p3), and accordingly the client device ( 10) and a TCP connection between the TCP connection processing device 100 is established. Thereafter, the client device 10 and the TCP connection processing device 100 can transmit data, commands/instructions, or programs in one or both directions based on the TCP connection.

도 2는 전송 제어 프로토콜 연결 처리 장치의 일 실시예에 대한 블록도이고, 도 3은 코어마다 인스턴스 보관소를 할당하는 일례를 도시한 도면이다.2 is a block diagram of an embodiment of a transmission control protocol connection processing device, and FIG. 3 is a diagram showing an example of allocating instance storage for each core.

도 2에 도시된 바와 같이, 일 실시예에 있어서, TCP 연결 처리 장치(100)는 SYNACK 패킷(191)의 전송(p2) 이전에 두 개의 인스턴스(191, 192)를 적어도 일회성으로 사용할 수 있다. 두 개의 인스턴스는 SYN 패킷에 대응하는 SYNACK 패킷(191)과, SYNACK 패킷(191)에 대응하는 ACK 패킷을 수신하기 위한 소켓(socket)인 리퀘스트 소켓(192, request socket)을 포함할 수 있다. 통상적으로 동일한 클라이언트 장치(10) 및 TCP 연결 처리 장치(100) 간의 연결에서 SYNACK 패킷(191)과 리퀘스트 소켓(192)의 상태는 큰 변경 없이 유지된다. 일 실시예에 의하면, SYNACK 패킷(191)은, 보관소(120)에 보관된 적어도 하나의 SYNACK 패킷(191-1 내지 191-k) 중에서 선택된 것이고, 리퀘스트 소켓(192)도 보관소(120)에 보관된 적어도 하나의 리퀘스트 소켓(192-1 내지 192-k) 중에서 선택된 것일 수 있다. 여기서, 보관소(120)에 보관된 SYNACK 패킷(191-1 내지 191-k) 및 보관소(120)에 보관된 적어도 하나의 리퀘스트 소켓(192-1 내지 192-k)은, 각각 상술한 클라이언트 장치(10) 또는 다른 클라이언트 장치와의 통신 과정에서 기 사용된 바 있는 SYNACK 패킷 및 리퀘스트 소켓일 수도 있다. 다시 말해서, 클라이언트 장치(10)와의 연결 수립을 위한 SYNACK 패킷(191)과 리퀘스트 소켓(192)은 재사용되는 것일 수 있다. SYNACK 패킷(191)과 리퀘스트 소켓(192)의 재사용에 의해, 종래의 TCP 연결 과정에서 수행되었던 초기화 처리가 필요 없게 된다.As shown in FIG. 2 , in one embodiment, the TCP connection processing device 100 may use the two instances 191 and 192 at least once before transmitting the SYNACK packet 191 (p2). The two instances may include a SYNACK packet 191 corresponding to the SYN packet and a request socket 192, which is a socket for receiving an ACK packet corresponding to the SYNACK packet 191. Normally, the states of the SYNACK packet 191 and the request socket 192 in the connection between the same client device 10 and the TCP connection processing device 100 are maintained without significant change. According to one embodiment, the SYNACK packet 191 is selected from at least one SYNACK packet 191-1 to 191-k stored in the storage 120, and the request socket 192 is also stored in the storage 120. may be one selected from at least one request socket 192-1 to 192-k. Here, the SYNACK packets 191-1 to 191-k stored in the storage 120 and at least one request socket 192-1 to 192-k stored in the storage 120 are each of the above-described client devices ( 10) Alternatively, it may be a SYNACK packet and a request socket previously used in the communication process with other client devices. In other words, the SYNACK packet 191 and the request socket 192 for establishing a connection with the client device 10 may be reused. By reusing the SYNACK packet 191 and the request socket 192, the initialization process performed in the conventional TCP connection process becomes unnecessary.

도 2에 도시된 바를 참조하면, TCP 연결 처리 장치(100)는, 일 실시예에 있어서, 통신부(101)와, 보관소(120)와, 처리부(130)를 포함할 수 있다. Referring to FIG. 2 , the TCP connection processing device 100 may include a communication unit 101 , a storage 120 , and a processing unit 130 in one embodiment.

통신부(101)는, 유선 또는 무선 통신 네트워크에 접속하여 클라이언트 장치(10)로부터 패킷(예를 들어, SYN 패킷)을 수신하고 이를 리슨 소켓(102)으로 전달하거나, 또는 클라이언트 장치(10)로 패킷(예를 들어, SYNACK 패킷(191))을 전송할 수 있다. 통신부(101)는, 외부에서 전달되는 전기적 신호나 전파 신호를 수신하고, 수신한 신호를 전기적 신호로 변환하여 출력하거나, 수신한 아날로그 신호를 디지털 신호로 변환하거나, 전기적 신호를 증폭하는 등의 동작을 수행할 수도 있다. 통신부(101)는, 예를 들어, 랜 카드나, 무선 통신 모듈 등을 이용해 구현될 수 있다.The communication unit 101 connects to a wired or wireless communication network, receives packets (eg, SYN packets) from the client device 10 and transfers them to the listen socket 102, or packets to the client device 10. (eg, SYNACK packet 191) may be transmitted. The communication unit 101 receives an electrical signal or radio wave signal transmitted from the outside, converts the received signal into an electrical signal and outputs it, converts the received analog signal into a digital signal, or amplifies the electrical signal. can also be performed. The communication unit 101 may be implemented using, for example, a LAN card or a wireless communication module.

리슨 소켓(102, listen socket)은, 들어오는 연결을 수신하기 위한 소켓이다. 예를 들어, 리슨 소켓(102)은 클라이언트 장치(10)가 전송한 적어도 하나의 패킷(일례로 SYN 패킷 또는 ACK 패킷)이 전달되면, 이에 대응하는 정보를 처리부(130)에 전달함으로써, 처리부(130)가 클라이언트 장치(10)로부터 TCP 연결 요청이 왔음을 알 수 있게 한다.A listen socket (102, listen socket) is a socket for receiving incoming connections. For example, when at least one packet (for example, a SYN packet or an ACK packet) transmitted by the client device 10 is transmitted, the listen socket 102 transfers information corresponding thereto to the processing unit 130, thereby processing the processing unit ( 130) makes it possible to know that a TCP connection request has come from the client device 10.

보관소(120)는, 적어도 하나의 SYNACK 패킷(191-1 내지 191-k)과, 하나의 리퀘스트 소켓(192-1 내지 192-k) 등과 같은 인스턴스를 일시적으로 또는 비일시적으로 보관할 수 있다. 이 경우, 보관소(120)는 SYNACK 패킷(191-1 내지 191-k) 및 리퀘스트 소켓(192-1 내지 192-k)을 서로 대응하는 바에 따라 쌍으로 저장할 수도 있다. 일 실시예에 따르면, SYNACK 패킷(191-1 내지 191-k) 및 리퀘스트 소켓(192-1 내지 192-k)은 사전에 클라이언트 장치(10) 또는 다른 클라이언트 장치와의 TCP 연결 수립 과정에서 생성되었던 SYNACK 패킷(191-1 내지 191-k) 및 리퀘스트 소켓(192-1 내지 192-k)를 포함할 수 있다. 다시 말해서, SYNACK 패킷(191-1 내지 191-k)은 과거에 클라이언트 장치(10) 또는 다른 클라이언트 장치로 전송된 패킷이고, 리퀘스트 소켓(192-1 내지 192-k)은 과거에 클라이언트 장치(10) 또는 다른 클라이언트 장치가 전송한 ACK 패킷을 수신한 소켓이다. 상황에 따라서, 보관서(120)에는 새로운 SYNACK 패킷 및/또는 리퀘스트 소켓이 더 저장될 수도 있고, 기존의 SYNACK 패킷(191-1 내지 191-k) 및 리퀘스트 소켓(192-1 내지 192-k) 중 적어도 하나가 삭제될 수도 있다. 이들 SYNACK 패킷(191-1 내지 191-k) 및 리퀘스트 소켓(192-1 내지 192-k)의 보관 또는 삭제는 처리부(130)에 동작에 의해 수행될 수 있다. 실시예에 따라서, 보관소는 멀티코어 시스템에서 확장성을 유지하기 위해 록리스(lock-less) 방법을 적용하여 최적화된 것일 수도 있다. 실시예에 따라서, 보관소(120)는 적어도 하나의 주기억장치(램 등)나 보조기억장치(플래시 메모리 장치나, 하드디스크 장치 등)를 이용하여 구현될 수 있다.The storage 120 may temporarily or non-temporarily store instances such as at least one SYNACK packet 191-1 to 191-k and one request socket 192-1 to 192-k. In this case, the storage 120 may store SYNACK packets 191-1 to 191-k and request sockets 192-1 to 192-k in pairs according to their correspondence. According to one embodiment, the SYNACK packets 191-1 to 191-k and the request sockets 192-1 to 192-k are previously generated in the process of establishing a TCP connection with the client device 10 or another client device. SYNACK packets 191-1 to 191-k and request sockets 192-1 to 192-k. In other words, the SYNACK packets 191-1 to 191-k are packets transmitted to the client device 10 or other client devices in the past, and the request sockets 192-1 to 192-k are packets transmitted to the client device 10 in the past. ) or a socket that receives an ACK packet sent by another client device. Depending on circumstances, new SYNACK packets and/or request sockets may be further stored in the archive 120, and existing SYNACK packets 191-1 to 191-k and request sockets 192-1 to 192-k At least one of them may be deleted. Storage or deletion of these SYNACK packets 191-1 to 191-k and request sockets 192-1 to 192-k may be performed by the processing unit 130. Depending on the embodiment, the storage may be optimized by applying a lock-less method to maintain scalability in a multi-core system. According to embodiments, the storage 120 may be implemented using at least one main memory device (RAM, etc.) or auxiliary memory device (flash memory device, hard disk device, etc.).

처리부(130)는, TCP 연결 처리 장치(100)의 동작에 필요한 각종 연산 또는 제어 동작을 수행할 수 있으며, 예를 들어, 리슨 소켓(102)의 생성, SYNACK 패킷(191) 및 리퀘스트 소켓(192)의 탐색 및 결정, 보관소(120)의 관리 및/또는 통신부(101)에 대한 제어 등의 동작을 수행할 수 있다. 처리부(130)는, 저장 매체(미도시)에 저장된 프로그램(앱, 애플리케이션 또는 소프트웨어로 지칭 가능함)을 구동시켜 상술한 동작을 수행하는 것도 가능하다. 처리부(130)는, 실시예에 따라, 중앙 처리 장치(CPU: Central Processing Unit), 그래픽 처리 장치(GPU: Graphic Processing Unit), 마이크로 컨트롤러 유닛(MCU: Micro Controller Unit), 애플리케이션 프로세서(AP: Application Processor), 전자 제어 유닛(ECU: Electronic Controlling Unit), 및/또는 이외 각종 연산 및 제어 처리를 수행할 수 있는 적어도 하나의 전자 장치 등을 이용하여 구현 가능하다. 또한, 처리부(130)는, 중앙 처리 장치(CPU)의 다수의 코어(core, 도 3의 140-1 내지 140-n, 즉, 멀티 코어) 중 적어도 하나의 코어(140-1 내지 140-n 중 적어도 하나)를 이용하여 구현될 수도 있다.The processing unit 130 may perform various operations or control operations necessary for the operation of the TCP connection processing device 100, for example, generation of the listen socket 102, SYNACK packet 191, and request socket 192. ) Search and determination, management of the storage 120 and/or control of the communication unit 101 may be performed. The processing unit 130 may also perform the above-described operation by driving a program (which may be referred to as an app, application, or software) stored in a storage medium (not shown). The processing unit 130 may include a central processing unit (CPU), a graphic processing unit (GPU), a micro controller unit (MCU), an application processor (AP), according to an embodiment. Processor), electronic control unit (ECU), and/or at least one electronic device capable of performing other various calculation and control processes. In addition, the processing unit 130 includes at least one core 140-1 to 140-n among a plurality of cores 140-1 to 140-n in FIG. 3 (ie, multi-core) of the central processing unit (CPU). At least one of) may be implemented using.

일 실시예에 따르면, 처리부(130)는, 보관소 처리부(131), 보관 처리부(132), 인스턴스 제거부(133) 및 재사용 판단부(134)를 포함할 수 있다.According to an embodiment, the processing unit 130 may include a storage processing unit 131 , a storage processing unit 132 , an instance removal unit 133 , and a reuse determination unit 134 .

보관소 처리부(131)는 보관소(120) 내의 인스턴스의 검출 동작을 수행할 수 있다. 구체적으로 보관소 처리부(131)는, 먼저 수신한 SYN 패킷의 정보로부터 클라이언트 장치(10)에 대한 정보를 획득하고, 클라이언트 장치(10) 및 TCP 연결 처리 장치(100) 페어 정보와 일치하는 인스턴스(즉, SYNACK 패킷(191) 및 리퀘스트 소켓(192))가 보관소에 존재하는지를 확인할 수 있다. 만약 보관소(120)의 SYNACK 패킷(191-1 내지 191-k) 및 리퀘스트 소켓(192-1 내지 192-k) 중에서, 클라이언트 장치(10) 및 TCP 연결 처리 장치(100) 페어 정보와 일치하는 SYNACK 패킷(191) 및 리퀘스트 소켓(192)이 존재한다면, 이를 사용할 SYNACK 패킷(191) 및 리퀘스트 소켓(192)로 하여 보관소(120)로부터 검출하고, TCP 연결 수립을 위해 재사용한다. 이후, TCP 연결 처리 장치(100)는, 도 1에 도시된 것처럼 클라이언트 장치(10)와 SYNACK 패킷과 ACK 패킷을 교환한다(p2, p3). 만약 TCP 연결이 정상적으로 생성되면, 해당 인스턴스(즉, SYNACK 패킷(191) 및 리퀘스트 소켓(192))는 인스턴스들을 보관소에 다시 보관된다. 다시 말해서, TCP 연결 과정에서, 메모리 할당자가 SYNACK 패킷(191) 및 리퀘스트 소켓(192)을 할당하고, TCP 연결 성립에 따라 SYNACK 패킷(191) 및 리퀘스트 소켓(192)가 해제되어 메모리 할당자로 반환되는 동작의 반복 수행이 불필요하게 된다. 이와 같이, 반복적인 할당, 해제 및 초기화 과정의 생략은 TCP 연결 수립 성능을 향상시킬 수 있게 된다. 일 실시예에 의하면, 보관소 처리부(131)는, SYNACK 패킷(191) 및 리퀘스트 소켓(192)의 검출을 위해서 소정의 해시 테이블을 사용할 수도 있다. 해시 테이블의 사용에 따라 보관소 처리부(131)는, 평균적으로 상수 시간 내에 SYNACK 패킷(191) 및 리퀘스트 소켓(192)을 찾을 수 있게 된다. 또한, 보관소 처리부(131)는 연결 리스트(199)를 참조하여 서로 대응하는 SYNACK 패킷(191) 및 리퀘스트 소켓(192)의 검출할 수도 있다. 연결 리스트(199)는 보관소(120)에 기록된 SYNACK 패킷(191-1 내지 191-k) 및 리퀘스트 소켓(192-1 내지 192-k) 간의 대응 여부에 정보를 순차적으로 또는 비순차적으로 저장할 수 있으며, 보관소 처리부(131)는 이를 참조하여 보다 신속하게 상호 대응하는 SYNACK 패킷(191-1 내지 191-k) 및 리퀘스트 소켓(192-1 내지 192-k)를 검출할 수 있게 된다.The storage processing unit 131 may perform an operation of detecting instances in the storage 120 . Specifically, the storage processing unit 131 obtains information about the client device 10 from the information of the first received SYN packet, and the instance matching the pair information of the client device 10 and the TCP connection processing device 100 (ie, , SYNACK packet 191 and request socket 192) can be checked whether they exist in the archive. If SYNACK packets 191-1 to 191-k and request sockets 192-1 to 192-k of the repository 120 match the pair information of the client device 10 and the TCP connection processing device 100, If the packet 191 and the request socket 192 exist, they are detected from the storage 120 as the SYNACK packet 191 and the request socket 192 to be used, and reused for TCP connection establishment. Thereafter, the TCP connection processing device 100 exchanges SYNACK packets and ACK packets with the client device 10 as shown in FIG. 1 (p2, p3). If the TCP connection is normally created, the corresponding instance (that is, the SYNACK packet 191 and the request socket 192) is stored in the storage again. In other words, during the TCP connection process, the memory allocator allocates the SYNACK packet 191 and the request socket 192, and according to the establishment of the TCP connection, the SYNACK packet 191 and the request socket 192 are released and returned to the memory allocator. Repeated execution of the operation becomes unnecessary. In this way, omission of repetitive allocation, release, and initialization processes can improve TCP connection establishment performance. According to an embodiment, the storage processing unit 131 may use a predetermined hash table to detect the SYNACK packet 191 and the request socket 192. According to the use of the hash table, the storage processing unit 131 can find the SYNACK packet 191 and the request socket 192 within a constant time on average. In addition, the storage processing unit 131 may detect the SYNACK packet 191 and the request socket 192 corresponding to each other by referring to the connection list 199 . The connection list 199 may sequentially or non-sequentially store information on correspondence between the SYNACK packets 191-1 to 191-k and the request sockets 192-1 to 192-k recorded in the storage 120. , and the storage processing unit 131 can more quickly detect SYNACK packets 191-1 to 191-k and request sockets 192-1 to 192-k that correspond to each other by referring to this.

보관 처리부(132)는 사용된 인스턴스(즉, 이전 또는 현재의 TCP 연결 수립 과정에서 이용된 SYNACK 패킷(일례로 191) 및 리퀘스트 소켓(일례로 192))의 보관 처리를 수행한다. 보다 구체적으로, 보관 처리부(132)는 해당 인스턴스(191, 192)를 보관할 TCP 연결 처리 장치(100) 및 클라이언트 장치(10)의 쌍을 결정하고, 보관소(120)에 어느 정도의 인스턴스(191, 192)를 보관할지를 결정할 수 있다. 일 실시예에 의하면, 보관 처리부(132)는 인스턴스(191, 192)를 보관할 TCP 연결 처리 장치(100) 및 클라이언트 장치(10)의 쌍을 결정하기 위해 임계 값을 이용할 수 있다. 이 경우, 보관 처리부(132)는 일정 시간 동안 미리 정의된 임계 값을 초과하여 반복 연결된 TCP 연결 처리 장치(100) 및 클라이언트 장치(10)의 쌍이 존재하면, 해당 TCP 연결 처리 장치(100) 및 클라이언트 장치(10)의 쌍이 반복적으로 연결된다고 판단하고, 해당 TCP 연결 처리 장치(100) 및 클라이언트 장치(10)의 쌍의 연결 수립을 위해 이용된 인스턴스(191, 192)를 저장할 수 있다. 또한, 보관 처리부(132)는 보관소(120)에 저장될 인스턴스의 개수, 즉 SYNACK 패킷(191-1 내지 191-k)의 개수 및/또는 리퀘스트 소켓의 개수(192-1 내지 192-k)를 결정하기 위해, 동시에 생성 가능한 TCP 연결의 개수를 관리할 수도 있다. 이 경우, 보관 처리부(132)는 보관소(120)에 저장될 인스턴스(191-1 내지 191-k, 192-1 내지 192-k)의 개수를, 일정 시간(일례로 타임 윈도우) 동안 동시에 수립 가능한 TCP 연결의 최대 개수로 유지할 수도 있다. 이는, 다수의 인스턴스(들)(191-1 내지 191-k, 192-1 내지 192-k) 각각의 상태는 재사용이 가능하나, 각 연결을 구별하는 상태 등은 공유가 되지 않으므로, 거의 동시에 다수의 TCP 연결 수립이 수행되고 있다면, 이들의 처리를 위해 TCP 연결 개수에 대응하는 개수의 인스턴스(191, 192)가 요청되기 때문이다.The storage processing unit 132 performs storage processing of used instances (ie, SYNACK packets (eg, 191) and request sockets (eg, 192) used in the previous or current TCP connection establishment process). More specifically, the storage processing unit 132 determines a pair of the TCP connection processing device 100 and the client device 10 to store the instances 191 and 192, and stores the instances 191 and 192 in the storage 120. 192) can be stored. According to an embodiment, the storage processing unit 132 may use a threshold value to determine a pair of the TCP connection processing device 100 and the client device 10 to store the instances 191 and 192 . In this case, the storage processing unit 132, if there is a pair of the TCP connection processing device 100 and the client device 10 repeatedly connected beyond a predefined threshold for a certain period of time, the corresponding TCP connection processing device 100 and the client It is determined that the pair of devices 10 are repeatedly connected, and instances 191 and 192 used to establish a connection between the corresponding TCP connection processing device 100 and the client device 10 may be stored. In addition, the archive processing unit 132 sets the number of instances to be stored in the archive 120, that is, the number of SYNACK packets 191-1 to 191-k and/or the number of request sockets 192-1 to 192-k. To determine, you can also manage the number of TCP connections that can be created simultaneously. In this case, the storage processing unit 132 can simultaneously establish the number of instances 191-1 to 191-k and 192-1 to 192-k to be stored in the storage 120 for a certain period of time (for example, a time window). It can also be maintained with the maximum number of TCP connections. This is because the state of each of the plurality of instance(s) (191-1 to 191-k, 192-1 to 192-k) can be reused, but the state that distinguishes each connection is not shared, so that multiple instances are almost simultaneously This is because, if TCP connection establishment is being performed, the number of instances 191 and 192 corresponding to the number of TCP connections is requested for their processing.

인스턴스 제거부(133)는 불필요한 인스턴스(즉, 더 이상 사용되지 않는 인스턴스)를 제거 대상으로 결정하고, 필요에 따라서 해당 인스턴스를 보관소(120)에서 제거할 수 있다. 인스턴스 제거부(133)는 특정한 적어도 한 쌍의 인스턴스(191-1 내지 191-k 중 적어도 하나, 192-1 내지 192-k 중 적어도 하나)에 대응하는 TCP 연결 처리 장치(100) 및 클라이언트 장치(10)의 쌍이 반복적으로 연결되지 않은 경우, 해당 쌍의 인스턴스(191-1 내지 191-k 중 적어도 하나, 192-1 내지 192-k 중 적어도 하나)를 제거 대상으로 판단할 수도 있다. 이를 위해 인스턴스 제거부(133)는 타이머를 이용하는 것도 가능하다. 구체적으로, 타이머는 일정한 주기마다 반복적으로 만료되고, 인스턴스 제거부(133)는 타이머의 만료 시마다 보관소(120)를 열람하여 어느 TCP 연결 처리 장치(100) 및 클라이언트 장치(10)의 쌍이 반복 연결 특성을 잃었는지 확인하고, 확인 결과를 기반으로 해당 TCP 연결 처리 장치(100) 및 클라이언트 장치(10)의 쌍의 제거 여부를 결정할 수 있다. 예를 들어, 인스턴스 제거부(133)는 타이머가 만료되는 동안, 해당 TCP 연결 처리 장치(100) 및 클라이언트 장치(10)가 상호 간에 전혀 연결되지 않았다면, 반복 연결 특성을 잃었다고 판단할 수도 있고, 또는 타이머가 2회 만료되는 동안, 해당 TCP 연결 처리 장치(100) 및 클라이언트 장치(10)가 상호 간에 전혀 연결되지 않았다면, 반복 연결 특성을 잃었다고 판단할 수도 있다. 타이머는 후술하는 다수의 코어(140-1 내지 140-n)마다 별도로 마련될 수도 있고, 또는 하나 또는 둘 이상의 타이머가 다수의 코어(140-1 내지 140-n)에 의해 전역적으로 이용될 수도 있다.The instance removal unit 133 may determine an unnecessary instance (that is, an instance that is no longer used) as a removal target, and may remove the corresponding instance from the storage 120 as needed. The instance removal unit 133 includes the TCP connection processing device 100 and the client device (at least one of 191-1 to 191-k and at least one of 192-1 to 192-k) corresponding to a specific pair of instances. If the pair of 10) is not repeatedly connected, instances of the pair (at least one of 191-1 to 191-k and at least one of 192-1 to 192-k) may be determined as a target for removal. For this purpose, the instance removal unit 133 may use a timer. Specifically, the timer repeatedly expires at regular intervals, and the instance removal unit 133 browses the storage 120 whenever the timer expires, so that a pair of TCP connection processing device 100 and client device 10 has repeated connection characteristics. is lost, and based on the check result, whether to remove the pair of the corresponding TCP connection processing device 100 and the client device 10 may be determined. For example, if the TCP connection processing device 100 and the client device 10 are not connected to each other at all while the timer expires, the instance removal unit 133 may determine that the repeated connection characteristic is lost, Alternatively, if the corresponding TCP connection processing device 100 and the client device 10 are not connected to each other at all while the timer expires twice, it may be determined that the repeated connection characteristic is lost. The timer may be provided separately for each of the plurality of cores 140-1 to 140-n described later, or one or more timers may be globally used by the plurality of cores 140-1 to 140-n. there is.

재사용판단부(134)는 저장될 인스턴스, 일례로 SYNACK 패킷(191) 및/또는 리퀘스트 소켓(192)이 재사용 가능한지 여부를 판단할 수 있다. 재사용이 가능하다는 것은 해당 인스턴스(191, 192)가 값의 변경 없이 그대로 사용 가능한 상태를 의미하며, 구체적으로 클라이언트 장치(10) 및 TCP 연결 처리 장치(100) 사이의 연결이 반복적으로 수행되어야 하고, 이에 이용되는 각각의 인스턴스, 예를 들어 SYNACK 패킷(191) 및 리퀘스트 소켓(192)이 보관소(120)에 보관될 수 있어야 한다. 그런데, 특정한 데이터 등은 또 다른 TCP 연결에서 재사용이 가능하나, 다른 데이터 등은 재사용이 불가능할 수도 있다. 예를 들어, 프로토콜 패밀리, 인터넷 프로토콜(IP) 주소, 포트 번호 또는 라우팅 정보 등은 동일한 클라이언트 장치(10) 및 TCP 연결 처리 장치(100) 간의 연결에서 동일한 값을 가지므로, 재사용이 가능하나, 패킷 시퀀스 번호나 타임스탬프 등은 연결 시마다 새로 초기화되어야 하므로 재사용이 불가능하다. 재사용판단부(134)는 이와 같이 반복 연결 여부나, 인스턴스(191, 192)의 재사용 가능 여부 등을 판단하고, 해당 인스턴스(191, 192)의 보관소(120) 저장 여부를 판단할 수 있다. 판단 결과는 보관 처리부(132)로 전달될 수도 있으며, 이 경우 보관 처리부(132)는 판단 결과를 기반으로 해당 인스턴스(191, 192)를 저장할 수 있다.The reuse determination unit 134 may determine whether the instance to be stored, for example, the SYNACK packet 191 and/or the request socket 192 is reusable. Being reusable means a state in which the instances 191 and 192 can be used as they are without changing values, and specifically, the connection between the client device 10 and the TCP connection processing device 100 must be repeatedly performed, Each instance used for this, for example, the SYNACK packet 191 and the request socket 192 should be able to be stored in the storage 120. However, specific data may be reused in another TCP connection, but other data may not be reused. For example, since the protocol family, Internet Protocol (IP) address, port number, or routing information has the same value in the connection between the same client device 10 and the TCP connection processing device 100, reuse is possible, but packet Sequence numbers or timestamps cannot be reused because they must be newly initialized each time a connection is made. The reuse determination unit 134 may determine whether or not the instance 191 or 192 can be reused or not, and determine whether the corresponding instance 191 or 192 is stored in the storage 120 . The determination result may be transmitted to the storage processing unit 132, and in this case, the storage processing unit 132 may store the corresponding instances 191 and 192 based on the determination result.

처리부(130)는, 일 실시예에 있어서, 상술한 동작의 수행을 위해서 TCP 스택과 더불어, 소프트 인터럽트 요청(Soft IRQ: Soft Interrupt Request)를 이용할 수도 있다. 구체적으로 처리부(130)가 상술한 처리를 수행하기 위해서는, SYNACK 패킷(191) 및 리퀘스트 소켓(192) 구조에 대한 동기화가 요청되는데, 처리부(130)는 SYNACK 패킷(191) 및 리퀘스트 소켓(192)를 새로 추가하거나 삭제하는 경우에 있어서, 이러한 동기화를 위해 지역적 인터럽트 요청 해제(Local IRQ disabling)를 이용할 수도 있다. 통상 소프트 인터럽트 요청은 하드웨어 인터럽트에 의해 직접 수행되는 경우와, ksoftirqd 프로세스에 의해 처리되는 경우로 나뉠 수 있는데, ksoftirqd 프로세스는 사용자 프로세스이므로, 하드웨어 인터럽트로부터 선점될 수도 있다. 따라서, 동일 처리부(코어, 130: 130-1 내지 130-k) 내에서 최소한의 록(lock)이 발생될 수 있다. 처리부(130)는 새로운 인스턴스(191, 192)가 할당되는 경우, 코어(130-1 내지 130-k)가 점유한 지역적 인터럽트 요청을 단 시간 동안 비활성화함으로써, 이러한 록 발생을 방지할 수도 있다.In one embodiment, the processing unit 130 may use a soft interrupt request (Soft IRQ) along with the TCP stack to perform the above-described operation. Specifically, in order for the processing unit 130 to perform the above-described processing, synchronization of the structure of the SYNACK packet 191 and the request socket 192 is requested. In the case of newly adding or deleting , local IRQ disabling may be used for synchronization. In general, a soft interrupt request can be divided into a case where it is directly performed by a hardware interrupt and a case where it is processed by a ksoftirqd process. Since the ksoftirqd process is a user process, it may be preempted from a hardware interrupt. Therefore, a minimum lock can be generated within the same processing unit (core, 130: 130-1 to 130-k). When the new instances 191 and 192 are allocated, the processing unit 130 may prevent such a lock from occurring by inactivating the regional interrupt requests occupied by the cores 130-1 to 130-k for a short period of time.

일 실시예에 의하면, 처리부(130), 일례로 코어(130-1 내지 130-k)는 보관소(120)에서 SYNACK 패킷(191) 및 리퀘스트 소켓(192) 등의 인스턴스를 검출하거나 또는 다시 되돌려 보내는 경우, 동기화를 수행할 수도 있다. 만약 두 쌍의 인스턴스(일례로 (191, 192) 및 (191-1, 192-1))가 동시에 필요하다면, 이는 두 개의 TCP 연결 수립이 수행 중임을 의미하므로, 서로 상이한 인스턴스가 사용되어야 한다. 이를 위해 처리부(130)는 일반적인 원자적 동작(atomic operation) 기법을 이용할 수 있으며, 이에 따라 비지 웨이팅(busy waiting)이 불필요하게 되고, 동기화 비용이 절감될 수 있게 된다.According to one embodiment, the processing unit 130, for example, the cores 130-1 to 130-k, detect instances such as SYNACK packets 191 and request sockets 192 from the storage 120 or send them back. In this case, synchronization may be performed. If two pairs of instances (eg, (191, 192) and (191-1, 192-1)) are required at the same time, this means that two TCP connection establishments are being performed, so different instances must be used. To this end, the processing unit 130 may use a general atomic operation technique, and accordingly, busy waiting becomes unnecessary and synchronization costs can be reduced.

일 실시예에 따르면, 도 3에 도시된 바와 같이, TCP 연결 처리 장치(100)는 복수의 보관소(120-1 내지 120-n)를 포함할 수도 있다. 이들 중 적어도 하나의 보관소(120-1 내지 120-n)는, 상술한 것처럼 적어도 하나의 SYNACK 패킷(191-1 내지 191-k) 및 이에 대응하는 적어도 하나의 리퀘스트 소켓(192-1 내지 192-k)을 저장할 수 있다. 한편, TCP 연결 제어 장치는, 복수의 처리부(130)를 포함할 수 있으며, 복수의 처리부(130) 각각은, 복수의 처리부(130) 각각에 대응하는 보관소(120)에 대한 인스턴스의 보관 또는 삭제 등의 동작을 제어할 수 있다. 각각의 처리부(130)는 상술한 바와 같이 각각의 코어(140-1 내지 140-n)를 이용하여 구현될 수도 있다. 이 경우, 일 실시예에 의하면, 각각의 보관소(120-1 내지 120-n)는 복수의 코어(140-1 내지 140-n) 각각에 대응하여 마련될 수도 있다. 상술한 바와 같이 보관소(120)를 이용함에 따라 할당, 해제 및/또는 초기화의 생략이 가능해지나, 이에 따른 전체적인 성능은 보관소(120)의 이용에 따른 성능 저하에 영향을 받는다. 보관소(120) 기반 동작에 따른 성능 저하 방지를 위해서 동일한 연결의 처리는 동일한 코어(140-1 내지 140-n)에 의해 수행되고, 이 경우 각각의 코어(140-1 내지 140-n)는 대응하는 보관소(120-1 내지 120-n)를 이용하여 해당 연결을 처리한다. 즉, 보관소(120-1 내지 120-n)는 코어(140-1 내지 140-n) 별로 분리된 후 코어(140-1 내지 140-n)에 고정된다. 일 실시예에 의하면, 이를 위해서 네트워크 인터페이스 컨트롤러(NIC: Network Interface Controller)의 수신측 스케일링(RSS: Receive-Side Scaling) 기술이 이용될 수 있다. 이 경우, SYN 패킷을 수신한 코어(140-1 내지 140-n 중 적어도 하나)는 해당 TCP 연결 처리가 모두 수행하면서, 사용하는 인스턴스를 다른 코어(140-1 내지 140-n 중 다른 적어도 하나)로 전달하거나 다른 코어(140-1 내지 140-n 중 다른 적어도 하나)로부터 다른 코어(140-1 내지 140-n 중 다른 적어도 하나)가 사용하는 인스턴스를 전달받지 않는다. 보관소(120)를 전역적으로 사용하는 경우, 인스턴스(191-1 내지 191-k, 192-1 내지 192-k)의 지역성을 저하시키고 록을 발생시킨다. 특히, 록의 발생은 코어 간의 비지 웨이팅으로 인한 딜레이 발생을 야기한다. 그러나, 상술한 바와 같이 서로 상이한 코어(140-1 내지 140-n)가 서로 상이한 보관소(120-1 내지 120-n)을 처리하는 경우, 캐시 일관성은 유지될 뿐만 아니라, 록이 사용되지 않으므로, 불필요한 성능 저하를 회피할 수 있게 된다.According to one embodiment, as shown in FIG. 3 , the TCP connection processing device 100 may include a plurality of storages 120-1 to 120-n. At least one of these storages 120-1 to 120-n, as described above, includes at least one SYNACK packet 191-1 to 191-k and at least one request socket 192-1 to 192-k corresponding thereto. k) can be stored. Meanwhile, the TCP connection control device may include a plurality of processing units 130, and each of the plurality of processing units 130 stores or deletes an instance of the storage 120 corresponding to each of the plurality of processing units 130. etc. can be controlled. Each processing unit 130 may be implemented using each of the cores 140-1 to 140-n as described above. In this case, according to an embodiment, each storage 120-1 to 120-n may be provided to correspond to each of the plurality of cores 140-1 to 140-n. As described above, as the storage 120 is used, it is possible to omit allocation, deallocation, and/or initialization, but overall performance is affected by performance degradation due to the use of the storage 120. In order to prevent performance degradation due to storage 120-based operations, processing of the same connection is performed by the same cores 140-1 to 140-n, and in this case, each core 140-1 to 140-n corresponds to The corresponding connection is processed using the repositories 120-1 to 120-n. That is, the storages 120-1 to 120-n are separated for each core 140-1 to 140-n and then fixed to the cores 140-1 to 140-n. According to an embodiment, a Receive-Side Scaling (RSS) technology of a Network Interface Controller (NIC) may be used for this purpose. In this case, the core (at least one of 140-1 to 140-n) that has received the SYN packet performs all of the corresponding TCP connection processing, and transfers the used instance to another core (at least one of 140-1 to 140-n). or does not receive an instance used by the other core (at least one of 140-1 to 140-n) from the other core (at least one of 140-1 to 140-n). When the storage 120 is used globally, the locality of the instances 191-1 to 191-k and 192-1 to 192-k is reduced and a lock is generated. In particular, occurrence of lock causes delay due to busy weighting between cores. However, as described above, when different cores 140-1 to 140-n process different storages 120-1 to 120-n, not only cache coherency is maintained, but locks are not used, so Unnecessary performance degradation can be avoided.

이하 도 4 내지 도 6을 참조하여, 전송 제어 프로토콜 연결 처리 방법의 일 실시예에 대해 설명한다.Referring to FIGS. 4 to 6, an embodiment of a transmission control protocol connection processing method will be described.

도 4는 전송 제어 프로토콜 연결 처리 방법의 일 실시예에 대한 흐름도이다.4 is a flow chart of an embodiment of a transmission control protocol connection processing method.

도 4에 도시된 바에 의하면, 전송 제어 프로토콜 연결 처리(TCP 연결 처리)를 위해서 리슨 소켓이 결정되고, 리슨 소켓을 통해 클라이언트 장치로부터 SYN 패킷을 수신하게 된다(400).As shown in FIG. 4, a listen socket is determined for a transmission control protocol connection process (TCP connection process), and a SYN packet is received from a client device through the listen socket (400).

SYN 패킷이 수신되면, 이에 응하여 보관소가 열람될 수 있다(404). 보관소 내에는 사전에 하나 또는 둘 이상의 쌍의 인스턴스(SYNACK 패킷 및 리퀘스트 소켓)이 저장되어 있을 수 있다.If the SYN packet is received, the archive may be browsed in response (404). One or more pairs of instances (SYNACK packet and request socket) may be stored in advance in the archive.

보관소의 열람을 통해, SYN 패킷에 대응하는 인스턴스(SYNACK 패킷 및 리퀘스트 소켓)가 보관소 내에 존재하는지 여부가 판단될 수 있다(406). 만약 보관소 내에 해당 SYNACK 패킷 및 리퀘스트 소켓이 존재한다면(406의 예), 해당 SYNACK 패킷 및 리퀘스트 소켓은, 수신한 SYN 패킷을 전송한 클라이언트 장치 및 TCP 연결 처리 장치 간의 연결을 위해 이용된다(408). 반대로 보관소 내에 해당 SYNACK 패킷 및 리퀘스트 소켓이 존재하지 않는다면(406의 아니오), 새로운 인스턴스(SYNACK 패킷 및 리퀘스트 소켓)가 메모리 할당자 등에 의해 생성될 수도 있다.Through browsing of the storage, it may be determined whether an instance (SYNACK packet and request socket) corresponding to the SYN packet exists in the storage (406). If the corresponding SYNACK packet and request socket exist in the archive (YES in 406), the corresponding SYNACK packet and request socket are used for connection between the client device that transmitted the received SYN packet and the TCP connection processing device (408). Conversely, if the corresponding SYNACK packet and request socket do not exist in the storage (No in 406), a new instance (SYNACK packet and request socket) may be created by a memory allocator or the like.

보관소에 저장되었거나 또는 새로 생성된 SYNACK 패킷은 클라이언트 장치로 전달될 수 있다(410).The archived or newly generated SYNACK packets may be delivered to the client device (410).

클라이언트 장치는 SYNACK 패킷의 수신에 응하여 ACK 패킷을 생성하여 발송하고, TCP 연결 처리 장치는 리퀘스트 소켓을 통해 발송된 ACK 패킷을 수신한다(412).The client device generates and sends an ACK packet in response to reception of the SYNACK packet, and the TCP connection processing device receives the ACK packet sent through the request socket (412).

이에 따라 클라이언트 장치 및 TCP 연결 처리 장치 간의 연결이 수립된다(414).Accordingly, a connection between the client device and the TCP connection processing device is established (414).

도 5는 반복 사용되는 인스턴스의 보관 여부를 결정하기 위한 과정의 일 실시예를 설명하기 위한 흐름도이다.5 is a flowchart illustrating an embodiment of a process for determining whether to store an instance that is repeatedly used.

한편, TCP 연결 처리 장치는, 특정한 클라이언트 장치 및 TCP 연결 처리 장치 간의 반복된 연결에 사용되는 인스턴스의 보관 여부를 도 5에 도시된 바와 같이 결정할 수 있다.Meanwhile, the TCP connection processing device may determine whether to store an instance used for repeated connections between a specific client device and a TCP connection processing device, as shown in FIG. 5 .

구체적으로 예를 들어, 먼저 특정 클라이언트 장치 및 TCP 연결 처리 장치 사이에 TCP 연결이 수립되면, 연결 수립 개수가 계수된다(412).Specifically, for example, when a TCP connection is first established between a specific client device and a TCP connection processing device, the number of connection establishments is counted (412).

계수 결과와 미리 정의된 임계 값이 상호 비교되고(422), 비교 결과 계수 결과가 임계 값보다 크다면(422의 예), 특정 클라이언트 장치 및 TCP 연결 처리 장치 사이에 TCP 연결이 반복 특성을 갖는 것으로 판단된다(423). The count result and the predefined threshold value are compared (422), and if the count result is greater than the threshold value (Yes in 422), the TCP connection between the specific client device and the TCP connection processing device is considered to have a repetitive characteristic. It is judged (423).

이 경우, 특정 클라이언트 장치 및 TCP 연결 처리 장치 간의 연결에 이용된 인스턴스(즉, SYNACK 패킷 및 리퀘스트 소켓)은 보관소에 저장된다(424).In this case, the instances used for the connection between the specific client device and the TCP connection processing device (ie, SYNACK packet and request socket) are stored in the storage (424).

반대로 비교 결과 계수 결과가 임계 값보다 작다면(422의 아니오), 상술한 과정(423, 424)은 수행되지 않는다.Conversely, if the comparison result coefficient is smaller than the threshold value (No in 422), the above-described processes 423 and 424 are not performed.

상술한 과정(421 내지 425)은 일정 시간(타임 윈도우)이 경과될 때까지 반복될 수 있다. 만약 특정한 특정 클라이언트 장치 및 TCP 연결 처리 장치 간의 연결이 반복적이라고 판단되는 경우(즉, 계수 결과가 임계 값보다 큰 경우(422의 예))에는 반복이 중단될 수도 있다(425). 다시 말해서, 특정 클라이언트 장치 및 TCP 연결 처리 장치 간의 연결이 임계 값보다 작다면(422의 아니오), 연결 생성 및 계수 과정 내지 임계 값 비교 결과에 따른 인스턴스의 보관소 저장 과정(421 내지 424)는 계속해서 반복 수행될 수 있다.The above-described processes 421 to 425 may be repeated until a predetermined time (time window) elapses. If it is determined that the connection between the specific client device and the TCP connection processing device is repetitive (ie, when the count result is greater than the threshold value (Yes in 422)), the repetition may be stopped (425). In other words, if the connection between the specific client device and the TCP connection processing device is smaller than the threshold value (No in 422), the process of creating and counting the connection or storing the instance according to the comparison result of the threshold value (421 to 424) continues. can be repeated.

도 6은 사용되지 않는 인스턴스를 제거하기 위한 과정의 일 실시예를 설명하기 위한 흐름도이다.6 is a flowchart illustrating an embodiment of a process for removing unused instances.

또한, TCP 연결 처리 장치는, 도 6에 도시된 것처럼, 기존에 보관소에 보관되고, 특정한 클라이언트 장치 및 TCP 연결 처리 장치 간의 연결에 사용되는 인스턴스의 제거 여부를 결정할 수도 있다.Also, as shown in FIG. 6 , the TCP connection processing device may determine whether or not to remove an instance previously stored in a storage and used for a connection between a specific client device and a TCP connection processing device.

구체적으로 예를 들면, 먼저 타이머가 구동을 개시하고, 미리 정의된 바에 따라서 소정의 시간(사용자 또는 설계자 등에 의해 정해질 수 있음)이 경과된 이후에 만료된다(431).Specifically, for example, the timer starts driving and expires after a predetermined time (which may be determined by a user or a designer) has elapsed (431) according to a predefined bar.

타이머가 만료되면(실시예에 따라 타이머가 만료될 때마다), 적어도 하나의 특정 클라이언트 장치 및 TCP 연결 처리 장치 간에 추가적이거나 반복적인 연결이 존재하였는지 여부가 판단될 수 있다(432).When the timer expires (every time the timer expires according to an embodiment), it may be determined whether an additional or repeated connection exists between at least one specific client device and the TCP connection processing device (432).

만약 타이머가 만료될 때까지 적어도 하나의 특정 클라이언트 장치 및 TCP 연결 처리 장치 사이에 추가적 또는 반복적 연결이 더 이상 존재하지 않았다면(432의 아니오), 추가적 또는 반복적 연결이 부재는 계수되고, 계수 결과(즉, 동작 기간 동안에 양 장치 사이에 연결이 없었던 타이머의 동작 회수)가 사용자나 설계자 등에 의해 미리 정의된 기준 회수(예를 들어, 2회)를 초과하는지 여부가 판단될 수 있다(433).If, by the time the timer expires, no additional or repetitive connections exist between the at least one specific client device and the TCP connection processing device (NO in 432), the absence of additional or repetitive connections is counted, and the count result (i.e. , The number of times of operation of the timer in which there was no connection between the two devices during the operation period) may be determined (433) whether the number of times of operation of the timer previously defined by the user or designer (eg, twice) is exceeded.

추가적 또는 반복적 연결이 부재한 회수가 미리 정의된 기준 회수를 초과하였다면(433의 예), 특정 클라이언트 장치 및 TCP 연결 처리 장치의 TCP 연결 수립을 위해 이용되었던 인스턴스(즉, SYNACK 패킷 및 리퀘스트 소켓)을 보관소에서 제거한다(434). 이에 따라 불필요한 인스턴스를 제거하여 보관소를 최적으로 관리할 수 있게 된다.If the number of additional or repetitive connection absences exceeds the predefined number of times (Yes in 433), instances used for TCP connection establishment (i.e., SYNACK packets and request sockets) of a specific client device and TCP connection processing device are deleted. Remove from storage (434). As a result, it is possible to optimally manage the storage by removing unnecessary instances.

반대로 추가적 또는 반복적 연결이 부재한 회수가 미리 정의된 기준 회수를 초과하지 않았다면(433의 아니오), 특정 클라이언트 장치 및 TCP 연결 처리 장치의 TCP 연결 수립을 위해 이용되었던 인스턴스는 계속 보관소에 유지된다. Conversely, if the number of additional or repetitive connection absences does not exceed the predefined reference number (No in 433), instances used for TCP connection establishment of a specific client device and TCP connection processing device are continuously maintained in the storage.

한편, 만약 타이머가 동작하는 동안 적어도 하나의 특정 클라이언트 장치 및 TCP 연결 처리 장치가 서로 연결된 바 있다면(432의 예), 상술한 기준 회수 초과 판단(433)이나 인스턴스 제거 동작(434)는 수행되지 않는다.On the other hand, if at least one specific client device and the TCP connection processing device have been connected to each other while the timer is running (Yes in 432), the above-described reference number exceeding determination 433 or instance removal operation 434 is not performed. .

상술한 과정은 계속해서 반복될 수 있다(435). 따라서, 타이머는 계속해서, 주기적으로 또는 임의적으로 동작 개시 및 만료를 수행하고(431), 이에 따라 특정 클라이언트 장치 및 TCP 연결 처리 장치 사이의 반복 연결 여부가 판단되고(432), 이에 따라 인스턴스의 제거 여부가 판단될 수 있다(433, 434).The above process may be continuously repeated (435). Therefore, the timer continuously, periodically or arbitrarily starts and expires (431), and accordingly, whether or not a repeated connection between a specific client device and a TCP connection processing device is determined (432), and the instance is removed accordingly. Whether or not it can be determined (433, 434).

상술한 실시예에 따른 전송 제어 프로토콜 연결 처리 방법은, 컴퓨터 장치에 의해 구동될 수 있는 프로그램의 형태로 구현될 수 있다. 프로그램은, 명령어, 라이브러리, 데이터 파일 및/또는 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있으며, 기계어 코드나 고급 언어 코드를 이용하여 설계 및 제작된 것일 수 있다. 프로그램은 상술한 방법을 구현하기 위하여 특별히 설계된 것일 수도 있고, 컴퓨터 소프트웨어 분야에서 통상의 기술자에게 기 공지되어 사용 가능한 각종 함수나 정의를 이용하여 구현된 것일 수도 있다. 또한, 여기서, 컴퓨터 장치는, 프로그램의 기능을 실현 가능하게 하는 프로세서나 메모리 등을 포함하여 구현된 것일 수 있으며, 필요에 따라 통신 장치를 더 포함할 수도 있다. 상술한 전송 제어 프로토콜 연결 처리 방법을 구현하기 위한 프로그램은, 컴퓨터 등의 장치에 의해 판독 가능한 기록 매체에 기록될 수 있다. 컴퓨터에 의해 판독 가능한 기록 매체는, 예를 들어, 롬, 램, SD카드 또는 플래시 메모리(일례로 솔리드 스테이트 드라이브(SSD) 등)와 같은 반도체 저장 매체나, 하드 디스크 또는 플로피 디스크 등과 같은 자기 디스크 저장 매체나, 콤팩트 디스크 또는 디브이디 등과 같은 광 기록 매체나, 또는 플롭티컬 디스크 등과 같은 자기-광 기록 매체 등과 같이 컴퓨터 등의 장치의 호출에 따라 실행되는 하나 이상의 프로그램을 일시적 또는 비일시적으로 저장 가능한 적어도 한 종류의 물리적 저장 매체를 포함할 수 있다.The transmission control protocol connection processing method according to the above-described embodiment may be implemented in the form of a program that can be driven by a computer device. The program may include commands, libraries, data files, and/or data structures alone or in combination, and may be designed and manufactured using machine language codes or high-level language codes. The program may be specially designed to implement the above-described method, or may be implemented using various functions or definitions known and usable to those skilled in the art in the field of computer software. Also, here, the computer device may be implemented by including a processor or a memory capable of realizing program functions, and may further include a communication device as needed. A program for implementing the transmission control protocol connection processing method described above may be recorded on a recording medium readable by a device such as a computer. A computer-readable recording medium is, for example, a semiconductor storage medium such as ROM, RAM, SD card or flash memory (for example, a solid state drive (SSD), etc.), or a magnetic disk storage such as a hard disk or a floppy disk. At least one program capable of temporarily or non-temporarily storing one or more programs executed by a device such as a computer, such as a medium, an optical recording medium such as a compact disk or DVD, or a magneto-optical recording medium such as a floptical disk, etc. type of physical storage medium.

이상 전송 제어 프로토콜 연결 처리 장치 및 전송 제어 프로토콜 연결 처리 방법의 여러 실시예에 대해 설명하였으나, 전송 제어 프로토콜 연결 처리 장치 또는 전송 제어 프로토콜 연결 처리 방법은 오직 상술한 실시예에 한정되는 것은 아니다. 해당 기술 분야에서 통상의 지식을 가진 자가 상술한 실시예를 기초로 수정 및 변형하여 구현할 수 있는 다른 다양한 장치나 방법 역시 상술한 전송 제어 프로토콜 연결 처리 장치 또는 전송 제어 프로토콜 연결 처리 방법의 일 실시예가 될 수 있다. 예를 들어, 설명된 방법(들)이 설명된 바와 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성 요소(들)가 설명된 바와 다른 형태로 결합, 연결 또는 조합되거나 다른 구성 요소 또는 균등물 등에 의하여 대치 또는 치환되더라도, 상술한 전송 제어 프로토콜 연결 처리 장치 및/또는 전송 제어 프로토콜 연결 처리 방법의 일 실시예가 될 수 있다.Although various embodiments of the transmission control protocol connection processing device and transmission control protocol connection processing method have been described above, the transmission control protocol connection processing device or transmission control protocol connection processing method is not limited to the above-described embodiment. Various other devices or methods that can be implemented by modifying and transforming based on the above-described embodiments by those skilled in the art may also be an embodiment of the above-described transmission control protocol connection processing device or transmission control protocol connection processing method. can For example, the described method(s) may be performed in an order different from that described, and/or component(s) of a described system, structure, device, circuit, etc. may be coupled, connected, or otherwise used in a manner other than described. Even if they are combined or substituted or substituted by other components or equivalents, it may be an embodiment of the above-described transmission control protocol connection processing device and/or transmission control protocol connection processing method.

10: 클라이언트 장치 100: 전송 제어 프로토콜 연결 장치
102: 리슨 소켓 120: 보관소
130: 처리부 191: SYNACK 패킷
192: 리퀘스트 소켓
10: client device 100: transmission control protocol connection device
102: listen socket 120: storage
130: processing unit 191: SYNACK packet
192: request socket

Claims (11)

적어도 하나의 SYNACK 패킷 및 상기 적어도 하나의 SYNACK 패킷에 대응하는 적어도 하나의 리퀘스트 소켓을 보관하는 보관소; 및
클라이언트 장치로부터 SYN 패킷이 수신되면, 상기 보관소를 열람하고, 상기 보관소로부터 상기 SYN 패킷에 대응하는 SYNACK 패킷 및 상기 SYN 패킷에 대응하는 리퀘스트 소켓을 검출하는 처리부;를 포함하고,
상기 SYN 패킷은 상기 클라이언트 장치로 전송되고, 상기 리퀘스트 소켓은 상기 클라이언트 장치가 상기 SYN 패킷에 대한 응답으로 전송한 ACK 패킷을 수신함으로써, 상기 클라이언트 장치와 전송 제어 프로토콜 연결이 수립되는 전송 제어 프로토콜 연결 처리 장치.
a repository for storing at least one SYNACK packet and at least one request socket corresponding to the at least one SYNACK packet; and
When a SYN packet is received from a client device, a processing unit that browses the repository and detects a SYNACK packet corresponding to the SYN packet and a request socket corresponding to the SYN packet from the repository;
The SYN packet is transmitted to the client device, and the request socket receives an ACK packet transmitted by the client device in response to the SYN packet, thereby establishing a transmission control protocol connection with the client device Transmission control protocol connection processing Device.
제1항에 있어서,
상기 처리부는, 상기 클라이언트 장치와의 반복 연결이 미리 정의된 임계 값을 초과하면, 상기 클라이언트 장치와의 전송 제어 프로토콜 연결에 이용된 상기 SYN 패킷 및 상기 리퀘스트 소켓을 상기 보관소에 보관하는 전송 제어 프로토콜 연결 처리 장치.
According to claim 1,
The processing unit stores the SYN packet and the request socket used for the transmission control protocol connection with the client device in the storage when the repeated connection with the client device exceeds a predefined threshold. processing unit.
제2항에 있어서,
상기 처리부는, SYN 패킷 및 리퀘스트 소켓의 재사용 가능 여부를 판단하고, 재사용 가능 여부에 따라서 상기 SYN 패킷 및 상기 리퀘스트 소켓을 상기 보관소에 보관하는 전송 제어 프로토콜 연결 처리 장치.
According to claim 2,
The processing unit determines whether the SYN packet and the request socket can be reused, and stores the SYN packet and the request socket in the storage according to whether the SYN packet and the request socket can be reused.
제1항에 있어서,
상기 처리부는, 상기 보관소에 저장 가능한 SYN 패킷 및 리퀘스트 소켓의 개수를 동시 수립이 가능한 전송 제어 프로토콜의 최대 개수로 유지하는 전송 제어 프로토콜 연결 처리 장치.
According to claim 1,
The processing unit maintains the number of SYN packets and request sockets that can be stored in the storage as the maximum number of transmission control protocols that can be established simultaneously.
제1항에 있어서,
상기 처리부는, 타이머의 구동 및 만료가 적어도 일 회 수행되는 동안, 적어도 하나의 클라이언트 장치와의 연결이 부재한지 여부를 판단하고, 만약 상기 적어도 하나의 클라이언트 장치와의 연결이 부재하다면, 상기 적어도 하나의 클라이언트 장치와의 연결에 이용된 SYN 패킷 및 리퀘스트 소켓을 상기 보관소에서 제거하는 전송 제어 프로토콜 연결 처리 장치.
According to claim 1,
The processing unit determines whether a connection with at least one client device is absent while the timer runs and expires at least once, and if there is no connection with the at least one client device, the at least one client device is not connected. A transmission control protocol connection processing device that removes SYN packets and request sockets used for connection with a client device of the storage from the storage.
제1항에 있어서,
상기 적어도 하나의 SYNACK 패킷에 상기 적어도 하나의 리퀘스트 소켓의 대응 여부에 대한 정보를 저장하는 연결 리스트;를 더 포함하는 연결 처리 장치.
According to claim 1,
and a connection list storing information on whether the at least one request socket corresponds to the at least one SYNACK packet.
클라이언트 장치로부터 SYN 패킷이 수신되는 단계;
SYN 패킷의 수신에 따라 보관소를 열람하고, 상기 보관소는 적어도 하나의 SYNACK 패킷 및 상기 적어도 하나의 SYNACK 패킷에 대응하는 적어도 하나의 리퀘스트 소켓을 보관하는 단계;
상기 보관소로부터 상기 SYN 패킷에 대응하는 SYNACK 패킷 및 상기 SYN 패킷에 대응하는 리퀘스트 소켓을 검출하는 단계;
상기 SYN 패킷이 상기 클라이언트 장치로 전송되는 단계;
상기 클라이언트 장치가 상기 SYN 패킷에 대한 응답으로 ACK 패킷을 전송하는 단계;
상기 리퀘스트 소켓을 통해 상기 ACK 패킷이 수신되는 단계; 및
상기 클라이언트 장치와 전송 제어 프로토콜 연결이 수립되는 단계;를 포함하는 전송 제어 프로토콜 연결 처리 방법.
receiving a SYN packet from a client device;
browsing a repository according to reception of a SYN packet, wherein the repository stores at least one SYNACK packet and at least one request socket corresponding to the at least one SYNACK packet;
detecting a SYNACK packet corresponding to the SYN packet and a request socket corresponding to the SYN packet from the storage;
sending the SYN packet to the client device;
transmitting, by the client device, an ACK packet in response to the SYN packet;
receiving the ACK packet through the request socket; and
A transmission control protocol connection processing method comprising the step of establishing a transmission control protocol connection with the client device.
제7항에 있어서,
상기 클라이언트 장치와의 반복 연결이 미리 정의된 임계 값을 초과하면, 상기 클라이언트 장치와의 전송 제어 프로토콜 연결에 이용된 상기 SYN 패킷 및 상기 리퀘스트 소켓을 상기 보관소에 보관하는 단계;를 더 포함하는 전송 제어 프로토콜 연결 처리 방법.
According to claim 7,
If the repeated connection with the client device exceeds a predefined threshold, storing the SYN packet and the request socket used for the transmission control protocol connection with the client device in the storage; transmission control further comprising How protocol connections are handled.
제8항에 있어서,
상기 SYN 패킷 및 상기 리퀘스트 소켓을 상기 보관소에 보관하는 단계는,
SYN 패킷 및 리퀘스트 소켓의 재사용 가능 여부를 판단하는 단계; 및
재사용 가능 여부에 따라서 상기 SYN 패킷 및 상기 리퀘스트 소켓을 상기 보관소에 보관하는 단계;를 포함하는 전송 제어 프로토콜 연결 처리 방법.
According to claim 8,
The step of storing the SYN packet and the request socket in the storage,
determining whether SYN packets and request sockets can be reused; and
and storing the SYN packet and the request socket in the repository according to whether they can be reused.
제7항에 있어서,
상기 보관소에 저장 가능한 SYN 패킷 및 리퀘스트 소켓의 개수를 동시 수립이 가능한 전송 제어 프로토콜의 최대 개수로 유지하는 단계;를 더 포함하는 전송 제어 프로토콜 연결 처리 방법.
According to claim 7,
and maintaining the number of SYN packets and request sockets that can be stored in the storage as the maximum number of transmission control protocols that can be simultaneously established.
제7항에 있어서,
타이머의 구동 및 만료가 적어도 일 회 수행되는 동안, 적어도 하나의 클라이언트 장치와의 연결이 부재한지 여부를 판단하는 단계; 및
만약 상기 적어도 하나의 클라이언트 장치와의 연결이 부재하다면, 상기 적어도 하나의 클라이언트 장치와의 연결에 이용된 SYN 패킷 및 리퀘스트 소켓을 상기 보관소에서 제거하는 단계;를 더 포함하는 전송 제어 프로토콜 연결 처리 방법.
According to claim 7,
determining whether a connection with at least one client device is absent while the timer is driven and expired at least once; and
If there is no connection with the at least one client device, removing the SYN packet and the request socket used for the connection with the at least one client device from the repository.
KR1020220021310A 2022-02-18 2022-02-18 Apparatus and method for processing of establishment of connection for transmission control protocol KR20230124249A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020220021310A KR20230124249A (en) 2022-02-18 2022-02-18 Apparatus and method for processing of establishment of connection for transmission control protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020220021310A KR20230124249A (en) 2022-02-18 2022-02-18 Apparatus and method for processing of establishment of connection for transmission control protocol

Publications (1)

Publication Number Publication Date
KR20230124249A true KR20230124249A (en) 2023-08-25

Family

ID=87847275

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220021310A KR20230124249A (en) 2022-02-18 2022-02-18 Apparatus and method for processing of establishment of connection for transmission control protocol

Country Status (1)

Country Link
KR (1) KR20230124249A (en)

Similar Documents

Publication Publication Date Title
JP7454662B2 (en) Information transmission method, device, readable storage medium and electronic device
CN106034084B (en) Data transmission method and device
US9392081B2 (en) Method and device for sending requests
EP2930899A1 (en) Tcp link configuration method, apparatus and device
KR20100017105A (en) Method for optimizing near field links
WO2014082562A1 (en) Method, device, and system for information processing based on distributed buses
CN112631788B (en) Data transmission method and data transmission server
WO2014187220A1 (en) Electronic device, storage medium and file transferrting method
CN109547162B (en) Data communication method based on two sets of one-way boundaries
EP3481028A1 (en) Network packet processing method, device, and network server
CN110609746B (en) Method, apparatus and computer readable medium for managing network system
CN111404842B (en) Data transmission method, device and computer storage medium
US20160057068A1 (en) System and method for transmitting data embedded into control information
US11444882B2 (en) Methods for dynamically controlling transmission control protocol push functionality and devices thereof
CN108234595B (en) Log transmission method and system
CN102025730B (en) Data transmission device based on HTTP protocol and implementation method thereof
KR20230124249A (en) Apparatus and method for processing of establishment of connection for transmission control protocol
CN114338477B (en) Communication link monitoring method, device, equipment and storage medium
WO2022110919A1 (en) Information subscription method and apparatus
JPWO2006043411A1 (en) Communication device and terminal existence confirmation method
CN112866133B (en) Method and device for acquiring MSS (maximum segment size)
CA2905607C (en) System and method for reliable messaging between application sessions across volatile networking conditions
CN107196819B (en) Network connection method and system and computer readable storage medium
WO2016101223A1 (en) Method and apparatus for snmp set operations
CN107948232B (en) Hook API-based proxy implementation method, data transmission method, device and system

Legal Events

Date Code Title Description
E902 Notification of reason for refusal