Google Cloud Professional Cloud Database Engineer — Question 46
You are running a mission-critical application on a Cloud SQL for PostgreSQL database with a multi-zonal setup. The primary and read replica instances are in the same region but in different zones. You need to ensure that you split the application load between both instances. What should you do?
Answer options
- A. Use Cloud Load Balancing for load balancing between the Cloud SQL primary and read replica instances.
- B. Use PgBouncer to set up database connection pooling between the Cloud SQL primary and read replica instances.
- C. Use HTTP(S) Load Balancing for database connection pooling between the Cloud SQL primary and read replica instances.
- D. Use the Cloud SQL Auth proxy for database connection pooling between the Cloud SQL primary and read replica instances.
Correct answer: B
Explanation
The correct answer is B because PgBouncer is designed for connection pooling, which effectively manages the database connections between the primary and read replica. Option A is incorrect as Cloud Load Balancing is typically used for HTTP(S) traffic, not database connections. Option C also misapplies HTTP(S) Load Balancing to database tasks, and option D involves the Cloud SQL Auth proxy, which is not primarily for load balancing.