PgBouncer has always left me confused in the world of application level connection pooling. I have never quite understand the value of it if we are already using connection pools in our applications. I don't want to pool connections to another pool.
Application level connection pools are not enough if you're using something like k8s and have your "application" running across hundreds of pods, each with their own application level connection pool. pgBouncer helps tremendously in that situation because all those pods will use a single pool. We cut down avg open connections dramatically by doing that from over 1000 to less than 400.
This still doesn't really make sense to me. You can't scale an application that relies on a database heavily to this level because your fundamental constraint IS the database. If you are already hitting your max number of connections with a small number of applications there are no benefits to further horizontal scaling. You are just passing the buck around because only a limited number can hit the database at any one time.
mscrivo|2 years ago
__s|2 years ago
Deadron|2 years ago
honkycat|2 years ago
additionally with microservices, managing connection pooling can be difficult across legacy software, service versions, teams, etc.
PGBouncer lets me have a front-end and manage that at an infra level.
taspeotis|2 years ago
Deadron|2 years ago