What should you do?

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?
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.

Answer: B

Explanation:

https://severalnines.com/blog/how-achieve-postgresql-high-availability-pgbouncer/

https://cloud.google.com/blog/products/databases/using-haproxy-to-scale-read-only-workloads-on-cloud-sql-for-postgresql

This answer is correct because PgBouncer is a lightweight connection pooler for PostgreSQL that can help you distribute read requests between the Cloud SQL primary and read replica instances1. PgBouncer can also improve performance and scalability by reducing the overhead of creating new connections and reusing existing ones1. You can install PgBouncer on a Compute Engine instance and configure it to connect to the Cloud SQL instances using private IP addresses or the Cloud SQL Auth proxy2.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments