Extended Socket API for Connection Association
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing socket APIs do not allow association between inbound and outbound connections, which is necessary for providing reliable server load-balancing and L7 service functions, especially when these services are chained, leading to difficulties in maintaining packet delivery and order.
Innovation Solution
An extended socket API that associates inbound and outbound network sockets using a socket file descriptor, allowing data to be directed between them and enabling the preservation of the original source IP address and port, with optional unproxying and proxying functionality to manage connections efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If standard socket API is used for application services, then existing network stack compatibility is maintained, but association between inbound and outbound connections cannot be established
Solution Approach 1:
The patent merges the standard socket API with extended functionality by introducing a new `associate()` function that operates on top of existing socket structures. This allows inbound and outbound connections to be associated without replacing the standard API, maintaining compatibility while adding connection association capability through a unified socket interface.
Solution Approach 2:
The patent introduces a connection association mechanism as an intermediary layer between the standard socket API and the application services. This intermediary uses socket file descriptors and association structures to link inbound and outbound connections, enabling reliable packet delivery and order maintenance without modifying the core socket API.
2Ease of operation
If standard socket API functions by terminating and opening new connections, then connection termination and reconnection is simplified, but relationship between inbound and outbound connections is not maintained
Solution Approach 1:
The patent performs preliminary association of inbound and outbound connections using socket file descriptors before data transmission begins. By establishing the connection relationship in advance through the `associate()` function, the system preserves connection information throughout the data flow, preventing loss of relationship information while maintaining simple connection operations.
3Adaptability or versatility
If L7 services are chained without connection association, then service chaining flexibility is improved, but packet delivery reliability and packet order cannot be ensured
Solution Approach 1:
The patent implements feedback mechanisms through connection association that track packet flow between chained L7 services. By maintaining association information between inbound and outbound connections, each service in the chain can verify packet delivery and order, ensuring reliability while preserving the flexibility to chain multiple services together.
4Reliability
If extended socket API associates inbound and outbound sockets, then connection association and data direction control is improved, but socket management complexity increases
Solution Approach 1:
The patent enables sockets to manage their own associations through automatic binding of inbound and outbound connections using socket file descriptors. The association mechanism operates autonomously once initiated, reducing the need for complex manual socket management while maintaining reliable data association and direction control throughout the connection lifecycle.
Data Source
AI summary
Methods and apparatus for providing an extended socket API are disclosed. A method for providing a socket API according to an implementation of the invention may include: receiving data at a first network socket; opening a second network socket; associating the first network socket and the second network socket using a socket file descriptor of a client-side connection; and directing the data from the first network socket to the second network socket. When an application service utilizes the socket API, the method may further include processing the data, i.e., performing a service.


