Patroni is a high-availability management software developed by Zalando for orchestrating and automating several aspects of a PostgreSQL cluster. Unlike repmgr, it requires a series of other components and interacts with them as a series of layers to produce the end result of high availability.
We learned how to manage access and abstraction in Chapter 4, Proxy and Pooling Resources. Chapter 7, PostgreSQL Replication, took us even further, giving us the necessary tools to maintain a veritable army of alternative servers for primary substitution at a moment's notice. Much of what we discussed while describing a repmgr-driven cluster, is that Patroni takes the last few steps necessary to automate failover and other elements of a healthy PostgreSQL cluster.
In this chapter, we will learn how to build a quick, yet adaptable, high-availability stack...