Opportunistic TCP Connection Establishment via Intermediate Device

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional TCP connection establishment methods require sequential handshakes between a client and an intermediate device and then the origin server, leading to delays in establishing connections, especially when the intermediate device waits for the completion of the client-handshake before initiating the server-handshake, which can increase the time to first byte (TTFB).

Innovation Solution

An intermediate device splits the TCP connection into two segments, allowing it to opportunistically initiate the connection with the origin server without waiting for the client-handshake completion, using a transparent proxy that intercepts packets and manages sequence numbers, acknowledgments, and checksums, while also supporting TCP Fast Open (TFO) by modifying responses to indicate TFO support even if the origin server does not, allowing the client to send data during the handshake.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the intermediate device waits for the client-handshake completion before initiating the server-handshake, then the connection security is guaranteed, but the connection establishment time increases

Engineering Contradiction:
Improveconnection securityVSAvoidconnection establishment time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The intermediate device performs preliminary actions by initiating the server-handshake before the client-handshake completes. The proxy device sends the SYN packet to the origin server in advance, and the origin server responds with SYN-ACK. This preliminary action overlaps the two handshakes, reducing total connection establishment time while maintaining security through subsequent validation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system dynamically adjusts the handshake process by allowing out-of-order packet delivery and processing. The intermediate device manages multiple connection states simultaneously, dynamically transitioning between waiting for client ACK and processing server responses. This dynamic state management enables concurrent handshake operations without compromising security validation.

Inventive Principle:
Principle #15Dynamics

2Loss of time

If the intermediate device initiates the server-handshake before client-handshake completion, then the connection establishment time is reduced, but the risk of impersonation attacks increases

Engineering Contradiction:
Improveconnection establishment timeVSAvoidimpersonation attack risk
Core Design Contradiction:
Loss of timeVSObject-affected harmful factors

Solution Approach 1:

The intermediate device implements feedback mechanisms by validating the client's ACK packet against the expected sequence numbers and connection state before establishing the connection. The proxy device continuously monitors and validates packets, providing feedback to ensure only legitimate clients can complete the handshake. This feedback loop maintains security even when the server-handshake is initiated prematurely.

Inventive Principle:
Principle #23Feedback

3Adaptability or versatility

If the origin server does not support TCP Fast Open, then compatibility is maintained, but the data transfer delay is increased

Engineering Contradiction:
Improveserver compatibilityVSAvoiddata transfer delay
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The intermediate proxy device acts as an intermediary that enables TCP Fast Open functionality even when the origin server does not natively support it. The proxy device intercepts packets, modifies sequence numbers and acknowledgments, and manages the TFO cookie exchange between the client and server. This intermediary role allows the client to send data during the handshake phase while maintaining compatibility with servers that don't support TFO, effectively reducing data transfer delay without sacrificing broad compatibility.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11349934B2Opportunistic transmission control protocol (TCP) connection establishment
Publication Date: 2022.05.31 CLOUDFLARE INC
  • US11349934B2 patent drawing
  • US11349934B2 patent drawing
  • US11349934B2 patent drawing

AI summary

A TCP intermediate device receives a first SYN packet from a TCP client to establish a TCP connection between the TCP client and a TCP origin server. Prior to the TCP connection being fully established, the TCP intermediate device transmits a second SYN packet to the TCP origin server. The TCP intermediate device transmits a first SYN-ACK packet to the TCP client. The TCP intermediate device receives a first ACK packet from the TCP client. The TCP intermediate device receives a second SYN-ACK packet from the TCP origin server. The TCP intermediate device transmits a second ACK packet to the TCP origin server as part of establishing the third TCP connection.