Florian
Florian

Reputation: 31

Should I hold connections or should I create new connections everytime?

Should the server keep a socket connection and wait for new data or should the server close a socket connection and the client creates a new connection everytime he need to send data?

Upvotes: 0

Views: 37

Answers (1)

Keep in mind that the process of opening a connection takes time and it can cause some performance issues. That´s the main reason to use connection pools. But there are cases where creating a connection every time is not a big deal and might keep your code simpler.

Upvotes: 1

Related Questions