RFC: Add API exposing TCP Fast Open
TCP Fast Open is an extension that reduces a round trip in the initial handshake improving latency.
It is currently exposed on:
- Linux (complete support in
3.16
)-
sendmsg()
orsendto()
client side (replacingconnect()
) andsetsockopt()
server side both usingTCP_FASTOPEN
flag.
-
- macOS 10.11
-
connectx()
(No online docs?)
-
- Windows 10
-
TCP_FASTOPEN
flag for Winsock APIs.
-
It is supported by Chromium and Firefox but note that it is not actually enabled. I did not find information why Mozilla disabled it but Chromium's reasons:
- The fast open cookie is global system state and can be used for tracking purposes.
- With TLS 1.2 session restore, the session resumption packet potentially contains data that the server will process, resulting in mutation of server state before Chrome knows if the data was accepted, increasing the chance of retries.
- QUIC is also on the horizon, which may make this even less useful.
So we need to discuss if we should expose it and how.
cc @mcatanzaro
Edited by Patrick Griffis