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.
A retail company runs an AlloyDB for PostgreSQL cluster with a 32-vCPU primary instance operating at 65% steady-state CPU utilization for heavy OLTP writes. To control costs, the team deployed a read pool with two 2-vCPU nodes for customer-facing reads. Query Insights now shows frequent HighLagThrottle wait events on the read pool, with replay lag exceeding 5 seconds while flush lag remains near zero.
The team must meet these goals:
What should the team do?
The google_storage.log_replay_throttle_read_transactions flag controls whether AlloyDB pauses new read queries and buffer reads (for up to one minute) on read pool nodes when replication lag exceeds one second. Setting this flag to off disables HighLagThrottle behavior so incoming read requests execute immediately regardless of how far behind the replica falls.
HighLagThrottle wait events hides the symptom of undersized replicas rather than providing enough compute capacity to process the replication stream.This option would be appropriate if the application were not sensitive to replication lag, could tolerate stale read results during peak write periods, and prioritized immediate read query response times over keeping lag below one second.
Scaling up the read pool nodes increases the vCPU and memory resources allocated to each replica in the pool while keeping lag-based read query throttling active as a protective guardrail. In AlloyDB for PostgreSQL, compute and storage are disaggregated, so primary and read pool instances share the same underlying regional storage layer while communicating changes via the Write-Ahead Log (WAL).
HighLagThrottle pauses stop occurring.google_storage.log_replay_throttle_read_transactions set to on ensures that if a sudden write spike temporarily pushes lag past 1 second, the node pauses new read queries to let WAL replay catch up.Near-zero flush lag confirms that WAL persistence to the shared storage layer is healthy, proving the bottleneck is strictly WAL replay on undersized read nodes. Unlike scaling out with more tiny nodes or disabling throttling, resizing the read pool nodes directly addresses the per-node replay deficit while balancing throughput, freshness, and cost. Note that replay lag may rise briefly right after resizing until the new nodes warm their caches, after which performance stabilizes.
In traditional disk-coupled databases, increasing provisioned disk size raises storage IOPS and throughput for faster log writing. Meanwhile, enabling wal_compression on a primary instance compresses full-page-writes records in the Write-Ahead Log to reduce network and disk I/O at the expense of additional primary CPU overhead.
wal_compression flag only compresses full-page-writes records (such as during large ScaNN index builds) and does not affect most standard OLTP WAL records, while adding extra CPU load to a primary instance already running at 65% utilization.Enabling wal_compression would be appropriate if flush or network lag spiked specifically during heavy full-page-write operations like building large ScaNN vector indexes, while increasing disk size for IOPS applies to disk-bound systems like Cloud SQL rather than AlloyDB.
Scaling out a read pool adds more compute nodes of the same machine size to distribute incoming client read connections across a larger number of replicas. While this increases the aggregate CPU and memory available across the cluster for serving read queries, it leaves each individual node at 2 vCPUs.
HighLagThrottle wait events will continue across every node in the pool.Scaling out would be the right approach if the existing read pool nodes were already large enough to keep up with the primary's WAL generation rate, and high CPU utilization was caused strictly by an excessive volume of concurrent read queries rather than a node-size mismatch.
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