hands-on lab

Improve Cloud SQL Infrastructure Using High Availability

Intermediate
1h
813
3.8/5
This lab is currently under maintenance. You can start the lab, but some instructions and screenshots may be inaccurate. We are actively working to resolve this issue and we apologize for any inconvenience.

The lab may fail to deploy due to a Google Cloud internal error. We are aware of the issue and working to fix the issue.

Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

When you deploy a database solution, you should always keep in mind data availability. That's because a disaster event, such as a fire, could destroy the database you have deployed. For this reason, Google Cloud SQL offers high availability for the instances you create. The high availability configuration allows data redundancy in multiple zones inside the region you choose while deploying your DB instance. If you decide to enable high availability, Cloud SQL will set up two DB instances in two different locations with the same region. There will be a principal instance (primary instance or master) that will be mainly used for operations while no issues or problems are detected, and there will be also a second instance (standby instance) that will be only used whether a disaster event happens where the primary instance is deployed. Disk attached to the standby instance is synchronized with the disk attached to the primary instance by using the synchronous replication. This way, if a disaster happens in the location where the primary instance is deployed, data are available in the second zone and the traffic will be routed to the standby instance with minimum downtime. In this lab, you will set up high availability for a Cloud SQL instance, and you will manually simulate a failover to check whether the traffic is automatically routed to the healthy standby instance.

Learning Objectives

Upon completion of this lab you will be able to:

  • Understand the high availability and failover concepts of Cloud SQL
  • Set up a high availability instance on Cloud SQL
  • Perform a manual failover on a Cloud SQL instance

Intended Audience

This lab is intended for:

  • Google Cloud Network Engineer (NE) certification candidates
  • Network engineers who want to apply data redundancy for their databases
  • Individuals that are interested in understanding how to improve Cloud SQL infrastructure

Prerequisites

Basic knowledge of Cloud SQL is preferred, but it's not required. You can follow the basic Cloud SQL lab following this link.

Updates

June 28th, 2023 - Resolved deployment issue

February 14th, 2021 - Clarified the amount of time it takes for the database instance to fully create after starting the lab

Environment before
Environment after
About the author
Avatar
Stefano Cascavilla
Junior Data Engineer
Students
39,686
Labs
106
Courses
2
Learning paths
10

Stefano studies Computer Science and is passionate about technology. He loves working with Cloud services and learning all the best practices for them. Google Cloud Platform and Amazon Web Services are the cloud providers he prefers. He is a Google Cloud Certified Associate Cloud Engineer. Node.js is the programming language he always uses to code. When he's not involved in studying or working, Stefano loves riding his motorbike and exploring new places.

Covered topics
Lab steps
Signing In to the Google Cloud Console
Reviewing the Cloud SQL Instance
Enabling High Availability for the Cloud SQL Instance
Performing a Failover to Test the High Availability