Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 67 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 67

Select 2Google Cloud Platform

Your team is deploying a serverless application on Google Cloud using Cloud Run. During a recent cost review, you notice that the application is incurring high costs during non-peak hours due to idle instances. What steps can you take to optimize both costs and resource usage while maintaining the application's performance?

  1. A

    Set the minimum number of Cloud Run instances to 0.

  2. B

    Enable autoscaling with a maximum instance limit.

  3. C

    Migrate the application to a Compute Engine instance with a fixed machine type.

  4. D

    Reduce the request timeout setting in Cloud Run.

  5. E

    Implement a custom load balancer to manually distribute traffic.

Show answer and explanation

Correct answers: A, B

Explanation

To optimize costs and resource usage in a serverless environment like Cloud Run, it's important to leverage its scaling capabilities. Setting the minimum number of instances to 0 ensures that no resources are consumed during idle periods, reducing costs. Additionally, enabling autoscaling with a maximum instance limit allows you to handle varying traffic patterns efficiently while capping costs. Other options, like migrating to Compute Engine or creating custom solutions, do not align with the cost optimization goals of a serverless model.

  • A. Correct.

    Setting the minimum number of Cloud Run instances to 0 ensures that no instances are running during idle periods, reducing costs. This is a recommended practice for serverless applications where traffic is unpredictable.

  • B. Correct.

    Enabling autoscaling with a maximum instance limit ensures that Cloud Run scales based on demand while capping the upper limit of resources to control costs during traffic spikes.

  • C. Incorrect.

    Migrating to a Compute Engine instance with a fixed machine type would likely increase costs due to always-on resources, even during idle periods, and does not align with serverless cost optimization principles.

  • D. Incorrect.

    Reducing the request timeout setting in Cloud Run has no direct impact on cost optimization but might negatively affect user experience if requests are prematurely terminated.

  • E. Incorrect.

    Implementing a custom load balancer is unnecessary in this scenario as Cloud Run already provides automatic traffic distribution, and creating a custom solution would add unnecessary complexity and cost.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam