Docsity

GOOGLE PROFESSIONAL CLOUD DEVELOPER PRACTICE EXAM 2026/2027 Q&A, Exams of Information Technology

Toggle sidebar
bg1
1
GOOGLE PROFESSIONAL CLOUD DEVELOPER PRACTICE
EXAM 2026/2027 COMPLETE CURRENT TESTING
QUESTIONS AND CORRECT ANSWERS WITH DETAILED
RATIONALES.
GOOGLE
This 120-question practice exam covers the five official exam domains: Designing
highly scalable, available, and reliable cloud-native applications, Building and testing
applications, Deploying applications, Integrating applications with Google Cloud
services, and Managing deployed applications.
MULTIPLE CHOICE.
SECTION 1: DESIGNING HIGHLY SCALABLE, AVAILABLE, AND RELIABLE
CLOUD-NATIVE APPLICATIONS (Questions 1–43)
1. A startup is building a social media application expecting growth from
10,000 to 10 million users. They need a platform that scales
automatically, minimizes operational overhead, and supports rapid
feature deployment. Which platform should they choose?
A. Compute Engine with managed instance groups
B. GKE Autopilot with Horizontal Pod Autoscaler
C. Cloud Run with minimum instances set to 1
D. App Engine Standard with manual scaling
Answer: B. GKE Autopilot with Horizontal Pod Autoscaler
Rationale: GKE Autopilot provides a fully managed Kubernetes
experience with automatic node provisioning and scaling. HPA
scales pods based on CPU or custom metrics. This combination
handles rapid growth from thousands to millions of users while
minimizing operational overhead. Compute Engine requires cluster
management. Cloud Run is serverless but has execution time limits.
App Engine Standard is more restrictive.
2. An e-commerce application needs to process orders with exactly-once
delivery. The system must handle bursts of traffic and guarantee that no
order is processed twice. Which architecture should they implement?
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29

Partial preview of the text

Download GOOGLE PROFESSIONAL CLOUD DEVELOPER PRACTICE EXAM 2026/2027 Q&A and more Exams Information Technology in PDF only on Docsity!

GOOGLE PROFESSIONAL CLOUD DEVELOPER PRACTICE

EXAM 2026/2027 COMPLETE CURRENT TESTING

QUESTIONS AND CORRECT ANSWERS WITH DETAILED

RATIONALES.

GOOGLE

This 120-question practice exam covers the five official exam domains: Designing highly scalable, available, and reliable cloud-native applications, Building and testing applications, Deploying applications, Integrating applications with Google Cloud services, and Managing deployed applications. MULTIPLE CHOICE. SECTION 1: DESIGNING HIGHLY SCALABLE, AVAILABLE, AND RELIABLE CLOUD-NATIVE APPLICATIONS (Questions 1–43)

  1. A startup is building a social media application expecting growth from 10,000 to 10 million users. They need a platform that scales automatically, minimizes operational overhead, and supports rapid feature deployment. Which platform should they choose? A. Compute Engine with managed instance groups B. GKE Autopilot with Horizontal Pod Autoscaler C. Cloud Run with minimum instances set to 1 D. App Engine Standard with manual scaling Answer: B. GKE Autopilot with Horizontal Pod Autoscaler Rationale: GKE Autopilot provides a fully managed Kubernetes experience with automatic node provisioning and scaling. HPA scales pods based on CPU or custom metrics. This combination handles rapid growth from thousands to millions of users while minimizing operational overhead. Compute Engine requires cluster management. Cloud Run is serverless but has execution time limits. App Engine Standard is more restrictive.
  2. An e-commerce application needs to process orders with exactly-once delivery. The system must handle bursts of traffic and guarantee that no order is processed twice. Which architecture should they implement?

