-
-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pgcat as an alternative to pgbouncer and more #646
Comments
Yes, I have an idea to add pgcat as an alternative to pgbouncer so that the user can choose which connection pooler to use. I need to take the time to do this, or you can suggest a PR. |
Currently, the playbook installs a copy of pgbouncer to each cluster node. With pgcat I currently test it with a single instance replacing haproxy as well. If you install pgcat instead of pgbouncer which topology would you use? |
In the same configuration by default, it is placed locally on the database server before Postgres. Balancers (optional) -> pgcat -> Postgres |
I opened an Discussion on PgCat. @vitabaks what did you find out about this? |
@TheOriginalGraLargeShrimpakaReaper why do you think it is a problem? pgcat claims to have its own healthcheck performed by connecting to PostgreSQL directly. Cluster configuration can be populated from etcd with confd the same way HAProxy is configured by this playbook. pgcat even reloads its configuration on its own. |
In this case, you need to understand that it will have fewer features than a load balancer integrated with the Patroni REST API. For example, we can now define sync and async replicas separately, automatically exclude replicas with a lag of more than By default, HAProxy and PgBouncer will be specified, but those who know what they are doing (understand the limitations) will be able to select pgcat to use its functions. If we consider it not only as a connection pooler but also as a load balancer, then its servers should be defined in the "balancers" group to be able to control which servers to deploy it on (dedicated or database servers). |
After trying out pgcat I have to say I was disappointed. It's load balancing feature is not capable to distinguish read and write operations properly and lacks the ability for fine tuning. You can see similar feedback in their issues on Github (example). Also, they haven't produced a release since February and the current version is 0.1.0. So I strongly advise against using it. |
@rcknr Ok, thank you for your feedback. We will be watching the next releases. |
I have recently deployed a cluster using this playbook and am very pleased with the outcome. As I learn capabilities of each component I also keep discovering new tools that can enhance database performance in my production scenario.
Recently I came across pgcat which is designed to be a replacement for pgbouncer but also could be a way to natively balance reads/writes as well as sharded datasets.
For now I'm testing it in parallel with haproxy/pgbouncer in my cluster populating members using confd/etcd.
Do you think it makes sense to include it into this playbook as an alternative to pgbouncer and haproxy? Does anyone have any experience working with pgcat and can share it here?
The text was updated successfully, but these errors were encountered: