Google Professional Cloud Developer Professional Cloud Developer Online Training
Google Professional Cloud Developer Online Training
The questions for Professional Cloud Developer were last updated at Nov 27,2024.
- Exam Code: Professional Cloud Developer
- Exam Name: Professional Cloud Developer
- Certification Provider: Google
- Latest update: Nov 27,2024
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
- B . Canary deployment
- C . Rolling deployment
- D . Recreate deployment
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.
- B . Package the application in a single container. Use a process management tool to manage each component.
- C . Package each component in a separate container. Use a script to orchestrate the launch of the components.
- 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.
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.
- 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.
- 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.
- 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.
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.
- B . The use of the STRING data type for arbitrary-precision values.
- C . The use of Version 1 UUIDs as primary keys that increase monotonically.
- D . The use of LIKE instead of STARTS_WITH keyword for parameterized SQL queries.
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.
- 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.
- 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.
- 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.
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.
- 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.
- 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.
- 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.
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.
- 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.
- C . Use Cloud Shell and the built-in code editor for development. Send your source code updates as pull requests.
- 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.
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.
- B . Create aggregated exports on application logs to Cloud Storage to facilitate log analytics.
- C . Write log output to standard output (stdout) as single-line JSON to be ingested into Cloud Logging as structured logs.
- D . Mandate the use of the Logging API in the application code to write structured logs to Cloud Logging.
- 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.
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
- B . Use blue/green deployment
- C . Use rolling updates deployment
- D . Use A/B testing with traffic mirroring during deployment
You support an application that uses the Cloud Storage API. You review the logs and discover multiple HTTP 503 Service Unavailable error responses from the API. Your application logs the error and does not take any further action. You want to implement Google-recommended retry logic to improve success rates.
Which approach should you take?
- A . Retry the failures in batch after a set number of failures is logged.
- B . Retry each failure at a set time interval up to a maximum number of times.
- C . Retry each failure at increasing time intervals up to a maximum number of tries.
- D . Retry each failure at decreasing time intervals up to a maximum number of tries.