top | item 37433002

(no title)

Deadron | 2 years ago

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.

discuss

order

mscrivo|2 years ago

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.

__s|2 years ago

Also IoT

Deadron|2 years ago

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.

honkycat|2 years ago

it lets me create a load balancer in front of multiple database instances without having to do a bunch of application-level BS

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

Lambdas

Deadron|2 years ago

If you are running aws lambdas I believe you should be using the RDS proxy product(This is a very similar product though).