The AlloyDB enable-high-availability recommender proactively generates recommendations that help you bring your important instances within a service-level agreement (SLA) by providing data redundancy. This might be helpful during a zonal outage or when an instance runs out of memory.
This page describes the AlloyDB enable-high-availability recommender, how this recommender works, and how to use it.
How it works
The AlloyDB enable-high-availability recommender analyzes the instance metadata. If the instance doesn't have high availability enabled, then AlloyDB recommends that you enable high availability for 99.99% (*) availability.
(*) See AlloyDB Service Level Agreement (SLA) for more information.
Pricing
The AlloyDB enable-high-availability recommender is available free of cost to all Google Cloud customers. For more information, see Recommender pricing .
Before you begin
Before you can view recommendations and insights, you must do the following:
-
Ensure that you enable the Recommender API .
-
To get the permissions to view and work with insights and recommendations, ensure that you have the required Identity and Access Management (IAM) roles .
Tasks Roles View recommendations One of these roles: recommender.alloydbVieweroralloydb.viewer.Apply recommendations One of these roles: recommender.alloydbAdminoralloydb.admin.
See Grant access to other users for more information.
List enable-high-availability recommendations
You can list the enable-high-availability recommendations
using the Google Cloud console, gcloud CLI
, or the Recommender API.
Console
To list enable-high-availability recommendations by using the Google Cloud console, follow these steps:
-
In the Google Cloud console, go to the Clusterspage.
For more information, see Getting started with Recommendation Hub .
-
In the Availability configurationcard, click Not failover protected. A list of clusters to which the Not failover protectedrecommendation applies is displayed.
gcloud
To list enable-high-availability recommendations using gcloud CLI, run the gcloud recommender recommendations list
command as follows:
gcloud recommender recommendations list \ --project= PROJECT_ID \ --location= LOCATION \ --recommender=google.alloydb.cluster.ReliabilityRecommender \ --filter=recommenderSubtype=ENABLE_INSTANCE_HIGH_AVAILABILITY
Replace the following:
-
PROJECT_ID: your project ID. -
LOCATION: a region where your instances are located, such asus-central1.
API
To list enable-high-availability recommendations using the Recommendations API
, call the recommendations.list
method as follows:
GET https://recommender.googleapis.com/v1/projects/ PROJECT_ID /locations/ LOCATION /recommenders/google.alloydb.cluster.ReliabilityRecommender/recommendations?filter=recommenderSubtype=ENABLE_INSTANCE_HIGH_AVAILABILITY
Replace the following:
-
PROJECT_ID: your project ID. -
LOCATION: a region where your instances are located, such asus-central1.
View insights and detailed recommendations
You can view insights and detailed recommendations about instances
that require enabling high availability using the Google Cloud console, gcloud CLI
, or the Recommender API.
To view insights and detailed recommendations, follow these steps:
Console
On the Clusterspage, click the Not failover protectedrecommendation for an instance in the Issuescolumn. The recommendation panel appears, which contains insights and detailed recommendations.
gcloud
Run the gcloud recommender insights list
command as follows:
gcloud recommender insights list \ --project= PROJECT_ID \ --location= LOCATION \ --insight-type=google.alloydb.cluster.ReliabilityInsight \ --filter=insightSubtype=INSTANCE_HIGH_AVAILABILITY_NOT_ENABLED
Replace the following:
-
PROJECT_ID: Your project ID. -
LOCATION: A region where your instances are located, such asus-central1.
API
Call the insights.list
method as follows:
GET https://recommender.googleapis.com/v1/projects/ PROJECT_ID /locations/ LOCATION /insightTypes/google.alloydb.cluster.ReliabilityInsight/insights?filter=insightSubtype=INSTANCE_HIGH_AVAILABILITY_NOT_ENABLED
Replace the following:
- PROJECT_ID : Your project ID.
- LOCATION
: A region where your instances are located, such as
us-central1.
Apply the recommendation
Evaluate the recommendation carefully and do any of the following:
Console
To implement the recommendation, do the following:
- Click Editon your cluster.
- In the Edit primary instancepane, under Zonal availability, select Multiple zones (Highly available).
- Click Update instance.
gcloud CLI
To implement the recommendation, follow the instructions in Upgrade a basic instance to an HA instance .