A. Pub/Sub with Dataflow and exactly-once processing, writing to Cloud SQL B. Cloud Tasks with Cloud Functions C. Direct writes to Firestore from the web frontend D. Cloud Scheduler with batch processing Answer: A. Pub/Sub with Dataflow and exactly-once processing, writing to Cloud SQL Rationale: Pub/Sub provides at-least-once delivery. Dataflow supports exactly-once processing semantics when reading from Pub/Sub and writing to sinks. This combination guarantees no duplicate order processing. Cloud Tasks and Cloud Functions do not provide exactly-once guarantees. Direct Firestore writes lack transactional order processing.

  1. A team is designing a user session management system for a globally distributed application. They need low-latency session access for users in North America, Europe, and Asia. Which caching solution should they use? A. Cloud CDN B. Memorystore for Redis with global replication C. Cloud Storage with object lifecycle management D. BigQuery with BI Engine Answer: B. Memorystore for Redis with global replication Rationale: Memorystore for Redis provides sub-millisecond latency for session data. Global replication ensures that session data is available in multiple regions. Cloud CDN caches static content, not session data. Cloud Storage and BigQuery are not suitable for low- latency session management.
  2. A developer needs to instrument their application to produce metrics, logs, and traces that can be correlated across services. Which approach should they take? A. Only log to stdout and rely on Cloud Logging B. Use OpenTelemetry SDK to emit metrics, logs, and traces with a consistent trace ID C. Use only Cloud Trace for tracing

increasing key causes hotspotting. A high-cardinality prefix distributes writes across multiple nodes. This is the recommended practice for high-write workloads.

  1. An application needs to support both HTTP REST and gRPC APIs. The team wants to use a single API definition and generate client libraries. What should they use? A. Cloud Endpoints with OpenAPI B. Cloud Endpoints with gRPC and transcoding C. Apigee with REST only D. Cloud API Gateway with HTTP only Answer: B. Cloud Endpoints with gRPC and transcoding Rationale: Cloud Endpoints supports gRPC with transcoding, which allows gRPC APIs to be accessed via HTTP REST. This provides both protocols from a single API definition. Apigee and API Gateway are also valid but gRPC transcoding is the key differentiator.
  2. A team needs to implement a caching solution for a Cloud Run service that experiences high read traffic and variable latency from the backend. Which caching approach should they use? A. In-memory caching within each Cloud Run instance B. Memorystore for Redis as a shared cache C. Cloud CDN only D. Cloud Storage for static content Answer: B. Memorystore for Redis as a shared cache Rationale: Memorystore for Redis provides a shared, low-latency cache that persists across Cloud Run instances. In-memory caching is lost when instances scale down. Cloud CDN is for static content. Cloud Storage is not a cache.
  3. An application deployed on Compute Engine needs to gracefully shut down when the platform terminates the instance. What should the developer implement? A. Ignore SIGTERM and wait for the instance to be forcefully terminated B. Handle SIGTERM by draining connections, finishing in-flight requests, and then exiting

C. Immediately exit on SIGTERM D. Use a cron job to check for termination Answer: B. Handle SIGTERM by draining connections, finishing in- flight requests, and then exiting Rationale: Compute Engine sends SIGTERM before terminating an instance. Applications should handle SIGTERM by draining connections, completing in-flight requests, and then exiting gracefully. This prevents data loss and connection errors.

  1. A team is designing a fault-tolerant application that uses Pub/Sub. They need to handle message processing failures without losing messages. What should they implement? A. Acknowledge all messages immediately B. Implement a dead-letter topic and retry with exponential backoff C. Ignore failed messages D. Delete failed messages Answer: B. Implement a dead-letter topic and retry with exponential backoff Rationale: A dead-letter topic captures messages that cannot be processed after a specified number of attempts. Retry with exponential backoff handles transient failures. This ensures no messages are lost.
  2. A developer needs to implement authentication for an application that calls Google Cloud APIs from outside Google Cloud. Which approach should they use? A. Use Application Default Credentials B. Use a service account key stored in the application C. Use Workload Identity Federation to exchange external credentials for Google Cloud access tokens D. Use API keys Answer: C. Use Workload Identity Federation to exchange external credentials for Google Cloud access tokens Rationale: Workload Identity Federation allows external workloads (e.g., on-premises, AWS, Azure) to authenticate to Google Cloud

