IP Library › Granted Patent US 12,375,406
Granted Patent B2
US 12,375,406 · App. 17/877,597 · Granted Jul 29, 2025

Virtual socket for load balancing and failover

Inventor: Linghan Cai (San Jose, CA)
Assignee: Hewlett Packard Enterprise Development LP
H04L47/125H04L47/122H04L47/30
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 12,375,406
App. No.
17/877,597
Granted
Jul 29, 2025
Kind
B2
Abstract

One aspect of the instant application can provide a system and method for balancing load among multiple network sockets established between a local node and a remote node. During operation, the system can encapsulate the multiple network sockets to form a local transport-layer virtual socket comprising a write interface and a read interface. The system can receive, at the write interface of the local transport-layer virtual socket, a packet; select, based on a load-balancing policy, a network socket from the multiple network sockets; and forward the packet to a socket-specific incoming queue associated with the selected network socket to allow the packet to be sent to the read interface of a corresponding remote transport-layer virtual socket via the selected network socket.

Claims (68)

1. A computer-implemented method for balancing load among network sockets established between a local node and a remote node, the method comprising:

presenting, to the local node, a single write interface and a single read interface using a virtual socket, wherein:

the single write interface is configured to transmit packets to the remote node, and

the single read interface is configured to receive the packets from the remote node;

encapsulating, using the virtual socket, a set of Transmission Control Protocol (TCP) sockets between the local node and the remote node, wherein:

the virtual socket comprises a set of socket-specific incoming queues and a set of thread-specific outgoing queues,

each socket-specific incoming queue is coupled to a corresponding encapsulated TCP socket and is to queue packets to be transmitted over the corresponding encapsulated TCP socket, and

each thread-specific outgoing queue is coupled to the set of encapsulated TCP sockets and is to queue packets to be received by a corresponding thread executing on the local node;

restricting access to the encapsulated set of TCP sockets to access via the single write interface and the single read interface;

receiving, at the single write interface, a packet sent by the local node; and

applying a load-balancing technique to select an encapsulated TCP socket from the encapsulated set of TCP sockets; and

forwarding the packet to a socket-specific incoming queue corresponding to the selected encapsulated TCP socket.

2. The method of claim 1 , wherein selecting the encapsulated TCP socket comprises:

determining a load of each encapsulated TCP socket; and

selecting an encapsulated TCP socket with least load.

3. The method of claim 2 , wherein determining the load of each encapsulated TCP socket comprises one of:

determining an occupancy rate of the socket-specific incoming queue associated with each encapsulated TCP socket; and

determining a number of packets queued in the socket-specific incoming queue associated with each encapsulated TCP socket.

4. The method of claim 3 , wherein the selected encapsulated TCP socket with the least load corresponds to a socket-specific incoming queue with a lowest occupancy rate or a smallest number of queued packets.

5. The method of claim 1 , further comprising:

in response to detecting that a network interface associated with a particular encapsulated TCP socket fails, removing the particular encapsulated TCP socket from the virtual socket; and

redistributing packets queued in the socket-specific incoming queue associated with the removed particular TCP socket to other socket-specific incoming queues associated with other TCP sockets encapsulated within the virtual socket.

6. The method of claim 5 , further comprising:

in response to detecting a recovery of the failed network interface, creating a new TCP socket bound to the recovered network interface; and

encapsulating the new TCP socket to the virtual TCP-socket.

7. The method of claim 1 , wherein the local and remote node each execute multiple threads, and wherein the method further comprises:

receiving, from the remote node, a packet associated with a particular thread executing on the remote node;

determining a destination thread executing on the local node associated with the packet received from the remote node; and

forwarding the packet received from the remote node to a thread-specific outgoing queue based on the destination thread.

8. The method of claim 7 , further comprising notifying the destination thread to allow the destination thread to read the packet received from the remote node from the thread-specific outgoing queue via the read interface.

9. The method of claim 7 , wherein the thread-specific outgoing queue is thread safe and is accessible to the encapsulated set of TCP sockets.

