Prepare and test your skills

Prepare and test your skills

Free sample question, answered and explained below. The Professional Data Engineer practice bank has 1,353 more like it. Try 10 free: instant score, no account.
An enterprise maintains a primary Cloud SQL for PostgreSQL database in us-central1 and a cross-region read replica in europe-west1 for regional reporting and disaster recovery readiness. During heavy transaction processing periods, operations teams observe growing replication delay.
A review of Cloud Monitoring telemetry reveals:
database/replication/network_lag metric is elevated near the 25-second reporting threshold.database/postgres/replication/replica_byte_lag metric with replica_lag_type: sent_location displays a steadily accumulating byte backlog.Which configuration change should you implement on the primary database to reduce network lag and improve cross-region replication throughput?
The max_connections database flag sets the maximum number of concurrent client connections that can connect to the PostgreSQL database server.
max_connections does not increase the number of replication streams or parallelize WAL transfer over the network.sent_location.max_connections allocates more shared memory for connection slots and backend processes, which can negatively impact memory pressure rather than solving inter-region network lag.This configuration change would be appropriate if application clients were failing with FATAL: remaining connection slots are reserved for non-superuser connections or too many connections errors under peak traffic conditions.
Replication bottlenecks are categorized into primary generation bottlenecks, network transport bottlenecks, or replica replay bottlenecks. Adjusting client connection ceilings does not optimize transport-layer efficiency.
Cascading replication involves configuring a standby replica to act as an upstream WAL sender for downstream standby nodes, offloading replication stream generation from the primary database instance.
us-central1 across the Atlantic still encounters the exact same cross-region network bandwidth constraint.The primary database CPU utilization was exceeding 90% due to serving an excessive number of read replicas simultaneously, starving the wal_sender processes of CPU scheduling time.
When cross-region network throughput is the limiting factor, compressing the payload (wal_compression) directly targets the data volume rather than shifting the transmission responsibility to another intermediate compute node.
WAL compression (wal_compression) is a PostgreSQL database configuration flag that instructs the primary database engine to compress full page images written to the Write Ahead Log (WAL) using algorithms such as lz4, zstd, or pglz before writing them to disk and transmitting them across the network.
us-central1 to europe-west1.sent_location byte backlog: Because the replica_byte_lag metric specifically tracks unsent WAL data at sent_location, reducing the physical byte volume allows the WAL sender process to transmit logs much faster over constrained bandwidth.Alternative solutions such as scaling up hardware or altering client concurrency do not fix the underlying bottleneck caused by large, uncompressed WAL streams traveling over inter-region boundaries. Enabling wal_compression strikes the best balance between available CPU resources and network transmission efficiency.
Modifying an alert threshold in Cloud Monitoring changes the trigger criteria for operational notifications sent to engineering teams.
us-central1 and europe-west1.network_lag metric has an architectural hard upper cap of 25 seconds; attempting to set alerting thresholds beyond 25 seconds is ineffective because the metric itself does not report values above 25.database/replication/network_lag metric reports a maximum value of 25 seconds even when underlying latency is significantly higher.The goal was solely to adjust operational alert sensitivity to accommodate temporary, expected maintenance windows where alert noise needed suppression.
To accurately track replication lag when network lag exceeds 25 seconds, engineers rely on replica_byte_lag and replica_lag (now() - pg_last_xact_replay_timestamp()), rather than artificially raising alert levels on a capped gauge.
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