Skip to content

Commit 56f2a3a

Browse files
committed
Enable tcp_tw_reuse
1 parent 93edf37 commit 56f2a3a

File tree

1 file changed

+11
-0
lines changed
  • ansible/roles/proxy-network/tasks

1 file changed

+11
-0
lines changed

ansible/roles/proxy-network/tasks/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,21 @@
2727
net.ipv4.conf.all.rp_filter = 0
2828
net.ipv4.conf.all.accept_local = 1
2929
net.ipv4.conf.all.log_martians = 1
30+
# Allow the use of every non-privileged port for connections
3031
net.ipv4.ip_local_port_range = 1024 65535
32+
# FIN_WAIT timeout
3133
net.ipv4.tcp_fin_timeout = 15
34+
# Limit on number of connections not attached to sockets (e.g. because FIN_WAIT);
35+
# costs up to 64KB per connection
3236
net.ipv4.tcp_max_orphans = 262144
37+
# Maximum number of connections that have not completed the three-way handshake;
38+
# costs 304B per connection
3339
net.ipv4.tcp_max_syn_backlog = 4096
40+
# Maximum number of TIME_WAIT sockets (can't be larger than tcp_max_orphans)
3441
net.ipv4.tcp_max_tw_buckets = 262144
42+
# Allow reusing a 5-tuple in TIME_WAIT for new connections
43+
net.ipv4.tcp_tw_reuse = 1
44+
# Maximum number of connections netfilter is tracking
45+
# TODO: Why are we using conntrack at all?
3546
net.netfilter.nf_conntrack_max = 8388608
3647
notify: apply sysctl

0 commit comments

Comments
 (0)