Question 229 of 503
Plan and manage database infrastructurehardMultiple ChoiceObjective-mapped

Quick Answer

The answer is to migrate to Cloud Spanner with a multi-region configuration because it provides synchronous replication using the Paxos protocol, which ensures that every write is committed across multiple regions before acknowledging success, thereby preventing data loss on Cloud SQL failover. This directly addresses the root cause of the outage: Cloud SQL for MySQL relies on asynchronous replication, where binary log positions can lag, leading to lost inventory updates during a two-minute failover window. On the Google Professional Cloud Database Engineer exam, this scenario tests your understanding of the critical difference between eventual consistency (Cloud SQL replicas) and strong consistency (Spanner). A common trap is to assume that enabling Cloud SQL’s high availability alone solves data loss, but HA only protects against zonal failures, not regional replication lag. Memory tip: think “Spanner syncs, SQL lags” to recall that only synchronous replication guarantees zero data loss across regions.

PCDE Plan and manage database infrastructure Practice Question

This PCDE practice question tests your understanding of plan and manage database infrastructure. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A global e-commerce company uses Cloud SQL for MySQL to store inventory data. They have a single primary instance in us-central1 and two read replicas in us-west1 and europe-west1 for local reads. Recently, the primary instance experienced a hardware failure causing an outage. The failover to a Cloud SQL high availability (HA) instance took 2 minutes. However, during that time, inventory updates were lost because the binary log position was not fully synchronized. The company requires zero data loss for inventory updates. What should the database engineer do?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "primary"

    Why it matters: Asks for the main purpose or function, not a secondary benefit. Eliminate answers that describe side-effects or partial functions.

Question 1hardmultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Migrate to Cloud Spanner with multi-region configuration.

Cloud Spanner with a multi-region configuration provides synchronous replication across regions, ensuring strong consistency and zero data loss during failover. Unlike Cloud SQL's asynchronous replication, Spanner uses the Paxos protocol to commit writes across multiple regions before acknowledging success, which eliminates the risk of lost inventory updates during a primary failure.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Migrate to Cloud Spanner with multi-region configuration.

    Why this is correct

    Spanner offers synchronous replication across regions, ensuring zero data loss.

    Clue confirmation

    The clue word "primary" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use Cloud SQL with external replication and a stand-by instance in another region.

    Why it's wrong here

    Cloud SQL does not support synchronous cross-region replication.

  • Implement application-level write-ahead logging and replay on failover.

    Why it's wrong here

    Complex and not a native database solution; still risk of loss.

  • Enable point-in-time recovery with a 7-day retention.

    Why it's wrong here

    PITR doesn't prevent data loss during failover; it only allows recovery to a specific point.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates assume Cloud SQL's high availability (HA) with regional replicas can guarantee zero data loss, but they overlook that Cloud SQL uses asynchronous replication for read replicas, which inherently risks data loss during a primary failure.

Detailed technical explanation

How to think about this question

Cloud SQL for MySQL uses asynchronous replication for read replicas, meaning the primary commits transactions before sending binary log events to replicas. In contrast, Cloud Spanner's multi-region configuration uses synchronous replication via the Paxos consensus algorithm, where a write must be acknowledged by a majority of replicas across regions before being committed, guaranteeing zero data loss even if a regional failure occurs. This makes Spanner suitable for global applications requiring strong consistency and high availability without manual failover handling.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PCDE practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PCDE practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PCDE question test?

Plan and manage database infrastructure — This question tests Plan and manage database infrastructure — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Migrate to Cloud Spanner with multi-region configuration. — Cloud Spanner with a multi-region configuration provides synchronous replication across regions, ensuring strong consistency and zero data loss during failover. Unlike Cloud SQL's asynchronous replication, Spanner uses the Paxos protocol to commit writes across multiple regions before acknowledging success, which eliminates the risk of lost inventory updates during a primary failure.

What should I do if I get this PCDE question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "primary". Asks for the main purpose or function, not a secondary benefit. Eliminate answers that describe side-effects or partial functions.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More PCDE practice questions

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCDE exam.