10. The method of claim 7 , wherein the socket-specific incoming queue is thread safe and is accessible to the multiple threads.

11. The computer-implemented method of claim 1 , further comprising:

providing to the local node, at the single read interface, a second packet sent by the remote node via an encapsulated TCP socket from the encapsulated set of TCP sockets.

12. The computer-implemented method of claim 1 , further comprising:

forwarding the packets received from all threads on a client device to one of the set of socket-specific incoming queues.

13. An apparatus for balancing load among network sockets established between a local node and a remote node, the apparatus comprising:

a local transport-layer virtual socket that is to:

present, to the local node, a single write interface and a single read interface, wherein:

the single write interface is configured to transmit packets to the remote node,

the single read interface is configured to receive packets from the remote node;

encapsulate a set of TCP sockets between the local node and the remote node, wherein:

the local transport-layer virtual socket comprises a set of socket-specific incoming queues and a set of thread-specific outgoing queues,

each socket-specific incoming queue is coupled to a corresponding encapsulated TCP socket and is to queue packets to be transmitted over a corresponding encapsulated TCP socket, and

each thread-specific outgoing queue is coupled to the set of encapsulated TCP sockets and is to queue packets to be received by a corresponding thread executing on the local node; and

restricts access to the encapsulated set of TCP sockets to access via the single write interface and the single read interface; and

a non-transitory computer-readable medium storing instructions, which when executed by one or more processing resources, cause the one or more processing resources to apply a load-balancing technique to select an encapsulated TCP socket from the encapsulated set of TCP sockets and forward the packet to a socket-specific incoming queue corresponding to the selected encapsulated TCP socket.

14. The apparatus of claim 13 , wherein, selecting the encapsulated TCP socket comprises:

determining a load of each encapsulated TCP socket; and

selecting an encapsulated TCP socket with least load.

15. The apparatus of claim 14 , wherein, the instructions further cause the one or more processing resources to determine the load of each encapsulated TCP socket by:

determining an occupancy rate of the socket-specific incoming queue associated with each encapsulated TCP socket; or

determining a number of packets queued in the socket-specific incoming queue associated with each encapsulated TCP socket.

16. The apparatus of claim 15 , wherein the selected encapsulated TCP socket with the least load corresponds to a socket-specific incoming queue with a lowest occupancy rate or a smallest number of queued packets.

17. The apparatus of claim 13 , wherein the instructions further cause the one or more processing resources to:

in response to detecting that a network interface associated with a particular encapsulated TCP socket fails, remove the particular encapsulated TCP socket from the local transport-layer virtual socket; and

cause packets queued in the socket-specific incoming queue associated with the removed particular TCP socket to be redistributed to other socket-specific incoming queues associated with other TCP sockets encapsulated within the local transport-layer virtual socket.

18. The apparatus of claim 17 , wherein the instructions further cause the one or more processing resources to:

in response to detecting a recovery of the failed network interface, create a new TCP socket bound to the recovered network interface; and

encapsulate the new TCP socket to the local transport-layer virtual socket.

19. The apparatus of claim 13 , wherein the selected encapsulated TCP socket:

receives, from the remote node, a packet associated with a particular thread executing on the remote node;

determines a destination thread executing on the local node associated with the packet received from the remote node; and

forwards the packet received from the remote node to a thread-specific outgoing queue based on the destination thread.

20. The apparatus of claim 19 , wherein the selected encapsulated TCP socket:

notifies the destination thread to allow the destination thread to read the packet received from the remote node from the thread-specific outgoing queue via the read interface.

21. The apparatus of claim 19 , wherein the thread-specific outgoing queue is thread safe and is accessible to the encapsulated set of TCP sockets.

22. The apparatus of claim 19 , wherein the socket-specific incoming queue is thread safe and is accessible to multiple threads.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 22, 2022
From: CAI, LINGHAN
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 061185/0652 →
Continuity (1)
Related Publication 20240039850A1 · Feb 1, 2024
References Cited (29)
US 5764756A · Onweller · 1998 [cited by applicant]
US 5799016A · Onweller · 1998 [cited by applicant]
US 5999965A · Kelly · 1999 [cited by applicant]
US 7373500B2 · Ramelson et al. · 2008 [cited by applicant]
US 8018961B2 · Gopinath et al. · 2011 [cited by applicant]
US 8675674B2 · Saha et al. · 2014 [cited by applicant]
US 9590914B2 · Alizadeh Attar et al. · 2017 [cited by applicant]
US 10547559B2 · Vasudevan et al. · 2020 [cited by applicant]
US 10649790B1 · Ingegneri · 2020 [cited by examiner]
US 20060075127A1 · Juncker · 2006 [cited by examiner]
US 20080114882A1 · Christenson · 2008 [cited by examiner]
US 20140006632A1 · Evens · 2014 [cited by applicant]
US 20170325113A1 · Markopoulou et al. · 2017 [cited by applicant]
US 20180041613A1 · Lapidous · 2018 [cited by examiner]
US 20190044847A1 · Guillemin · 2019 [cited by examiner]
US 20210029179A1 · Ravich · 2021 [cited by examiner]
JP 2003110604A · 2003 [cited by examiner]
Kumar, “Data sequence signal manipulation in multipath TCP (MPTCP): The vulnerability, attack and its detection”, (Year: 2021). [cited by examiner]
Chand “An Adaptive and Efficient Packet Scheduler for Multipath TCP” (Year: 2019). [cited by examiner]
Paasch, “Improving Multipath TCP”, 2014 (Year: 2014). [cited by examiner]
S. Braun, C.-T. Cheng, S. Dowey and J. Wollert, “Survey on Security Concepts to Adapt Flexible Manufacturing and Operations Management based upon Multi-Agent Systems,” 2020 IEEE 29th International Symposium on Industria… [cited by examiner]
V. Melnyk, O. Kuzmych, N. Bahniuk, N. Cherniashchuk, L. Hlynchuk and O. Mekush, “Effective Big Data Analysis Based on Sockets. Application to Biomedical Data Processing,” 2021 11th International Conference on Advanced C… [cited by examiner]
H. Si, C. Sun, B. Chen, L. Shi and H. Qiao, “Analysis of Socket Communication Technology Based on Machine Learning Algorithms Under TCP/IP Protocol in Network Virtual Laboratory System,” in IEEE Access, vol. 7, pp. 8045… [cited by examiner]
O. Serres, A. Anbar, S. G. Merchant, A. Kayi and T. El-Ghazawi, “Address Translation Optimization for Unified Parallel C Multi-dimensional Arrays,” 2011 IEEE International Symposium on Parallel and Distributed Processin… [cited by examiner]
C. Georgiou, P. M. Musial, A. A. Shvartsman and E. L. Sonderegger, “An Abstract Channel Specification and an Algorithm Implementing It Using Java Sockets,” 2008 Seventh IEEE International Symposium on Network Computing … [cited by examiner]
Juniper Networks, Inc., “SCTP Overview”, available online at <https://web.archive.org/web/20210417213501/https://www.juniper.net/documentation/us/en/software/junos/gtp-sctp/topics/topic-map/security-gprs-sctp.html>, Jan… [cited by applicant]
Robin Seggelmann, “SCTP: strategies to secure end-to-end communication”, Doctoral Dissertation, University of Duisburg-Essen, 2012, 143 pages. [cited by applicant]
Wikipedia, “Multipath TCP”, available online at <https://en.wikipedia.org/w/index.php? title=Multipath_TCP&oldid=1039533254>, Aug. 19, 2021, 8 pages. [cited by applicant]
Wikipedia, “Stream Control Transmission Protocol”, available online at << https://en.wikipedia.org/w/index.php? title=Stream_Control_Transmission_Protocol&oldid=1031934097>, Jul. 4, 2021, 9 pages. [cited by applicant]