πŸ”

PCD β€” questions

Page 4 of 18 Β· 359 total questions.

Topic 1 Β· Question 61

Your application performs well when tested locally, but it runs significantly slower after you deploy it to a Compute Engine instance. You need to diagnose the problem. What should you do? What should you do?

  • AFile a ticket with Cloud Support indicating that the application performs faster locally.
  • BUse Cloud Debugger snapshots to look at a point-in-time execution of the application.
  • CUse Cloud Profiler to determine which functions within the application take the longest amount of time. (correct answer)
  • DAdd logging commands to the application and use Cloud Logging to check where the latency problem occurs.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Use Cloud Profiler to determine which functions within the application take the longest amount of time.

Explanation

Cloud Profiler continuously analyzes CPU and memory usage of production code.

Topic 1 Β· Question 62

You have an application running in App Engine. Your application is instrumented with Stackdriver Trace. The /product-details request reports details about four known unique products at /sku-details as shown below. You want to reduce the time it takes for the request to complete. What should you do?

  • AIncrease the size of the instance class.
  • BChange the Persistent Disk type to SSD.
  • CChange /product-details to perform the requests in parallel. (correct answer)
  • DStore the /sku-details information in a database, and replace the webservice call with a database query.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Change /product-details to perform the requests in parallel.

Topic 1 Β· Question 63 Β· Select all that apply

Your company has a data warehouse that keeps your application information in BigQuery. The BigQuery data warehouse keeps 2 PBs of user data. Recently, your company expanded your user base to include EU users and needs to comply with these requirements: β€’ Your company must be able to delete all user account information upon user request. β€’ All EU user data must be stored in a single region specifically for EU users. Which two actions should you take? (Choose two.)

  • AUse BigQuery federated queries to query data from Cloud Storage.
  • BCreate a dataset in the EU region that will keep information about EU users only. (correct answer)
  • CCreate a Cloud Storage bucket in the EU region to store information for EU users only.
  • DRe-upload your data using to a Cloud Dataflow pipeline by filtering your user records out.
  • EUse DML statements in BigQuery to update/delete user records based on their requests. (correct answer)
Reveal answer & explanation
Correct answer: B, E

The correct answer is B, E. Option B: Create a dataset in the EU region that will keep information about EU users only. Option E: Use DML statements in BigQuery to update/delete user records based on their requests.

Explanation

BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage.

Topic 1 Β· Question 64

