title: Is it better to reuse connections, or renew them for sending data frequently?
body: <p>I have a TCP server application which listens for connections from clients that send "heartbeat" packets frequently in rather small intervals, around 20 seconds. There are a few hundred such clients, 1000 at most. </p>
  
  <p>It has previously been implemented (not by me) such that a new TCP connection is established for every heartbeat, then it is closed. </p>
  
  <p>It seems to me that it would be better to keep the connection open and reuse it for the communication, but I'm not sure. Is re-establishing the connections a waste of time and bandwidth and keeping a few hundred open connections (in the server's case) not a problem, or, on the contrary, is it a big waste of resources not to close them?</p>