C. No security controls D. Only IAM policies Answer: A. Network policies and mTLS with Cloud Service Mesh Rationale: Kubernetes Network Policies control pod-to-pod traffic. Cloud Service Mesh provides mTLS for service-to-service authentication and encryption. Together they secure microservices communication.

  1. A developer needs to store application secrets and rotate them regularly. Which service should they use? A. Environment variables in the deployment configuration B. Secret Manager with automatic rotation C. ConfigMaps D. Hardcoded values in source code Answer: B. Secret Manager with automatic rotation Rationale: Secret Manager stores secrets encrypted at rest, controls access via IAM, and supports automatic rotation. Environment variables and ConfigMaps are not secure for secrets. Hardcoded values are never acceptable.
  2. A team is building an application that needs to process events from multiple sources, including Cloud Storage, Pub/Sub, and Cloud Scheduler. They want a single orchestration layer. What should they use? A. Cloud Functions only B. Workflows with Eventarc C. Cloud Run only D. Compute Engine with cron jobs Answer: B. Workflows with Eventarc Rationale: Workflows provides a serverless orchestration engine for multi-step processes. Eventarc routes events from sources to Workflows. This combination handles events from multiple sources with a single orchestration layer.
  3. A developer needs to implement rate limiting for an API deployed on Cloud Run. What should they use?

A. Cloud Armor with rate limiting rules B. Apigee with rate limiting policies C. Cloud Endpoints with quotas D. All of the above Answer: D. All of the above Rationale: Cloud Armor provides rate limiting at the load balancer level. Apigee provides API management with rate limiting policies. Cloud Endpoints supports quotas and rate limiting. The choice depends on the API management approach.

  1. A team needs to implement data retention policies for Cloud Storage objects. What should they configure? A. Object Lifecycle Management rules to transition or delete objects based on age B. Bucket Lock to prevent deletion C. Both A and B D. Neither A nor B Answer: C. Both A and B Rationale: Object Lifecycle Management automates transitioning objects to colder storage classes or deleting them. Bucket Lock prevents deletion of objects for a specified retention period. Both are needed for comprehensive retention policies.
  2. A developer is building a Cloud Run service that needs to access a Cloud SQL database. What is the recommended approach for connecting? A. Use the Cloud SQL Auth Proxy or the Cloud SQL Connector B. Use a public IP address for Cloud SQL C. Store database credentials in environment variables D. Use direct database connections over the public internet Answer: A. Use the Cloud SQL Auth Proxy or the Cloud SQL Connector Rationale: The Cloud SQL Auth Proxy and Cloud SQL Connector provide secure, IAM-based authentication to Cloud SQL without exposing the database to the public internet or managing IP allowlists.

asynchronous. Firestore in Datastore mode provides eventual consistency. Bigtable provides eventual consistency.

  1. A developer is building a service that needs to process messages from Pub/Sub with at-least-once delivery. How should they handle duplicate messages? A. Ignore duplicates B. Implement idempotent processing logic using a unique message ID C. Use exactly-once delivery only D. Store duplicates in a separate table Answer: B. Implement idempotent processing logic using a unique message ID Rationale: Pub/Sub provides at-least-once delivery, so duplicates can occur. Idempotent processing uses a unique message ID to detect and skip duplicates. This ensures correct results regardless of duplicate delivery.
  2. A team needs to deploy a containerized application to GKE with health checks that ensure traffic is only routed to healthy pods. What should they configure? A. Liveness and readiness probes B. Startup probes only C. No health checks D. Only liveness probes Answer: A. Liveness and readiness probes Rationale: Readiness probes determine when a pod is ready to receive traffic. Liveness probes determine when a pod should be restarted. Both are essential for reliable GKE deployments.
  3. A developer needs to choose between HTTP REST and gRPC for a new API. The API will be used by mobile clients and internal microservices. What should they consider? A. gRPC for internal microservices (performance, streaming), REST for mobile clients (compatibility) B. REST for everything C. gRPC for everything

