Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 236 of 481

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

Google Professional Cloud Developer Question 236

Select 2Google Cloud Platform

You are tasked with developing a highly scalable web application on Google Cloud Platform. The application will use Cloud Run to handle HTTP requests and Cloud Pub/Sub for asynchronous processing. Which of the following design considerations should you prioritize to ensure reliability and scalability?

  1. A

    Implement idempotency in your Cloud Run service to handle retries from Cloud Pub/Sub.

  2. B

    Use a global state in Cloud Run to cache frequently accessed data for improved performance.

  3. C

    Configure Cloud Pub/Sub message acknowledgment to be processed only after successful message handling.

  4. D

    Set a fixed concurrency limit for Cloud Run to avoid overloading your service.

  5. E

    Ensure your application logs all incoming requests directly to the local filesystem for debugging purposes.

Show answer and explanation

Correct answers: A, C

Explanation

To ensure reliability and scalability in a Cloud Run and Cloud Pub/Sub-based application, it is important to account for the stateless nature of Cloud Run and the asynchronous nature of Cloud Pub/Sub. Idempotency safeguards against duplicate message processing, and proper acknowledgment handling ensures that messages are retried in case of failures. These considerations align with best practices for building resilient cloud-native applications.

  • A. Correct.

    Implementing idempotency in your Cloud Run service is critical because Cloud Pub/Sub may retry messages in case of failures, and idempotency ensures that processing the same message multiple times does not cause unintended side effects.

  • B. Incorrect.

    Using a global state in Cloud Run is not recommended because Cloud Run instances are stateless by design, and relying on a global state can lead to inconsistent behavior and scale issues.

  • C. Correct.

    Configuring Cloud Pub/Sub message acknowledgment to occur only after successful handling ensures that failed messages can be retried, improving the reliability of your application.

  • D. Incorrect.

    Setting a fixed concurrency limit can restrict scalability. Instead, you should allow Cloud Run to scale dynamically based on traffic, unless there are specific resource constraints.

  • E. Incorrect.

    Logging requests directly to the local filesystem is not recommended in Cloud Run because instances may be ephemeral and logs could be lost. Instead, use a centralized logging solution like Cloud Logging.

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