ADPG architecture

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.

architecture dark
architecture light

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.

NOTE
The High Availability mode will be presented in future releases.

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. ADCM provides the following actions with ADPG cluster:

  • Install contrib and postgis extension.

  • Reconfigure & Reload or Restart

  • Reinstall.

  • Run SQL.

  • Start and stop.

You can read more information about actions on the Working with actions page.

Found a mistake? Seleсt text and press Ctrl+Enter to report it