D. Neither Answer: A. gRPC for internal microservices (performance, streaming), REST for mobile clients (compatibility) Rationale: gRPC provides better performance and streaming for service-to-service communication. REST is more compatible with mobile clients and browsers. A hybrid approach is often optimal.

  1. A team is designing a caching strategy for a high-traffic web application. They need to cache both static assets and dynamic API responses. What should they use? A. Cloud CDN for static assets, Memorystore for Redis for dynamic API responses B. Cloud CDN for everything C. Memorystore for Redis for everything D. No caching Answer: A. Cloud CDN for static assets, Memorystore for Redis for dynamic API responses Rationale: Cloud CDN caches static assets at edge locations. Memorystore for Redis caches dynamic API responses with sub- millisecond latency. This combination provides optimal performance.
  2. A developer needs to implement graceful shutdown for a Cloud Run service. What should they do? A. Handle SIGTERM by finishing in-flight requests, then exit B. Ignore SIGTERM C. Immediately exit on SIGTERM D. Use a cron job to check for termination Answer: A. Handle SIGTERM by finishing in-flight requests, then exit Rationale: Cloud Run sends SIGTERM before terminating an instance. Applications should handle SIGTERM by finishing in-flight requests and then exiting. This prevents request failures during scaling events.
  3. A team is building an application that needs to support multiple authentication methods, including social login and email/password.
  1. A developer needs to instrument code to produce metrics and traces. Which SDK should they use? A. OpenTelemetry SDK B. Proprietary vendor SDK C. Only Cloud Trace libraries D. Only Cloud Monitoring libraries Answer: A. OpenTelemetry SDK Rationale: OpenTelemetry is the industry-standard, vendor-neutral SDK for instrumenting code to produce metrics, logs, and traces. It integrates with Google Cloud Observability.
  2. A team is designing an API that needs to handle rate limiting, authentication, and observability. Which service should they use? A. Apigee B. Cloud Run only C. Compute Engine only D. Cloud Storage Answer: A. Apigee Rationale: Apigee provides API management with rate limiting, authentication, analytics, and observability. It is the recommended solution for enterprise API management.
  3. A developer needs to implement caching for a Cloud Run service that has variable traffic and needs to reduce backend load. What should they use? A. Memorystore for Redis B. Cloud CDN C. Cloud Storage D. BigQuery Answer: A. Memorystore for Redis Rationale: Memorystore for Redis provides a shared, low-latency cache that persists across Cloud Run instances. This reduces backend load and improves response times.
  4. A team needs to choose between Cloud Run and GKE for a containerized application. They need full control over the Kubernetes

API and custom networking. Which should they choose? A. Cloud Run B. GKE C. Both are equal D. Neither Answer: B. GKE Rationale: GKE provides full Kubernetes API access and custom networking capabilities. Cloud Run is serverless and abstracts away the infrastructure but limits control over the runtime environment.

  1. A developer needs to store application secrets and access them from a Cloud Run service. What should they use? A. Secret Manager with the Secret Manager client library B. Environment variables in the Cloud Run configuration C. ConfigMaps D. Hardcoded values Answer: A. Secret Manager with the Secret Manager client library Rationale: Secret Manager stores secrets encrypted and provides IAM-based access control. The client library allows Cloud Run services to retrieve secrets at runtime. Environment variables and ConfigMaps are not secure.
  2. A team needs to implement a multi-region failover strategy for a Cloud SQL database. What should they configure? A. A cross-region read replica with failover capability B. A single-zone instance C. No failover D. Only a single region Answer: A. A cross-region read replica with failover capability Rationale: A cross-region read replica provides a standby instance in another region. If the primary region fails, the replica can be promoted to primary. This provides multi-region failover.
  3. A developer needs to process a large batch of images using Cloud Run. What is the recommended approach? A. Use Cloud Run jobs for batch processing

C. Both are equal D. Neither Answer: B. GKE Rationale: GKE provides full Kubernetes API access and custom networking capabilities. Cloud Run is serverless and abstracts away the infrastructure but limits control over the runtime environment.

  1. A developer needs to store application secrets and access them from a Cloud Run service. What should they use? A. Secret Manager with the Secret Manager client library B. Environment variables in the Cloud Run configuration C. ConfigMaps D. Hardcoded values Answer: A. Secret Manager with the Secret Manager client library Rationale: Secret Manager stores secrets encrypted and provides IAM-based access control. The client library allows Cloud Run services to retrieve secrets at runtime. Environment variables and ConfigMaps are not secure.
  2. A team needs to implement a multi-region failover strategy for a Cloud SQL database. What should they configure? A. A cross-region read replica with failover capability B. A single-zone instance C. No failover D. Only a single region Answer: A. A cross-region read replica with failover capability Rationale: A cross-region read replica provides a standby instance in another region. If the primary region fails, the replica can be promoted to primary. This provides multi-region failover.
  3. A developer needs to process a large batch of images using Cloud Run. What is the recommended approach? A. Use Cloud Run jobs for batch processing B. Use a single Cloud Run service for all images C. Use Compute Engine VMs D. Use Cloud Functions

