0

I fee very skeptical about this part as I have not found an answer on the web that satisfies me.

The questions are:

  1. Should I keep the db connection on forever and then keep processing my requests. This way is easier as I only have to open up the connection once and forget about closing it unless it goes down for some reason. Here, I understand the overheads of keeping a connection on forever.

  2. Should I open up a fresh connection each time I receive a request that needs some processing in the database and then close after the processing is done.

As per my research, the second part is better, but I need to understand the consequences in both cases.

It will mean a lot if someone can explain me the design overheads here with some examples

0 Answers0