Skip to content

Commit 5046b77

Browse files
committed
add sysctl parameter "net.ipv4.tcp_tw_reuse"
tcp_tw_reuse sets whether TCP should reuse an existing connection in the TIME-WAIT state for a new outgoing connection if the new timestamp is strictly bigger than the most recent timestamp recorded for the previous connection. Reuse time-wait sockets in cases where the protocol considers it safe. This helps avoid from running out of available network sockets.
1 parent 75afbc2 commit 5046b77

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vars/system.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ sysctl_conf:
5656
- {name: "net.core.netdev_max_backlog", value: "10000"}
5757
- {name: "net.ipv4.tcp_max_syn_backlog", value: "8192"}
5858
- {name: "net.core.somaxconn", value: "65535"}
59+
- {name: "net.ipv4.tcp_tw_reuse", value: "1"}
5960
# - {name: "", value: ""}
6061
balancers:
6162
- {name: "net.ipv4.ip_nonlocal_bind", value: "1"}
@@ -65,6 +66,7 @@ sysctl_conf:
6566
- {name: "net.core.netdev_max_backlog", value: "10000"}
6667
- {name: "net.ipv4.tcp_max_syn_backlog", value: "8192"}
6768
- {name: "net.core.somaxconn", value: "65535"}
69+
- {name: "net.ipv4.tcp_tw_reuse", value: "1"}
6870
# - {name: "", value: ""}
6971

7072

0 commit comments

Comments
 (0)