DEVELOPER BLOG

HOME > DEVELOPER BLOG > 【GCP handbook】Launch Cloud SQL in stand-by configuration - PrismScaler

【GCP handbook】Launch Cloud SQL in stand-by configuration - PrismScaler

1. Introduction

Hello! We are a writer team from Definer Inc. Cloud SQL is a fully managed database service provided by Google Cloud Platform (GCP). It allows users to deploy and manage relational databases such as MySQL, PostgreSQL, and SQL Server in the cloud without worrying about the underlying infrastructure. Cloud SQL in stand-by configuration is a specialized deployment setup that provides high availability and data redundancy for mission-critical database workloads. In this issue, you are wondering about the use of Google Cloud SQL stand-by configuration. Let's take a look at the actual screens and resources to explain in detail.

2. Purpose/Use Cases

The purpose of launching Cloud SQL in stand-by configuration is to ensure high availability and fault tolerance for databases running in the cloud. Standby configuration creates a secondary instance that replicates data from the primary instance in real-time, serving as a hot standby ready to take over if the primary instance becomes unavailable due to hardware failure, maintenance, or other issues. Key Objectives of Launching Cloud SQL in Standby Configuration:
  1. High Availability
  2. Data Redundancy
  3. Automatic Failover
  4. Reduced RTO (Recovery Time Objective)
  5. Read Replicas and Scaling
  6. Automated Backups

3. What is stand-by configuration?

What is a standby configuration of a database? Standby configuration is a method of preparing multiple identical databases and keeping some of them in standby status in case of failure. It is also known as active/passive configuration. A common configuration is to prepare two databases, one of which is always in operation (active) and the other in standby (standby) status, so that in case of failure, the standby takes over processing.   There are two types of standby systems   Hot standby system A method in which both the active system and the standby system are activated during normal operation to synchronize data. It is called hot standby because the power is on. One advantage is that if the active system goes down due to a failure, it can switch to the standby system without downtime. The disadvantage is that it is more expensive than cold standby.   Cold standby method A method in which only the active system is activated during normal times and the standby system is turned off. It is called cold standby because the power is turned off. The advantage is low cost. The disadvantage is that switching from the active system (active) to the standby system (standby) in the event of a failure requires a certain amount of downtime.

4. Launch Cloud SQL in stand-by configuration

Launching Cloud SQL in stand-by configuration involves setting up a highly available and fault-tolerant database instance using Google Cloud SQL. Let's explore the steps you took to start Cloud SQL in stand-by configuration:
  1. Access the Cloud SQL Screen and Create Instance:
    • The process begins by accessing the Google Cloud SQL console. Once you are in the console, you clicked on the "Create Instance" button to initiate the creation of a new database instance.
  2. Select the Database Engine (PostgreSQL):
    • Google Cloud SQL supports various database engines, such as MySQL, PostgreSQL, and SQL Server. In this case, you chose PostgreSQL as the database engine for your instance.
  3. Region and Zone Availability Selection:
    • One critical aspect of deploying Cloud SQL in stand-by configuration is selecting the appropriate region and zone settings. You chose the "Tokyo" region for your instance, indicating that it will be hosted in the Tokyo data center of Google Cloud. Additionally, you selected "Multiple Zones (High Availability)" as the deployment option.
    • When you choose "Multiple Zones (High Availability)," Google Cloud SQL automatically sets up a stand-by instance in a separate zone within the same region, ensuring data replication and redundancy.
  4. Instance Configuration:
    • During the instance creation process, you provided essential details like instance ID, password, and other configuration settings, depending on your requirements. These parameters help define the behavior and characteristics of your Cloud SQL instance.
  5. Create Instance:
    • After entering all the necessary information, you clicked on the "Create Instance" button to initiate the creation process. Google Cloud SQL then provisions the primary and stand-by instances, replicates the data from the primary instance to the stand-by instance, and configures automatic failover mechanisms.
  6. Status Confirmation:
    • Once the creation process is completed successfully, you checked the status of the Cloud SQL instance, and it was shown as "High Availability." This indicates that the instance is configured in a stand-by configuration, ready to provide high availability and fault tolerance.
With Cloud SQL in stand-by configuration, your database is equipped to handle potential failures and maintain seamless operations. In the event of a primary instance failure or maintenance, the stand-by instance takes over automatically, ensuring minimal downtime and continuous service availability.  

5. Cited/Referenced Articles

6. About the proprietary solution "PrismScaler"

・PrismScaler is a web service that enables the construction of multi-cloud infrastructures such as AWS, Azure, and GCP in just three steps, without requiring development and operation. ・PrismScaler is a web service that enables multi-cloud infrastructure construction such as AWS, Azure, GCP, etc. in just 3 steps without development and operation. ・The solution is designed for a wide range of usage scenarios such as cloud infrastructure construction/cloud migration, cloud maintenance and operation, and cost optimization, and can easily realize more than several hundred high-quality general-purpose cloud infrastructures by appropriately combining IaaS and PaaS.  

7. Contact us

This article provides useful introductory information free of charge. For consultation and inquiries, please contact "Definer Inc".

8. Regarding Definer

・Definer Inc. provides one-stop solutions from upstream to downstream of IT. ・We are committed to providing integrated support for advanced IT technologies such as AI and cloud IT infrastructure, from consulting to requirement definition/design development/implementation, and maintenance and operation. ・We are committed to providing integrated support for advanced IT technologies such as AI and cloud IT infrastructure, from consulting to requirement definition, design development, implementation, maintenance, and operation. ・PrismScaler is a high-quality, rapid, "auto-configuration," "auto-monitoring," "problem detection," and "configuration visualization" for multi-cloud/IT infrastructure such as AWS, Azure, and GCP.