IP Library › Granted Patent US 11,652,909
Granted Patent B1
US 11,652,909 · App. 17/691,171 · Granted May 16, 2023

TCP session closure in container orchestration system

Inventors: Gang Tang (Nanjing, CN); Hong Jun Tu (Beijing, CN); Jian Guo Liu (Beijing, CN); Jun Wei JW Zhao (WuXi, CN); Hongsen Liu (Beijing, CN)
Assignee: International Business Machines Corporation
H04L69/16H04L43/0805H04L43/0811
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,652,909
App. No.
17/691,171
Granted
May 16, 2023
Kind
B1
Abstract

Disclosed are a computer-implemented method, a system and a computer program product for TCP session closure in a container orchestration system. In the computer-implemented method for TCP session closure in a container orchestration system, a first pod being not alive in a second node can be determined by one or more processing units at a first node. A TCP session between a second pod in the first node and the first pod can be determined by one or more processing units at the first node based on a pod IP address of the first pod. The TCP session between the second pod and the first pod can be closed by one or more processing units at the first node.

Claims (53)

1. A computer-implemented method for Transmission Control Protocol (TCP) session closure in a container orchestration system, comprising:

determining, by one or more processing units at a first node, a first pod being not alive in a second node, wherein the container orchestration system automatically determines that the first pod is being not alive before a keep-alive interval ends without using a heartbeat mechanism;

determining, by the one or more processing units at the first node, a TCP session between a second pod in the first node and the first pod based on a pod IP address of the first pod, wherein the first pod is a server pod and the second pod is a client pod; and

closing, by the one or more processing units at the first node, the TCP session between the second pod and the first pod based on the container orchestration system automatically having determined that the first pod was being not alive before the keep-alive interval ends without using the heartbeat mechanism.

2. The computer-implemented method of claim 1 , wherein the determining the first pod being not alive in the second node comprises:

obtaining, by the one or more processing units at the first node, availability of a plurality of pods including the first pod from a managing unit in the container orchestration system; and

determining, by the one or more processing units at the first node, the first pod among the plurality of pods being not alive in response to the first pod being not available.

3. The computer-implemented method of claim 2 , wherein the first pod is determined as being not available in response to the pod IP address of the first pod being removed from available pod IP addresses recorded in the container orchestration system.

4. The computer-implemented method of claim 1 , wherein the determining the TCP session between the second pod in the first node and the first pod based on the pod IP address of the first pod comprises:

determining, by one or more processing units at the first node, a cluster IP address associated with the pod IP address of the first pod according to a connection information database at the first node; and

determining, by one or more processing units at the first node, the TCP session between the second pod and the first pod based on the cluster IP address according to the connection information database.

5. The computer-implemented method of claim 4 , wherein the connection information database is a conntrack table at the first node.

6. The computer-implemented method of claim 4 , wherein the TCP session between the second pod and the first pod is defined by a four-element tuple with a source IP address, a source port, a destination IP address and a destination port, and

wherein the determining the TCP session between the second pod and the first pod based on the cluster IP address according to the connection information database comprises:

determining, by the one or more processing units at the first node, a four-element tuple in the connection information database with a destination IP address which is the same as the cluster IP address as the four-element tuple of the TCP session between the second pod and the first pod.

7. The computer-implemented method of claim 6 , wherein the closing the TCP session between the second pod and the first pod comprises:

obtaining, by the one or more processing units at the first node, container metadata based on the source IP address in the four-element tuple;

extracting, by the one or more processing units at the first node, container namespace in the container metadata; and

closing, by the one or more processing units at the first node, the TCP session in the container namespace.

8. The computer-implemented method of claim 7 , wherein the closing the TCP session in the container namespace comprises:

making, by the one or more processing units at the first node, a system call to destroy the TCP session in the container namespace.

9. The computer-implemented method of claim 1 , wherein the one or more processing units are working with a daemon at the first node.

10. A system for Transmission Control Protocol (TCP) session closure in a container orchestration system, comprising:

one or more computer processors, one or more computer-readable storage media, and program instructions stored on the one or more of the computer-readable storage media for execution by at least one of the one or more processors, the program instructions including a method comprising:

determining a first pod being not alive in a second node, wherein the container orchestration system automatically determines that the first pod is being not alive before a keep-alive interval ends without using a heartbeat mechanism;

determining a TCP session between a second pod in the first node and the first pod based on a pod IP address of the first pod, wherein the first pod is a server pod and the second pod is a client pod; and

closing the TCP session between the second pod and the first pod based on the container orchestration system automatically having determined that the first pod was being not alive before the keep-alive interval ends without using the heartbeat mechanism.

11. The system of claim 10 , wherein the determining the first pod being not alive in the second node comprises:

obtaining availability of a plurality of pods including the first pod from a managing unit in the container orchestration system; and

determining the first pod among the plurality of pods being not alive in response to the first pod being not available.

12. The system of claim 11 , wherein the first pod is determined as being not available in response to the pod IP address of the first pod being removed from available pod IP addresses recorded in the container orchestration system.

13. The system of claim 10 , wherein the determining the TCP session between the second pod in the first node and the first pod based on the pod IP address of the first pod comprises:

determining a cluster IP address associated with the pod IP address of the first pod according to a connection information database at the first node; and

determining the TCP session between the second pod and the first pod based on the cluster IP address according to the connection information database.

14. The system of claim 13 , wherein the connection information database is a conntrack table at the first node.

15. The system of claim 13 , wherein the TCP session between the second pod and the first pod is defined by a four-element tuple with a source IP address, a source port, a destination IP address and a destination port, and

wherein the determining the TCP session between the second pod and the first pod based on the cluster IP address according to the connection information database comprises:

determining a four-element tuple in the connection information database with a destination IP address which is the same as the cluster IP address as the four-element tuple of the TCP session between the second pod and the first pod.

16. The system of claim 15 , wherein the closing the TCP session between the second pod and the first pod comprises:

obtaining container metadata based on the source IP address in the four-element tuple;

extracting container namespace in the container metadata; and

closing the TCP session in the container namespace.

17. The system of claim 16 , wherein the closing the TCP session in the container namespace comprises:

making a system call to destroy the TCP session in the container namespace.

18. The system of claim 10 , wherein the set of computer program instructions is a daemon at the first node.

19. A computer program product for Transmission Control Protocol (TCP) session closure in a container orchestration system, the computer program product comprising:

one or more computer-readable storage media and program instructions stored on the one or more computer-readable storage media, the program instructions including a method, the method comprising:

determining a first pod being not alive in a second node, wherein the container orchestration system automatically determines that the first pod is being not alive before a keep-alive interval ends without using a heartbeat mechanism;

determining a TCP session between a second pod in the first node and the first pod based on a pod IP address of the first pod, wherein the first pod is a server pod and the second pod is a client pod: and

closing the TCP session between the second pod and the first pod based on the container orchestration system automatically having determined that the first pod was being not alive before the keep-alive interval ends without using the heartbeat mechanism.

20. The computer program product of claim 19 , wherein the determining the first pod being not alive in the second node comprises:

obtaining availability of a plurality of pods including the first pod from a managing unit in the container orchestration system; and

determining the first pod among the plurality of pods being not alive in response to the first pod being not available.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 10, 2022
From: TANG, GANG; TU, HONG JUN; LIU, JIAN GUO; ZHAO, JUN WEI JW; LIU, HONGSEN
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 059218/0149 →
Cited By (1)
US 12,658,066