Professional Cloud ArchitectAnalyze and optimize technical and business processesHard

A global SaaS provider is experiencing intermittent performance degradation for its API services, particularly during peak usage hours. Their current architecture uses Google Kubernetes Engine (GKE) for microservices, Cloud Load Balancing, and Cloud SQL for their primary database. After initial investigation, they suspect that inefficient database queries and connection pooling issues are contributing factors, rather than just raw compute capacity. Which two actions should they prioritize to diagnose and optimize the database performance?

  1. AImplement a global external HTTP(S) Load Balancer for the GKE services and configure advanced traffic management policies.
  2. BMigrate Cloud SQL to Cloud Spanner to leverage its global scalability and strong consistency immediately.
  3. CEnable Cloud Monitoring for GKE and set up alerts for high CPU utilization on nodes, then increase node pool size.
  4. DUtilize Cloud Trace to analyze end-to-end request latency, focusing on database call spans, and enable Cloud SQL Insights for query plan analysis.
Show answer & explanation

Correct answer: D. Utilize Cloud Trace to analyze end-to-end request latency, focusing on database call spans, and enable Cloud SQL Insights for query plan analysis.

Cloud Trace provides detailed latency breakdowns for requests across services, including database calls, helping pinpoint where time is spent. Cloud SQL Insights (for PostgreSQL and MySQL) provides query plan explanations, slow query logs, and insights into database performance, directly addressing the suspected issues of inefficient queries and connection pooling by offering deep visibility into database operations.

Why the other options are wrong

  • A. This focuses on load balancing the frontend services, not diagnosing or optimizing backend database query performance or connection issues.
  • B. Migrating to Cloud Spanner is a significant architectural change, not a diagnostic or immediate optimization step. It might also be overkill or inappropriate if the underlying issue is poor query design rather than inherent Cloud SQL limitations.
  • C. While helpful for overall GKE health, this focuses on compute capacity, not the specific database query and connection pooling issues identified as the likely cause.

Database Performance Diagnostics

Tools and techniques used to identify and resolve performance bottlenecks in database systems, often involving query analysis, connection management, and resource monitoring.

  • Inefficient queries are a common cause of performance issues.
  • Connection pooling helps manage database connections efficiently.
  • Monitoring query execution plans and resource utilization is crucial.
  • Cloud Trace and Cloud SQL Insights provide deep visibility into database performance on Google Cloud.

Memory trick: Trace the path, Insight the query, Fix the speed!

More Analyze and optimize technical and business processes questions