Google

Professional Cloud Developer Free Practice Questions — Page 8

Question 71

You work for a company that operates an ecommerce website. You are developing a new integration that will manage all order fulfillment steps after orders are placed. You have created multiple Cloud Functions to process each order. You need to orchestrate the execution of the functions, using the output of each function to determine the flow. You want to minimize the latency of this process. What should you do?

A. Use Workflows to call the functions, and use callbacks to handle the execution logic.
B. Use Workflows to call the functions, and use conditional jumps to handle the execution logic.
C. Use Cloud Composer to call the functions, and use an Apache Airflow HTTP operator to handle the execution logic.
D. Use Cloud Composer to call the functions, and use an Apache Airflow operator to handle the execution logic.
Show Answer
Correct Answer: B
Explanation:
Workflows is the managed Google Cloud service designed to orchestrate Cloud Functions and other services with very low operational overhead and low latency. It natively supports conditional branching (switch/conditional jumps) based on the output of previous steps, making it appropriate for order-fulfillment workflows whose execution path depends on function results. Callbacks are intended for waiting on external asynchronous events rather than ordinary branching logic, and Cloud Composer (Apache Airflow) is better suited to batch/data pipeline orchestration rather than low-latency request-driven workflows.

Question 72

You manage an application deployed on GKE clusters across multiple environments. You are using Cloud Build to run user acceptance testing (UAT) tests. You have integrated Cloud Build with Artifact Analysis, and enabled the Binary Authorization API in all Google Cloud projects hosting your environments. You want only container images that have passed certain automated UAT tests to be deployed to the production environment. You have already created an attestor. What should you do next?

A. After the UAT phase, sign the attestation with a key stored as a Kubernetes secret. Add a GKE cluster-specific rule in Binary Authorization for the UAT Google Cloud project.
B. After the UAT phase, sign the attestation with a key stored as a Kubernetes secret. Add a GKE cluster-specific rule in Binary Authorization for the production Google Cloud project policy.
C. After the UAT phase, sign the attestation with a key stored in Cloud Key Management Service (KMS). Add a default rule in Binary Authorization for the UAT Google Cloud project.
D. After the UAT phase, sign the attestation with a key stored in Cloud Key Management Service (KMS). Add a GKE cluster-specific rule in Binary Authorization for the production Google Cloud project policy.
Show Answer
Correct Answer: D
Explanation:
Binary Authorization should enforce deployment policy in the production environment, requiring an attestation from the configured attestor before admitting images. Attestations should be signed with a key managed in Cloud KMS, which is the recommended secure key management approach for Binary Authorization. A production GKE cluster-specific policy requiring the attestation ensures only images that passed UAT can be deployed.

Question 73

You are developing a mobile application that allows users to create and manage to-do lists. Your application has the following requirements: • Store and synchronize data between different mobile devices. • Support offline access. • Provide real-time updates on each user's device. You need to implement a database solution while minimizing operational effort. Which approach should you use?

A. Create a Cloud SQL for MySQL instance. Implement a data model to store to-do list information. Create indexes for the most heavily and frequently used queries.
B. Create a Bigtable instance. Design a database schema to avoid hotspots when writing data. Use a Bigtable change stream to capture data changes.
C. Use Firestore as the database. Configure Firestore offline persistence to cache a copy of the Firestore data. Listen to document changes to update applications whenever there are document changes.
D. Implement a SQLite database on each user's device. Use a scheduled job to synchronize each device database with a copy stored in Cloud Storage.
Show Answer
Correct Answer: C
Explanation:
Firestore is designed for mobile and web applications, providing fully managed data storage with built-in real-time synchronization, offline persistence, and automatic syncing when connectivity is restored. This satisfies the requirements while minimizing operational effort. Cloud SQL and Bigtable require more operational design and do not provide client-side offline sync and real-time mobile features out of the box. SQLite with Cloud Storage requires custom synchronization logic and lacks real-time updates.

Question 74

