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
The discussion revolves around comparing pgbouncer and pgpool II for use with Discourse. trobiyo asks about pgpool II’s suitability and its HA capabilities compared to pgbouncer. sam explains that pgpool II lacks transaction pooling, limiting its value in high-scale setups, and notes that for standard self-hosted Discourse, the database typically handles 30-60 connections without needing a connection pooler. trobiyo raises the point that pgbouncer lacks HA, but sam clarifies that Discourse supports HA natively via global configuration and rails_failover, suggesting that two pgbouncers can be used in a high-availability setup instead of combining pgbouncer with 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
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 · GitHub
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.