4 ms·
If pgbouncer makes this big a difference to performance, is it included in managed PostgreSQL services, such as Amazon RDS and Heroku Postgres? Or would you ha
by robbles 13y ago
If pgbouncer makes this big a difference to performance, is it included in managed PostgreSQL services, such as Amazon RDS and Heroku Postgres?
Or would you have to roll your own pgbouncer setup for these systems?
- _hans_ 13y agoNeither AWS RDS PostgreSQL nor Heroku has a PGBouncer.
- btown 13y agoHeroku actually does seem to support/encourage it: https://postgres.heroku.com/blog/past/2013/11/22/connection_limit_guidance/ https://postgres.heroku.com/blog/past/2013/11/22/connection_... https://github.com/gregburek/heroku-buildpack-pgbouncer https://github.com/gregburek/heroku-buildpack-pgbouncer
- robbles 13y agoSaw that reference in the linked post from Heroku in the original article. Has anyone used this? Is it configurable, or do they just choose some reasonable defaults?
- thruflo 13y agoWorks great for me. There's some minimal configuration explained in the pgbouncer docs. What the pgbouncer buildpack does is just route your DATABASE_URL through the local pgbouncer. In my python app, I switched from an sqlalchemy connection pool per process (eg per gunicorn worker) to using a Null pool everwhere. No increase in latency; far fewer connections needed.