Pgbouncer против pgpool II

Всем привет,

Интересно, есть ли у кого-то из вас опыт использования pgpool II вместо pgbouncer в связке с Discourse? Если да, то какие первые впечатления?

Рассматривает ли ваша команда возможность перехода на него в будущем и если да, то почему?

Спасибо,
Исмаэль

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.

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.