exam questions

Exam Professional Cloud Database Engineer All Questions

View all questions & answers for the Professional Cloud Database Engineer exam

Exam Professional Cloud Database Engineer topic 1 question 24 discussion

Actual exam question from Google's Professional Cloud Database Engineer
Question #: 24
Topic #: 1
[All Professional Cloud Database Engineer Questions]

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.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
dynamic_dba
Highly Voted 1 year, 7 months ago
A. Eliminate D because Cloud SQL Auth Proxy by itself does not provide connection pooling. There’s nothing in the question about needing to load balance HTTP traffic specifically, so ignore C. B is eliminated on the basis Pgbouncer does not have multi-host configuration, failover, or detection and the question specifically says “mission critical”. That leaves A which makes sense since Google Cloud Load Balancer is a regional service and the question specifically mentions a single region.
upvoted 12 times
bigdawg70
8 months, 3 weeks ago
This doesn't seem correct: https://www.googlecloudcommunity.com/gc/Databases/Load-Balancer-for-Postgres/m-p/647563#:~:text=To%20clarify%2C%20Google%20Cloud%20Platform%27s,in%20Cloud%20SQL%20for%20PostgreSQL.
upvoted 2 times
...
...
Steve8512
Most Recent 4 weeks, 1 day ago
Selected Answer: A
https://www.pgbouncer.org/faq.html says pgbouncer cannot handle multi-host configs, so B is out. C is out because there's nothing involving HTTP, D is out because the auth proxy does not provide connection pooling.
upvoted 1 times
...
studymoreoften
5 months ago
Selected Answer: B
Cloud SQL doesn't provide load balancing between replicas. You can choose to implement load balancing for your Cloud SQL instance. You can also use connection pooling to distribute queries across replicas with your load balancing setup for better performance. https://cloud.google.com/sql/docs/postgres/replication#:~:text=Cloud%20SQL%20doesn't%20provide,balancing%20setup%20for%20better%20performance.&text=You%20can't%20configure%20maintenance%20windows%20on%20a%20read%20replica.
upvoted 2 times
...
Tempingtron
7 months, 1 week ago
Should be A. Pgbouncer needs a load balancer or DNS roundrobin in front of it to operate. It can't route the traffic to multiple hosts without it. C, D are wrong.
upvoted 1 times
...
Jason_Cloud_at
8 months, 2 weeks ago
Selected Answer: B
PgBouncer is especially used to manage connection pools to the PostgreSQL database.
upvoted 1 times
...
PKookNN
9 months, 1 week ago
Selected Answer: B
Cloud Load Balancing can't be used to LB cloud SQL (it's mostly for VM), so you can choose to use HAProxy or PGBouncer as Google recommend connection pooling (https://cloud.google.com/sql/docs/postgres/replication#rr-info)
upvoted 3 times
...
whoosh
10 months, 2 weeks ago
Selected Answer: B
By using PgBouncer, you can configure it to distribute the application load between the Cloud SQL primary and read replica instances. PgBouncer will handle connection pooling and load balancing, ensuring efficient utilization of resources and improving performance for your mission-critical application.
upvoted 1 times
...
AngieSoccerBall49
11 months, 1 week ago
It should be (A). Specifically, you'd (most likely) use a TCP Load balancer https://www.pgbouncer.org/faq.html#how-to-load-balance-queries-between-several-servers "PgBouncer does not have an internal multi-host configuration. It is possible via external tools." you need to frontend stateless pgBouncer instances with a TCP load balancer.
upvoted 2 times
...
Jay_Krish
11 months, 3 weeks ago
Selected Answer: B
PgBouncer (Option B): PgBouncer is a lightweight connection pooler for PostgreSQL that can efficiently manage and distribute database connections between the primary and read replica instances. It helps in load balancing the application traffic between the instances.
upvoted 1 times
...
KennyHuang
1 year, 5 months ago
Selected Answer: B
By using PgBouncer, you can configure it to distribute the application load between the Cloud SQL primary and read replica instances. PgBouncer will handle connection pooling and load balancing, ensuring efficient utilization of resources and improving performance for your mission-critical application.
upvoted 2 times
...
BenMS
1 year, 7 months ago
Selected Answer: A
As others have said, A is the only option which could achieve the desired effect, providing TCP load balancing across multiple servers.
upvoted 3 times
...
Nirca
1 year, 8 months ago
Selected Answer: A
A, I think is better. HAProxy is not same as Cloud Load balancing.
upvoted 2 times
...
PrtkKA
1 year, 8 months ago
Selected Answer: B
Connection pooling !
upvoted 2 times
...
Teraflow
1 year, 8 months ago
Selected Answer: A
https://cloud.google.com/blog/products/databases/using-haproxy-to-scale-read-only-workloads-on-cloud-sql-for-postgresql
upvoted 4 times
PrtkKA
1 year, 8 months ago
HAProxy is not same as Cloud Load balancing.
upvoted 1 times
felipeschossler
1 year, 6 months ago
I think in the same way, it's not the same thing. However pgBouncer is not recommended for Load Balancing, just for connection pooling 🙏
upvoted 1 times
...
...
...
JayGeotab
1 year, 9 months ago
A is the best answer, PgBouncer does not have multi-host
upvoted 2 times
...
sp57
1 year, 10 months ago
Per GPC72's referenced link, you need PgBouncer only does connection pooling, need Load balancing coupled. Since Load Balancing not referenced in B., is not A the best answer? PgBouncer is a popular connection pooler designed for PostgreSQL, but it is not enough to achieve PostgreSQL High Availability by itself as it doesn’t have multi-host configuration, failover, or detection. Using a Load Balancer is a way to have High Availability in your database topology. It could be useful for redirecting traffic to healthy database nodes, distribute the
upvoted 3 times
sp57
1 year, 10 months ago
And C & D are wrong because they don't pool connections. ref for refuting C...The load balancer doesn’t store database credentials (except for the health check user), and it doesn’t pool or decrypt/re-encrypt database connections. A single client connection in HAProxy translates to a single client connection in Postgres. This approach is suitable when the workload is constrained by the database’s processing capacity, and not by the number of client connections. You may require an additional connection pooling component (e.g. PgBouncer) if the number of clients becomes an issue, for example, when the database instances exhibit performance or stability issues due to the sheer number of simultaneous database connections.
upvoted 1 times
sp57
1 year, 10 months ago
https://cloud.google.com/blog/products/databases/using-haproxy-to-scale-read-only-workloads-on-cloud-sql-for-postgresql
upvoted 1 times
...
...
...
pk349
1 year, 10 months ago
PgBouncer is a light-weight connection pool manager for Greenplum and PostgreSQL. PgBouncer maintains a pool for connections for each database and user combination. PgBouncer either creates a new database connection for a client or reuses an existing connection for the same user and database.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago