title: tcp_tw_reuse vs tcp_tw_recycle : Which to use (or both)?
body: <p>I have a website and application which use a significant number of connections.  It normally has about 3,000 connections statically open, and can receive anywhere from 5,000 to 50,000 connection attempts in a few seconds time frame.</p>
  
  <p>I have had the problem of running out of local ports to open new connections due to TIME_WAIT status sockets.  Even with tcp_fin_timeout set to a low value (1-5), this seemed to just be causing too much overhead/slowdown, and it would still occasionally be unable to open a new socket.</p>
  
  <p>I've looked at tcp_tw_reuse and tcp_tw_recycle, but I am not sure which of these would be the preferred choice, or if using both of them is an option.</p>