Setting up a simple HA cluster

We will now go through setting up a simple database cluster. For this setup, we will need two database nodes, one extra node for providing quorum, and a cluster IP that will be assigned to the node that is running as the primary. Each database node will store the database on a local filesystem.

Preparing the servers

Install the operating system as you would normally. You should prefer fresher Linux distributions because Linux-HA support has really matured in distributions such as Red Hat Enterprise Linux 7 and its derivatives.

For the network setup, it is really important that the hostnames are set properly before you start setting up High Availability. Pacemaker uses hostnames to identify systems, and that makes changing ...

Get PostgreSQL Replication - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.