Question 6 of 279

You need to copy directory local-scripts and all of its contents from your local workstation to a Compute Engine virtual machine instance.

Which command should you use?

    Correct Answer: C

    To copy a directory and its contents from a local workstation to a Compute Engine virtual machine instance, you should use the gcloud compute scp command with the --recurse flag. This command securely copies files and directories between your local machine and virtual machine instances. The correct command is: gcloud compute scp --project "my-gcp-project" --recurse ~/local-scripts/ gcp-instance-name:~/server-scripts/ --zone "us-east1-b". Options A and B use the gsutil cp command, which is intended for copying data to or from Google Cloud Storage rather than directly between local systems and Compute Engine instances. Option D uses gcloud compute mv, which is intended for moving rather than copying files or directories.

Question 7 of 279

You are deploying your application to a Compute Engine virtual machine instance with the Stackdriver Monitoring Agent installed. Your application is a unix process on the instance. You want to be alerted if the unix process has not run for at least 5 minutes. You are not able to change the application to generate metrics or logs.

Which alert condition should you configure?

    Correct Answer: C

    To be alerted if the Unix process has not run for at least 5 minutes without changing the application to generate metrics or logs, the best approach is to use a metric absence condition. This type of condition allows monitoring the absence of specific data points over a time interval, in this case, 5 minutes. When the process stops running, it will stop reporting its metrics, and this absence will trigger the alert. This approach ensures you are notified if the process has not been active for the specified duration.

Question 8 of 279

You have two tables in an ANSI-SQL compliant database with identical columns that you need to quickly combine into a single table, removing duplicate rows from the result set.

What should you do?

    Correct Answer: C

    The UNION operator in SQL is used to combine the result sets of two or more SELECT statements, while automatically removing duplicate rows from the result set. This makes it suitable for the scenario where you need to quickly combine two tables with identical columns and eliminate duplicates.

Question 9 of 279

You have an application deployed in production. When a new version is deployed, some issues don't arise until the application receives traffic from users in production. You want to reduce both the impact and the number of users affected.

Which deployment strategy should you use?

    Correct Answer: B

    To minimize the impact and number of users affected by issues in a new version of an application, the best strategy is Canary deployment. This strategy involves rolling out the new version to a small subset of users first, allowing you to monitor and address any issues before a full-scale deployment. This gradual release ensures that only a limited number of users are impacted at any time, making it easier to handle any potential problems and roll back if necessary.

Question 10 of 279

Your company wants to expand their users outside the United States for their popular application. The company wants to ensure 99.999% availability of the database for their application and also wants to minimize the read latency for their users across the globe.

Which two actions should they take? (Choose two.)

    Correct Answer: A, C

    To ensure 99.999% availability of the database and minimize read latency for users across the globe, the company should create a multi-regional Cloud Spanner instance with the 'nam-asia-eur1' configuration. This setup provides data replication across North America, Asia, and Europe, ensuring high availability and low latency for a global user base. Additionally, creating a cluster with at least three Spanner nodes will enhance computational capabilities and further minimize read latency by distributing the load and providing fault tolerance.