Question 382 of 503
Monitor and optimize database performancehardMultiple ChoiceObjective-mapped

Quick Answer

The answer is to change the default leader option to 'NEAREST'. This is correct because Cloud Spanner’s multi-region configuration uses a single leader replica to coordinate writes, and when clients are geographically distant from that leader, every write incurs a long network round-trip for confirmation. By setting the default leader option to 'NEAREST', Spanner dynamically assigns the leader to the region closest to the majority of write requests, directly reducing write latency for far-away clients. On the Google Professional Cloud Database Engineer exam, this scenario tests your understanding of leader placement strategies and how they impact performance in distributed databases; a common trap is assuming you must manually reconfigure regions or add read replicas, which do not affect write latency. Remember the mnemonic: "NEAREST leader, fastest writer" — the leader follows the writes, not the other way around.

PCDE Monitor and optimize database performance Practice Question

This PCDE practice question tests your understanding of monitor and optimize database performance. 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 company runs a Cloud Spanner database with a multi-region configuration. They notice that write latency is higher than expected for clients in a region far from the leader region. What action should be taken to reduce write latency?

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

Change the default leader option to 'NEAREST'

Option C is correct because changing the default leader option to 'NEAREST' allows Cloud Spanner to dynamically assign the leader replica to the region closest to the majority of write requests, reducing the network round-trip time for clients far from the original leader region. This directly addresses the high write latency caused by geographic distance, as writes must be confirmed by the leader before committing.

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.

  • Reduce the number of replicas

    Why it's wrong here

    Fewer replicas would not reduce latency and could affect availability.

  • Use directed reads

    Why it's wrong here

    Directed reads only affect read requests, not writes.

  • Change the default leader option to 'NEAREST'

    Why this is correct

    This places the leader in the nearest region, reducing write latency for that region.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Enable follower reads for writes

    Why it's wrong here

    Follower reads are for reads only; writes must go to the leader.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse directed reads (which reduce read latency) with leader placement options (which reduce write latency), or incorrectly assume that reducing replicas or using follower reads can improve write performance.

Detailed technical explanation

How to think about this question

In Cloud Spanner, the leader replica is responsible for sequencing all writes in a region via the Paxos protocol; by default, the leader is fixed to a specific region. The 'NEAREST' leader option uses a dynamic leader placement algorithm that considers the geographic origin of write requests and network latency, automatically moving the leader to the region with the highest write volume or closest proximity, which can significantly reduce commit latency for distributed clients. This is particularly effective in multi-region configurations where write traffic is asymmetric across regions.

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

A healthcare organisation deploys an application with a public-facing web tier and a private database tier. The database subnet has no public IP and only accepts connections from the web tier's security group. Questions like this test whether you can design cloud network isolation using VNets/VPCs, subnets, and security group rules.

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?

Monitor and optimize database performance — This question tests Monitor and optimize database performance — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Change the default leader option to 'NEAREST' — Option C is correct because changing the default leader option to 'NEAREST' allows Cloud Spanner to dynamically assign the leader replica to the region closest to the majority of write requests, reducing the network round-trip time for clients far from the original leader region. This directly addresses the high write latency caused by geographic distance, as writes must be confirmed by the leader before committing.

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.

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

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.