NDB supports PostgreSQL HA software profiles for provisioning PostgreSQL databases with high availability. PostgreSQL HA software profiles consist of three components: etcd, HAProxy, and Patroni.
etcd is a distributed key-value store that provides a reliable way to store configuration data across a cluster of machines. etcd is used by Patroni to store and synchronize the cluster state and configuration.
HAProxy is a load balancer that distributes incoming requests to the PostgreSQL nodes. HAProxy is used to expose a single endpoint for database connections even as the roles of the individual nodes change.
Patroni is a template for PostgreSQL high availability. Patroni is responsible for managing the state of the cluster and handling failover. Patroni uses etcd as the distributed configuration store and relies on HAProxy for load balancing.
Therefore, the software component that manages the state of the cluster and handles failover is Patroni.
References:
Nutanix Database Automation (NCP-DB) Course Details, Section 2.4: Provisioning PostgreSQL Databases
Nutanix Database Automation (NCP-DB) Certification Details, Objective 2.4: Provision PostgreSQL Databases
Nutanix Database Automation (NCP-DB) YouTube Playlist, Video 2.4: Provisioning PostgreSQL Databases
[Nutanix Database Automation (NCP-DB) User Guide], Section 2.4: Provision PostgreSQL Databases
[PostgreSQL High Availability: Under the Hood – Nutanix.dev]