|
| 1 | +--- |
| 2 | +title: "Architecture Overview" |
| 3 | +--- |
| 4 | + |
| 5 | +This guide explains how to configure Failover Manager and Pgpool best to leverage the benefits that they provide for Advanced Server. Using the reference architecture described in the Architecture section, you can learn how to achieve high availability by implementing an automatic failover mechanism (with Failover Manager) while scaling the system for larger workloads and an increased number of concurrent clients with read-intensive or mixed workloads to achieve horizontal scaling/read-scalability (with Pgpool). |
| 6 | + |
| 7 | +The architecture described in this document has been developed and tested for EFM 4.2, EDB pgPool 4.2, and Advanced Server 13. |
| 8 | + |
| 9 | +Documentation for Advanced Server and Failover Manager are available from EnterpriseDB at: |
| 10 | + |
| 11 | +<https://www.enterprisedb.com/docs/> |
| 12 | + |
| 13 | +Documentation for pgPool-II can be found at: |
| 14 | + |
| 15 | +<http://www.pgpool.net/docs/latest/en/html> |
| 16 | + |
| 17 | +## Failover Manager Overview |
| 18 | + |
| 19 | +Failover Manager is a high-availability module that monitors the health of a Postgres streaming replication cluster and verifies failures quickly. When a database failure occurs, Failover Manager can automatically promote a streaming replication Standby node into a writable Primary node to ensure continued performance and protect against data loss with minimal service interruption. |
| 20 | + |
| 21 | +**Basic EFM Architecture Terminology** |
| 22 | + |
| 23 | +A Failover Manager cluster is comprised of EFM processes that reside on the following hosts on a network: |
| 24 | + |
| 25 | +- A **Primary** node is the Primary database server that is servicing database clients. |
| 26 | +- One or more **Standby nodes** are streaming replication servers associated with the Primary node. |
| 27 | +- The **Witness node** confirms assertions of either the Primary or a Standby in a failover scenario. If, during a failure situation, the Primary finds itself in a partition with half or more of the nodes, it will stay Primary. As such, EFM supports running in a cluster with an even number of agents. |
| 28 | + |
| 29 | +## Pgpool-II Overview |
| 30 | + |
| 31 | +Pgpool-II (Pgpool) is an open-source application that provides connection pooling and load balancing for horizontal scalability of SELECT queries on multiple Standbys in EPAS and community Postgres clusters. For every backend, a backend_weight parameter can set the ratio of read traffic to be directed to the backend node. To prevent read traffic on the Primary node, the backend_weight parameter can be set to 0. In such cases, data modification language (DML) queries (i.e., INSERT, UPDATE, and DELETE) will still be sent to the Primary node, while read queries are load-balanced to the Standbys, providing scalability with mixed and read-intensive workloads. |
| 32 | + |
| 33 | +EnterpriseDB supports the following Pgpool functionality: |
| 34 | + |
| 35 | +- Load balancing |
| 36 | +- Connection pooling |
| 37 | +- High availability |
| 38 | +- Connection limits |
| 39 | + |
| 40 | +### PCP Overview |
| 41 | + |
| 42 | +Pgpool provides an interface called PCP for administrators that performs management operations such as retrieving the status of Pgpool or terminating Pgpool processes remotely. PCP commands are UNIX commands that manipulate Pgpool via the network. |
| 43 | + |
| 44 | +### Pgpool Watchdog |
| 45 | + |
| 46 | +`watchdog` is an optional sub process of Pgpool that provides a high availability feature. Features added by `watchdog` include: |
| 47 | + |
| 48 | +- Health checking of the pgpool service |
| 49 | +- Mutual monitoring of other watchdog processes |
| 50 | +- Changing leader/Standby state if certain faults are detected |
| 51 | +- Automatic virtual IP address assigning synchronous to server switching |
| 52 | +- Automatic registration of a server as a Standby during recovery |
| 53 | + |
| 54 | +More information about the `Pgpool watchdog` component can be found at: |
| 55 | + |
| 56 | +<http://www.pgpool.net/docs/latest/en/html/tutorial-watchdog.html> |
0 commit comments