Google Professional Cloud Database Engineer Question 20
Single answerGoogle Cloud PlatformYour team is deploying a new transactional database on Google Cloud using Cloud SQL for PostgreSQL. The application requires high IOPS for real-time transaction processing and has unpredictable workloads, which might spike during business hours. The database size is expected to grow significantly over the next year. How should you configure the database compute and storage to meet performance needs and future scalability requirements?
- A
Use a machine type with high CPU and memory, and configure SSD storage with autoscaling enabled.
- B
Choose a smaller machine type with standard HDD storage to minimize costs, and scale it manually as needed.
- C
Configure a custom machine type with minimal CPU and memory, and set the storage type to balanced persistent disks.
- D
Use a preemptible VM with standard HDD storage and configure a separate caching layer for performance.
Show answer and explanation
Correct answer: A
Explanation
For a transactional database with high IOPS and unpredictable workloads, using a machine type with high CPU and memory, combined with SSD storage and autoscaling, provides the necessary performance and scalability. SSDs deliver low latency and high throughput, while autoscaling ensures the database can handle workload spikes without manual intervention. This configuration also supports future growth as the database size increases.
- A. Correct.
This option ensures high performance for transactional workloads by using SSD storage for high IOPS and autoscaling for unpredictable workload spikes. The high CPU and memory configuration also supports real-time transaction processing effectively.
- B. Incorrect.
While this option reduces costs, standard HDD storage does not provide the necessary IOPS for real-time transactional workloads, and manual scaling introduces delays and risks during workload spikes.
- C. Incorrect.
Minimal CPU and memory do not meet the performance requirements for real-time processing, and balanced persistent disks are not optimal for high IOPS needs.
- D. Incorrect.
Preemptible VMs are not suitable for production databases due to their ephemeral nature, and standard HDD storage cannot meet the IOPS required for transactional workloads even with a caching layer.