Your App Engine standard configuration is as follows: service: production instance_class: B1 You want to limit the application to 5 instances. Which code snippet should you include in your configuration?

  • Amanual_scaling: instances: 5 min_pending_latency: 30ms
  • Bmanual_scaling: max_instances: 5 idle_timeout: 10m
  • Cbasic_scaling: instances: 5 min_pending_latency: 30ms
  • Dbasic_scaling: max_instances: 5 idle_timeout: 10m (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: basic_scaling: max_instances: 5 idle_timeout: 10m.

Topic 1 Β· Question 65

Your analytics system executes queries against a BigQuery dataset. The SQL query is executed in batch and passes the contents of a SQL file to the BigQuery CLI. Then it redirects the BigQuery CLI output to another process. However, you are getting a permission error from the BigQuery CLI when the queries are executed. You want to resolve the issue. What should you do?

  • AGrant the service account BigQuery Data Viewer and BigQuery Job User roles. (correct answer)
  • BGrant the service account BigQuery Data Editor and BigQuery Data Viewer roles.
  • CCreate a view in BigQuery from the SQL query and SELECT* from the view in the CLI.
  • DCreate a new dataset in BigQuery, and copy the source table to the new dataset Query the new dataset and table from the CLI.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Grant the service account BigQuery Data Viewer and BigQuery Job User roles.

Explanation

BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage. A service account provides an identity for workloads to access Google Cloud APIs securely.

Topic 1 Β· Question 66

Your application is running on Compute Engine and is showing sustained failures for a small number of requests. You have narrowed the cause down to a single Compute Engine instance, but the instance is unresponsive to SSH. What should you do next?

  • AReboot the machine.
  • BEnable and check the serial port output. (correct answer)
  • CDelete the machine and create a new one.
  • DTake a snapshot of the disk and attach it to a new machine.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Enable and check the serial port output.

Topic 1 Β· Question 67 Β· Select all that apply

You configured your Compute Engine instance group to scale automatically according to overall CPU usage. However, your application's response latency increases sharply before the cluster has finished adding up instances. You want to provide a more consistent latency experience for your end users by changing the configuration of the instance group autoscaler. Which two configuration changes should you make? (Choose two.)

  • AAdd the label "AUTOSCALE" to the instance group template.
  • BDecrease the cool-down period for instances added to the group. (correct answer)
  • CIncrease the target CPU usage for the instance group autoscaler.
  • DDecrease the target CPU usage for the instance group autoscaler. (correct answer)
  • ERemove the health-check for individual VMs in the instance group.
Reveal answer & explanation
Correct answer: B, D

The correct answer is B, D. Option B: Decrease the cool-down period for instances added to the group. Option D: Decrease the target CPU usage for the instance group autoscaler.

Topic 1 Β· Question 68

You have an application controlled by a managed instance group. When you deploy a new version of the application, costs should be minimized and the number of instances should not increase. You want to ensure that, when each new instance is created, the deployment only continues if the new instance is healthy. What should you do?

  • APerform a rolling-action with maxSurge set to 1, maxUnavailable set to 0.
  • BPerform a rolling-action with maxSurge set to 0, maxUnavailable set to 1 (correct answer)
  • CPerform a rolling-action with maxHealthy set to 1, maxUnhealthy set to 0.
  • DPerform a rolling-action with maxHealthy set to 0, maxUnhealthy set to 1.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Perform a rolling-action with maxSurge set to 0, maxUnavailable set to 1.

Topic 1 Β· Question 69

Your application requires service accounts to be authenticated to GCP products via credentials stored on its host Compute Engine virtual machine instances. You want to distribute these credentials to the host instances as securely as possible. What should you do?

  • AUse HTTP signed URLs to securely provide access to the required resources.
  • BUse the instance's service account Application Default Credentials to authenticate to the required resources. (correct answer)
  • CGenerate a P12 file from the GCP Console after the instance is deployed, and copy the credentials to the host instance before starting the application.
  • DCommit the credential JSON file into your application's source repository, and have your CI/CD process package it with the software that is deployed to the instance.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use the instance's service account Application Default Credentials to authenticate to the required resources.

Explanation

A service account provides an identity for workloads to access Google Cloud APIs securely.

Topic 1 Β· Question 70

Your application is deployed in a Google Kubernetes Engine (GKE) cluster. You want to expose this application publicly behind a Cloud Load Balancing HTTP(S) load balancer. What should you do?

  • AConfigure a GKE Ingress resource. (correct answer)
  • BConfigure a GKE Service resource.
  • CConfigure a GKE Ingress resource with type: LoadBalancer.
  • DConfigure a GKE Service resource with type: LoadBalancer.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Configure a GKE Ingress resource.

Explanation

Google Kubernetes Engine runs managed Kubernetes for containerized, portable workloads.

Topic 1 Β· Question 71

Your company is planning to migrate their on-premises Hadoop environment to the cloud. Increasing storage cost and maintenance of data stored in HDFS is a major concern for your company. You also want to make minimal changes to existing data analytics jobs and existing architecture. How should you proceed with the migration?

  • AMigrate your data stored in Hadoop to BigQuery. Change your jobs to source their information from BigQuery instead of the on-premises Hadoop environment.
  • BCreate Compute Engine instances with HDD instead of SSD to save costs. Then perform a full migration of your existing environment into the new one in Compute Engine instances.
  • CCreate a Cloud Dataproc cluster on Google Cloud Platform, and then migrate your Hadoop environment to the new Cloud Dataproc cluster. Move your HDFS data into larger HDD disks to save on storage costs.
  • DCreate a Cloud Dataproc cluster on Google Cloud Platform, and then migrate your Hadoop code objects to the new cluster. Move your data to Cloud Storage and leverage the Cloud Dataproc connector to run jobs on that data. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Create a Cloud Dataproc cluster on Google Cloud Platform, and then migrate your Hadoop code objects to the new cluster. Move your data to Cloud Storage and leverage the Cloud Dataproc connector to run jobs on that data.

Explanation

Cloud Storage provides durable, scalable object storage that is fully managed. Dataproc runs managed Spark and Hadoop clusters for big-data processing.

Topic 1 Β· Question 72

Your data is stored in Cloud Storage buckets. Fellow developers have reported that data downloaded from Cloud Storage is resulting in slow API performance. You want to research the issue to provide details to the GCP support team. Which command should you run?

  • Agsutil test ""o output.json gs://my-bucket
  • Bgsutil perfdiag ""o output.json gs://my-bucket (correct answer)
  • Cgcloud compute scp example-instance:~/test-data ""o output.json gs://my-bucket
  • Dgcloud services test ""o output.json gs://my-bucket
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: gsutil perfdiag ""o output.json gs://my-bucket.

Topic 1 Β· Question 73

You are using Cloud Build build to promote a Docker image to Development, Test, and Production environments. You need to ensure that the same Docker image is deployed to each of these environments. How should you identify the Docker image in your build?

  • AUse the latest Docker image tag.
  • BUse a unique Docker image name.
  • CUse the digest of the Docker image. (correct answer)
  • DUse a semantic version Docker image tag.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Use the digest of the Docker image.

Topic 1 Β· Question 74

Your company has created an application that uploads a report to a Cloud Storage bucket. When the report is uploaded to the bucket, you want to publish a message to a Cloud Pub/Sub topic. You want to implement a solution that will take a small amount to effort to implement. What should you do?

  • AConfigure the Cloud Storage bucket to trigger Cloud Pub/Sub notifications when objects are modified. (correct answer)
  • BCreate an App Engine application to receive the file; when it is received, publish a message to the Cloud Pub/Sub topic.
  • CCreate a Cloud Function that is triggered by the Cloud Storage bucket. In the Cloud Function, publish a message to the Cloud Pub/Sub topic.
  • DCreate an application deployed in a Google Kubernetes Engine cluster to receive the file; when it is received, publish a message to the Cloud Pub/Sub topic.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Configure the Cloud Storage bucket to trigger Cloud Pub/Sub notifications when objects are modified.

Explanation

Cloud Storage provides durable, scalable object storage that is fully managed. Pub/Sub is a serverless, global messaging service that decouples services and ingests high-volume event streams.

Topic 1 Β· Question 75

Your teammate has asked you to review the code below, which is adding a credit to an account balance in Cloud Datastore. Which improvement should you suggest your teammate make?

  • AGet the entity with an ancestor query.
  • BGet and put the entity in a transaction. (correct answer)
  • CUse a strongly consistent transactional database.
  • DDon't return the account entity from the function.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Get and put the entity in a transaction.

Topic 1 Β· Question 76

Your company stores their source code in a Cloud Source Repositories repository. Your company wants to build and test their code on each source code commit to the repository and requires a solution that is managed and has minimal operations overhead. Which method should they use?

  • AUse Cloud Build with a trigger configured for each source code commit. (correct answer)
  • BUse Jenkins deployed via the Google Cloud Platform Marketplace, configured to watch for source code commits.
  • CUse a Compute Engine virtual machine instance with an open source continuous integration tool, configured to watch for source code commits.
  • DUse a source code commit trigger to push a message to a Cloud Pub/Sub topic that triggers an App Engine service to build the source code.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use Cloud Build with a trigger configured for each source code commit.

Explanation

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

Topic 1 Β· Question 77

You are writing a Compute Engine hosted application in project A that needs to securely authenticate to a Cloud Pub/Sub topic in project B. What should you do?

  • AConfigure the instances with a service account owned by project B. Add the service account as a Cloud Pub/Sub publisher to project A.
  • BConfigure the instances with a service account owned by project A. Add the service account as a publisher on the topic. (correct answer)
  • CConfigure Application Default Credentials to use the private key of a service account owned by project B. Add the service account as a Cloud Pub/Sub publisher to project A.
  • DConfigure Application Default Credentials to use the private key of a service account owned by project A. Add the service account as a publisher on the topic
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Configure the instances with a service account owned by project A. Add the service account as a publisher on the topic.

Explanation

A service account provides an identity for workloads to access Google Cloud APIs securely.

Topic 1 Β· Question 78

You are developing a corporate tool on Compute Engine for the finance department, which needs to authenticate users and verify that they are in the finance department. All company employees use G Suite. What should you do?

  • AEnable Cloud Identity-Aware Proxy on the HTTP(s) load balancer and restrict access to a Google Group containing users in the finance department. Verify the provided JSON Web Token within the application. (correct answer)
  • BEnable Cloud Identity-Aware Proxy on the HTTP(s) load balancer and restrict access to a Google Group containing users in the finance department. Issue client-side certificates to everybody in the finance team and verify the certificates in the application.
  • CConfigure Cloud Armor Security Policies to restrict access to only corporate IP address ranges. Verify the provided JSON Web Token within the application.
  • DConfigure Cloud Armor Security Policies to restrict access to only corporate IP address ranges. Issue client side certificates to everybody in the finance team and verify the certificates in the application.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Enable Cloud Identity-Aware Proxy on the HTTP(s) load balancer and restrict access to a Google Group containing users in the finance department. Verify the provided JSON Web Token within the application.

Explanation

A load balancer distributes traffic across healthy backends in multiple zones for availability and scale. Cloud Identity manages users, groups, and device policies as a managed identity platform. Identity-Aware Proxy enforces per-request access control to apps without a VPN.

Topic 1 Β· Question 79 Β· Select all that apply

Your API backend is running on multiple cloud providers. You want to generate reports for the network latency of your API. Which two steps should you take? (Choose two.)

  • AUse Zipkin collector to gather data. (correct answer)
  • BUse Fluentd agent to gather data.
  • CUse Stackdriver Trace to generate reports. (correct answer)
  • DUse Stackdriver Debugger to generate report.
  • EUse Stackdriver Profiler to generate report.
Reveal answer & explanation
Correct answer: A, C

The correct answer is A, C. Option A: Use Zipkin collector to gather data. Option C: Use Stackdriver Trace to generate reports.

Explanation

Cloud Operations (formerly Stackdriver) provides monitoring, logging, and tracing for reliability.

Topic 1 Β· Question 80

Case study - This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided. To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study. At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section. To start the case study - To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question. Company Overview - HipLocal is a community application designed to facilitate communication between people in close proximity. It is used for event planning and organizing sporting events, and for businesses to connect with their local communities. HipLocal launched recently in a few neighborhoods in Dallas and is rapidly growing into a global phenomenon. Its unique style of hyper-local community communication and business outreach is in demand around the world. Executive Statement - We are the number one local community app; it's time to take our local community services global. Our venture capital investors want to see rapid growth and the same great experience for new local and virtual communities that come online, whether their members are 10 or 10000 miles away from each other. Solution Concept - HipLocal wants to expand their existing service, with updated functionality, in new regions to better serve their global customers. They want to hire and train a new team to support these regions in their time zones. They will need to ensure that the application scales smoothly and provides clear uptime data. Existing Technical Environment - HipLocal's environment is a mix of on-premises hardware and infrastructure running in Google Cloud Platform. The HipLocal team understands their application well, but has limited experience in global scale applications. Their existing technical environment is as follows: * Existing APIs run on Compute Engine virtual machine instances hosted in GCP. * State is stored in a single instance MySQL database in GCP. * Data is exported to an on-premises Teradata/Vertica data warehouse. * Data analytics is performed in an on-premises Hadoop environment. * The application has no logging. * There are basic indicators of uptime; alerts are frequently fired when the APIs are unresponsive. Business Requirements - HipLocal's investors want to expand their footprint and support the increase in demand they are seeing. Their requirements are: * Expand availability of the application to new regions. * Increase the number of concurrent users that can be supported. * Ensure a consistent experience for users when they travel to different regions. * Obtain user activity metrics to better understand how to monetize their product. * Ensure compliance with regulations in the new regions (for example, GDPR). * Reduce infrastructure management time and cost. * Adopt the Google-recommended practices for cloud computing. Technical Requirements - * The application and backend must provide usage metrics and monitoring. * APIs require strong authentication and authorization. * Logging must be increased, and data should be stored in a cloud analytics platform. * Move to serverless architecture to facilitate elastic scaling. * Provide authorized access to internal apps in a secure manner. Which database should HipLocal use for storing user activity?

  • ABigQuery (correct answer)
  • BCloud SQL
  • CCloud Spanner
  • DCloud Datastore
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: BigQuery

Explanation

BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage.

Showing questions 61–80 of 359 Β· Page 4 of 18