00:00

QUESTION 1

- (Exam Topic 2)
Your team detected a spike of errors in an application running on Cloud Run in your production project. The application is configured to read messages from Pub/Sub topic A, process the messages, and write the messages to topic B. You want to conduct tests to identify the cause of the errors. You can use a set of mock messages for testing. What should you do?

Correct Answer: A

QUESTION 2

- (Exam Topic 2)
You are parsing a log file that contains three columns: a timestamp, an account number (a string), and a transaction amount (a number). You want to calculate the sum of all transaction amounts for each unique account number efficiently.
Which data structure should you use?

Correct Answer: B

QUESTION 3

- (Exam Topic 2)
Your team develops services that run on Google Cloud. You want to process messages sent to a Pub/Sub topic, and then store them. Each message must be processed exactly once to avoid duplication of data and any data conflicts. You need to use the cheapest and most simple solution. What should you do?

Correct Answer: B
https://cloud.google.com/dataflow/docs/concepts/streaming-with-cloud-pubsub

QUESTION 4

- (Exam Topic 2)
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?

Correct Answer: A
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."

QUESTION 5

- (Exam Topic 2)
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?

Correct Answer: D