CLOUD-DATABASE-ENGINEER practice question 6 of 25

You host an application in Google Cloud. The application is located in a single region and uses Cloud SQL for transactional dat a. Most of your users are located in the same time zone and expect the application to be available 7 days a week, from 6 AM to 10 PM. You want to ensure regular maintenance updates to your Cloud SQL instance without creating downtime for your users. What should you do?

Full set: 141 questions
Answer options
A: Configure a maintenance window during a period when no users will be on the system. Control the order of update by setting non-production instances to earlier and production instances to later. Correct answer
B: Create your database with one primary node and one read replica in the region.
C: Enable maintenance notifications for users, and reschedule maintenance activities to a specific time after notifications have been sent.
D: Configure your Cloud SQL instance with high availability enabled.
Correct Answer:
A. Configure a maintenance window during a period when no users will be on the system. Control the order of update by setting non-production instances to earlier and production instances to later.
Explanation

The most effective way to perform Cloud SQL maintenance without impacting users is to schedule it during a time of guaranteed inactivity. The scenario specifies that the application is used from 6 AM to 10 PM, leaving a clear eight-hour window (10 PM to 6 AM) for maintenance. Cloud SQL's maintenance window feature allows you to specify a preferred day and hour for maintenance activities. By configuring the window during this off-peak period, any brief downtime will not affect users. Additionally, controlling the update order by updating non-production instances first is a best practice for validating updates before they are applied to the production environment.

Why Incorrect

B. Read replicas are used for scaling read-heavy workloads and do not provide high availability or reduce maintenance downtime for the primary instance's write operations.
C. While notifications and rescheduling are useful features, they are reactive. A pre-configured maintenance window is a proactive and more reliable strategy to consistently avoid user impact.
D. High availability (HA) significantly minimizes downtime to a brief failover period (typically under 60 seconds), but it does not eliminate it. Scheduling maintenance when no users are active completely avoids any user-facing impact.

References

1. Google Cloud Documentation - About maintenance on Cloud SQL instances: This document details the maintenance window feature. It states, "By configuring a maintenance window, you can control when downtime for maintenance occurs... We recommend that you set maintenance windows for times when your instance has the lowest traffic." It also describes the "Maintenance order" setting, which supports the second part of the correct answer.

Source: https://cloud.google.com/sql/docs/mysql/maintenance, Sections: "Set a preferred maintenance window" and "Set maintenance order".

2. Google Cloud Documentation - High availability for Cloud SQL: This source explains how HA works during maintenance. It clarifies that HA minimizes downtime, not eliminates it: "During a maintenance window, Cloud SQL first applies the maintenance update to the standby instance. If the update is successful, it initiates a failover... This process minimizes the downtime for your application." This confirms that a brief interruption still occurs.

Source: https://cloud.google.com/sql/docs/mysql/high-availability, Section: "Maintenance".

3. Google Cloud Documentation - Replication in Cloud SQL: This document explains the purpose of read replicas, confirming they are for offloading read workloads and do not serve as a failover target for the primary instance during maintenance.

Source: https://cloud.google.com/sql/docs/mysql/replication/overview, Section: "Read replica use cases".

Scroll to Top