ExamGecko
Home Home / Google / Professional Cloud Developer

Google Professional Cloud Developer Practice Test - Questions Answers, Page 11

Question list
Search
Search

List of questions

Search

Related questions











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

A.
Use Zipkin collector to gather data.
A.
Use Zipkin collector to gather data.
Answers
B.
Use Fluentd agent to gather data.
B.
Use Fluentd agent to gather data.
Answers
C.
Use Stackdriver Trace to generate reports.
C.
Use Stackdriver Trace to generate reports.
Answers
D.
Use Stackdriver Debugger to generate report.
D.
Use Stackdriver Debugger to generate report.
Answers
E.
Use Stackdriver Profiler to generate report.
E.
Use Stackdriver Profiler to generate report.
Answers
Suggested answer: A, C

Explanation:

https://cloud.google.com/trace/docs/zipkin

'receive traces from Zipkin clients and forward those traces to Cloud Trace for analysis.'

https://cloud.google.com/trace/docs/quickstart#analysis_reports_window

You have an application deployed in production. When a new version is deployed, you want to ensure that all production traffic is routed to the new version of your application. You also want to keep the previous version deployed so that you can revert to it if there is an issue with the new version.

Which deployment strategy should you use?

A.
Blue/green deployment
A.
Blue/green deployment
Answers
B.
Canary deployment
B.
Canary deployment
Answers
C.
Rolling deployment
C.
Rolling deployment
Answers
D.
Recreate deployment
D.
Recreate deployment
Answers
Suggested answer: A

You are porting an existing Apache/MySQL/PHP application stack from a single machine to Google Kubernetes Engine. You need to determine how to containerize the application. Your approach should follow Google-recommended best practices for availability. What should you do?

A.
Package each component in a separate container. Implement readiness and liveness probes.
A.
Package each component in a separate container. Implement readiness and liveness probes.
Answers
B.
Package the application in a single container. Use a process management tool to manage each component.
B.
Package the application in a single container. Use a process management tool to manage each component.
Answers
C.
Package each component in a separate container. Use a script to orchestrate the launch of the components.
C.
Package each component in a separate container. Use a script to orchestrate the launch of the components.
Answers
D.
Package the application in a single container. Use a bash script as an entrypoint to the container, and then spawn each component as a background job.
D.
Package the application in a single container. Use a bash script as an entrypoint to the container, and then spawn each component as a background job.
Answers
Suggested answer: A

Explanation:

https://cloud.google.com/blog/products/containers-kubernetes/7-best-practices-for-building-containers

https://cloud.google.com/architecture/best-practices-for-building-containers

'classic Apache/MySQL/PHP stack: you might be tempted to run all the components in a single container. However, the best practice is to use two or three different containers: one for Apache, one for MySQL, and potentially one for PHP if you are running PHP-FPM.'

You are developing an application that will be launched on Compute Engine instances into multiple distinct projects, each corresponding to the environments in your software development process (development, QA, staging, and production). The instances in each project have the same application code but a different configuration. During deployment, each instance should receive the application's configuration based on the environment it serves. You want to minimize the number of steps to configure this flow.

What should you do?

A.
When creating your instances, configure a startup script using the gcloud command to determine the project name that indicates the correct environment.
A.
When creating your instances, configure a startup script using the gcloud command to determine the project name that indicates the correct environment.
Answers
B.
In each project, configure a metadata key ''environment'' whose value is the environment it serves. Use your deployment tool to query the instance metadata and configure the application based on the ''environment'' value.
B.
In each project, configure a metadata key ''environment'' whose value is the environment it serves. Use your deployment tool to query the instance metadata and configure the application based on the ''environment'' value.
Answers
C.
Deploy your chosen deployment tool on an instance in each project. Use a deployment job to retrieve the appropriate configuration file from your version control system, and apply the configuration when deploying the application on each instance.
C.
Deploy your chosen deployment tool on an instance in each project. Use a deployment job to retrieve the appropriate configuration file from your version control system, and apply the configuration when deploying the application on each instance.
Answers
D.
During each instance launch, configure an instance custom-metadata key named ''environment'' whose value is the environment the instance serves. Use your deployment tool to query the instance metadata, and configure the application based on the ''environment'' value.
D.
During each instance launch, configure an instance custom-metadata key named ''environment'' whose value is the environment the instance serves. Use your deployment tool to query the instance metadata, and configure the application based on the ''environment'' value.
Answers
Suggested answer: B

You are developing an ecommerce application that stores customer, order, and inventory data as relational tables inside Cloud Spanner. During a recent load test, you discover that Spanner performance is not scaling linearly as expected. Which of the following is the cause?

A.
The use of 64-bit numeric types for 32-bit numbers.
A.
The use of 64-bit numeric types for 32-bit numbers.
Answers
B.
The use of the STRING data type for arbitrary-precision values.
B.
The use of the STRING data type for arbitrary-precision values.
Answers
C.
The use of Version 1 UUIDs as primary keys that increase monotonically.
C.
The use of Version 1 UUIDs as primary keys that increase monotonically.
Answers
D.
The use of LIKE instead of STARTS_WITH keyword for parameterized SQL queries.
D.
The use of LIKE instead of STARTS_WITH keyword for parameterized SQL queries.
Answers
Suggested answer: C

You are developing an application that reads credit card data from a Pub/Sub subscription. You have written code and completed unit testing. You need to test the Pub/Sub integration before deploying to Google Cloud. What should you do?

