-
-
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
HAProxy + pgbouncer configuration and pgpool-II as an alternative #710
Comments
@rcknr Thanks for the comment. I think we could implement the option to install P.S. We are not considering |
For confd template I have the following proposal:
This section refers to write frontend. For read frontend "master" is replaced with "replica". |
Yes, I understand that. However, if you use any monitoring on HAProxy it will complain that some backends are down and you are going to need to get around that. One could argue that confd is not really necessary as you could just list all nodes in HAProxy with Ansible and fully rely on patroni healthchecks. |
I monitor the availability of port 5000 and 5001, and not separately each host that is defined in the HAProxy configuration. According to the same principle (using the Patroni REST API) I am implementing cloud load balancers (will be available in version 2.0). |
HAProxy though checks each backend listed and appropriately marks some as being down under its metrics. |
I have followed the most common scenario for deploying a cluster recently with HAProxy and pgbouncer.
After maintaining this setup for a while I came up with understanding of the following downsides:
The last point can be mitigated with a more involved template which also check for node role before including it in a particular frontend. @vitabaks please let me know if you'd be open to a contribution regarding this.
While researching I mistakingly assumed that pgpool-II was a functional equivalent of pgbouncer and the latter was chosen due to bigger popularity. Since then I have found that pgpool-II is actually so much more capable and can act as a load-balancer among other things. For now I'm testing it as a replacement for both HAProxy and pgbouncer and keep learning its other features like query caching.
The text was updated successfully, but these errors were encountered: