Skip to content

Commit 007c944

Browse files
committed
nginx: enable TCP Fast Open for HTTP(S)
This isn't used by end user machines in practice due to privacy and compatibility reasons but it works well between servers. We're using it for authoritative DNS per the RFC 9210 recommendation and might as well have it available for HTTP and HTTPS since it does get used a bit in practice. The queue size determines how many pending fast open connections which have not yet completed the handshake are allowed before the kernel will fall back to waiting for the handshake. TCP Fast Open key rotation and persistence has been handled as part of our baseline server configuration.
1 parent fbbcaa2 commit 007c944

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nginx/nginx.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ http {
9696
}
9797

9898
server {
99-
listen 80 default_server backlog=4096 rcvbuf=2048 sndbuf=2048;
100-
listen [::]:80 default_server backlog=4096 rcvbuf=2048 sndbuf=2048;
99+
listen 80 default_server backlog=4096 fastopen=16 rcvbuf=2048 sndbuf=2048;
100+
listen [::]:80 default_server backlog=4096 fastopen=16 rcvbuf=2048 sndbuf=2048;
101101

102102
# https://trac.nginx.org/nginx/ticket/2012
103103
location / {
@@ -134,8 +134,8 @@ http {
134134
}
135135

136136
server {
137-
listen 443 default_server ssl backlog=4096;
138-
listen [::]:443 default_server ssl backlog=4096;
137+
listen 443 default_server ssl backlog=4096 fastopen=16;
138+
listen [::]:443 default_server ssl backlog=4096 fastopen=16;
139139
http2 on;
140140
ssl_reject_handshake on;
141141

0 commit comments

Comments
 (0)