A.
Create a service to publish messages, and deploy the Pub/Sub emulator. Generate random content in the publishing service, and publish to the emulator.
A.
Create a service to publish messages, and deploy the Pub/Sub emulator. Generate random content in the publishing service, and publish to the emulator.
Answers
B.
Create a service to publish messages to your application. Collect the messages from Pub/Sub in production, and replay them through the publishing service.
B.
Create a service to publish messages to your application. Collect the messages from Pub/Sub in production, and replay them through the publishing service.
Answers
C.
Create a service to publish messages, and deploy the Pub/Sub emulator. Collect the messages from Pub/Sub in production, and publish them to the emulator.
C.
Create a service to publish messages, and deploy the Pub/Sub emulator. Collect the messages from Pub/Sub in production, and publish them to the emulator.
Answers
D.
Create a service to publish messages, and deploy the Pub/Sub emulator. Publish a standard set of testing messages from the publishing service to the emulator.
D.
Create a service to publish messages, and deploy the Pub/Sub emulator. Publish a standard set of testing messages from the publishing service to the emulator.
Answers
Suggested answer: D

You are designing an application that will subscribe to and receive messages from a single Pub/Sub topic and insert corresponding rows into a database. Your application runs on Linux and leverages preemptible virtual machines to reduce costs. You need to create a shutdown script that will initiate a graceful shutdown. What should you do?

A.
Write a shutdown script that uses inter-process signals to notify the application process to disconnect from the database.
A.
Write a shutdown script that uses inter-process signals to notify the application process to disconnect from the database.
Answers
B.
Write a shutdown script that broadcasts a message to all signed-in users that the Compute Engine instance is going down and instructs them to save current work and sign out.
B.
Write a shutdown script that broadcasts a message to all signed-in users that the Compute Engine instance is going down and instructs them to save current work and sign out.
Answers
C.
Write a shutdown script that writes a file in a location that is being polled by the application once every five minutes. After the file is read, the application disconnects from the database.
C.
Write a shutdown script that writes a file in a location that is being polled by the application once every five minutes. After the file is read, the application disconnects from the database.
Answers
D.
Write a shutdown script that publishes a message to the Pub/Sub topic announcing that a shutdown is in progress. After the application reads the message, it disconnects from the database.
D.
Write a shutdown script that publishes a message to the Pub/Sub topic announcing that a shutdown is in progress. After the application reads the message, it disconnects from the database.
Answers
Suggested answer: D

You work for a web development team at a small startup. Your team is developing a Node.js application using Google Cloud services, including Cloud Storage and Cloud Build. The team uses a Git repository for version control. Your manager calls you over the weekend and instructs you to make an emergency update to one of the company's websites, and you're the only developer available. You need to access Google Cloud to make the update, but you don't have your work laptop. You are not allowed to store source code locally on a non-corporate computer. How should you set up your developer environment?

A.
Use a text editor and the Git command line to send your source code updates as pull requests from a public computer.
A.
Use a text editor and the Git command line to send your source code updates as pull requests from a public computer.
Answers
B.
Use a text editor and the Git command line to send your source code updates as pull requests from a virtual machine running on a public computer.
B.
Use a text editor and the Git command line to send your source code updates as pull requests from a virtual machine running on a public computer.
Answers
C.
Use Cloud Shell and the built-in code editor for development. Send your source code updates as pull requests.
C.
Use Cloud Shell and the built-in code editor for development. Send your source code updates as pull requests.
Answers
D.
Use a Cloud Storage bucket to store the source code that you need to edit. Mount the bucket to a public computer as a drive, and use a code editor to update the code. Turn on versioning for the bucket, and point it to the team's Git repository.
D.
Use a Cloud Storage bucket to store the source code that you need to edit. Mount the bucket to a public computer as a drive, and use a code editor to update the code. Turn on versioning for the bucket, and point it to the team's Git repository.
Answers
Suggested answer: C

Explanation:

https://cloud.google.com/shell/docs

Your team develops services that run on Google Kubernetes Engine. You need to standardize their log data using Google-recommended practices and make the data more useful in the fewest number of steps. What should you do? (Choose two.)

A.
Create aggregated exports on application logs to BigQuery to facilitate log analytics.
A.
Create aggregated exports on application logs to BigQuery to facilitate log analytics.
Answers
B.
Create aggregated exports on application logs to Cloud Storage to facilitate log analytics.
B.
Create aggregated exports on application logs to Cloud Storage to facilitate log analytics.
Answers
C.
Write log output to standard output (stdout) as single-line JSON to be ingested into Cloud Logging as structured logs.
C.
Write log output to standard output (stdout) as single-line JSON to be ingested into Cloud Logging as structured logs.
Answers
D.
Mandate the use of the Logging API in the application code to write structured logs to Cloud Logging.
D.
Mandate the use of the Logging API in the application code to write structured logs to Cloud Logging.
Answers
E.
Mandate the use of the Pub/Sub API to write structured data to Pub/Sub and create a Dataflow streaming pipeline to normalize logs and write them to BigQuery for analytics.
E.
Mandate the use of the Pub/Sub API to write structured data to Pub/Sub and create a Dataflow streaming pipeline to normalize logs and write them to BigQuery for analytics.
Answers
Suggested answer: A, C

Explanation:

https://cloud.google.com/stackdriver/docs/solutions/gke/managing-logs#best_practices

You are designing a deployment technique for your new applications on Google Cloud. As part of your deployment planning, you want to use live traffic to gather performance metrics for both new and existing applications. You need to test against the full production load prior to launch. What should you do?

A.
Use canary deployment
A.
Use canary deployment
Answers
B.
Use blue/green deployment
B.
Use blue/green deployment
Answers
C.
Use rolling updates deployment
C.
Use rolling updates deployment
Answers
D.
Use A/B testing with traffic mirroring during deployment
D.
Use A/B testing with traffic mirroring during deployment
Answers
Suggested answer: A
Total 265 questions
Go to page: of 27