PostgreSQL High-Availability has been one of the most dominant topics in the field for a long time. While there are many different approaches out there, Patroni seems to have become one of the most dominant solutions currently in use out there. Many database clusters are running on Linux. However, we have seen some demand for a Microsoft Windows-based solution as well.
While installing Patroni on Linux has become pretty simple, it is still an issue on Microsoft operating systems. There are simply too many parts that have to be in place to run Patroni and many people have found it hard to deploy Patroni.
PES: Patroni Environment Setup
PES is a graphical installer for Patroni on Windows which makes it really easy to deploy Patroni High-Availability. It takes care of all relevant components including:
- Python and Python libraries
PES will stall what is already installed and what is not. All missing parts will be deployed with minimal effort.
Simplified Patroni configuration
One of the key issues is to configure more than one server at a time. PES makes it easy to solve this problem. Simply start PES on all nodes – the installer will then search for other running installers on the network and automatically exchange information.
This greatly reduces the chances of configuration mistakes. If you want to build a reliable cluster it is essential that the etcd and Patroni configuration is not just correct but also consistent. By automatically exchanging information the risk of failure is reduced significantly.
Automatic Patroni and service deployment
PES is automatically going to configure all relevant services for you. It will make sure that …
… are automatically started after a Windows reboot. The cluster is therefore ready for production use within minutes.
Clusters and IP management
A database cluster consists of more than one machine. How does the application, therefore, know who is the current leader and which ones happen to be the replicas? The easiest solution to the problem is the introduction of service IPs. The core idea is to ensure that there is simply one IP all applications can connect to. The cluster itself will make sure that the service IP always points to the right server.
The tool capable of doing that on Windows and Linux is CYBERTEC vipmanager.
It checks etcd to figure out who the current leader is and makes sure the desired IPs are removed from a failed master and bound to the current leader.
The configuration is simple and easy to understand.
Trying out PES
If you want to try out PES check out our GitHub repo or directly download our Windows installer (binary) here .
If you are looking for professional consulting services to setup PostgreSQL high-availability please check out our services.