Improve instance reliability by enabling high availability

The Cloud SQL enable-high-availability recommender proactively generates recommendations that help you bring your important instances within 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 Cloud SQL enable-high-availability recommender, how this recommender works, and how to use it.

How it works

The Cloud SQL enable-high-availability recommender analyzes the instance metadata. If the instance is configured similar to instances that support important workloads but doesn't have high availability enabled, then Cloud SQL recommends that you enable high availability for 99.95% availability SLA, or migrate to Cloud SQL Enterprise Plus edition with high availability for 99.99% availability SLA.

Pricing

The Cloud SQL 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, do the following:

List enable-high-availability recommendations

Console

To list enable-high-availability recommendations by using the Google Cloud console, follow these steps:

  1. Go to the Recommendation Hub.

    Go to the Recommendation Hub

    For more information, see Getting started with Recommendation Hub.

  2. In the Improve reliability on Cloud SQL instances card, click View all.

gcloud

To list enable-high-availability recommendations by using gcloud CLI, run the gcloud recommender recommendations list command as follows:

gcloud recommender recommendations list \
--project=PROJECT_ID \
--location=LOCATION \
--recommender=google.cloudsql.instance.ReliabilityRecommender \
--filter=recommenderSubtype=ENABLE_HIGH_AVAILABILITY

Replace the following:

  • PROJECT_ID: Your project ID.
  • LOCATION: A region where your instances are located, such as us-central1.

API

To list enable-high-availability recommendations by using the Recommendations API, call the recommendations.list method as follows:

GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/recommenders/google.cloudsql.instance.ReliabilityRecommender/recommendations

Replace the following:

  • PROJECT_ID: Your project ID.
  • LOCATION: A region where your instances are located, such as us-central1.

View insights and detailed recommendations

Console

To view insights and detailed recommendations about instances that are configured similar to instances that support important workloads but don't have high availability enabled, click the recommendation link in the list of instances.

gcloud

To view insights and detailed recommendations about instances that are configured similar to instances that support important workloads but don't have high availability enabled, run the gcloud recommender insights list command as follows:

gcloud recommender insights list \
--project=PROJECT_ID \
--location=LOCATION \
--insight-type=google.cloudsql.instance.ReliabilityInsight \
--filter=insightSubtype=CRITICAL_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.

API

To view insights and detailed recommendations about instances that are configured similar to instances that support important workloads but don't have high availability enabled by using the Recommendations API, call the insights.list method as follows:

GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/insightTypes/google.cloudsql.instance.ReliabilityInsight/insights

Replace the following:

  • PROJECT_ID: Your project ID.
  • LOCATION: A region where your instances are located, such as us-central1.

The following table lists the insight and recommendation that the Cloud SQL enable-high-availability recommender generates. The subtypes are visible in the gcloud CLI and API results.

Insight Recommendation
This instance isn't highly available, even though it's configured similarly to instances that support important workloads. Single zone instances are more susceptible to downtime.
Subtype: CRITICAL_INSTANCE_HIGH_AVAILABILITY_NOT_ENABLED
Enable high availability for 99.95% availability SLA, or migrate to Cloud SQL Enterprise Plus edition with high availability for even higher 99.99% availability SLA. Enabling high availability will make your instance multi-zonal, which replicates your data within a region to protect against zonal outages, limit downtime and improve recovery time.
Subtype: ENABLE_HIGH_AVAILABILITY

Apply recommendation

Evaluate the recommendation carefully and do any of the following:

  • To examine the instance, click View instance and do any of the following:

    • Configure high availability on your instance. For more information, see Enable and disable high availability.

    • Migrate to the Cloud SQL Enterprise Plus edition. For more information, see Introduction to Cloud SQL editions.

  • To dismiss the recommendation, click Dismiss.

  • To close the panel without applying or dismissing the recommendation, click Cancel.

What's next