🔍

PCD — questions

Page 16 of 18 · 359 total questions.

Topic 1 · Question 302

You are developing a new image processing application that needs to handle various tasks, such as resizing, cropping, and watermarking images. You also need to monitor the workflow and ensure that it scales efficiently when there are large volumes of images. You want to automate the image processing tasks and workflow monitoring with the least effort. What should you do?

  • AEmploy Cloud Composer to manage the image processing workflows. Use Dataproc for workflow monitoring and analytics.
  • BUse Cloud Run to deploy the image processing functions. Use Apigee to expose the API. Use Cloud Logging for workflow monitoring.
  • CImplement Workflows to orchestrate the image processing tasks. Use Cloud Logging for workflow monitoring. (correct answer)
  • DUse Cloud Build to trigger Cloud Functions for the image processing tasks. Use Cloud Monitoring for workflow monitoring.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Implement Workflows to orchestrate the image processing tasks. Use Cloud Logging for workflow monitoring.

Explanation

Cloud Logging centralizes, stores, and analyzes logs across services.

Topic 1 · Question 303

You are developing a web application that will be deployed to production on Cloud Run. The application consists of multiple microservices, some of which will be publicly accessible and others that will only be accessible after authentication by Google identities. You need to ensure that only authenticated users can access the restricted services, while allowing unrestricted access to the public services of the application. You want to use the most secure approach while minimizing management overhead and complexity. How should you configure access?

  • AEnable Identity-Aware Proxy (IAP) for all microservices. Develop a new microservice that checks the authentication requirements for each application and controls access to the respective services.
  • BEnable Identity-Aware Proxy (IAP) for all microservices. Manage access control lists (ACLs) for the restricted services, and configure allAuthenticatedUsers access to the public services.
  • CUse Cloud Endpoints with Firebase Authentication for all microservices. Configure Firebase rules to manage access control lists (ACLs) for each service, allowing access to the public services.
  • DConfigure separate Cloud Run services for the public and restricted microservices. Enable Identity-Aware Proxy (IAP) only for the restricted services, and configure the Cloud Run ingress settings to ‘Internal and Cloud Load Balancing’. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Configure separate Cloud Run services for the public and restricted microservices. Enable Identity-Aware Proxy (IAP) only for the restricted services, and configure the Cloud Run ingress settings to ‘Internal and Clou...

Explanation

Cloud Run runs stateless containers serverlessly and scales to zero, minimizing operational overhead. Cloud Load Balancing distributes traffic across regions and backends for availability and scale. A load balancer distributes traffic across healthy backends in multiple zones for availability and scale.

Topic 1 · Question 304

You are the lead developer for a company that provides a financial risk calculation API. The API is built on Cloud Run and has a gRPC interface. You frequently develop optimizations to the risk calculators. You want to enable these optimizations for select customers who registered to try out the optimizations prior to rolling out the optimization to all customers. Your CI/CD pipeline has built a new image and stored it in the Artifact Registry. Which rollout strategy should you use?

  • AMigrate the traffic to the new service by setting Cloud Run’s traffic split based on the percentage of registered customers.
  • BMigrate the traffic to the new service by using a blue/green deployment approach.
  • CMigrate the traffic to the new service by using a feature flag for registered customers. (correct answer)
  • DMigrate the traffic to the new service and enable session affinity for Cloud Run.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Migrate the traffic to the new service by using a feature flag for registered customers.

Topic 1 · Question 305

Your ecommerce application has a rapidly growing user base, and it is experiencing performance issues due to excessive requests to your backend API. Your team develops and manages this API. The Cloud SQL backend database is struggling to handle the high demand, leading to latency and timeouts. You need to implement a solution that optimizes API performance and improves user experience. What should you do?

  • AUse Apigee to expose your API. Use Memorystore for Redis to cache frequently accessed data. Implement exponential backoff in the application to retry failed requests. (correct answer)
  • BUse Apigee to expose your API. Implement rate limiting and access control policies in Apigee to control API traffic. Use Pub/Sub to queue requests to prevent database overload.
  • CUse Cloud Load Balancing to expose your API. Use Cloud CDN in front of the load balancer to cache responses. Implement exponential backoff to retry failed requests.
  • DUse Cloud Load Balancing to expose your API. Increase the memory for the database instances to handle more concurrent requests. Implement a custom rate-limiting mechanism in your application code to control API requests.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use Apigee to expose your API. Use Memorystore for Redis to cache frequently accessed data. Implement exponential backoff in the application to retry failed requests.

Explanation

Memorystore provides managed in-memory Redis/Memcached caching to reduce latency and offload databases.

Topic 1 · Question 306

