Google Professional Cloud Developer Practice Test 3
Question 20
An API stores shopping-cart state only in one container's memory and loses it after a new Cloud Run instance receives the request. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The Pod reaches authorized APIs but cannot access unrelated data after secrets containing static keys are removed.
- A user can resume the same authorized session after instance replacement without stale or cross-user state.
- The latest authorized price appears within the defined freshness window, and cached responses preserve access boundaries.
- Checkout returns promptly and downstream jobs recover from subscriber outages without duplicate business effects.
Explanation
Correct Answer
B:A user can resume the same authorized session after instance replacement without stale or cross-user state. This is evidence that the particular acceptance condition for stateless service session design has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect where session state is written, whether it is shared, and what happens during scale-out or instance replacement.
Incorrect Answers
A:The Pod reaches authorized APIs but cannot access unrelated data after secrets containing static keys are removed. That result could support testing of GKE Workload Identity Federation: GKE Workload Identity Federation associates Kubernetes workload identity with Google IAM permissions without embedding service-account private keys in containers. It cannot substitute for the required control: a user can resume the same authorized session after instance replacement without stale or cross-user state.
C:The latest authorized price appears within the defined freshness window, and cached responses preserve access boundaries. That result could support testing of cache freshness and invalidation: Cache invalidation and tenant-aware keying are correctness and security controls, not merely performance tuning. It cannot substitute for the required control: a user can resume the same authorized session after instance replacement without stale or cross-user state.
D:Checkout returns promptly and downstream jobs recover from subscriber outages without duplicate business effects. That result could support testing of Pub/Sub decoupled processing architecture: Publish-subscribe messaging decouples production from consumption but consumers still need retry-safe processing and eventual completion visibility. It cannot substitute for the required control: a user can resume the same authorized session after instance replacement without stale or cross-user state.
Question 21
A checkout service assumes session affinity alone guarantees that an expired or restarted instance will preserve a user's transaction state. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest.
- Inspect CI issuer claims, Workload Identity Pool provider trust, audience, and target service account permissions.
- Inspect transaction scope, SQL query needs, global replication, throughput, data size, and indexing patterns.
- Inspect where session state is written, whether it is shared, and what happens during scale-out or instance replacement.
Explanation
Correct Answer
D:Inspect where session state is written, whether it is shared, and what happens during scale-out or instance replacement. Success requires that a user can resume the same authorized session after instance replacement without stale or cross-user state. A focused follow-up is to move the cart record to an authorized shared datastore and test alternating requests across independently restarted instances. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A:Inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest. Artifact storage and verified deployment authorization are separate; Binary Authorization enforces policy based on artifact trust evidence. The first evidence should address stateless service session design, not this separate diagnostic path.
B:Inspect CI issuer claims, Workload Identity Pool provider trust, audience, and target service account permissions. Federation trusts verified external identity claims under explicit conditions instead of exposing long-lived service account private keys. The first evidence should address stateless service session design, not this separate diagnostic path.
C:Inspect transaction scope, SQL query needs, global replication, throughput, data size, and indexing patterns. Cloud SQL, Spanner, and Bigtable differ in data model and transaction guarantees; no one product is optimal for all workloads. The first evidence should address stateless service session design, not this separate diagnostic path.
Question 22
A checkout service assumes session affinity alone guarantees that an expired or restarted instance will preserve a user's transaction state. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Keep critical session state in an appropriate shared durable store and use affinity only as a performance optimization where justified.
- Publish durable business events through Pub/Sub and let independent subscribers process appropriate downstream work asynchronously.
- Store sensitive application credentials in Secret Manager and grant narrowly scoped access to the execution identity.
- Set Cloud Run concurrency to match measured in-process parallelism, rather than assuming the highest possible number is optimal.
Explanation
Correct Answer
A:Keep critical session state in an appropriate shared durable store and use affinity only as a performance optimization where justified. The expected outcome is that a user can resume the same authorized session after instance replacement without stale or cross-user state. Before rollout, inspect where session state is written, whether it is shared, and what happens during scale-out or instance replacement. A checkout service assumes session affinity alone guarantees that an expired or restarted instance will preserve a user's transaction state. The team is choosing a sustainable solution.
Incorrect Answers
B:Publish durable business events through Pub/Sub and let independent subscribers process appropriate downstream work asynchronously. This design addresses Pub/Sub decoupled processing architecture, where publish-subscribe messaging decouples production from consumption but consumers still need retry-safe processing and eventual completion visibility. The reported condition is about stateless service session design, not this adjacent change.
C:Store sensitive application credentials in Secret Manager and grant narrowly scoped access to the execution identity. For this case, autoscaled instances can be ephemeral; affinity does not replace durable shared state or safe per-user authorization. The reported condition is about stateless service session design, not this adjacent change.
D:Set Cloud Run concurrency to match measured in-process parallelism, rather than assuming the highest possible number is optimal. For this case, autoscaled instances can be ephemeral; affinity does not replace durable shared state or safe per-user authorization. The reported condition is about stateless service session design, not this adjacent change.
Question 23
A checkout service assumes session affinity alone guarantees that an expired or restarted instance will preserve a user's transaction state. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Configure a proof-of-concept policy and verify partner access, API metrics, and operational ownership against requirements.
- Integrate the chosen provider, validate ID tokens server-side, and map authorized users to application roles.
- Implement the matching service, record its retry or schedule settings, and verify failure and completion paths.
- Move the cart record to an authorized shared datastore and test alternating requests across independently restarted instances.
Explanation
Correct Answer
D:Move the cart record to an authorized shared datastore and test alternating requests across independently restarted instances. Validate the change by checking that a user can resume the same authorized session after instance replacement without stale or cross-user state. An approved limited change can be tested in a safe environment.
Incorrect Answers
A:Configure a proof-of-concept policy and verify partner access, API metrics, and operational ownership against requirements. This action changes a different concern, API Gateway versus Apigee responsibilities. Applying it first would leave stateless service session design unresolved.
B:Integrate the chosen provider, validate ID tokens server-side, and map authorized users to application roles. This action changes a different concern, identity Platform end-user sign-in. Applying it first would leave stateless service session design unresolved.
C:Implement the matching service, record its retry or schedule settings, and verify failure and completion paths. This action changes a different concern, Workflows versus Cloud Tasks versus Scheduler. Applying it first would leave stateless service session design unresolved.
Question 24
A checkout service assumes session affinity alone guarantees that an expired or restarted instance will preserve a user's transaction state. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- A user can resume the same authorized session after instance replacement without stale or cross-user state.
- Only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy.
- Untrusted images are rejected while policy-compliant images can be deployed under a recorded approval chain.
- The client can perform only the permitted operation before expiry, without direct bucket-wide IAM credentials.
Explanation
Correct Answer
A:A user can resume the same authorized session after instance replacement without stale or cross-user state. In this scenario, a checkout service assumes session affinity alone guarantees that an expired or restarted instance will preserve a user's transaction state. The original diagnosis should have included this step: inspect where session state is written, whether it is shared, and what happens during scale-out or instance replacement.
Incorrect Answers
B:Only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy. It would not establish the success condition for stateless service session design. That may help elsewhere, but it does not make the change required for stateless service session design.
C:Untrusted images are rejected while policy-compliant images can be deployed under a recorded approval chain. That result could support testing of binary Authorization deployment policy: Artifact storage and verified deployment authorization are separate; Binary Authorization enforces policy based on artifact trust evidence. That may help elsewhere, but it does not make the change required for stateless service session design.
D:The client can perform only the permitted operation before expiry, without direct bucket-wide IAM credentials. It would not establish the success condition for stateless service session design. That may help elsewhere, but it does not make the change required for stateless service session design.
Question 25
A European user population repeatedly calls an API deployed far away in a single North American region. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect record structure, update frequency, query shape, storage volume, and whether access is transactional or analytical.
- Inspect user geography, regional service availability, dependency placement, measured round-trip latency, and residency policy.
- Inspect compute placement, dependency replication, backups, failover prerequisites, and recovery objectives.
- Inspect event sources, supported Eventarc provider types, filters, delivery destinations, and handler authorization.
Explanation
Correct Answer
B:Inspect user geography, regional service availability, dependency placement, measured round-trip latency, and residency policy. Success requires that latency and data placement meet stated goals without assuming every managed Google Cloud service is globally replicated. A focused follow-up is to benchmark representative clients and validate the region of every persistent data replica and downstream dependency.
Incorrect Answers
A:Inspect record structure, update frequency, query shape, storage volume, and whether access is transactional or analytical. Document stores, object stores, and analytical warehouses solve different persistence problems even if each can hold serialized data. The more informative check is to inspect user geography, regional service availability, dependency placement, measured round-trip latency, and residency policy.
C:Inspect compute placement, dependency replication, backups, failover prerequisites, and recovery objectives. Spreading compute across zones does not automatically replicate state or guarantee continuity after a region-wide disruption. The more informative check is to inspect user geography, regional service availability, dependency placement, measured round-trip latency, and residency policy.
D:Inspect event sources, supported Eventarc provider types, filters, delivery destinations, and handler authorization. Eventarc routes supported source events to destinations; filters, delivery permissions, and handler idempotency determine reliable behavior. The more informative check is to inspect user geography, regional service availability, dependency placement, measured round-trip latency, and residency policy.
Question 26
A European user population repeatedly calls an API deployed far away in a single North American region. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Set justified Cloud Run minimum and maximum instance bounds and concurrency based on load and cold-start tolerance.
- Place application and data resources in supported regions that satisfy locality, resilience, and regulatory requirements.
- Use Kubernetes NetworkPolicy for supported traffic isolation and a supported service mesh for additional service-level controls.
- Use versioned or invalidated cached data with identity-scoped keys and freshness bounds appropriate to the business rule.
Explanation
Correct Answer
B:Place application and data resources in supported regions that satisfy locality, resilience, and regulatory requirements. The expected outcome is that latency and data placement meet stated goals without assuming every managed Google Cloud service is globally replicated. Before rollout, inspect user geography, regional service availability, dependency placement, measured round-trip latency, and residency policy.
Incorrect Answers
A:Set justified Cloud Run minimum and maximum instance bounds and concurrency based on load and cold-start tolerance. For this case, a product's regional or zonal scope determines placement, failure exposure, and latency; global branding alone does not guarantee global data residency. The case instead calls for the following: place application and data resources in supported regions that satisfy locality, resilience, and regulatory requirements.
C:Use Kubernetes NetworkPolicy for supported traffic isolation and a supported service mesh for additional service-level controls. This design addresses service mesh versus network policy, where network policies and service meshes operate at different levels; allowing or denying packets does not automatically implement mutual TLS or service observability. The case instead calls for the following: place application and data resources in supported regions that satisfy locality, resilience, and regulatory requirements.
D:Use versioned or invalidated cached data with identity-scoped keys and freshness bounds appropriate to the business rule. This design addresses cache freshness and invalidation, where cache invalidation and tenant-aware keying are correctness and security controls, not merely performance tuning. The case instead calls for the following: place application and data resources in supported regions that satisfy locality, resilience, and regulatory requirements.
Question 27
A European user population repeatedly calls an API deployed far away in a single North American region. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Define explicit ingress/egress policy and, where needed, mesh mTLS and route policy, then test authorized peer flows.
- Benchmark representative clients and validate the region of every persistent data replica and downstream dependency.
- Configure claim conditions and tightly scoped impersonation, then test valid and invalid CI identities.
- Test the supported failover path with representative dependent services and measure recovery time and data loss.
Explanation
Correct Answer
B:Benchmark representative clients and validate the region of every persistent data replica and downstream dependency. Validate the change by checking that latency and data placement meet stated goals without assuming every managed Google Cloud service is globally replicated.
Incorrect Answers
A:Define explicit ingress/egress policy and, where needed, mesh mTLS and route policy, then test authorized peer flows. This action changes a different concern, service mesh versus network policy. It cannot substitute for the required control: benchmark representative clients and validate the region of every persistent data replica and downstream dependency.
C:Configure claim conditions and tightly scoped impersonation, then test valid and invalid CI identities. This action changes a different concern, external CI Workload Identity Federation. It cannot substitute for the required control: benchmark representative clients and validate the region of every persistent data replica and downstream dependency.
D:Test the supported failover path with representative dependent services and measure recovery time and data loss. This action changes a different concern, zonal and regional resiliency. It cannot substitute for the required control: benchmark representative clients and validate the region of every persistent data replica and downstream dependency.
Question 28
A European user population repeatedly calls an API deployed far away in a single North American region. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy.
- Latency and data placement meet stated goals without assuming every managed Google Cloud service is globally replicated.
- The latest authorized price appears within the defined freshness window, and cached responses preserve access boundaries.
- Over-budget requests are throttled while healthy clients remain within the service capacity budget.
Explanation
Correct Answer
B:Latency and data placement meet stated goals without assuming every managed Google Cloud service is globally replicated. This is evidence that the particular acceptance condition for regional latency and data placement has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect user geography, regional service availability, dependency placement, measured round-trip latency, and residency policy.
Incorrect Answers
A:Only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy. It would not establish the success condition for regional latency and data placement. It addresses a different dependency from regional latency and data placement.
C:The latest authorized price appears within the defined freshness window, and cached responses preserve access boundaries. That result could support testing of cache freshness and invalidation: Cache invalidation and tenant-aware keying are correctness and security controls, not merely performance tuning. It addresses a different dependency from regional latency and data placement.
D:Over-budget requests are throttled while healthy clients remain within the service capacity budget. That result could support testing of API rate limiting and request quota: Rate limiting and quota policies regulate request load; they are different from IAM authorization and should produce explicit throttling semantics. It addresses a different dependency from regional latency and data placement.
Question 29
A design places regulated customer records in a region that conflicts with the organization's required residency controls. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect required authentication, quota policy, developer-portal features, routing, and API product governance.
- Inspect destination IP, supported VPC region, egress configuration, firewall rules, and service identity.
- Inspect user geography, regional service availability, dependency placement, measured round-trip latency, and residency policy.
- Inspect whether the requirement is orchestration, point-to-point durable work, a fixed schedule, or an event fan-out.
Explanation
Correct Answer
C:Inspect user geography, regional service availability, dependency placement, measured round-trip latency, and residency policy. Success requires that latency and data placement meet stated goals without assuming every managed Google Cloud service is globally replicated. A focused follow-up is to benchmark representative clients and validate the region of every persistent data replica and downstream dependency. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A:Inspect required authentication, quota policy, developer-portal features, routing, and API product governance. A basic managed gateway and a full API management platform overlap in routing but differ in breadth of policy, analytics, and developer lifecycle. The relevant dependency is regional latency and data placement, which this inspection alone does not establish.
B:Inspect destination IP, supported VPC region, egress configuration, firewall rules, and service identity. Private VPC egress changes the network path for selected Cloud Run outbound traffic and still requires downstream firewall and identity controls. The relevant dependency is regional latency and data placement, which this inspection alone does not establish.
D:Inspect whether the requirement is orchestration, point-to-point durable work, a fixed schedule, or an event fan-out. Orchestration, task queues, and cron scheduling solve different trigger and coordination problems despite being able to interact. The relevant dependency is regional latency and data placement, which this inspection alone does not establish.
Question 30
A design places regulated customer records in a region that conflicts with the organization's required residency controls. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Choose REST for broad HTTP compatibility or gRPC with protobuf when supported typed service contracts and streaming matter.
- Place application and data resources in supported regions that satisfy locality, resilience, and regulatory requirements.
- Use Workload Identity Federation for GKE to provide keyless workload access limited to intended Google resources.
- Use Firestore for appropriate document-oriented operational data, Cloud Storage for object blobs, and BigQuery for analytical queries.
Explanation
Correct Answer
B:Place application and data resources in supported regions that satisfy locality, resilience, and regulatory requirements. The expected outcome is that latency and data placement meet stated goals without assuming every managed Google Cloud service is globally replicated. Before rollout, inspect user geography, regional service availability, dependency placement, measured round-trip latency, and residency policy. A design places regulated customer records in a region that conflicts with the organization's required residency controls. The team is choosing a sustainable solution.
Incorrect Answers
A:Choose REST for broad HTTP compatibility or gRPC with protobuf when supported typed service contracts and streaming matter. This design addresses REST and gRPC contract choice, where REST and gRPC are different interface and transport approaches; a protocol choice must match actual client support and the API contract. Applying it first would leave regional latency and data placement unresolved.
C:Use Workload Identity Federation for GKE to provide keyless workload access limited to intended Google resources. This design addresses GKE Workload Identity Federation, where GKE Workload Identity Federation associates Kubernetes workload identity with Google IAM permissions without embedding service-account private keys in containers. Applying it first would leave regional latency and data placement unresolved.
D:Use Firestore for appropriate document-oriented operational data, Cloud Storage for object blobs, and BigQuery for analytical queries. This design addresses Firestore versus Cloud Storage versus BigQuery, where document stores, object stores, and analytical warehouses solve different persistence problems even if each can hold serialized data. Applying it first would leave regional latency and data placement unresolved.