Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 72 of 481

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

Google Professional Cloud Developer Question 72

Select 2Google Cloud Platform

You are a developer managing a serverless application running on Google Cloud Functions. The application processes data from Cloud Storage and writes results to BigQuery. Your team has noticed increased costs for the function as the data volume has grown. Which actions can you take to optimize the cost of the application while ensuring performance is maintained?

  1. A

    Switch to a higher memory allocation for the Cloud Function to reduce execution time.

  2. B

    Batch multiple data processing requests into a single invocation of the Cloud Function.

  3. C

    Use Preemptible VMs instead of Cloud Functions for processing the data.

  4. D

    Configure Cloud Function to use a lower timeout setting to avoid excessive runtime costs.

  5. E

    Implement event filtering to ensure the Cloud Function only processes relevant data events.

Show answer and explanation

Correct answers: B, E

Explanation

To optimize the cost of a serverless application, it is essential to reduce unnecessary invocations and ensure efficient utilization of resources. Batching data processing requests (Option 2) decreases the number of invocations, while event filtering (Option 5) ensures that the function only processes relevant events, both of which help reduce costs. Other options either do not align with a serverless architecture or could inadvertently impact performance or function behavior.

  • A. Incorrect.

    Although increasing memory allocation can improve execution time, it also increases the cost per invocation. Without evidence that memory is a bottleneck, this may not optimize costs overall.

  • B. Correct.

    Batching multiple data processing requests reduces the number of invocations and can optimize costs significantly, as fewer invocations are charged.

  • C. Incorrect.

    Preemptible VMs are not suitable for serverless applications like Cloud Functions, as they require infrastructure management and are not serverless by nature.

  • D. Incorrect.

    Reducing the timeout setting could lead to incomplete processing of data if the function requires more time to execute. This does not directly optimize costs unless the function is consistently running unnecessarily long.

  • E. Correct.

    Event filtering ensures that the Cloud Function processes only relevant events, reducing unnecessary invocations and optimizing costs.

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