Re:PgBouncer is useful, important, and fraught with peril
by film42 on Friday September 08, 2023 @10:18AM
(#37433830)
This. For the web service workloads most of us run, I’ve always run out of postgres connections before exceeding the vertical limit of a postgres server.
[ Parent
| on HN ]
Re:PgBouncer is useful, important, and fraught with peril
by Deadron on Friday September 08, 2023 @10:33AM
(#37434011)
Is this because your default approach is to horizontally scale or because you have tried other options? Logically scaling vertically a single server with pooled connections should have a better effect than horizontally scaling to multiple servers that need to share connections through a proxy. The proxy doesn't magically increase the number of connections available to the database. It will add overhead to all your database interactions though.
Re:PgBouncer is useful, important, and fraught with peril
by film42 on Friday September 08, 2023 @10:59AM
(#37434380)
Vertically scaling has a cost component. If you're able to use pgbouncer with transaction pooling to better utilize but not exceed your existing vertical postgres limit, then you're set. If you do, then you must scale up. Pgbouncer can help you lengthen your runway. Tuning your pgbouncer pool sizes can help minimize the overhead but as with anything we do, it's about weighing trade-offs for your situation.