Google Professional Cloud Developer Practice Test 1
Question 1
A startup has a stateless container API and wants managed request scaling without administering Kubernetes nodes. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect compute placement, dependency replication, backups, failover prerequisites, and recovery objectives.
- Inspect backend health status, health-check behavior, dependency errors, and actual request distribution.
- Inspect workload process model, control-plane needs, runtime constraints, request shape, and operational ownership.
- Inspect whether the requirement is orchestration, point-to-point durable work, a fixed schedule, or an event fan-out.
Explanation
Correct Answer
C:Inspect workload process model, control-plane needs, runtime constraints, request shape, and operational ownership. This checks the actual operating conditions relevant to Cloud Run versus GKE versus Compute Engine, rather than changing a service before the failure is understood. The right compute product is determined by workload execution constraints and the operating responsibility the team is prepared to own.
Incorrect Answers
A: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 relevant dependency is cloud run versus gke versus compute engine, which this inspection alone does not establish.
B:Inspect backend health status, health-check behavior, dependency errors, and actual request distribution. A healthy network listener and a healthy application are not necessarily equivalent; routing depends on meaningful health checks. The relevant dependency is cloud run versus gke versus compute engine, 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 cloud run versus gke versus compute engine, which this inspection alone does not establish.
Question 2
A startup has a stateless container API and wants managed request scaling without administering Kubernetes nodes. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use an appropriate Google-signed identity token for the target URL plus minimum Cloud Run Invoker authorization.
- Use Eventarc routing with selective event filters and a supported Cloud Run destination for event-driven handling.
- Choose Cloud Run for compatible managed HTTP containers, GKE for Kubernetes orchestration, or Compute Engine when virtual machine control is required.
- Use versioned or invalidated cached data with identity-scoped keys and freshness bounds appropriate to the business rule.
Explanation
Correct Answer
C:Choose Cloud Run for compatible managed HTTP containers, GKE for Kubernetes orchestration, or Compute Engine when virtual machine control is required. In this scenario, a startup has a stateless container API and wants managed request scaling without administering Kubernetes nodes. The right compute product is determined by workload execution constraints and the operating responsibility the team is prepared to own.
Incorrect Answers
A: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. Applying it first would leave cloud run versus gke versus compute engine unresolved.
B:Use Eventarc routing with selective event filters and a supported Cloud Run destination for event-driven handling. Applying it first would leave cloud run versus gke versus compute engine unresolved.
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. Applying it first would leave cloud run versus gke versus compute engine unresolved.
Question 3
A startup has a stateless container API and wants managed request scaling without administering Kubernetes nodes. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Attach validated attestations to the intended image digest and test both authorized and untrusted image deployments.
- Prototype the shortlisted runtime with the real container, platform permissions, and scaling limits before migrating traffic.
- Assign the scoped identity to the service and remove plaintext keys after rotating any previously exposed secrets.
- Define explicit ingress/egress policy and, where needed, mesh mTLS and route policy, then test authorized peer flows.
Explanation
Correct Answer
B:Prototype the shortlisted runtime with the real container, platform permissions, and scaling limits before migrating traffic. In this scenario, a startup has a stateless container API and wants managed request scaling without administering Kubernetes nodes. The right compute product is determined by workload execution constraints and the operating responsibility the team is prepared to own.
Incorrect Answers
A:Attach validated attestations to the intended image digest and test both authorized and untrusted image deployments. This action changes a different concern, binary Authorization deployment policy. That may help elsewhere, but it does not make the change required for cloud run versus gke versus compute engine.
C:Assign the scoped identity to the service and remove plaintext keys after rotating any previously exposed secrets. This action changes a different concern, service account and least-privilege API identity. That may help elsewhere, but it does not make the change required for cloud run versus gke versus compute engine.
D: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. That may help elsewhere, but it does not make the change required for cloud run versus gke versus compute engine.
Question 4
A startup has a stateless container API and wants managed request scaling without administering Kubernetes nodes. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Unhealthy backends stop receiving new eligible traffic while healthy capacity serves the request contract.
- Latency and data placement meet stated goals without assuming every managed Google Cloud service is globally replicated.
- Authorized operations succeed while unrelated resource access is rejected under least privilege.
- The selected runtime meets the application contract without hidden node-management or host-customization gaps.
Explanation
Correct Answer
D:The selected runtime meets the application contract without hidden node-management or host-customization gaps. This is evidence that the particular acceptance condition for Cloud Run versus GKE versus Compute Engine has been met, rather than a general availability metric. The right compute product is determined by workload execution constraints and the operating responsibility the team is prepared to own.
Incorrect Answers
A:Unhealthy backends stop receiving new eligible traffic while healthy capacity serves the request contract. That result could support testing of backend health and failure routing: A healthy network listener and a healthy application are not necessarily equivalent; routing depends on meaningful health checks. A more direct response is to recognize that the selected runtime meets the application contract without hidden node-management or host-customization gaps.
B:Latency and data placement meet stated goals without assuming every managed Google Cloud service is globally replicated. That result could support testing of regional latency and data placement: A product's regional or zonal scope determines placement, failure exposure, and latency; global branding alone does not guarantee global data residency. A more direct response is to recognize that the selected runtime meets the application contract without hidden node-management or host-customization gaps.
C:Authorized operations succeed while unrelated resource access is rejected under least privilege. That result could support testing of service account and least-privilege API identity: Service identities and IAM roles authorize Google Cloud APIs; embedding reusable private keys is not necessary for managed runtime credentials. A more direct response is to recognize that the selected runtime meets the application contract without hidden node-management or host-customization gaps.
Question 5
A legacy image-processing daemon requires persistent host agents and custom kernel tooling that a serverless container contract cannot supply. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect event sources, supported Eventarc provider types, filters, delivery destinations, and handler authorization.
- Inspect hostname requirements, URL paths, backends, ingress type, health checks, and TLS certificate scope.
- Inspect workload process model, control-plane needs, runtime constraints, request shape, and operational ownership.
- Inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest.
Explanation
Correct Answer
C:Inspect workload process model, control-plane needs, runtime constraints, request shape, and operational ownership. This checks the actual operating conditions relevant to Cloud Run versus GKE versus Compute Engine, rather than changing a service before the failure is understood. The right compute product is determined by workload execution constraints and the operating responsibility the team is prepared to own. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A: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. To examine the reported mechanism, the team instead needs to inspect workload process model, control-plane needs, runtime constraints, request shape, and operational ownership.
B:Inspect hostname requirements, URL paths, backends, ingress type, health checks, and TLS certificate scope. Application load balancing can apply HTTP host and path rules; DNS resolution alone cannot implement those backend routing decisions. To examine the reported mechanism, the team instead needs to inspect workload process model, control-plane needs, runtime constraints, request shape, and operational ownership.
D: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. To examine the reported mechanism, the team instead needs to inspect workload process model, control-plane needs, runtime constraints, request shape, and operational ownership.
Question 6
A legacy image-processing daemon requires persistent host agents and custom kernel tooling that a serverless container contract cannot supply. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use Identity Platform for supported end-user identity flows and separate application sessions from workload IAM credentials.
- Choose Cloud Run for compatible managed HTTP containers, GKE for Kubernetes orchestration, or Compute Engine when virtual machine control is required.
- Use Workload Identity Federation for GKE to provide keyless workload access limited to intended Google resources.
- Choose REST for broad HTTP compatibility or gRPC with protobuf when supported typed service contracts and streaming matter.
Explanation
Correct Answer
B:Choose Cloud Run for compatible managed HTTP containers, GKE for Kubernetes orchestration, or Compute Engine when virtual machine control is required. In this scenario, a legacy image-processing daemon requires persistent host agents and custom kernel tooling that a serverless container contract cannot supply. The right compute product is determined by workload execution constraints and the operating responsibility the team is prepared to own.
Incorrect Answers
A:Use Identity Platform for supported end-user identity flows and separate application sessions from workload IAM credentials. This design addresses identity Platform end-user sign-in, where end-user authentication and service-to-service IAM authentication are distinct trust boundaries requiring different tokens and policies. It cannot substitute for the required control: choose Cloud Run for compatible managed HTTP containers, GKE for Kubernetes orchestration, or Compute Engine when virtual machine control is required.
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. It cannot substitute for the required control: choose Cloud Run for compatible managed HTTP containers, GKE for Kubernetes orchestration, or Compute Engine when virtual machine control is required.
D: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. It cannot substitute for the required control: choose Cloud Run for compatible managed HTTP containers, GKE for Kubernetes orchestration, or Compute Engine when virtual machine control is required.
Question 7
A legacy image-processing daemon requires persistent host agents and custom kernel tooling that a serverless container contract cannot supply. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Move the cart record to an authorized shared datastore and test alternating requests across independently restarted instances.
- Configure a proof-of-concept policy and verify partner access, API metrics, and operational ownership against requirements.
- Migrate the credential to an approved secret version and test rotation without exposing secret contents in logs.
- Prototype the shortlisted runtime with the real container, platform permissions, and scaling limits before migrating traffic.
Explanation
Correct Answer
D:Prototype the shortlisted runtime with the real container, platform permissions, and scaling limits before migrating traffic. In this scenario, a legacy image-processing daemon requires persistent host agents and custom kernel tooling that a serverless container contract cannot supply. The right compute product is determined by workload execution constraints and the operating responsibility the team is prepared to own.
Incorrect Answers
A:Move the cart record to an authorized shared datastore and test alternating requests across independently restarted instances. This action changes a different concern, stateless service session design. It addresses a different dependency from cloud run versus gke versus compute engine.
B: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. It addresses a different dependency from cloud run versus gke versus compute engine.
C:Migrate the credential to an approved secret version and test rotation without exposing secret contents in logs. This action changes a different concern, secret Manager access and rotation. It addresses a different dependency from cloud run versus gke versus compute engine.
Question 8
A legacy image-processing daemon requires persistent host agents and custom kernel tooling that a serverless container contract cannot supply. 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.
- The selected runtime meets the application contract without hidden node-management or host-customization gaps.
- The client can perform only the permitted operation before expiry, without direct bucket-wide IAM credentials.
- Requests for each public path reach the correct healthy backend through the approved HTTPS endpoint.
Explanation
Correct Answer
B:The selected runtime meets the application contract without hidden node-management or host-customization gaps. In this scenario, a legacy image-processing daemon requires persistent host agents and custom kernel tooling that a serverless container contract cannot supply. The right compute product is determined by workload execution constraints and the operating responsibility the team is prepared to own.
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 the selected runtime meets the application contract without hidden node-management or host-customization gaps. The reported condition is about cloud run versus gke versus compute engine, not this adjacent change.
C:The client can perform only the permitted operation before expiry, without direct bucket-wide IAM credentials. In this case, the outcome to verify is that the selected runtime meets the application contract without hidden node-management or host-customization gaps. The reported condition is about cloud run versus gke versus compute engine, not this adjacent change.
D:Requests for each public path reach the correct healthy backend through the approved HTTPS endpoint. That result could support testing of external application load balancer routing: Application load balancing can apply HTTP host and path rules; DNS resolution alone cannot implement those backend routing decisions. The reported condition is about cloud run versus gke versus compute engine, not this adjacent change.
Question 9
A CPU-heavy Cloud Run handler stalls when multiple large document requests run simultaneously in one instance. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect workload process model, control-plane needs, runtime constraints, request shape, and operational ownership.
- Inspect whether the requirement is storing an API credential or managing cryptographic keys and their rotation permissions.
- Inspect per-instance simultaneous requests, CPU saturation, memory pressure, tail latency, and autoscaling metrics.
- Inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values.
Explanation
Correct Answer
C:Inspect per-instance simultaneous requests, CPU saturation, memory pressure, tail latency, and autoscaling metrics. Success requires that the service meets throughput and latency targets without overloading a single container or creating unnecessary instances.
Incorrect Answers
A:Inspect workload process model, control-plane needs, runtime constraints, request shape, and operational ownership. The right compute product is determined by workload execution constraints and the operating responsibility the team is prepared to own. This is not the decisive inspection for cloud run concurrent request capacity.
B:Inspect whether the requirement is storing an API credential or managing cryptographic keys and their rotation permissions. Cloud KMS manages encryption keys and cryptographic operations, while Secret Manager primarily manages sensitive application secret values. This is not the decisive inspection for cloud run concurrent request capacity.
D:Inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values. Secret Manager stores and versions application secret values; ordinary source repositories and world-readable configuration are unsuitable secret stores. This is not the decisive inspection for cloud run concurrent request capacity.
Question 10
A CPU-heavy Cloud Run handler stalls when multiple large document requests run simultaneously in one instance. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment.
- Set Cloud Run concurrency to match measured in-process parallelism, rather than assuming the highest possible number is optimal.
- Set justified Cloud Run minimum and maximum instance bounds and concurrency based on load and cold-start tolerance.
- Use Cloud KMS for supported cryptographic key operations and lifecycle controls, rather than confusing it with Secret Manager storage.
Explanation
Correct Answer
B:Set Cloud Run concurrency to match measured in-process parallelism, rather than assuming the highest possible number is optimal. The expected outcome is that the service meets throughput and latency targets without overloading a single container or creating unnecessary instances. Before rollout, inspect per-instance simultaneous requests, CPU saturation, memory pressure, tail latency, and autoscaling metrics.
Incorrect Answers
A:Use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment. This design addresses binary Authorization deployment policy, where 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 cloud run concurrent request capacity.
C:Set justified Cloud Run minimum and maximum instance bounds and concurrency based on load and cold-start tolerance. That may help elsewhere, but it does not make the change required for cloud run concurrent request capacity.
D:Use Cloud KMS for supported cryptographic key operations and lifecycle controls, rather than confusing it with Secret Manager storage. That may help elsewhere, but it does not make the change required for cloud run concurrent request capacity.