I have configured Nginx and Apache on one of my servers. The nginx server listens on port 80 and Apache on port 81. Nginx works as a reverse proxy. In nginx I configured TCP Fast Open:
server {
listen 107.6.155.74 fastopen=50;
server_name servtest.com www.servtest.com;
TCP Fast Open is also enabled on the server itself:
root@server:~/projects/nginx# cat /proc/sys/net/ipv4/tcp_fastopen
3
In order to test if this works I configured Chrome on a PC running Ubuntu to use TCP Fast Open (chrome://flags page). The tcp_fastopen settings is set to 1 on the client.
On the server I use the following grep to find out if TCP Fast Open is used or not:
grep '^TcpExt:' /proc/net/netstat | cut -d ' ' -f 87-92 | column -t
TCPOFOMerge TCPChallengeACK TCPSYNChallenge TCPFastOpenActive TCPFastOpenPassive TCPFastOpenPassiveFail
0 2 2 0 0 0
I believe that the TCPFastOpenActive and/or TCPFastOpenPassive counters should not be "0" if this works. Any ideas how to actually find out if TCP Fast Open is used and works as expected? Let me know if I need to provide some more info.