As always, measure, don't guess, but yes, if you care about performance you still want connection pooling in some way.
Besides the aformentioned reason (TCP 3-way handhsake) you also want connection pooling for these reasons:
- The database may need to fork or start a new process for each connection which may be a very costly operation
- Upon closing the connection the database process may have to be cleaned up by the operating system to safe memory, file descriptors, sockets etc.
- The database may need to validate the login credentials of the user, which in some cases could be an LDAP useraccount so another network roundtrip is involved
- If your connection is not a plain TCP connection but you use SSL/TLS in the worst case scenario (no session resumption possible) you may incur the overhead of a full TLS handshake, including validating RSA signatures and checking the status of the certificates through CRL or OCSP over the internet
We use this professionally and also:
- pooling httpclients (for REST/SOAP webservices)
- pooling connections to RabbitMQ (RabbitMQ monitors provide insight into what they call: Churn statistics, to easily see how often new connections are established)
You may also want to check out other 'cloud architecture solutions' like the: service mesh of which Istio is an implementation that try to decouple this kind of concerns from your application in a microservice architecture. These may use a local proxy server with connection pooling in the so called 'Side car pattern'. For a more complete explanation see: Red Hats explanation of a Service Mesh