Google Professional Cloud Database Engineer Question 172
Single answerGoogle Cloud PlatformYou are managing a Cloud SQL instance for your e-commerce platform. During seasonal sales events, you expect a significant increase in database traffic. The traffic patterns are predictable, and you want to ensure the database can handle the load without manual intervention while minimizing costs the rest of the time. How should you configure your Cloud SQL instance?
- A
Enable Cloud SQL instance auto-scaling and set the minimum and maximum instance sizes.
- B
Manually resize the Cloud SQL instance to a larger size before the sales event.
- C
Configure a scheduled scaling policy to adjust instance size based on predicted traffic patterns.
- D
Use read replicas to handle additional read traffic during the sales event.
Show answer and explanation
Correct answer: C
Explanation
Since the traffic patterns are predictable, configuring a scheduled scaling policy is the best solution. It allows you to manage costs effectively by scaling up resources during peak times and scaling down after the event ends. Other options either require manual intervention or do not fully address the workload scaling requirements.
- A. Incorrect.
While enabling auto-scaling can help in dynamic scaling, Cloud SQL does not natively support automatic horizontal scaling for instance sizes. This option is incorrect.
- B. Incorrect.
Manually resizing the instance requires human intervention and may not handle unexpected surges efficiently. This option is not optimal for the scenario.
- C. Correct.
A scheduled scaling policy can adjust the instance size based on predictable traffic patterns, ensuring the database is scaled appropriately during the sales event and scaled down afterward to minimize costs. This is the correct approach.
- D. Incorrect.
Using read replicas is useful for scaling read operations, but it does not help with overall instance scaling or write-heavy workloads. This option is insufficient for the described scenario.