With Data Management for VMware Tanzu, you can configure High Availability (HA) clusters of MySQL databases or PostgreSQL databases. As a Provider Administrator, Organization Administrator, or Organization User, you can create Replica databases of a Primary Database to support redundancy. One or more Replica databases and a Primary database can form an HA cluster of MySQL databases. However, to form an HA cluster of PostgreSQL databases, you need one or more Replica databases and a Primary database along with a Monitor database.
If the Primary Database in an HA cluster stops its services, there is automatic promotion of one of the configured Replica databases as the Primary database. To support changing resource requirements of a business, you can promote a Replica database to a Primary database manually.
The following limitations are applicable when configuring an HA cluster of databases:
You can create HA clusters of MySQL databases or PostgreSQL databases in a sync mode to support immediate sync between the Primary database and Replica databases in an HA cluster. In an HA cluster of PostgreSQL databases, a PostgreSQL Monitor database is created automatically when you create the first Replica database of the cluster.
Perform the following steps to create an HA cluster of MySQL databases or PostgreSQL databases:
Click a database from the list of databases in the Databases view of the Databases pane.
The Details tab of the database appears.
Click the Cluster Settings tab and then click + CREATE in the Replication section of this tab.
In the Create Read Replica form, specify the following properties, and then click CREATE.
Property | Description |
---|---|
Replica VM Name | Enter the Replica VM name for the Replica database. |
Namespace | Select the Namespace for the Replica database. |
Cluster IP | Enter a static valid IP address that is in the subnet of the Primary databases's application network. You cannot provide the Cluster IP for the subsequent Replica databases you create for that cluster. This property is not available for PostgreSQL replica database VMs. |
Candidate Priority | Specify a value between 0 to 100. Higher the Candidate Priority, greater the chance of the Replica database to be auto promoted as the Primary database. |
A Read Replica database is created for a MySQL HA cluster and a Monitor database is created along with the first Read Replica database for a PostgreSQL HA cluster.
Create at least two replicas in an HA cluster for efficient functioning of automatic promotion in the cluster. Based on the number of Replica databases created in an HA cluster, the status of the cluster varies as follows:
You can use Data Management for VMware Tanzu to manually promote a Replica database that is in Online status to a Primary database.
div class="note">Note: To perform manual promotion in a High availability cluster of databases, all the database VMs in the cluster must have Online status. If any database VM in a cluster is powered off, either power it on or remove it from the cluster before you attempt manual promotion in the cluster.
Perform the following steps to manually promote a Replica database to a Primary database:
Click the Replica database in the Databases view of the Databases pane.
The Details tab of the Replica database appears.
Click the Cluster Settings tab.
In the Replication section of the Cluster Settings tab, click the three vertical dots in Actions column of the Replica database, and then select Promote Replica from the pop-up menu.
In the Promote Read Replica dialog box, click CONFIRM.
The Replica database is promoted as the Primary database, and the existing Primary database becomes a Replica database.
Data Management for VMware Tanzu enables you to delete databases in an HA cluster. For a MySQL HA cluster, you must delete the Replica databases before you delete the Primary database of the cluster. For a PostgreSQL HA cluster, you must delete the Replica databases, followed by the Primary database, and then the Monitor database of the cluster.
Perform the following steps to delete a database in an HA cluster:
Click the Replica database or Primary database in the Databases view of the Databases pane.
The Details tab of the Replica database or Primary database appears.
Click the Cluster Settings tab.
In the Replication section of the Cluster Settings tab, click the three vertical dots in Actions column of the Replica database, and then select Delete from the pop-up menu.
In the Delete Instance dialog box, click CONFIRM.