You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use node-postgres since months and now my project is evolving so I migrated on a more robust setup.
I was using node-postgres pooling to manage the pool at app level, but now I'm running my app on an auto-scale k8s and my postgres db on multiple nodes, so it makes sense to manage a centralized external pool between my app and my db, here comes PgBouncer.
First of all, am I getting the logic right? Does it make sense to use a pool outside the app logic since I can't anticipate the number of clusters running, and so the maximum clients per app instance? Or should I still create pools inside my app? Maybe PgBouncer fit better for other languages like PHP where you can't keep a pool instance opened?
And if it make sense to use PgBouncer, what are the good practices with node-postgres? Do I have to use a Client instance instead of a Pool instance? Will I be able to get several clients in the same app instance? Will I still be able to run transactions? Will there be a drop in performance? Will Andrew marry Laura?
I saw that PgBouncer was mentioned several times here but I can't get the answers I'm looking for unfortunately. It sounds to me that it's better to use a pool at app level but I'm not sure, and it feels better to handle the pool logic at the same place to get perfect control on the number of connections.
Thank you for you help!
The text was updated successfully, but these errors were encountered:
Hello there,
I use node-postgres since months and now my project is evolving so I migrated on a more robust setup.
I was using node-postgres pooling to manage the pool at app level, but now I'm running my app on an auto-scale k8s and my postgres db on multiple nodes, so it makes sense to manage a centralized external pool between my app and my db, here comes PgBouncer.
First of all, am I getting the logic right? Does it make sense to use a pool outside the app logic since I can't anticipate the number of clusters running, and so the maximum clients per app instance? Or should I still create pools inside my app? Maybe PgBouncer fit better for other languages like PHP where you can't keep a pool instance opened?
And if it make sense to use PgBouncer, what are the good practices with node-postgres? Do I have to use a Client instance instead of a Pool instance? Will I be able to get several clients in the same app instance? Will I still be able to run transactions? Will there be a drop in performance? Will Andrew marry Laura?
I saw that PgBouncer was mentioned several times here but I can't get the answers I'm looking for unfortunately. It sounds to me that it's better to use a pool at app level but I'm not sure, and it feels better to handle the pool logic at the same place to get perfect control on the number of connections.
Thank you for you help!
The text was updated successfully, but these errors were encountered: