Installing Postgres Enterprise Manager in HA Patterns
=====================================================

Before deploying High Availability PEM, please familiarize yourself with
the high-level guidance in `High Availability Patterns for PEM Deployment <https://www.enterprisedb.com/docs/pem/latest/considerations/ha_pem.mdx>`_  .

For PEM 10.4 and later, the recommended process for deploying HA PEM is
as follows:

- Deploy an HA Postgres cluster with a supported cluster manager.

- Prepare the cluster for PEM installation by adding the required SSL
  files and HBA rules.

- Install and configure PEM on the primary, then on the standbys.

- If using separate web servers, deploy PEM on the web servers.

In versions of PEM prior to 10.4, the process was more complex due to
limitations in the ``configure-pem-server.sh`` script. It is therefore
highly recommended that new deployments of HA PEM are performed with the
latest version. However, the changes to ``configure-pem-server.sh`` are
backward-compatible so previous processes will still run without
adjustment.

The following pages provide detailed instructions for some example HA
PEM architectures following the steps above. They are not intended to be
an exhaustive guide to all possible patterns.

- :ref:`Deploying HA PEM with colocated web application and backend using EDB Failover Manager and Virtual IPs <HA PEM using the C1 architecture with EFM and a Virtual IP>` 

- :ref:`Deploying HA PEM with separate web application and backend using EDB Failover Manager and Virtual IPs <HA PEM using the S1 architecture with EFM and a Virtual IP>` 

- :ref:`Deploying HA PEM with separate web application and backend using Patroni and multi-host strings <HA PEM using the SM architecture with Patroni>` 

In addition, the following guides to specific elements of HA PEM
deployment are provided:

- :ref:`Storing user settings in the backend, accessible to all web application instances <Storing user settings in the backend, accessible to all web application instances>` 

.. toctree::
  :maxdepth: 3

  INSTALLING_AND_UPGRADING--installing--ha--setup_ha_using_efm
  INSTALLING_AND_UPGRADING--installing--ha--efm_s1
  INSTALLING_AND_UPGRADING--installing--ha--user_settings
  INSTALLING_AND_UPGRADING--installing--ha--patroni_sm
  INSTALLING_AND_UPGRADING--installing--ha--ssl
