Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Database Engineer practice bank has an additional 769 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
An e-commerce company runs a microservices architecture on Cloud Run that connects to a Cloud SQL for PostgreSQL Enterprise Plus instance. During flash sales, hundreds of serverless containers scale up simultaneously, repeatedly opening and closing short-lived database connections. Monitoring during these traffic spikes reveals:
To resolve these issues, the database architect recommends implementing a session and connection pooler such as Managed Connection Pooling.
Which justification best explains how connection pooling resolves both the latency and resource utilization problems?
A connection pooler is an intermediary proxy layer that maintains a reusable cache of persistent, pre-established backend database connections. Rather than having serverless containers or microservices connect directly to the database engine, clients connect to the pooler, which dynamically assigns and multiplexes requests across existing server connections.
max_client_connections) onto a smaller, bounded pool of persistent backend connections (controlled via max_pool_size), the pooler prevents CPU spikes and memory exhaustion.transaction mode (the default for Managed Connection Pooling), backend connections return to the pool as soon as a transaction completes, maximizing reuse for short-lived serverless workloads.min_pool_size) and client queuing (query_wait_timeout) smooth out sudden flash-sale traffic spikes without crashing the database.max_connections ceiling during rapid container scale-outs.This option accurately captures both halves of connection optimization: cutting handshake latency on the network/TLS path and conserving system CPU and memory by decoupling client connection counts from PostgreSQL backend OS processes.
A connection pooler (or session pooler) is a database proxy service that sits between client applications and the database server to manage, multiplex, and reuse open database connections. Instead of caching data or query outputs, it maintains pools of pre-established backend connections per database and user pair.
This option confuses connection pooling with in-memory query result caching. Connection poolers do not evaluate SQL semantics to store or serve cached query results, nor do they bypass the database engine during query execution. Even when a pooler is active, every SELECT, INSERT, or UPDATE statement is still forwarded to and executed by the PostgreSQL backend.
The question asked how an in-memory read-through cache (such as Memorystore) reduces read query load on a database instance by serving frequently requested data without hitting persistent storage.
While some poolers can track protocol-level named prepared statements (configured via parameters like max_prepared_statements in transaction pooling mode), this only optimizes statement parsing metadata across reused connections—it never caches or serves query result rows.
Read-replica routing distributes read-only SQL traffic across multiple read replica instances to scale read throughput, whereas assigning a dedicated persistent backend process to every client container creates a 1:1 mapping between application instances and database server processes.
This option misrepresents the core purpose and resource model of a connection pooler:
max_connections) and high memory pressure.session pooling mode—which holds a server connection for the duration of a client session—connections are still returned to a shared pool upon disconnect rather than permanently bound to specific container instances.The question described an application-layer or proxy-based read/write load balancer designed to distribute analytical read traffic across read replicas rather than optimizing connection handshakes and backend process overhead.
In serverless architectures like Cloud Run, containers scale horizontally and unpredictably. Without connection multiplexing (many client connections sharing fewer backend connections), a 1:1 persistent connection model quickly overwhelms database memory.
Terminating a backend database process immediately after a single query completes is the exact opposite of connection pooling. While closing a connection releases its allocated memory, it forces the next incoming request to establish a brand-new connection from scratch.
This statement contradicts both security and performance principles of a connection pooler:
server_lifetime defaulting to 3600 seconds) and idle timeout (such as 600 seconds) specifically to avoid premature teardown.server_lifetime to 0 seconds forces immediate connection closure after use, negating the latency and CPU benefits of connection reuse.There is no valid production scenario where unauthenticated access and immediate per-query process termination solve handshake latency; rather, this describes a classic anti-pattern of disabling persistent keep-alive connections.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated