I have multiple PostgreSQL servers for a web application. Typically one master and multiple slaves in hot standby mode (asynchronous streaming replication). I use PGBouncer for connection pooling: one instance installed on each PG server (port 6432) connecting to database on localhost. I use transaction pool mode. In order to load-balance my read-only connections on slaves, I use HAProxy (v1.5) wi
![PostgreSQL High Availability/Scalability using HAProxy and PGBouncer](https://cdn-ak-scissors.b.st-hatena.com/image/square/2a53379c39df414b89526fa0b87c626122f0b7ef/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fdba%2FImg%2Fapple-touch-icon%402.png%3Fv%3D246e2cb2439c)