Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Google Professional Cloud Developer Professional-Cloud-Developer Exam Questions

Last updated: · 12 practice questions with answers and explanations

Page: 1 / 18 Total 265 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Designing highly scalable, secure, and reliable cloud-native applications

Skill tested: Selects a compute platform based on workload scaling, operational, and networking requirements.

A media company is moving a stateless image-resizing API to Google Cloud. Traffic is highly variable, requests complete in seconds, and the service must scale to zero when idle. The team wants to deploy an application container without managing a cluster or virtual machines. It does not require privileged containers, host-level access, or a continuously running worker. Which platform is the best fit?

Correct Answer: D. Cloud Run, deploying the container as a service and configuring request-based scaling
Explanation:

Cloud Run is designed to run containerized, request-driven services without requiring the team to manage a cluster or virtual machines. It can scale instances in response to requests and scale to zero when there is no demand, matching the stateless, short-lived workload. GKE provides greater orchestration control but adds cluster operations and is unnecessary here. A managed instance group can autoscale VMs but does not remove VM management and typically cannot scale the service to zero in the same way. A single VM neither meets the scaling requirement nor avoids infrastructure management.

Question 2

New Multiple answers

Topic: Designing highly scalable, secure, and reliable cloud-native applications

Skill tested: Designs resilient regional deployments and load balancing for availability across zones.

An online retailer runs a stateless web application on Compute Engine and must remain available if one zone in its serving region fails. The application can run on identical instances in multiple zones, and requests do not require client session affinity. The team wants health-based traffic distribution and automated replacement or scaling of instances. Which two changes best meet these requirements? Select TWO.

Correct Answer: D. Create a regional managed instance group spanning multiple zones and configure autoscaling.; E. Configure a load balancer with a backend service that uses health checks and the regional managed instance group as its backend.
Explanation:

A regional managed instance group distributes instances across zones and can maintain or replace instances according to its configuration, while autoscaling adjusts capacity. A health-checked load balancer can stop sending traffic to unhealthy backends and distribute requests among healthy instances. DNS round-robin without health checking can continue returning an unavailable endpoint. A zonal group leaves a single-zone failure as a service outage, regardless of the load balancer's scope. Session affinity is unnecessary for a stateless application and cannot preserve a failed zone.

Question 3

New Single answer

Topic: Designing highly scalable, secure, and reliable cloud-native applications

Skill tested: Uses Memorystore to reduce repeated database reads while maintaining application correctness.

A product-catalog API reads product details from Cloud SQL. During promotions, repeated requests for the same popular products cause high database utilization and increased latency. Product records change infrequently, and the application can tolerate a short period of stale data. The team wants a managed in-memory cache accessible to its application instances without making the cache the durable source of truth. What should the team implement?

Correct Answer: D. Add Memorystore as a cache, using Cloud SQL as the source of truth and an appropriate expiration or invalidation strategy.
Explanation:

Memorystore provides a managed in-memory data store that can serve frequently requested values with lower latency and reduce repeated reads against Cloud SQL. Keeping Cloud SQL authoritative preserves durable catalog data; expiration or invalidation bounds how long cached values can remain stale. Making Memorystore the sole copy confuses a cache with durable source-of-truth storage. A larger connection pool does not eliminate repeated database work and can increase database pressure. Pub/Sub is asynchronous messaging, not a synchronous cache for returning query results.

Question 4

New Single answer

Topic: Designing highly scalable, secure, and reliable cloud-native applications

Skill tested: Chooses asynchronous Pub/Sub integration to decouple producers from independently scaling consumers.

A checkout service must record an order promptly, but several downstream systems perform independent work: fraud analysis, warehouse updates, and customer notifications. Those systems can be temporarily unavailable, and checkout must not wait for each one to finish. The organization wants the consumers to scale independently and to process events after transient outages. Which design is most appropriate?

Correct Answer: B. Publish an order event to a Pub/Sub topic after recording the order, with separate subscriptions for the downstream consumers.
Explanation:

Publishing an event to Pub/Sub decouples checkout from downstream processing and allows each consumer to use its own subscription and scale independently. Pub/Sub retains messages for delivery according to its service behavior, allowing consumers to resume after transient outages. Synchronous calls couple checkout latency and availability to every downstream system. A local file is neither a shared, durable event distribution mechanism nor reliable across instance replacement. Extending a request timeout leaves the systems coupled and does not address independent scaling or outage isolation.

