Hi all.
As far as I understand it, the advantage to persistent connections is that if a request is made to connect to a PostgreSQL database via a persistent connection, then if there already exists in the pool a connection with the same database, username, and password, then this connection will be reused instead of opening up a new one.
However, I've also read some information which suggests that using persistent connections increases the load on the server.
Since I'm running four applications which use PostgreSQL, and since two of these often have multiple users connected at once that will be using the same username and password to connect to a database, am I not better off using persistent connections to reduce the number of active connections for the same username and password?
From what I've read it seems that persistent connections are in this case the way to go, but I've read some other posts/articles which suggest the opposite, so while I would tend to lean towards the side of persistent connections I'm not certain.
On the two applications I have which are currently accessed the most, I think I could use persistent or non-persistent connections and it might not make that much of a difference. But the application I'm currently developing (a db-driven content management system) will have MANY users connected at the same time, so efficiency in pooling connections is of utmost importance.
Any advice is greatly appreciated.
Thanks much in advance,
Pablo
As far as I understand it, the advantage to persistent connections is that if a request is made to connect to a PostgreSQL database via a persistent connection, then if there already exists in the pool a connection with the same database, username, and password, then this connection will be reused instead of opening up a new one.
However, I've also read some information which suggests that using persistent connections increases the load on the server.
Since I'm running four applications which use PostgreSQL, and since two of these often have multiple users connected at once that will be using the same username and password to connect to a database, am I not better off using persistent connections to reduce the number of active connections for the same username and password?
From what I've read it seems that persistent connections are in this case the way to go, but I've read some other posts/articles which suggest the opposite, so while I would tend to lean towards the side of persistent connections I'm not certain.
On the two applications I have which are currently accessed the most, I think I could use persistent or non-persistent connections and it might not make that much of a difference. But the application I'm currently developing (a db-driven content management system) will have MANY users connected at the same time, so efficiency in pooling connections is of utmost importance.
Any advice is greatly appreciated.
Thanks much in advance,
Pablo