Google Professional Cloud Database Engineer Question 179
Select 2Google Cloud PlatformYour organization is running a Cloud SQL database for its e-commerce platform. The database is experiencing varying workloads throughout the day, with a significant drop in activity during nighttime hours. As a Professional Cloud Database Engineer, how can you optimize the cost of running this database while ensuring performance remains unaffected during peak hours?
- A
Enable automatic storage increases to handle growth without manual intervention.
- B
Use Compute Engine instead of Cloud SQL for better cost control.
- C
Implement an instance schedule to reduce the database instance size during low-traffic hours.
- D
Enable Cloud SQL read replicas for improved performance during peak times.
- E
Move the database to a serverless architecture like Firestore for dynamic scaling.
Show answer and explanation
Correct answers: A, C
Explanation
To optimize the cost of running a Cloud SQL database with varying workloads, you should focus on strategies that align resource usage with demand. Enabling automatic storage increases ensures you pay only for the storage you use, avoiding unnecessary over-provisioning. Additionally, implementing an instance schedule allows you to downsize the database instance during low-traffic hours, saving costs without compromising performance during peak hours.
- A. Correct.
Enabling automatic storage increases helps avoid over-provisioning storage capacity, which reduces unnecessary costs while ensuring the database can grow as needed.
- B. Incorrect.
Moving to Compute Engine is not a cost-optimization strategy for this scenario as it would require manual scaling and management, potentially leading to higher costs and complexity.
- C. Correct.
Implementing an instance schedule allows you to reduce the database instance size during low-traffic hours, saving costs while maintaining peak performance when needed.
- D. Incorrect.
Enabling read replicas improves performance during peak times but does not directly address cost optimization, which is the focus of this scenario.
- E. Incorrect.
Switching to Firestore is not a viable solution for this scenario as it requires significant architectural changes and may not support the transactional requirements of an e-commerce database.