You need to deploy a new feature into production on Cloud Run. Your company’s SRE team mandates gradual deployments to avoid large downtimes caused by code change errors. You want to configure this deployment with minimal effort. What should you do?

  • AConfigure the application’s frontend load balancer to toggle between the new and old revisions.
  • BConfigure the application code to send a small percentage of users to the newly deployed revision.
  • CDeploy the feature with “Serve this revision immediately” unchecked, and configure the new revision to serve a small percentage of traffic. Check for errors, and increase traffic to the revision as appropriate. (correct answer)
  • DDeploy the feature with “Serve this revision immediately” checked. Check for errors, roll back to the previous revision, and repeat the process until you have verified that the deployment is bug-free.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Deploy the feature with “Serve this revision immediately” unchecked, and configure the new revision to serve a small percentage of traffic. Check for errors, and increase traffic to the revision as appropriate.

Topic 1 · Question 307

You are developing an external-facing application on GKE that provides a streaming API to users. You want to offer two subscription tiers, “basic" and “premium", to users based on the number of API requests that each client application is allowed to make each day. You want to design the application architecture to provide subscription tiers to users while following Google-recommended practices. What should you do?

  • A1. Configure the service on GKE as a backend to an Apigee proxy.2. Provide API keys to users to identify client applications.3. Configure a Quota policy in Apigee for API keys based on the subscription tier. (correct answer)
  • B1. Configure the service on GKE as a backend to an Apigee proxy.2. Provide API keys to users to identify client applications.3. Configure a SpikeArrest policy in Apigee for API keys based on the subscription tier.
  • C1. Configure the service on GKE as a backend to two new projects, each with a separate Application Load Balancer.2. Configure the quota "Queries per second (QPS) per region per network” for each project individually.3. Provide users with API endpoints based on the subscription tier.
  • D1. Deploy the application to two GKE clusters, one for each subscription tier. Configure each cluster to have a separate Ingress.2. Configure each cluster as a backend to an Apigee proxy.3. Provide API keys to users to identify client applications.4. Configure separate rate limits for client applications based on the subscription tier.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: 1. Configure the service on GKE as a backend to an Apigee proxy.2. Provide API keys to users to identify client applications.3. Configure a Quota policy in Apigee for API keys based on the subscription tier.

Explanation

Google Kubernetes Engine runs managed Kubernetes for containerized, portable workloads. This option meets the real-time / low-latency performance requirement.

Topic 1 · Question 308

Your organization has users and groups configured in an external identity provider (IdP). You want to leverage the same external IdP to allow Google Cloud console access to all employees. You also want to personalize the sign-in experience by displaying the user's name and photo when users access the Google Cloud console. What should you do?

  • AConfigure workforce identity federation with the external IdP, and set up attribute mapping. (correct answer)
  • BConfigure a service account for each individual by using the user name and photo, and grant permissions for each user to impersonate their respective service accounts.
  • CConfigure workload identity federation to get the external IdP tokens, and use these tokens to sign in to the Google Cloud console.
  • DCreate a Google group that includes organization email IDs for all users. Ask users to use the same name, work email ID, and password to register and sign in.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Configure workforce identity federation with the external IdP, and set up attribute mapping.

Topic 1 · Question 309

You are developing a new API that creates requests on an asynchronous message service. Requests will be consumed by different services. You need to expose the API by using a gRPC interface while minimizing infrastructure management overhead. How should you deploy the API?

  • ADeploy your API to App Engine. Create a Pub/Sub topic, and configure your API to push messages to the topic.
  • BDeploy your API as a Cloud Run service. Create a Pub/Sub topic, and configure your API to push messages to the topic. (correct answer)
  • CDeploy your API to a GKE cluster. Create a Kafka cluster, and configure your API to write messages to the cluster.
  • DDeploy your API on a Compute Engine instance. Create a Kafka cluster, and configure your API to write messages to the cluster.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Deploy your API as a Cloud Run service. Create a Pub/Sub topic, and configure your API to push messages to the topic.

Explanation

Cloud Run runs stateless containers serverlessly and scales to zero, minimizing operational overhead. Pub/Sub is a serverless, global messaging service that decouples services and ingests high-volume event streams. This option decouples the components so they scale independently and absorb load spikes.

Topic 1 · Question 310

You are about to deploy an application hosted on a Compute Engine instance with Windows OS and Cloud SQL. You plan to use the Cloud SQL Auth Proxy for connectivity to the Cloud SQL instance. You plan to follow Google-recommended practices and the principle of least privilege. You have already created a custom service account. What should you do next?

  • ACreate and assign a custom role with the cloudsql.instances.connect permission to the custom service account. Adjust the Cloud SQL Auth Proxy start command to specify your instance connection name. (correct answer)
  • BGrant the custom service account the roles/cloudsql.client role. Adjust the Cloud SQL Auth Proxy start command to use the --unix-socket CLI option.
  • CGrant the custom service account the roles/cloudsql.editor role.
  • DGrant the custom service account the roles/cloudsql.viewer role. Adjust the Cloud SQL Auth Proxy start command to specify your instance connection name.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create and assign a custom role with the cloudsql.instances.connect permission to the custom service account. Adjust the Cloud SQL Auth Proxy start command to specify your instance connection name.

Explanation

Cloud SQL is a managed relational database (MySQL/PostgreSQL/SQL Server) that handles patching, backups, and failover. A service account provides an identity for workloads to access Google Cloud APIs securely.

