Professional Cloud Developer v1.0 (Professional Cloud Developer)

Page:    1 / 19   
Total 274 questions

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?

  • A. File a ticket with Cloud Support indicating that the application performs faster locally.
  • B. Use Cloud Debugger snapshots to look at a point-in-time execution of the application.
  • C. Use Cloud Profiler to determine which functions within the application take the longest amount of time.
  • D. Add logging commands to the application and use Cloud Logging to check where the latency problem occurs.


Answer : D

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?

  • A. Increase the size of the instance class.
  • B. Change the Persistent Disk type to SSD.
  • C. Change /product-details to perform the requests in parallel.
  • D. Store the /sku-details information in a database, and replace the webservice call with a database query.


Answer : C

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

  • A. Use BigQuery federated queries to query data from Cloud Storage.
  • B. Create a dataset in the EU region that will keep information about EU users only.
  • C. Create a Cloud Storage bucket in the EU region to store information for EU users only.
  • D. Re-upload your data using to a Cloud Dataflow pipeline by filtering your user records out.
  • E. Use DML statements in BigQuery to update/delete user records based on their requests.


Answer : CE

Reference:
https://cloud.google.com/solutions/bigquery-data-warehouse

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?

  • A. manual_scaling: instances: 5 min_pending_latency: 30ms
  • B. manual_scaling: max_instances: 5 idle_timeout: 10m
  • C. basic_scaling: instances: 5 min_pending_latency: 30ms
  • D. basic_scaling: max_instances: 5 idle_timeout: 10m


Answer : C

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?

  • A. Grant the service account BigQuery Data Viewer and BigQuery Job User roles.
  • B. Grant the service account BigQuery Data Editor and BigQuery Data Viewer roles.
  • C. Create a view in BigQuery from the SQL query and SELECT* from the view in the CLI.
  • D. Create a new dataset in BigQuery, and copy the source table to the new dataset Query the new dataset and table from the CLI.


Answer : B

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?

  • A. Reboot the machine.
  • B. Enable and check the serial port output.
  • C. Delete the machine and create a new one.
  • D. Take a snapshot of the disk and attach it to a new machine.


Answer : A

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

  • A. Add the label ג€AUTOSCALEג€ to the instance group template.
  • B. Decrease the cool-down period for instances added to the group.
  • C. Increase the target CPU usage for the instance group autoscaler.
  • D. Decrease the target CPU usage for the instance group autoscaler.
  • E. Remove the health-check for individual VMs in the instance group.


Answer : AC

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?

  • A. Perform a rolling-action with maxSurge set to 1, maxUnavailable set to 0.
  • B. Perform a rolling-action with maxSurge set to 0, maxUnavailable set to 1
  • C. Perform a rolling-action with maxHealthy set to 1, maxUnhealthy set to 0.
  • D. Perform a rolling-action with maxHealthy set to 0, maxUnhealthy set to 1.


Answer : A

Reference:
https://cloud.google.com/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups

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?

  • A. Use HTTP signed URLs to securely provide access to the required resources.
  • B. Use the instanceג€™s service account Application Default Credentials to authenticate to the required resources.
  • C. Generate a P12 file from the GCP Console after the instance is deployed, and copy the credentials to the host instance before starting the application.
  • D. Commit 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.


Answer : B

Reference:
https://cloud.google.com/compute/docs/api/how-tos/authorization

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?

  • A. Configure a GKE Ingress resource.
  • B. Configure a GKE Service resource.
  • C. Configure a GKE Ingress resource with type: LoadBalancer.
  • D. Configure a GKE Service resource with type: LoadBalancer.


Answer : A

Reference:
https://cloud.google.com/kubernetes-engine/docs/concepts/ingress

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?

  • A. Migrate your data stored in Hadoop to BigQuery. Change your jobs to source their information from BigQuery instead of the on-premises Hadoop environment.
  • B. Create 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.
  • C. Create 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.
  • 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.


Answer : D

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?

  • A. gsutil test ג€"o output.json gs://my-bucket
  • B. gsutil perfdiag ג€"o output.json gs://my-bucket
  • C. gcloud compute scp example-instance:~/test-data ג€"o output.json gs://my-bucket
  • D. gcloud services test ג€"o output.json gs://my-bucket


Answer : B

Reference:
https://groups.google.com/forum/#!topic/gce-discussion/xBl9Jq5HDsY

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?

  • A. Use the latest Docker image tag.
  • B. Use a unique Docker image name.
  • C. Use the digest of the Docker image.
  • D. Use a semantic version Docker image tag.


Answer : D

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?

  • A. Configure the Cloud Storage bucket to trigger Cloud Pub/Sub notifications when objects are modified.
  • B. Create an App Engine application to receive the file; when it is received, publish a message to the Cloud Pub/Sub topic.
  • C. Create a Cloud Function that is triggered by the Cloud Storage bucket. In the Cloud Function, publish a message to the Cloud Pub/Sub topic.
  • D. Create 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.


Answer : C

Reference:
https://cloud.google.com/storage/docs/pubsub-notifications

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?

  • A. Get the entity with an ancestor query.
  • B. Get and put the entity in a transaction.
  • C. Use a strongly consistent transactional database.
  • D. Donג€™t return the account entity from the function.


Answer : A

Page:    1 / 19   
Total 274 questions