$linuxjunkies
>

TCP Fast Open

also: TFO

TCP Fast Open (TFO) is a TCP extension that allows applications to transmit data during the initial connection handshake, reducing latency by eliminating one round-trip time compared to standard TCP.

Traditionally, TCP requires a three-way handshake (SYN, SYN-ACK, ACK) to establish a connection before any application data can be sent. TCP Fast Open modifies this by allowing the client to include a small amount of data in the initial SYN packet, which the server can process immediately if it recognizes a valid TFO cookie.

The mechanism uses a TFO cookie—a secure token generated by the server on first connection—that the client stores and presents on subsequent connections to prove legitimacy. This eliminates one round-trip delay, significantly improving performance for latency-sensitive applications like web browsing and DNS queries.

Example: A web browser with TFO can send the initial HTTP request within the SYN packet to a previously visited server, rather than waiting for the handshake to complete before transmitting data. TFO is enabled via kernel parameters like net.ipv4.tcp_fastopen and requires application support.

Related terms