Google Professional Cloud Developer Practice Test 8
Question 70
A multitenant API caches a user-specific response under a key containing only the public endpoint path. 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.
- Use a dedicated runtime service account with minimum required roles and keyless Application Default Credentials.
- Choose Cloud SQL for managed relational instances, Spanner for supported distributed SQL needs, or Bigtable for high-scale key-based wide-column access.
- Use versioned or invalidated cached data with identity-scoped keys and freshness bounds appropriate to the business rule.
Explanation
Correct Answer
D:Use versioned or invalidated cached data with identity-scoped keys and freshness bounds appropriate to the business rule. Before rollout, inspect cache keys, expiry settings, update events, tenant identity, and whether responses are permission-dependent. A multitenant API caches a user-specific response under a key containing only the public endpoint path. The team is choosing a sustainable solution.
Incorrect Answers
A:Keep critical session state in an appropriate shared durable store and use affinity only as a performance optimization where justified. This design addresses stateless service session design, where autoscaled instances can be ephemeral; affinity does not replace durable shared state or safe per-user authorization. It addresses a different dependency from cache freshness and invalidation.
B:Use a dedicated runtime service account with minimum required roles and keyless Application Default Credentials. This design addresses service account and least-privilege API identity, where service identities and IAM roles authorize Google Cloud APIs; embedding reusable private keys is not necessary for managed runtime credentials. It addresses a different dependency from cache freshness and invalidation.
C:Choose Cloud SQL for managed relational instances, Spanner for supported distributed SQL needs, or Bigtable for high-scale key-based wide-column access. This design addresses Cloud SQL versus Spanner versus Bigtable, where Cloud SQL, Spanner, and Bigtable differ in data model and transaction guarantees; no one product is optimal for all workloads. It addresses a different dependency from cache freshness and invalidation.
Question 71
A multitenant API caches a user-specific response under a key containing only the public endpoint path. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Persist the approved order then publish a stable event and implement idempotent consumers with a measured backlog policy.
- Invalidate or replace affected entries after authorized updates and test that users cannot receive another tenant's cached content.
- Prototype the interface using supported client libraries and validate backward-compatible schema and authentication behavior.
- Enable supported affinity only for an evaluated benefit, and test revision migration with independent session persistence.
Explanation
Correct Answer
B:Invalidate or replace affected entries after authorized updates and test that users cannot receive another tenant's cached content. Cache invalidation and tenant-aware keying are correctness and security controls, not merely performance tuning. Validate the change by checking that the latest authorized price appears within the defined freshness window, and cached responses preserve access boundaries. An approved limited change can be tested in a safe environment.
Incorrect Answers
A:Persist the approved order then publish a stable event and implement idempotent consumers with a measured backlog policy. This action changes a different concern, Pub/Sub decoupled processing architecture. The reported condition is about cache freshness and invalidation, not this adjacent change.
C:Prototype the interface using supported client libraries and validate backward-compatible schema and authentication behavior. This action changes a different concern, REST and gRPC contract choice. The reported condition is about cache freshness and invalidation, not this adjacent change.
D:Enable supported affinity only for an evaluated benefit, and test revision migration with independent session persistence. This action changes a different concern, session affinity limitations. The reported condition is about cache freshness and invalidation, not this adjacent change.
Question 72
A multitenant API caches a user-specific response under a key containing only the public endpoint path. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The latest authorized price appears within the defined freshness window, and cached responses preserve access boundaries.
- A user can resume the same authorized session after instance replacement without stale or cross-user state.
- The workload executes the needed steps in the intended order without conflating scheduling, orchestration, and queue delivery.
- User state remains correct during scale-out, failover, and rollout even if a subsequent request reaches another instance.
Explanation
Correct Answer
A:The latest authorized price appears within the defined freshness window, and cached responses preserve access boundaries. This is evidence that the particular acceptance condition for cache freshness and invalidation has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect cache keys, expiry settings, update events, tenant identity, and whether responses are permission-dependent. A multitenant API caches a user-specific response under a key containing only the public endpoint path. The team has tried a correction.
Incorrect Answers
B:A user can resume the same authorized session after instance replacement without stale or cross-user state. That result could support testing of stateless service session design: Autoscaled instances can be ephemeral; affinity does not replace durable shared state or safe per-user authorization. Applying it first would leave cache freshness and invalidation unresolved.
C:The workload executes the needed steps in the intended order without conflating scheduling, orchestration, and queue delivery. In this scenario, a multitenant API caches a user-specific response under a key containing only the public endpoint path. Applying it first would leave cache freshness and invalidation unresolved.
D:User state remains correct during scale-out, failover, and rollout even if a subsequent request reaches another instance. That result could support testing of session affinity limitations: Affinity influences routing preferences but cannot guarantee durable state or prevent all changes in backend selection. Applying it first would leave cache freshness and invalidation unresolved.
Question 73
Two internal services exchange structured messages at high frequency and need generated typed client interfaces. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect end-user sign-in provider requirements, token validation, session lifecycle, and runtime service identity.
- Inspect minimum instances, maximum instances, concurrency, startup costs, request volumes, and resource pricing.
- Inspect client interoperability requirements, message schemas, transport capabilities, latency, and streaming needs.
- Inspect Kubernetes ServiceAccount binding, workload identity principal, token audience, and IAM access scope.
Explanation
Correct Answer
C:Inspect client interoperability requirements, message schemas, transport capabilities, latency, and streaming needs. Success requires that approved clients can exchange the expected payloads within latency and compatibility requirements. A focused follow-up is to prototype the interface using supported client libraries and validate backward-compatible schema and authentication behavior.
Incorrect Answers
A:Inspect end-user sign-in provider requirements, token validation, session lifecycle, and runtime service identity. End-user authentication and service-to-service IAM authentication are distinct trust boundaries requiring different tokens and policies. That check does not establish the specific cause behind rest and grpc contract choice.
B:Inspect minimum instances, maximum instances, concurrency, startup costs, request volumes, and resource pricing. Managed autoscaling reduces routine capacity management, but configured minimum instances and concurrency still affect cost and saturation. That check does not establish the specific cause behind rest and grpc contract choice.
D:Inspect Kubernetes ServiceAccount binding, workload identity principal, token audience, and IAM access scope. GKE Workload Identity Federation associates Kubernetes workload identity with Google IAM permissions without embedding service-account private keys in containers. That check does not establish the specific cause behind rest and grpc contract choice.
Question 74
Two internal services exchange structured messages at high frequency and need generated typed client interfaces. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use Direct VPC egress or a supported connector path when the Cloud Run service needs private VPC access.
- Distribute eligible components across failure domains and plan data failover matching actual service replication guarantees.
- Choose REST for broad HTTP compatibility or gRPC with protobuf when supported typed service contracts and streaming matter.
- Use an appropriate Google-signed identity token for the target URL plus minimum Cloud Run Invoker authorization.
Explanation
Correct Answer
C:Choose REST for broad HTTP compatibility or gRPC with protobuf when supported typed service contracts and streaming matter. The expected outcome is that approved clients can exchange the expected payloads within latency and compatibility requirements. Before rollout, inspect client interoperability requirements, message schemas, transport capabilities, latency, and streaming needs.
Incorrect Answers
A:Use Direct VPC egress or a supported connector path when the Cloud Run service needs private VPC access. This design addresses private VPC egress from Cloud Run, where private VPC egress changes the network path for selected Cloud Run outbound traffic and still requires downstream firewall and identity controls. A more direct response is to choose REST for broad HTTP compatibility or gRPC with protobuf when supported typed service contracts and streaming matter.
B:Distribute eligible components across failure domains and plan data failover matching actual service replication guarantees. This design addresses zonal and regional resiliency, where spreading compute across zones does not automatically replicate state or guarantee continuity after a region-wide disruption. A more direct response is to choose REST for broad HTTP compatibility or gRPC with protobuf when supported typed service contracts and streaming matter.
D:Use an appropriate Google-signed identity token for the target URL plus minimum Cloud Run Invoker authorization. This design addresses Cloud Run service-to-service identity tokens, where Cloud Run authenticated HTTP invocation validates an identity token audience and caller permissions; generic Google API access tokens are not interchangeable. A more direct response is to choose REST for broad HTTP compatibility or gRPC with protobuf when supported typed service contracts and streaming matter.
Question 75
Two internal services exchange structured messages at high frequency and need generated typed client interfaces. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Correct health probes and simulate one unavailable backend while observing load-balancer routing and user errors.
- Implement the matching service, record its retry or schedule settings, and verify failure and completion paths.
- Introduce bounded cache keys and TTLs, invalidate them on relevant writes, and verify cache-miss database fallback.
- Prototype the interface using supported client libraries and validate backward-compatible schema and authentication behavior.
Explanation
Correct Answer
D:Prototype the interface using supported client libraries and validate backward-compatible schema and authentication behavior. Validate the change by checking that approved clients can exchange the expected payloads within latency and compatibility requirements.
Incorrect Answers
A:Correct health probes and simulate one unavailable backend while observing load-balancer routing and user errors. This action changes a different concern, backend health and failure routing. The case instead calls for the following: prototype the interface using supported client libraries and validate backward-compatible schema and authentication behavior.
B: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. The case instead calls for the following: prototype the interface using supported client libraries and validate backward-compatible schema and authentication behavior.
C:Introduce bounded cache keys and TTLs, invalidate them on relevant writes, and verify cache-miss database fallback. This action changes a different concern, memorystore cache for hot data. The case instead calls for the following: prototype the interface using supported client libraries and validate backward-compatible schema and authentication behavior.
Question 76
Two internal services exchange structured messages at high frequency and need generated typed client interfaces. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The allowed caller invokes the private service successfully while requests without valid identity are denied.
- Only authorized external jobs obtain temporary deployment credentials and no private key needs to be committed.
- Approved clients can exchange the expected payloads within latency and compatibility requirements.
- The selected datastore sustains the required transaction and read/write semantics under tested scale and recovery conditions.
Explanation
Correct Answer
C:Approved clients can exchange the expected payloads within latency and compatibility requirements. This is evidence that the particular acceptance condition for REST and gRPC contract choice has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect client interoperability requirements, message schemas, transport capabilities, latency, and streaming needs.
Incorrect Answers
A:The allowed caller invokes the private service successfully while requests without valid identity are denied. That result could support testing of Cloud Run service-to-service identity tokens: Cloud Run authenticated HTTP invocation validates an identity token audience and caller permissions; generic Google API access tokens are not interchangeable. It cannot substitute for the required control: approved clients can exchange the expected payloads within latency and compatibility requirements.
B:Only authorized external jobs obtain temporary deployment credentials and no private key needs to be committed. That result could support testing of external CI Workload Identity Federation: Federation trusts verified external identity claims under explicit conditions instead of exposing long-lived service account private keys. It cannot substitute for the required control: approved clients can exchange the expected payloads within latency and compatibility requirements.
D:The selected datastore sustains the required transaction and read/write semantics under tested scale and recovery conditions. That result could support testing of Cloud SQL versus Spanner versus Bigtable: Cloud SQL, Spanner, and Bigtable differ in data model and transaction guarantees; no one product is optimal for all workloads. It cannot substitute for the required control: approved clients can exchange the expected payloads within latency and compatibility requirements.
Question 77
A public browser-facing integration expects ordinary HTTP JSON requests but a team proposes requiring unsupported gRPC transports. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect stable request identifiers, processing checkpoints, retry codes, and the atomicity of business side effects.
- Inspect immutable revision IDs, serving percentages, tag URLs, and rollback targets.
- Inspect whether the requirement is L3/L4 network isolation, L7 routing telemetry, or authenticated service-to-service encryption.
- Inspect client interoperability requirements, message schemas, transport capabilities, latency, and streaming needs.
Explanation
Correct Answer
D:Inspect client interoperability requirements, message schemas, transport capabilities, latency, and streaming needs. Success requires that approved clients can exchange the expected payloads within latency and compatibility requirements. A focused follow-up is to prototype the interface using supported client libraries and validate backward-compatible schema and authentication behavior. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A:Inspect stable request identifiers, processing checkpoints, retry codes, and the atomicity of business side effects. Transient retries and at-least-once event delivery do not imply exactly-once business effects without an idempotent application design. The first evidence should address rest and grpc contract choice, not this separate diagnostic path.
B:Inspect immutable revision IDs, serving percentages, tag URLs, and rollback targets. Cloud Run revisions are immutable; traffic splitting and revision tags let teams stage, test, and reverse changes without editing an existing revision. The first evidence should address rest and grpc contract choice, not this separate diagnostic path.
C:Inspect whether the requirement is L3/L4 network isolation, L7 routing telemetry, or authenticated service-to-service encryption. Network policies and service meshes operate at different levels; allowing or denying packets does not automatically implement mutual TLS or service observability. The first evidence should address rest and grpc contract choice, not this separate diagnostic path.
Question 78
A public browser-facing integration expects ordinary HTTP JSON requests but a team proposes requiring unsupported gRPC transports. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use idempotency keys and transactional state transitions around work that may be redelivered or retried.
- Use Direct VPC egress or a supported connector path when the Cloud Run service needs private VPC access.
- Select health criteria that accurately represent backend readiness without causing unnecessary removal during transient dependencies.
- Choose REST for broad HTTP compatibility or gRPC with protobuf when supported typed service contracts and streaming matter.
Explanation
Correct Answer
D:Choose REST for broad HTTP compatibility or gRPC with protobuf when supported typed service contracts and streaming matter. The expected outcome is that approved clients can exchange the expected payloads within latency and compatibility requirements. Before rollout, inspect client interoperability requirements, message schemas, transport capabilities, latency, and streaming needs. A public browser-facing integration expects ordinary HTTP JSON requests but a team proposes requiring unsupported gRPC transports. The team is choosing a sustainable solution.
Incorrect Answers
A:Use idempotency keys and transactional state transitions around work that may be redelivered or retried. This design addresses retry-safe application side effects, where transient retries and at-least-once event delivery do not imply exactly-once business effects without an idempotent application design. The reported condition is about rest and grpc contract choice, not this adjacent change.
B:Use Direct VPC egress or a supported connector path when the Cloud Run service needs private VPC access. This design addresses private VPC egress from Cloud Run, where private VPC egress changes the network path for selected Cloud Run outbound traffic and still requires downstream firewall and identity controls. The reported condition is about rest and grpc contract choice, not this adjacent change.
C:Select health criteria that accurately represent backend readiness without causing unnecessary removal during transient dependencies. This design addresses backend health and failure routing, where a healthy network listener and a healthy application are not necessarily equivalent; routing depends on meaningful health checks. The reported condition is about rest and grpc contract choice, not this adjacent change.
Question 79
A public browser-facing integration expects ordinary HTTP JSON requests but a team proposes requiring unsupported gRPC transports. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Deploy the new revision without full cutover, send a limited traffic share, and monitor error and latency differences.
- Test the supported failover path with representative dependent services and measure recovery time and data loss.
- Configure the approved key ring, key permissions, and key-rotation plan, then test authorized encrypt/decrypt operations.
- Prototype the interface using supported client libraries and validate backward-compatible schema and authentication behavior.
Explanation
Correct Answer
D:Prototype the interface using supported client libraries and validate backward-compatible schema and authentication behavior. Validate the change by checking that approved clients can exchange the expected payloads within latency and compatibility requirements. An approved limited change can be tested in a safe environment.
Incorrect Answers
A:Deploy the new revision without full cutover, send a limited traffic share, and monitor error and latency differences. This action changes a different concern, Cloud Run revision traffic splitting. Applying it first would leave rest and grpc contract choice unresolved.
B: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. Applying it first would leave rest and grpc contract choice unresolved.
C:Configure the approved key ring, key permissions, and key-rotation plan, then test authorized encrypt/decrypt operations. This action changes a different concern, Cloud KMS and encryption key lifecycle. Applying it first would leave rest and grpc contract choice unresolved.
Question 80
A public browser-facing integration expects ordinary HTTP JSON requests but a team proposes requiring unsupported gRPC transports. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The workload executes the needed steps in the intended order without conflating scheduling, orchestration, and queue delivery.
- Approved clients can exchange the expected payloads within latency and compatibility requirements.
- Over-budget requests are throttled while healthy clients remain within the service capacity budget.
- The selected runtime meets the application contract without hidden node-management or host-customization gaps.
Explanation
Correct Answer
B:Approved clients can exchange the expected payloads within latency and compatibility requirements. This is evidence that the particular acceptance condition for REST and gRPC contract choice has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect client interoperability requirements, message schemas, transport capabilities, latency, and streaming needs. A public browser-facing integration expects ordinary HTTP JSON requests but a team proposes requiring unsupported gRPC transports. The team has tried a correction.
Incorrect Answers
A:The workload executes the needed steps in the intended order without conflating scheduling, orchestration, and queue delivery. In this case, the outcome to verify is that approved clients can exchange the expected payloads within latency and compatibility requirements. That may help elsewhere, but it does not make the change required for rest and grpc contract choice.
C: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. That may help elsewhere, but it does not make the change required for rest and grpc contract choice.
D:The selected runtime meets the application contract without hidden node-management or host-customization gaps. In this case, the outcome to verify is that approved clients can exchange the expected payloads within latency and compatibility requirements. That may help elsewhere, but it does not make the change required for rest and grpc contract choice.