Question 5

New Single answer

Topic: Designing highly scalable, secure, and reliable cloud-native applications

Skill tested: Selects an API exposure layer for authentication, rate limiting, and API observability.

A team exposes a set of HTTP APIs implemented by Cloud Run services. External mobile clients must authenticate, and the product team needs centrally managed API quotas and analytics without adding rate-limit logic independently to every service. The services should remain behind their existing service-level access controls. Which approach best fits these requirements?

Correct Answer: C. Put Apigee in front of the APIs to manage API security policies, quotas, and analytics, while retaining appropriate backend access controls.
Explanation:

Apigee is an API management platform that can apply centralized API policies, including authentication-related controls, quotas, and analytics, while the backend services retain their own access controls. This avoids duplicating quota enforcement across APIs or relying on untrusted client behavior. Directly exposing service URLs does not provide the requested centralized management. Memorystore is a data store, not an API gateway or credential-management solution. Cloud Run minimum instances affect serving capacity and latency, not per-client API quotas.

Question 6

New Single answer

Topic: Building and testing applications

Skill tested: Builds and stores container images using Cloud Build and Artifact Registry.

A development team currently builds container images on a developer workstation and pushes them to a registry using personal credentials. It wants a repeatable CI build triggered by source changes, with images stored in a Google Cloud-managed repository and access controlled through IAM. The team wants to avoid maintaining a self-hosted build server. Which solution should it implement?

Correct Answer: A. Configure Cloud Build to build the image from source and push it to an Artifact Registry Docker repository using the build service account's permissions.
Explanation:

Cloud Build provides managed build execution and can build container images from source as part of a CI workflow. Artifact Registry stores container images and integrates with Google Cloud IAM; the Cloud Build service account needs the necessary repository permissions to push. A scheduled VM adds infrastructure management and does not provide a source-change-driven managed build by itself. Cloud Run deploys application containers rather than serving as the image-build system. Artifact Registry stores artifacts, not Dockerfiles as a replacement for building, and continuing to use personal credentials fails the requested centralized access model.

Question 7

New Multiple answers

Topic: Building and testing applications

Skill tested: Separates unit and integration testing and runs automated integration tests in Cloud Build.

A team has fast unit tests that use local fakes and a smaller integration suite that must verify the application against actual Google Cloud service behavior. It wants every proposed change tested automatically, while keeping the unit-test feedback loop fast and preventing integration tests from using developers' personal credentials. Which two CI practices best satisfy these requirements? Select TWO.

Correct Answer: C. Run the integration suite in Cloud Build with a dedicated build identity granted only the required test-resource permissions.; E. Run the unit tests early in the Cloud Build pipeline, before expensive build or integration stages.
Explanation:

Running fast unit tests early gives developers quick feedback and avoids spending time on later stages when basic logic already fails. Integration tests can run in Cloud Build against the required services, using the build identity with narrowly scoped permissions rather than personal credentials. Laptop-only testing is inconsistent and undermines automated verification. Mocks are valuable for unit tests but cannot establish that real service integration works. Project-wide Owner access is unnecessarily broad and violates least-privilege practice; a dedicated identity should receive only the permissions needed for the test environment.

Question 8

New Single answer

Topic: Integrating applications with Google Cloud services

Skill tested: Connects a Cloud Run service to Cloud SQL using a dedicated service identity and least privilege.

A company is deploying a Cloud Run application that must read and update a Cloud SQL database. The team wants to avoid embedding database credentials or a service-account key in the container image. The Cloud Run service should authenticate using its attached identity, and the database connection must follow the supported Cloud SQL integration pattern. What should the team do?

Correct Answer: B. Attach a dedicated runtime service account to the Cloud Run service, grant it the required Cloud SQL connection permission, and configure the service to connect through the Cloud SQL integration.
Explanation:

Cloud Run uses its configured runtime service account for application access to Google Cloud services. Granting a dedicated identity the needed Cloud SQL connection permission and configuring the Cloud SQL connection appropriately avoids long-lived keys in the image and applies least privilege. Baking a key into an image exposes a reusable credential and complicates rotation. Project-wide Editor access and a committed password are excessive and unsafe. The deployment identity is not automatically the application's runtime identity, and deployment authorization alone does not configure database connectivity.

Question 9

New Multiple answers

Topic: Integrating applications with Google Cloud services

Skill tested: Implements robust Cloud API reads using pagination and exponential backoff for transient errors.

A reporting service calls a Google Cloud API to retrieve a large collection of resources. The API returns results in pages, and transient rate-limit or server errors occur occasionally. The report must include all matching resources without issuing unnecessary repeated requests. Which two client behaviors are most appropriate? Select TWO.

Correct Answer: D. Follow each response's page token until the API indicates there are no further results.; E. Retry transient failures with exponential backoff, applying the API's retry guidance where available.
Explanation:

Paginated APIs require the client to use the returned page token to retrieve subsequent pages; stopping after the first page can silently omit resources. Exponential backoff reduces pressure during transient errors and rate limiting, and the client should honor documented retry guidance. Repeating the first page does not advance through results. Immediate tight-loop retries can worsen throttling and contention. Asking for a page size beyond the documented maximum is not a reliable substitute for pagination and may be rejected or capped.

Question 10

New Single answer

Topic: Integrating applications with Google Cloud services

Skill tested: Uses Cloud Logging, metrics, and traces to isolate latency in a distributed application.

A service receives requests through an API layer and then calls two downstream services. Users report intermittent slow responses, but aggregate request counts and error rates appear normal. The team needs to identify which component contributes latency for individual requests and correlate that evidence with application behavior. What should the team implement first?

Correct Answer: D. Instrument the request path with distributed traces and useful span attributes, and emit correlated structured logs and relevant latency metrics.
Explanation:

Distributed traces show the timing and relationships of work across the API layer and downstream calls, making them appropriate for locating latency in individual request paths. Correlated structured logs add diagnostic context, while latency metrics reveal broader trends and help identify affected services. Daily aggregate counts cannot isolate a slow component. Raising timeouts can mask symptoms while increasing request duration and resource use. Permanently enabling verbose logs creates noise and cost without providing the request-level timing relationships that tracing supplies.

Question 11

New Single answer

Topic: Configuring cloud-native applications for deployment

Skill tested: Configures Kubernetes readiness and liveness probes to protect traffic and recover unhealthy containers.

A team deploys a containerized API to GKE. During startup, the application needs time to load configuration and establish local state; during operation, it can become irrecoverably stuck. The current probe sends traffic as soon as the container starts, causing failed requests during initialization. The team also wants Kubernetes to restart a container that remains unhealthy, without restarting it merely because it is not yet ready to serve. Which configuration is best?

Correct Answer: D. Use a readiness probe that succeeds only when the API can serve requests, and a liveness probe that detects a stuck process; configure startup allowances appropriate to initialization.
Explanation:

Readiness controls whether a pod should receive service traffic, whereas liveness determines whether Kubernetes should restart a container. A startup probe can provide startup time before liveness and readiness checks take effect, which is useful when initialization is slow. A liveness-only configuration does not prevent traffic from reaching an unready application. An always-successful readiness probe defeats traffic protection, and coupling liveness to a remote dependency can trigger unnecessary restarts when that dependency is unavailable. A startup probe is not a permanent replacement for readiness and liveness checks.

Question 12

New Multiple answers

Topic: Configuring cloud-native applications for deployment

Skill tested: Configures GKE Horizontal Pod Autoscaler inputs and resource requests for workload scaling.

A GKE application experiences predictable request spikes, and its Deployment currently has no CPU resource requests. The team wants a Horizontal Pod Autoscaler to add replicas when sustained CPU utilization rises, while keeping the workload within its cluster capacity. Engineers have observed that the current autoscaler configuration does not produce the expected utilization-based scaling. Which two actions should the team take? Select TWO.

Correct Answer: A. Set appropriate CPU requests on the application containers and configure the HPA to scale the Deployment using CPU utilization.; D. Configure the HPA with a target CPU utilization and ensure the cluster has capacity, or a node-scaling mechanism, to schedule additional pods.
Explanation:

For an HPA CPU utilization target, Kubernetes evaluates usage relative to the containers' CPU requests; without requests, utilization-based scaling cannot be calculated as intended. The HPA must be configured with a target metric, and newly requested pods also need schedulable cluster capacity, potentially provided by cluster autoscaling. CPU limits alone do not provide the missing request baseline. Manually setting replicas does not configure the HPA's scaling metric. Liveness probes restart unhealthy containers; they do not add Deployment replicas in response to high CPU usage.