I'm working with postgre (AWS RDS) for my db and using node (AWS EC2) for server side. I'm just starting out so I don't have much context. I always used other third party software like Parse for DB so I had my apps access db through Parse API. So I thought I would do the same for Postgres. The more I read about it the more people say I need a middle server to prevent a direct link from a client app to the DB for security reasons. I understand that point, hence the node server.
But then as I was using node libraries, I realized that a establishing a connection from the server to DB was heavy. Within the stable realm, I can only establish 20 connections at once. So if I had gone through a direct connection from client app to DB, it was going to be too intense for DB.
Other than the security reason, is this the main reason why people recommend using a middle server layer between client app and the DB?
Or are there other technical reasons I'm not aware of?