Google Professional Cloud Developer Question 286
Select 3Google Cloud PlatformYou are developing a high-traffic web application hosted on Google Kubernetes Engine (GKE). The application uses a Cloud SQL database as the backend. During performance testing, you notice high latency during peak traffic. Which of the following actions should you take to optimize application performance?
- A
Enable connection pooling for the Cloud SQL database.
- B
Scale the GKE deployment horizontally by increasing the number of pods.
- C
Use the default database connection settings provided by Cloud SQL.
- D
Implement caching for frequently accessed data using Memorystore.
- E
Switch from Cloud SQL to a NoSQL database like Firestore.
Show answer and explanation
Correct answers: A, B, D
Explanation
Performance testing helps identify bottlenecks in your application. In this scenario, enabling connection pooling optimizes database connections, horizontal scaling of GKE ensures the application can handle increased traffic, and caching with Memorystore reduces database load for frequently accessed data. These actions together address the high latency issue observed during peak traffic.
- A. Correct.
Enabling connection pooling helps manage database connections efficiently, reducing latency and preventing connection exhaustion during peak traffic.
- B. Correct.
Scaling the GKE deployment horizontally ensures more pods can handle the increased traffic, reducing system bottlenecks.
- C. Incorrect.
Using default database connection settings may not be optimal for high-traffic scenarios and can lead to performance issues.
- D. Correct.
Implementing caching with a service like Memorystore reduces the load on the database by serving frequently accessed data from memory, improving latency.
- E. Incorrect.
Switching to a NoSQL database like Firestore might not be necessary unless your application's data model requires it. It's not a direct solution to the observed issue.