ADPG architecture overview
An ADPG cluster is a set of hosts where one host performs as a leader and all other hosts perform as replicas. The scheme below shows an architecture with active elements for the current release and inactive ones for future releases.
The main components of the ADPG cluster in the diagram:
-
BackupAgent — creates a backup and sends it to the repository. BackupAgent is based on the pgBackRest utility.
-
BackupManager — manages the creation and storage of backups.
-
ADPG leader — the main host that has the right to perform write transactions.
-
ADPG replica — additional hosts that are replicas of the leading ADPG host.
-
etcd — distributed configuration storage.
-
Proxies — perform the Service Discovery function, distributing read/write transactions between leader host and replica hosts.
-
Connection Pollers — perform all Proxies functions, as well as limiting the number of connections and reuse them (pgbouncer).
An important part of the cluster is Patroni, that is a cluster manager designed primarily for creating HA clusters. In ADPG cluster, Patroni without High Availability mode is used to connect and exchange information between leader host, replica hosts, and etcd storage. Patroni selects the ADPG leader from the hosts of the entire cluster to perform write transactions. Another function of Patroni is to get configurations from etcd.
Another ADPG part is Storage that is a backup storage host. You can use any type of storage supported by the pgBackRest utility.
ADPG cluster management is performed via ADCM. The following actions are available in the ADCM UI:
-
Cluster actions that allow you to manage the entire cluster with all services.
-
Service actions that manage a single service.