> Source: https://docs.cyberelements.io/bastion/4.7/hr/Installation/TypicalPlatforms/ClusterHighAvailability/

# High-availability Cluster platform

This platform doubles the Mediation Controller: two servers, a `MASTER` and a `SLAVE`, share virtual IP addresses. It usually has two Edge Gateways that also hold the HTML5 Gateway role, each connected to both Mediation Controllers. The databases are hosted on an external database server (nominal case in Cluster).

## Composition

| Component | Number | Location |
|---|---|---|
| **Mediation Controller** | 2 (`MASTER` and `SLAVE`) | DMZ |
| **Edge Gateway** (with the HTML5 Gateway) | 2 | LAN, as close as possible to the managed resources |
| **Database server** | 1, or a PostgreSQL cluster | Reachable from both Mediation Controllers |

## Installation steps

| Step | Page | What to follow |
|---|---|---|
| 1 | [Prerequisites of the Mediation Controller](https://docs.cyberelements.io/bastion/4.7/hr/Installation/MediationController/Prerequisites/) and [of the Edge Gateways](https://docs.cyberelements.io/bastion/4.7/hr/Installation/EdgeGateway/Prerequisites/) | **Cluster platform** sections and **Cluster** tabs: virtual IP addresses, network flows, [database](https://docs.cyberelements.io/bastion/4.7/hr/Installation/MediationController/Prerequisites/#database-cluster) (the `default` database is created before connecting the Mediation Controllers), licences and certificates, including the interserver certificate. |
| 2 | [PostgreSQL cluster](https://docs.cyberelements.io/bastion/4.7/hr/Installation/Dependencies/PostgreSQLCluster/PostgreSQLClusterIntroduction/) | If the database is hosted on a PostgreSQL cluster: three nodes and a virtual IP address, deployed from a virtual appliance. |
| 3 | [Cluster Mediation Controllers, from scratch](https://docs.cyberelements.io/bastion/4.7/hr/Installation/Cluster/FromScratch/InstallMediationController/) or [by virtual appliances](https://docs.cyberelements.io/bastion/4.7/hr/Installation/Cluster/FromAppliances/InstallMediationController/) | Installation of the `MASTER` and the `SLAVE`, pairing, interserver link, connection to the database. |
| 4 | [Cluster Edge Gateways, from scratch](https://docs.cyberelements.io/bastion/4.7/hr/Installation/Cluster/FromScratch/InstallEdgeGateway/) or [by virtual appliance](https://docs.cyberelements.io/bastion/4.7/hr/Installation/Cluster/FromAppliances/InstallEdgeGateway/) | For each Edge Gateway: Edge Gateway components and [HTML5 Gateway components](https://docs.cyberelements.io/bastion/4.7/hr/Installation/Cluster/FromScratch/InstallEdgeGateway/#installation-of-html5-gateway-components), instances connected to the `MASTER` and to the `SLAVE`, configuration of the HTML5 Gateway on both Mediation Controllers. |
| 5 | [CyberElements Bastion client](https://docs.cyberelements.io/bastion/4.7/hr/Installation/ClientAndAgent/ClientInstallation/) and agents | As for a [simple Standalone platform](https://docs.cyberelements.io/bastion/4.7/hr/Installation/TypicalPlatforms/StandaloneSimple/#installation-steps). |

> **Recommendation**
>
> The [security hardening guide](https://docs.cyberelements.io/bastion/4.7/hr/Security/SecurityHardening/) applies to each server; it also details the hardening of an external database: see [R79](https://docs.cyberelements.io/bastion/4.7/hr/Security/SessionRecordings/#r79).
