I am building a web application and I using PostgreSQL as the database management system.
The following page details the maximum connections setting:
I read about tuning on the following page
and it mentions
Generally, PostgreSQL on good hardware can support a few hundred connections.
I am confused about what defines a "connection". Many web sites have thousands or more users and it seems if it can only support a few hundred connections at once, then significant horizontal scaling would be required. Are connections very short?...Meaning, if a user loads a page and it queries the database, does it open and close a connection before and after?