You maintain a popular mobile game deployed on Google Cloud services that include Firebase, Firestore, and Cloud Functions. Recently, the game experienced a surge in usage, and the application encountered HTTP 429 RESOURCE_EXHAUSTED errors when accessing the Firestore API. The application has now stabilized. You want to quickly fix this issue because your company has a marketing campaign next week and you expect another surge in usage. What should you do?

A. Request a quota increase, and modify the application code to retry the Firestore API call with fixed backoff.
B. Request a quota increase, and modify the application code to retry the Firestore API call with exponential backoff.
C. Optimize database queries to reduce read/write operations, and modify the application code to retry the Firestore API call with fixed backoff.
D. Optimize database queries to reduce read/write operations, and modify the application code to retry the Firestore API call with exponential backoff.
Show Answer
Correct Answer: B
Explanation:
HTTP 429 RESOURCE_EXHAUSTED indicates throttling or quota/resource limits. Client retries should use exponential backoff, not fixed backoff, to avoid amplifying load. Because the priority is a quick mitigation before an expected traffic surge, requesting a quota increase is faster and lower risk than redesigning and optimizing database queries. Query optimization is valuable longer term, but the immediate fix is to increase available quota and implement exponential backoff.

Question 75

You are developing an application component to capture user behavior data and stream the data to BigQuery. You plan to use the BigQuery Storage Write API. You need to ensure that the data that arrives in BigQuery does not have any duplicates. You want to use the simplest operational method to achieve this. What should you do?

A. Create a write stream in the default type.
B. Create a write stream in the committed type.
C. Configure a Kafka cluster. Use a primary universally unique identifier (UUID) for duplicate messages.
D. Configure a Pub/Sub topic. Use Cloud Functions to subscribe to the topic and remove any duplicates.
Show Answer
Correct Answer: B
Explanation:
The committed write stream type in the BigQuery Storage Write API supports exactly-once semantics when using stream offsets, enabling BigQuery to prevent duplicate writes. The default stream is optimized for at-least-once ingestion and does not by itself guarantee deduplication. The Kafka and Pub/Sub options add unnecessary operational complexity when the requirement is to use the simplest operational method.

Question 76

You are designing a Node.js-based mobile news feed application that stores data on Google Cloud. You need to select the application's database. You want the database to have zonal resiliency out of the box, low latency responses, ACID compliance, an optional middle tier, semi-structured data storage, and network-partition-tolerant and offline-mode client libraries. What should you do?

A. Configure Firestore and use the Firestore client library in the app.
B. Configure Bigtable and use the Bigtable client in the app.
C. Configure Cloud SQL and use the Google Client Library for Cloud SQL in the app.
D. Configure BigQuery and use the BigQuery REST API in the app.
Show Answer
Correct Answer: A
Explanation:
Firestore best matches the requirements: built-in high availability and zonal resiliency, low-latency access for mobile apps, ACID transactions, document-based semi-structured storage, optional direct client SDK access without a middle tier, and client libraries with offline persistence and synchronization that tolerate network partitions.

Question 77

You are preparing to conduct a load test on your Cloud Run service by using JMeter. You need to orchestrate the steps and services to use for an effective load test and analysis. You want to follow Google-recommended practices. What should you do?

A. Install JMeter on your local machine, create a log sink to BigQuery, and use Looker to analyze the results.
B. Set up a Compute Engine instance, install JMeter on the instance, create a log sink to a Cloud Storage bucket, and use Looker Studio to analyze the results.
C. Set up a Compute Engine instance, install JMeter on the instance, create a log sink to a Cloud Storage bucket, and use Looker to analyze the results.
D. Set up a Compute Engine instance, install JMeter on the instance, create a log sink to BigQuery, and use Looker Studio to analyze the results.
Show Answer
Correct Answer: D
Explanation:
Google-recommended practice is to generate load from a Compute Engine VM rather than a local machine, export Cloud Run logs to BigQuery for scalable analysis, and visualize the results with Looker Studio, which integrates directly with BigQuery. Cloud Storage is less suitable for interactive log analytics, and Looker Studio is the commonly recommended visualization tool for this workflow.

