Skip to main content

Posts

Showing posts from March, 2017

The difference with tcp_tw_recycle and tcp_tw_reuse

If you ask me the most troublesome kernel parameters are for the system engineers, there are probably tcp_tw_reuse and tcp_tw_recycle . These two kernel parameters are looks very similar and it's hard to know difference of two values exactly. So, in this article we will test about these parameters and find out the difference with tcp_tw_reuse and tcp_tw_recycle. Let's start. Materials First of all, prepare two servers. One is the role of client, and the other is the role of server. And in client we set a value of net.ipv4.ip_local_port_range kernel parameter to  32768 32768 . [root@server ~]# sysctl -w "net.ipv4.ip_local_port_range=32768 32768" net.ipv4.ip_local_port_range = 32768 32768 tcp_tw_reuse First, let's test about tcp_tw_reuse . In client, you enter curl command to server. And soon, you will see the port that used to open to server is changed TIME_WAIT state. If you enter curl command again, you will see below error message. tcp_tw_re...