Google Professional Cloud Developer Practice Test 64
Question 630
A new workload loses cloud API access after migration because its Kubernetes ServiceAccount lacks intended IAM bindings. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use Workload Identity Federation for GKE with least-privilege permissions rather than injecting static Google private keys.
- Treat configuration changes as new immutable revisions and scope debug settings to a controlled nonproduction rollout.
- Rollback by restoring traffic to an immutable previously healthy revision while investigating the new release.
- Use an authenticated Pub/Sub push subscription with a scoped service account and target audience.
Explanation
Correct Answer
A:Use Workload Identity Federation for GKE with least-privilege permissions rather than injecting static Google private keys. The expected outcome is that the workload uses short-lived authorized identity and can access only intended buckets without key material in manifests. Before rollout, inspect Pod ServiceAccount, workload identity pool principal, IAM bindings, and token availability inside the Pod. A new workload loses cloud API access after migration because its Kubernetes ServiceAccount lacks intended IAM bindings. The team is choosing a sustainable solution.
Incorrect Answers
B:Treat configuration changes as new immutable revisions and scope debug settings to a controlled nonproduction rollout. This design addresses Cloud Run environment configuration revisions, where Cloud Run revisions are immutable snapshots of code and configuration; environment updates create a new revision rather than editing old instances. It addresses a different dependency from gke pod identity without key files.
C:Rollback by restoring traffic to an immutable previously healthy revision while investigating the new release. This design addresses Cloud Run revision rollback strategy, where Cloud Run rollbacks manipulate traffic allocation among existing revisions rather than rewriting the contents of a released revision. It addresses a different dependency from gke pod identity without key files.
D:Use an authenticated Pub/Sub push subscription with a scoped service account and target audience. This design addresses Pub/Sub push to Cloud Run authentication, where Pub/Sub push delivery can use an OIDC token for authenticated Cloud Run invocation; access is not established by topic ownership alone. It addresses a different dependency from gke pod identity without key files.
Question 631
A new workload loses cloud API access after migration because its Kubernetes ServiceAccount lacks intended IAM bindings. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Bind the correct Kubernetes identity and scoped storage permissions, and verify API calls in a fresh Pod.
- Create validated service endpoints and network entry rules, then test authorized internal and external routes.
- Bind the approved secret to the service, test rotation semantics, and verify that no secret values enter logs or images.
- Apply the intended ingress mode and test calls from approved internal and unapproved external locations.
Explanation
Correct Answer
A:Bind the correct Kubernetes identity and scoped storage permissions, and verify API calls in a fresh Pod. Validate the change by checking that the workload uses short-lived authorized identity and can access only intended buckets without key material in manifests. An approved limited change can be tested in a safe environment.
Incorrect Answers
B:Create validated service endpoints and network entry rules, then test authorized internal and external routes. This action changes a different concern, GKE Service and ingress exposure. The reported condition is about gke pod identity without key files, not this adjacent change.
C:Bind the approved secret to the service, test rotation semantics, and verify that no secret values enter logs or images. This action changes a different concern, Cloud Run secrets as environment or mounted files. The reported condition is about gke pod identity without key files, not this adjacent change.
D:Apply the intended ingress mode and test calls from approved internal and unapproved external locations. This action changes a different concern, Cloud Run ingress restriction. The reported condition is about gke pod identity without key files, not this adjacent change.
Question 632
A new workload loses cloud API access after migration because its Kubernetes ServiceAccount lacks intended IAM bindings. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Production continues with approved configuration until the new revision is explicitly promoted.
- The candidate is testable without changing serving percentages and can be promoted only after acceptance.
- Both destination classes follow the approved routes and network controls without leaking private endpoints.
- The workload uses short-lived authorized identity and can access only intended buckets without key material in manifests.
Explanation
Correct Answer
D:The workload uses short-lived authorized identity and can access only intended buckets without key material in manifests. This is evidence that the particular acceptance condition for GKE pod identity without key files has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect Pod ServiceAccount, workload identity pool principal, IAM bindings, and token availability inside the Pod. A new workload loses cloud API access after migration because its Kubernetes ServiceAccount lacks intended IAM bindings. The team has tried a correction.
Incorrect Answers
A:Production continues with approved configuration until the new revision is explicitly promoted. That result could support testing of Cloud Run environment configuration revisions: Cloud Run revisions are immutable snapshots of code and configuration; environment updates create a new revision rather than editing old instances. Applying it first would leave gke pod identity without key files unresolved.
B:The candidate is testable without changing serving percentages and can be promoted only after acceptance. That result could support testing of tagged Cloud Run revision validation: Revision tags provide direct revision access for testing; they do not inherently shift regular service URL traffic. Applying it first would leave gke pod identity without key files unresolved.
C:Both destination classes follow the approved routes and network controls without leaking private endpoints. That result could support testing of Cloud Run Direct VPC egress configuration: Cloud Run VPC egress policy changes outbound routing; IAM, firewall and NAT controls still determine actual reachability. Applying it first would leave gke pod identity without key files unresolved.
Question 633
An autoscaled Cloud Run fleet opens a new direct database connection on every request and exhausts Cloud SQL connection limits. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect concurrent instances, per-instance connection count, pool configuration, and database connection quota.
- Inspect delivery attempt counts, retry policy, dead-letter topic configuration, and failure classification.
- Inspect task dependencies, branching logic, retry policy, state transitions, and auditability requirements.
- Inspect row-key distribution, access queries, tablet hot spots, and key-prefix cardinality.
Explanation
Correct Answer
A:Inspect concurrent instances, per-instance connection count, pool configuration, and database connection quota. This checks the actual operating conditions relevant to Cloud SQL connection pooling in serverless workloads, rather than changing a service before the failure is understood. A focused follow-up is to set pool size and idle timeouts, then load-test total database connections under maximum intended app instances.
Incorrect Answers
B:Inspect delivery attempt counts, retry policy, dead-letter topic configuration, and failure classification. Dead-letter routing isolates messages that exceed allowed delivery attempts; it does not itself repair invalid data or guarantee business processing. That check does not establish the specific cause behind cloud sql connection pooling in serverless workloads.
C:Inspect task dependencies, branching logic, retry policy, state transitions, and auditability requirements. Workflows coordinates multi-step application processes; simply placing independent messages on topics does not create a deterministic state machine. That check does not establish the specific cause behind cloud sql connection pooling in serverless workloads.
D:Inspect row-key distribution, access queries, tablet hot spots, and key-prefix cardinality. Bigtable performance depends heavily on row-key design; monotonically increasing leading keys can concentrate writes and increase hotspots. That check does not establish the specific cause behind cloud sql connection pooling in serverless workloads.
Question 634
An autoscaled Cloud Run fleet opens a new direct database connection on every request and exhausts Cloud SQL connection limits. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Prefer maintained Cloud Client Libraries for supported calls and use documented REST or gRPC contracts when needed.
- Retry only transient eligible failures with bounded exponential backoff and jitter, separately handling nonretryable client errors.
- Acknowledge only after durable processing and make the handler idempotent to expected redelivery.
- Use bounded per-instance connection pools with application-level limits appropriate to aggregate autoscaling.
Explanation
Correct Answer
D:Use bounded per-instance connection pools with application-level limits appropriate to aggregate autoscaling. The expected outcome is that SQL requests remain responsive without saturating the database connection budget when the app scales. Before rollout, inspect concurrent instances, per-instance connection count, pool configuration, and database connection quota.
Incorrect Answers
A:Prefer maintained Cloud Client Libraries for supported calls and use documented REST or gRPC contracts when needed. In this scenario, an autoscaled Cloud Run fleet opens a new direct database connection on every request and exhausts Cloud SQL connection limits. A more direct response is to use bounded per-instance connection pools with application-level limits appropriate to aggregate autoscaling.
B:Retry only transient eligible failures with bounded exponential backoff and jitter, separately handling nonretryable client errors. This design addresses exponential backoff on transient API errors, where backoff reduces coordinated retries after transient failures; not every error is retryable and repeatable side effects need idempotency. A more direct response is to use bounded per-instance connection pools with application-level limits appropriate to aggregate autoscaling.
C:Acknowledge only after durable processing and make the handler idempotent to expected redelivery. This design addresses Pub/Sub acknowledgments and redelivery, where Pub/Sub normally uses at-least-once delivery; missing or expired acknowledgment permits redelivery and requires consumer-side idempotency. A more direct response is to use bounded per-instance connection pools with application-level limits appropriate to aggregate autoscaling.
Question 635
An autoscaled Cloud Run fleet opens a new direct database connection on every request and exhausts Cloud SQL connection limits. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Wrap stock validation and update in a transaction and test parallel competing purchases.
- Set pool size and idle timeouts, then load-test total database connections under maximum intended app instances.
- Create representative synthetic keys, run hot-key load tests, and measure read latency and tablet distribution.
- Enable and validate eligible pull-subscription acknowledgment semantics, then test duplicate publisher submissions independently.
Explanation
Correct Answer
B:Set pool size and idle timeouts, then load-test total database connections under maximum intended app instances. Validate the change by checking that SQL requests remain responsive without saturating the database connection budget when the app scales.
Incorrect Answers
A:Wrap stock validation and update in a transaction and test parallel competing purchases. This action changes a different concern, Firestore transactional document updates. The case instead calls for the following: set pool size and idle timeouts, then load-test total database connections under maximum intended app instances.
C:Create representative synthetic keys, run hot-key load tests, and measure read latency and tablet distribution. This action changes a different concern, Bigtable row-key hotspot avoidance. The case instead calls for the following: set pool size and idle timeouts, then load-test total database connections under maximum intended app instances.
D:Enable and validate eligible pull-subscription acknowledgment semantics, then test duplicate publisher submissions independently. This action changes a different concern, Pub/Sub exactly-once feature scope. The case instead calls for the following: set pool size and idle timeouts, then load-test total database connections under maximum intended app instances.
Question 636
An autoscaled Cloud Run fleet opens a new direct database connection on every request and exhausts Cloud SQL connection limits. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- SQL requests remain responsive without saturating the database connection budget when the app scales.
- The workload spreads writes and provides efficient row-range access for its documented query patterns.
- Temporary throttling recovers without retry storms and invalid requests fail promptly with actionable diagnostics.
- The intended endpoint processes tasks under rate limits, and failed callbacks recover within policy.
Explanation
Correct Answer
A:SQL requests remain responsive without saturating the database connection budget when the app scales. This is evidence that the particular acceptance condition for Cloud SQL connection pooling in serverless workloads has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect concurrent instances, per-instance connection count, pool configuration, and database connection quota.
Incorrect Answers
B:The workload spreads writes and provides efficient row-range access for its documented query patterns. That result could support testing of Bigtable row-key hotspot avoidance: Bigtable performance depends heavily on row-key design; monotonically increasing leading keys can concentrate writes and increase hotspots. It cannot substitute for the required control: sQL requests remain responsive without saturating the database connection budget when the app scales.
C:Temporary throttling recovers without retry storms and invalid requests fail promptly with actionable diagnostics. That result could support testing of exponential backoff on transient API errors: Backoff reduces coordinated retries after transient failures; not every error is retryable and repeatable side effects need idempotency. It cannot substitute for the required control: sQL requests remain responsive without saturating the database connection budget when the app scales.
D:The intended endpoint processes tasks under rate limits, and failed callbacks recover within policy. In this case, the outcome to verify is that SQL requests remain responsive without saturating the database connection budget when the app scales. It cannot substitute for the required control: sQL requests remain responsive without saturating the database connection budget when the app scales.
Question 637
An application holds unused SQL connections across deployments and fails to close them during scale-down. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect response page tokens, page size, requested field masks, and result reconciliation.
- Inspect subscription type, acknowledgment IDs, region and publisher message identity separately.
- Inspect concurrent instances, per-instance connection count, pool configuration, and database connection quota.
- Inspect bucket lifecycle rules, object age, retention policy locks, and legal retention requirements.
Explanation
Correct Answer
C:Inspect concurrent instances, per-instance connection count, pool configuration, and database connection quota. This checks the actual operating conditions relevant to Cloud SQL connection pooling in serverless workloads, rather than changing a service before the failure is understood. A focused follow-up is to set pool size and idle timeouts, then load-test total database connections under maximum intended app instances. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A:Inspect response page tokens, page size, requested field masks, and result reconciliation. Cloud APIs frequently paginate collection responses; selecting fewer fields improves efficiency but does not eliminate the need to consume every page. The first evidence should address cloud sql connection pooling in serverless workloads, not this separate diagnostic path.
B:Inspect subscription type, acknowledgment IDs, region and publisher message identity separately. Pub/Sub exactly-once delivery applies to supported pull subscriptions within documented scope and cannot prevent independent duplicate publishes. The first evidence should address cloud sql connection pooling in serverless workloads, not this separate diagnostic path.
D:Inspect bucket lifecycle rules, object age, retention policy locks, and legal retention requirements. Lifecycle policies automate object management, but enforceable retention controls can prevent deletion until the obligation expires. The first evidence should address cloud sql connection pooling in serverless workloads, not this separate diagnostic path.
Question 638
An application holds unused SQL connections across deployments and fails to close them during scale-down. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Route persistently unprocessable messages to a configured dead-letter topic after a bounded attempt policy.
- Use Cloud Storage lifecycle management for approved expiration while respecting effective retention constraints.
- Use Workflows to coordinate the required service calls with explicit conditionals and error handling.
- Use bounded per-instance connection pools with application-level limits appropriate to aggregate autoscaling.
Explanation
Correct Answer
D:Use bounded per-instance connection pools with application-level limits appropriate to aggregate autoscaling. The expected outcome is that SQL requests remain responsive without saturating the database connection budget when the app scales. Before rollout, inspect concurrent instances, per-instance connection count, pool configuration, and database connection quota. An application holds unused SQL connections across deployments and fails to close them during scale-down. The team is choosing a sustainable solution.
Incorrect Answers
A:Route persistently unprocessable messages to a configured dead-letter topic after a bounded attempt policy. This design addresses Pub/Sub dead-letter handling, where dead-letter routing isolates messages that exceed allowed delivery attempts; it does not itself repair invalid data or guarantee business processing. The reported condition is about cloud sql connection pooling in serverless workloads, not this adjacent change.
B:Use Cloud Storage lifecycle management for approved expiration while respecting effective retention constraints. This design addresses Cloud Storage lifecycle and retention controls, where lifecycle policies automate object management, but enforceable retention controls can prevent deletion until the obligation expires. The reported condition is about cloud sql connection pooling in serverless workloads, not this adjacent change.
C:Use Workflows to coordinate the required service calls with explicit conditionals and error handling. This design addresses Workflows multi-step service orchestration, where Workflows coordinates multi-step application processes; simply placing independent messages on topics does not create a deterministic state machine. The reported condition is about cloud sql connection pooling in serverless workloads, not this adjacent change.
Question 639
An application holds unused SQL connections across deployments and fails to close them during scale-down. 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 test event trigger and verify one positive, one excluded event, and one unauthorized invocation.
- Configure a test workload identity and a minimally privileged database user, then validate allowed and denied queries.
- Use supported client deadline-extension behavior and a stable operation identifier around the database update.
- Set pool size and idle timeouts, then load-test total database connections under maximum intended app instances.
Explanation
Correct Answer
D:Set pool size and idle timeouts, then load-test total database connections under maximum intended app instances. Validate the change by checking that SQL requests remain responsive without saturating the database connection budget when the app scales. An approved limited change can be tested in a safe environment.
Incorrect Answers
A:Configure a test event trigger and verify one positive, one excluded event, and one unauthorized invocation. This action changes a different concern, Eventarc event-type filtering and authorization. Applying it first would leave cloud sql connection pooling in serverless workloads unresolved.
B:Configure a test workload identity and a minimally privileged database user, then validate allowed and denied queries. This action changes a different concern, Cloud SQL Auth Proxy and database authorization. Applying it first would leave cloud sql connection pooling in serverless workloads unresolved.
C:Use supported client deadline-extension behavior and a stable operation identifier around the database update. This action changes a different concern, Pub/Sub acknowledgments and redelivery. Applying it first would leave cloud sql connection pooling in serverless workloads unresolved.
Question 640
An application holds unused SQL connections across deployments and fails to close them during scale-down. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Objects transition or expire according to policy without deleting data still under mandatory retention.
- The intended endpoint processes tasks under rate limits, and failed callbacks recover within policy.
- Messages eventually complete once at the business level even when delivery retries are observed.
- SQL requests remain responsive without saturating the database connection budget when the app scales.
Explanation
Correct Answer
D:SQL requests remain responsive without saturating the database connection budget when the app scales. This is evidence that the particular acceptance condition for Cloud SQL connection pooling in serverless workloads has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect concurrent instances, per-instance connection count, pool configuration, and database connection quota. An application holds unused SQL connections across deployments and fails to close them during scale-down. The team has tried a correction.
Incorrect Answers
A:Objects transition or expire according to policy without deleting data still under mandatory retention. That result could support testing of Cloud Storage lifecycle and retention controls: Lifecycle policies automate object management, but enforceable retention controls can prevent deletion until the obligation expires. That may help elsewhere, but it does not make the change required for cloud sql connection pooling in serverless workloads.
B:The intended endpoint processes tasks under rate limits, and failed callbacks recover within policy. In this case, the outcome to verify is that SQL requests remain responsive without saturating the database connection budget when the app scales. That may help elsewhere, but it does not make the change required for cloud sql connection pooling in serverless workloads.
C:Messages eventually complete once at the business level even when delivery retries are observed. That result could support testing of Pub/Sub acknowledgments and redelivery: Pub/Sub normally uses at-least-once delivery; missing or expired acknowledgment permits redelivery and requires consumer-side idempotency. That may help elsewhere, but it does not make the change required for cloud sql connection pooling in serverless workloads.