Question 78

You are a lead developer at an organization that recently integrated several Google Cloud services. These services are located within Virtual Private Cloud (VPC) environments that are secured with VPC Service Controls and Private Service Connect endpoints. Developers across your organization use different operating systems, development frameworks, and integrated development environments (IDEs). You need to recommend a developer environment that will ensure consistency in the developer process and improve the overall developer experience. You want this solution to: • Enforce consistent security controls. • Have access to Google Cloud resources and applications within the VPC. • Allow the installation of custom tools and utilities on the development environments. What solution should you recommend?

A. Use Cloud Workstations, and allow developers to create their own custom images.
B. Use Cloud Workstations with preconfigured base images. For custom tools and utilities, use custom images that are rebuilt weekly.
C. Use the Cloud Code extension with the IDEs that are used across the organization. Configure Cloud VPN to enable VPC access.
D. Use the Cloud Code extension with the IDEs that are used across the organization. Use Identity-Aware Proxy to enable access to the services in the VPC.
Show Answer
Correct Answer: B
Explanation:
Cloud Workstations provides managed, consistent development environments that run in Google Cloud and can access private resources within a VPC, including environments protected by VPC Service Controls and Private Service Connect. Using standardized preconfigured base images enforces consistent security and developer experience, while maintaining custom tools through centrally managed custom images rebuilt on a regular schedule provides controlled customization without allowing each developer to diverge from the approved baseline.

Question 79

You are developing an application that uses microservices architecture that includes Cloud Run, Bigtable, and Pub/Sub. You want to conduct the testing and debugging process as quickly as possible to create a minimally viable product with minimal cost. What should you do?

A. Use Cloud Shell Editor and Cloud Shell to deploy the application, and test the functionality by using the Google Cloud console in the project.
B. Use emulators to test the functionality of cloud resources locally, and deploy the code to your Google Cloud project.
C. Use Cloud Build to create a pipeline, and add the unit testing stage and the manual approval stage. Deploy the code to your Google Cloud project.
D. Use Cloud Code to develop, deploy, and test microservices resources. Use Cloud Logging to review the resource logs.
Show Answer
Correct Answer: B
Explanation:
Using local emulators for supported Google Cloud services such as Bigtable and Pub/Sub enables fast development, testing, and debugging without incurring cloud resource costs. This is well suited for building an MVP quickly. After validating functionality locally, deploy the application to Google Cloud (including Cloud Run) for integration testing. The other options either require cloud deployment for testing or focus on CI/CD and observability rather than minimizing cost and iteration time.

Question 80

You work for an ecommerce company. You are designing a new Orders API that will be exposed through Apigee. In your Apigee organization, you created two new environments named orders-test and orders-prod. You plan to use unique URLs named test.lnk-42.com/api/v1/orders and Ink-42.com/api/v1/orders for each environment. You need to ensure that each environment only uses the assigned URL. What should you do?

A. 1. Attach orders-test and orders-prod to the orders environment group. 2. Add each hostname to the appropriate environment.
B. 1. Attach orders-test and orders-prod to the orders environment group. 2. Add each hostname to the orders environment group.
C. 1. Attach orders-test to the test environment group, and attach orders-prod to the production environment group. 2. Add each hostname to the appropriate environment.
D. 1. Attach orders-test to the test environment group, and attach orders-prod to the production environment group. 2. Add each hostname to the appropriate environment group.
Show Answer
Correct Answer: D
Explanation:
In Apigee X/hybrid, hostnames are configured on environment groups, not individual environments. To ensure each environment is only reachable through its assigned URL, place the test and production environments into separate environment groups and assign the appropriate hostname to each environment group. This enforces that orders-test responds only to test.lnk-42.com and orders-prod only to lnk-42.com.

$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.