Topic 1 · Question 311

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?

  • ACreate signed policy documents on the Cloud Storage bucket.
  • BApply access control list (ACL) permissions to the Cloud Storage bucket.
  • CGenerate a signed URL for each document the user wants to share. (correct answer)
  • DGrant the Storage Object Viewer IAM role to all authenticated users.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Generate a signed URL for each document the user wants to share.

Topic 1 · Question 312

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?

  • A1. 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.
  • B1. 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.
  • C1. 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.
  • D1 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. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option 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 devic...

Explanation

A managed instance group provides autoscaling, autohealing, and rolling updates for VMs. A load balancer distributes traffic across healthy backends in multiple zones for availability and scale.

Topic 1 · Question 313

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?

  • AUse 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. (correct answer)
  • BDeploy 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.
  • CWrite a script to check all Compute Engine VMs for missing labels regularly by using Cloud Scheduler. Use the script to assign the labels.
  • DCheck all Compute Engine VMs for missing labels regularly. Use the console to assign the labels.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option 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.

Explanation

Compute Engine provides configurable virtual machines when you need full control of the OS. Cloud Audit Logs record administrative and data-access activity for auditing and governance.

Topic 1 · Question 314

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?

  • AModify 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.
  • BConfigure Cloud Trace to capture the requests from the load testing clients. Review the timings in Cloud Trace. (correct answer)
  • CExpose the latency metrics per service for each request. Configure Google Cloud Managed Service for Prometheus, and use it to scrape and analyze the metrics.
  • DAdd log statements that capture elapsed time. Analyze the logs and metrics by using BigQuery.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Configure Cloud Trace to capture the requests from the load testing clients. Review the timings in Cloud Trace.

Explanation

Cloud Trace analyzes request latency across distributed services.

Topic 1 · Question 315

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?

  • ASet up Memcached so that queries hit the cache layer first and automatically get data from Bigtable in the event of a cache miss.
  • BIncrease the Bigtable client’s connection pool size.
  • CConfigure a Dataflow template, and use a Beam connector to stream data changes.
  • DConfigure the app profile to use multi-cluster routing. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Configure the app profile to use multi-cluster routing. By spanning multiple Availability Zones / adding redundancy, this option provides the high availability and resilience required.

Topic 1 · Question 316

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?

  • ADeploy the image to Cloud Run. (correct answer)
  • BDeploy the image to a GKE Autopilot cluster.
  • CDeploy the image to a GKE Standard cluster.
  • DDeploy the image to a Compute Engine instance.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Deploy the image to Cloud Run.

Explanation

Cloud Run runs stateless containers serverlessly and scales to zero, minimizing operational overhead.

Topic 1 · Question 317

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?

Exhibit 1 for question 317
  • ACreate a TargetEndpoint with a weighted load balancing algorithm. Configure the API proxy to use the same weights for each region's backend.
  • BConfigure 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.
  • CConfigure 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.
  • DConfigure 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. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option 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.

Topic 1 · Question 318

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?

  • AAdd the seat reservation to a Cloud Tasks queue, which triggers Workflows to process the seat reservation.
  • BPublish the seat reservation to a Pub/Sub topic. Configure the backend service to use Eventarc to process the seat reservation on GKE.
  • CUpload the seat reservation to a Cloud Storage bucket, which triggers an event to a Cloud Run service that processes the orders.
  • DSubmit 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. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option 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 rese...

Explanation

A managed instance group provides autoscaling, autohealing, and rolling updates for VMs. Compute Engine provides configurable virtual machines when you need full control of the OS. A load balancer distributes traffic across healthy backends in multiple zones for availability and scale.

Topic 1 · Question 319

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?

  • ADeploy 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.
  • BCreate 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.
  • CCreate 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. (correct answer)
  • DSet 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.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option 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.

Explanation

Cloud Build runs managed CI pipelines to build, test, and package code.

Topic 1 · Question 320

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?

  • AReplace 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.
  • BUpdate 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.
  • CUpdate 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. (correct answer)
  • DReplace 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.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option 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.

Topic 1 · Question 321

Your team plans to use AlloyDB as their database backend for an upcoming application release. Your application is currently hosted in a different project and network than the AlloyDB instances. You need to securely connect your application to the AlloyDB instance while keeping the projects isolated. You want to minimize additional operations and follow Google-recommended practices. How should you configure the network for database connectivity?

  • AProvision a Shared VPC project where both the application project and the AlloyDB project are service projects.
  • BUse AlloyDB Auth Proxy and configure the application project’s firewall to allow connections to port 5433. (correct answer)
  • CProvision a service account from the AlloyDB project. Use this service account’s JSON key file as the --credentials-file to connect to the AlloyDB instance.
  • DAsk the database team to provision AlloyDB databases in the same project and network as the application.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use AlloyDB Auth Proxy and configure the application project’s firewall to allow connections to port 5433.

Explanation

AlloyDB is a managed PostgreSQL-compatible database for demanding transactional and analytical workloads.

Showing questions 301320 of 359 · Page 16 of 18