code1br / heroku-buildpack-pgpool

Pgpool-II Heroku Buildpack
MIT License
3 stars 7 forks source link

using both pgbouncer and pgpool buildpacks in series #1

Closed gregorykan closed 6 years ago

gregorykan commented 6 years ago

hi there @sobrinho, first of all i want to say thanks so much for this buildpack! we've seen immense performance gains in our application because of your work.

i wanted to ask, is there any way to use both pgpool and pgbouncer buildpacks on the dyno?

sobrinho commented 6 years ago

Hi there! Thank you!

I had success doing that in a customer application but using a fork of pgbouncer buildpack to support connecting to pgpool, see https://github.com/heroku/heroku-buildpack-pgbouncer/pull/68.

All you have to do is configure pgpool to connect to the pgbouncer instead of connecting directly to the database, and keep your application connecting to the pgpool, i.e.:

app -> pgpool -> pbbouncer -> database