0

I am going to develop a REST service with Node Js, using mysql2 module and its pool API.
My question is:
what is the way to deal with ending connections to databases a rest api service?
A single client request may need to do multiple queries to database, so my opinion is that it's best to close the database connection after every request, not every query of course.
But I read that pools close connections automatically so the other option I have is not bothering about this problem at all.
What is your advice?

Ferex
  • 553
  • 6
  • 22

0 Answers0