4 ms·
Sorry if this is a stupid question, but don't most libraries do connection pooling on their own? Why is something like pgbouncer necessary?
by tshannon 8y ago
Sorry if this is a stupid question, but don't most libraries do connection pooling on their own? Why is something like pgbouncer necessary?
- bobwaycott 8y agoMost libraries do not handle connection pooling on their own. They simply handle opening and closing a connection per query. Hence the write up on pgbouncer being a (relatively) transparent, drop-in solution to handling this when a library does not.
- merb 8y agowell transaction pooling is good for most databases. consider having 10 upstream connections per transaction pool and 10000s of connections to applications. pgbouncer can handle that and every application would only be assigned to a real database if a transaction/query happens and after that the upstream connection would be deassigned.