Question 208 of 500

Quick Answer

The answer is to implement a shared session store using Cloud Memorystore for Redis. This is correct because it decouples session state from individual Compute Engine instances, solving the core problem of session persistence with auto-scaling: when a managed instance group scales out new instances, a local SSD or sticky-session approach fails because the load balancer may route a returning user to a different instance that lacks their session data. By using a centralized, external store like Cloud Memorystore, any instance can serve any request, preserving both session continuity and horizontal scalability. On the Google Professional Cloud Developer exam, this scenario tests your understanding of stateless application design and the trade-offs between instance affinity and elastic scaling; a common trap is to assume that simply enabling session affinity on the load balancer is sufficient, but that breaks under auto-scaling because new instances have no pre-existing sessions. Memory tip: “Redis the session, not the instance” — keep state outside the VM to scale without losing users.

PCD Practice Question: Designing highly scalable, available, and reliable cloud-native applications

This PCD practice question tests your understanding of designing highly scalable, available, and reliable cloud-native applications. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. 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 critical financial application on Google Cloud using Compute Engine instances in a managed instance group (MIG) with auto-scaling based on CPU utilization. The application stores state in a local SSD and relies on sticky sessions (session affinity). Recently, during a traffic spike, the MIG scaled out new instances, but some users lost their sessions because the load balancer routed them to a different instance. The team needs to maintain session persistence without sacrificing scalability. What should they do?

Question 1mediummultiple choice
Review the full routing breakdown →

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

Implement a shared session store using Cloud Memorystore for Redis.

Option A is correct because using Cloud Memorystore for Redis provides a centralized, external session store that decouples session state from individual Compute Engine instances. This ensures that any instance in the managed instance group can serve any user's request, maintaining session persistence even as the MIG scales out or in based on CPU utilization. It preserves scalability because the session store is independent of instance lifecycle, and Redis offers low-latency reads and writes suitable for session data.

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.

  • Implement a shared session store using Cloud Memorystore for Redis.

    Why this is correct

    External session store makes sessions available to all instances.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Increase the instance group's cooldown period to reduce scaling frequency.

    Why it's wrong here

    This does not solve session loss; it only delays scaling.

  • Use a global HTTPS Load Balancer with cookie-based session affinity.

    Why it's wrong here

    Cookie affinity ties users to specific instances, which can still lose sessions if instances are terminated.

  • Use Cloud NAT for consistent source IP routing.

    Why it's wrong here

    Cloud NAT is for outbound traffic, not session persistence.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Cisco often tests the misconception that session affinity alone is sufficient for session persistence, but the trap here is that candidates overlook the need for a shared external store when instances are ephemeral or can be terminated, as local SSD state is lost on instance stop/termination.

Detailed technical explanation

How to think about this question

Under the hood, session affinity (sticky sessions) in a load balancer relies on a hash of the client's source IP or a cookie to route requests to the same backend instance, but this does not protect against instance failure, scaling down, or rolling updates. Cloud Memorystore for Redis uses an in-memory data store with replication and persistence options (e.g., AOF or RDB snapshots), allowing session data to survive instance restarts and be shared across all instances. In a real-world scenario, a financial application might use Redis to store user authentication tokens and shopping cart data, ensuring zero session loss during auto-scaling events triggered by traffic spikes.

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 PCD 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 PCD 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 PCD question test?

Designing highly scalable, available, and reliable cloud-native applications — This question tests Designing highly scalable, available, and reliable cloud-native applications — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Implement a shared session store using Cloud Memorystore for Redis. — Option A is correct because using Cloud Memorystore for Redis provides a centralized, external session store that decouples session state from individual Compute Engine instances. This ensures that any instance in the managed instance group can serve any user's request, maintaining session persistence even as the MIG scales out or in based on CPU utilization. It preserves scalability because the session store is independent of instance lifecycle, and Redis offers low-latency reads and writes suitable for session data.

What should I do if I get this PCD 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 PCD 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 PCD exam.