February 2020
Intermediate to advanced
734 pages
38h 13m
English
For this recipe, we will need only one PostgreSQL server, and one server for HAProxy. We'll assume the PostgreSQL server is named pgha1, and the HAProxy is named pgha-proxy. In addition to this, the IP address for pg1 is 10.0.30.1, while pgha-proxy uses 10.0.30.20. Follow these steps to configure HAProxy on the pgha-proxy server:
CREATE ROLE haproxy_check;
global maxconn 100 defaults log global mode tcp retries 2 timeout client 30m timeout connect 4s timeout server 30m timeout check 5s frontend ft_postgresql bind *:5432 default_backend bk_db backend bk_db ...
Read now
Unlock full access