Professional Cloud Developer Free Practice Questions — Page 5
Question 41
You have an application running in production on Cloud Run. Your team needs to change one of the application’s services to return a new field. You want to test the new revision on 10% of your clients using the least amount of effort. You also need to keep your service backward compatible.
What should you do?
A. Replace the current service with the new revision. Deploy the new revision with no traffic allocated. After the deployment, split the traffic between the previous service and the new revision.
B. Update the current service with the new changes. Deploy the new revision. After the deployment, split the traffic between the current service and the new revision.
C. Update the current service with the new changes. Deploy the new revision with no traffic allocated. Split the traffic between the current service and the new revision.
D. Replace the current service with the new revision. Deploy the new revision. Create a load balancer to split the traffic between the previous service and the new revision.
Show Answer
Correct Answer: C
Explanation: Cloud Run supports revision-based deployments with built-in traffic splitting. To test a new revision on 10% of clients with minimal effort, deploy the new revision with no traffic initially, verify deployment, then adjust the traffic split so 10% goes to the new revision and 90% remains on the current revision. This uses Cloud Run's native revision traffic management and maintains backward compatibility by keeping most traffic on the existing revision while gradually introducing the new response field.
Question 42
You work for a financial services company that has a container-first approach. Your team develops microservices applications. You have a Cloud Build pipeline that creates a container image, runs regression tests, and publishes the image to Artifact Registry. You need to ensure that only containers that have passed the regression tests are deployed to GKE clusters. You have already enabled Binary Authorization on the GKE clusters. What should you do next?
A. Deploy Voucher Server and Voucher Client components. After a container image has passed the regression tests, run Voucher Client as a step in the Cloud Build pipeline.
B. Create an attestor and a policy. Run a vulnerability scan to create an attestation for the container image as a step in the Cloud Build pipeline.
C. Create an attestor and a policy. Create an attestation for the container images that have passed the regression tests as a step in the Cloud Build pipeline.
D. Set the Pod Security Standard level to Restricted for the relevant namespaces. Digitally sign the container images that have passed the regression tests as a step in the Cloud Build pipeline.
Show Answer
Correct Answer: C
Explanation: With Binary Authorization enabled, you enforce deployment by requiring attestations from configured attestors. After regression tests succeed in Cloud Build, the pipeline should create an attestation for the image using the attestor. The Binary Authorization policy then allows only images with the required attestation to be deployed. Voucher Server/Client are from Grafeas/Kritis patterns and are not the standard Binary Authorization workflow, vulnerability scan attestations do not prove regression tests passed, and Pod Security Standards are unrelated to Binary Authorization image admission.
Question 43
You are a developer that works for a local concert venue. Customers use your company’s website to purchase tickets for events. You need to provide customers with immediate confirmation when a selected seat has been reserved. How should you design the ticket ordering process?
A. Add the seat reservation to a Cloud Tasks queue, which triggers Workflows to process the seat reservation.
B. Publish the seat reservation to a Pub/Sub topic. Configure the backend service to use Eventarc to process the seat reservation on GKE.
C. Upload the seat reservation to a Cloud Storage bucket, which triggers an event to a Cloud Run service that processes the orders.
D. Submit the seat reservation in an HTTP POST request to an Application Load Balancer. Configure the Application Load Balancer to distribute the request to a Compute Engine managed instance group that processes the reservation.
Show Answer
Correct Answer: D
Explanation: Immediate seat reservation confirmation requires synchronous request/response processing so the backend can reserve the seat and return success or failure in the same transaction. Cloud Tasks, Pub/Sub/Eventarc, and Cloud Storage event triggers are asynchronous patterns and do not provide immediate reservation confirmation to the client.
Question 44
You recently deployed an Apigee API proxy to your organization across two regions. Both regions are configured with a separate backend that is hosting the API. You need to configure Apigee to route traffic to the appropriate local region backend. What should you do?
A. Create a TargetEndpoint with a weighted load balancing algorithm. Configure the API proxy to use the same weights for each region's backend.
B. Configure a regional internal Application Load Balancer in each region, and use health checks to verify that each backend is active. Create a DNS A record that contains the IP addresses of both regions' load balancers. Configure a Targetserver for each region that uses this DNS name.
C. Configure a global external Application Load Balancer and configure each region’s backend with a different regional backend service. Each region communicates to this single global external Application Load Balancer as its TargetServer.
D. Configure a TargetServer for each region's backend host names. Configure the API proxy to choose the TargetServer based on the system.region.name flow variable.
Show Answer
Correct Answer: D
Explanation: Use separate TargetServers for each regional backend and select the appropriate TargetServer at runtime using the system.region.name flow variable. In Apigee X/hybrid deployed across multiple regions, this enables requests handled in a given region to be routed to the corresponding local backend, minimizing latency and avoiding unnecessary cross-region traffic. Weighted load balancing does not provide locality awareness, and using a single global load balancer or DNS-based approach does not leverage Apigee's regional flow variable for deterministic regional routing.
Question 45
You work for an ecommerce company. Your company is migrating multiple applications to Google Cloud, and you are assisting with the migration of one of the applications. The application is currently deployed on a VM without any OS dependencies. You have created a Dockerfile and used it to upload a new image to Artifact Registry. You want to minimize the infrastructure and operational complexity. What should you do?
A. Deploy the image to Cloud Run.
B. Deploy the image to a GKE Autopilot cluster.
C. Deploy the image to a GKE Standard cluster.
D. Deploy the image to a Compute Engine instance.
Show Answer
Correct Answer: A
Explanation: Cloud Run is the fully managed serverless container platform on Google Cloud. Since the application has been containerized and has no OS dependencies, deploying the container image from Artifact Registry to Cloud Run minimizes infrastructure management and operational overhead. GKE (Autopilot or Standard) requires Kubernetes cluster management to varying degrees, and Compute Engine requires VM management, making them more operationally complex.
Question 46
Your team currently uses Bigtable as their database backend. In your application's app profile, you notice that the connection to the Bigtable cluster is specified as single-cluster routing, and the cluster’s connection logic is configured to conduct manual failover when the cluster is unavailable. You want to optimize the application code to have more efficient and highly available Bigtable connectivity. What should you do?
A. Set up Memcached so that queries hit the cache layer first and automatically get data from Bigtable in the event of a cache miss.
B. Increase the Bigtable client’s connection pool size.
C. Configure a Dataflow template, and use a Beam connector to stream data changes.
D. Configure the app profile to use multi-cluster routing.
Show Answer
Correct Answer: D
Explanation: Multi-cluster routing in the Bigtable app profile automatically routes requests across replicated clusters and provides automatic failover, improving availability and reducing the need for application-managed failover logic. The other options do not address automatic high availability for Bigtable client connectivity.
Question 47
You are developing a discussion portal that is built on Cloud Run. Incoming external requests are routed through a set of microservices before a response is sent. Some of these microservices connect to databases. You need to run a load test to identify any bottlenecks in the application when it is under load. You want to follow Google-recommended practices. What should you do?
A. Modify the response to include a time series that shows elapsed time per service. Use Log Analytics in Cloud Logging to create a heatmap that exposes any service that could be a bottleneck.
B. Configure Cloud Trace to capture the requests from the load testing clients. Review the timings in Cloud Trace.
C. Expose the latency metrics per service for each request. Configure Google Cloud Managed Service for Prometheus, and use it to scrape and analyze the metrics.
D. Add log statements that capture elapsed time. Analyze the logs and metrics by using BigQuery.
Show Answer
Correct Answer: B
Explanation: Cloud Trace is the Google-recommended service for distributed request tracing and latency analysis across microservices. During a load test, it shows end-to-end request timing and the latency contribution of each service, making it the appropriate tool to identify bottlenecks in a Cloud Run microservices architecture. The other options require custom instrumentation or log analysis when Cloud Trace is purpose-built for this use case.
Question 48
Your infrastructure team is responsible for creating and managing Compute Engine VMs. Your team uses the Google Cloud console and gcloud CLI to provision resources for the development environment. You need to ensure that all Compute Engine VMs are labeled correctly for compliance reasons. In case of missing labels, you need to implement corrective actions so the labels are configured accordingly without changing the current deployment process. You want to use the most scalable approach. What should you do?
A. Use a Cloud Audit Logs trigger to invoke a Cloud Function when a Compute Engine VM is created. Check for missing labels and assign them if necessary.
B. Deploy resources with Terraform. Use the gcloud terraform vet command with a policy to ensure that every Compute Engine VM that is provisioned by Terraform has labels set.
C. Write a script to check all Compute Engine VMs for missing labels regularly by using Cloud Scheduler. Use the script to assign the labels.
D. Check all Compute Engine VMs for missing labels regularly. Use the console to assign the labels.
Show Answer
Correct Answer: A
Explanation: Use an event-driven remediation approach that does not alter the existing provisioning workflow. A Cloud Audit Logs trigger can invoke a Cloud Function whenever a Compute Engine VM is created. The function checks for required labels and applies any that are missing, providing automatic, scalable, near-real-time compliance regardless of whether the VM was created via the Google Cloud console or gcloud CLI. The Terraform option changes the deployment process and only governs Terraform-managed resources, while scheduled or manual checks are less scalable and allow periods of noncompliance.
Question 49
You work for an environmental agency in a large city. You are developing a new monitoring platform that will capture air quality readings from thousands of locations in the city. You want the air quality reading devices to send and receive their data payload to the newly created RESTful backend systems every minute by using a curl command. The backend systems are running in a single cloud region and are using Premium Tier networking. You need to connect the devices to the backend while minimizing the daily average latency, measured by using Time to First Byte (TTFB). How should you build this service?
A. 1. Run the air quality devices’ backends on Compute Engine VMs. 2. Create a weighted round robin routing policy on Cloud DNS. 3. Configure the air quality devices to connect by using this DNS.
B. 1. Run the air quality devices’ backends on Compute Engine VMs. 2. Create a round robin routing policy on Cloud DNS for these Compute Engine VMs. 3. Configure the air quality devices to connect by using this DNS.
C. 1. Run the air quality devices' backends in a managed instance group. 2. Create an external passthrough Network Load Balancer to connect to the managed instance group. 3. Configure a connection between the air quality devices and the Network Load Balancer.
D. 1 Run the air quality devices' backends in a managed instance group. 2. Create an external Application Load Balancer, and connect it to the managed instance group. 3. Configure a connection between the air quality devices and the Application Load Balancer.
Show Answer
Correct Answer: D
Explanation: For a RESTful HTTP backend serving thousands of globally distributed clients within a region using Premium Tier, an external Application Load Balancer is the recommended solution. It provides Google Front Ends (GFEs), optimized HTTP(S) request handling, connection management, autoscaling support with managed instance groups, and typically minimizes Time to First Byte compared with DNS-based distribution or a passthrough Network Load Balancer, which operates at L4 and lacks HTTP-aware optimizations. DNS round robin or weighted routing cannot account for client/network conditions and do not provide load balancing or fast failover.
Question 50
You are developing a secure document sharing platform. The platform allows users to share documents with other users who may be external to their organization. Access to these documents should be revoked after a configurable time period. The documents are stored in Cloud Storage. How should you configure Cloud Storage to support this functionality?
A. Create signed policy documents on the Cloud Storage bucket.
B. Apply access control list (ACL) permissions to the Cloud Storage bucket.
C. Generate a signed URL for each document the user wants to share.
D. Grant the Storage Object Viewer IAM role to all authenticated users.
Show Answer
Correct Answer: C
Explanation: Signed URLs provide time-limited access to specific Cloud Storage objects without requiring IAM changes. You can configure an expiration time so access is automatically revoked after the specified period. ACLs and IAM roles do not provide built-in time-based expiration for shared access, and signed policy documents are intended for controlling uploads via HTML forms rather than secure temporary download sharing.
$19
Get all 358 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.