Answer: A. Use Cloud Run jobs for batch processing Rationale: Cloud Run jobs are designed for batch processing workloads. They run to completion and can process multiple items in parallel. Cloud Run services are for request-driven workloads. SECTION 2: BUILDING AND TESTING APPLICATIONS (Questions 44–71)

  1. A developer needs to emulate Google Cloud services locally for unit testing. What should they use? A. Cloud Code with emulators B. Production Cloud services only C. A local database only D. No testing Answer: A. Cloud Code with emulators Rationale: Cloud Code provides emulators for Pub/Sub, Firestore, Datastore, and other services. This allows local unit testing without connecting to production services.
  2. A team needs to build container images from source code using Google Cloud services. What should they use? A. Cloud Build with Artifact Registry B. Docker on a local machine C. Cloud Storage D. BigQuery Answer: A. Cloud Build with Artifact Registry Rationale: Cloud Build builds container images from source code. Artifact Registry stores and manages the images. This is the recommended CI/CD approach.
  3. A developer needs to configure provenance in Cloud Build. What is the purpose of provenance? A. To track the build process for supply chain security B. To increase build speed C. To reduce build costs D. To store build logs Answer: A. To track the build process for supply chain security Rationale: Provenance documents the build process, including
  1. A developer needs to use Gemini Code Assist for unit testing. What does it provide? A. AI-assisted test generation and code completion B. A CI/CD pipeline C. A container registry D. A monitoring tool Answer: A. AI-assisted test generation and code completion Rationale: Gemini Code Assist provides AI-assisted code generation, including unit test scaffolding and completion. It helps developers write tests faster.
  2. A team needs to build a container image from source code using a Dockerfile. What should they use? A. Cloud Build with a Dockerfile B. Manual Docker build only C. Cloud Storage D. BigQuery Answer: A. Cloud Build with a Dockerfile Rationale: Cloud Build can build container images from a Dockerfile. It provides a managed, scalable build environment with integration to Artifact Registry.
  3. A developer needs to test a Cloud Run service locally. What should they use? A. Cloud Code with Cloud Run emulator B. Production Cloud Run only C. No testing D. Only unit tests Answer: A. Cloud Code with Cloud Run emulator Rationale: Cloud Code provides a Cloud Run emulator for local development and testing. This allows developers to test Cloud Run services without deploying to production.
  4. A team needs to configure a CI/CD pipeline using Cloud Build. What should they use for artifact storage? A. Artifact Registry

B. Cloud Storage only C. BigQuery D. Cloud SQL Answer: A. Artifact Registry Rationale: Artifact Registry stores and manages container images and other build artifacts. It integrates with Cloud Build and provides vulnerability scanning.

  1. A developer needs to write integration tests for a microservices application. What should they use? A. Cloud Build with integration test steps B. Manual testing only C. No testing D. Only unit tests Answer: A. Cloud Build with integration test steps Rationale: Cloud Build pipelines can include integration test steps that run after deploying to a test environment. This ensures that services work together correctly before production deployment.
  2. A team needs to use Skaffold for Kubernetes development. What does Skaffold provide? A. Continuous development and deployment for Kubernetes applications B. A CI/CD pipeline C. A container registry D. A monitoring tool Answer: A. Continuous development and deployment for Kubernetes applications Rationale: Skaffold handles the workflow for building, pushing, and deploying Kubernetes applications. It enables continuous development with automatic rebuilds and redeployments.
  3. A developer needs to use Cloud Shell for development. What does Cloud Shell provide? A. A browser-based terminal with Google Cloud SDK and tools pre- installed