Pgbouncer vs pgpool II

Hi all,

I was wondering if any of you has experience with pgpool II instead of pgbouncer by using Discourse, and if so, what’s the feeling so far?

Do you, Team, consider it at some point and if so, why?

Thanks,
Ismael

1 Like

pgpool II has no transaction pooling. Without transaction pooling it has extreme limited value in high scale hosting and would only add complexity.

On a standard “self hosted” Discourse you would be struggling to push 30-60 active connections and PG is not going to struggle with that. No need for a connection pooler to add complexity to your setup.

5 Likes

Many thanks Sam. Indeed, as you said for not many connections it might not make sense. Also, having transaction pooling into consideration there is only one winner in this case.

However, as far as I know, I saw pgbouncer does not offer HA, while pgpool II does. What about having a pgbouncer “in-front” of a pgpool to allow such feature? What’s the recommendation for a HA approach that fits well for Discourse?

Discourse offers HA out of the box using global configuration.

See: GitHub - discourse/rails_failover

And dig through global settings here: discourse/config/discourse_defaults.conf at main · discourse/discourse · GitHub

You would configure 2 pgbouncers in a high availability / enormous amount of connections required mode.

2 Likes