Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 178 of 481

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

Google Professional Cloud Developer Question 178

Single answerGoogle Cloud Platform

You are building a global e-commerce application on Google Cloud that uses Cloud Spanner as the database. The application needs to ensure that inventory updates are reflected immediately across all regions to prevent overselling of products. Which consistency model should you choose, and why?

  1. A

    Strong consistency, because it ensures that all reads return the most recent committed data.

  2. B

    Eventual consistency, because it allows higher availability and lower latency across regions.

  3. C

    Eventual consistency, because it guarantees atomicity for updates across multiple regions.

  4. D

    Strong consistency, because it supports eventual convergence of data without sacrificing performance.

Show answer and explanation

Correct answer: A

Explanation

In scenarios where immediate consistency is required, such as inventory management to prevent overselling, strong consistency is the appropriate choice. It ensures that all reads reflect the most recent committed data, which is critical for maintaining accurate and synchronized states across regions. Eventual consistency, while suitable for some use cases, would not meet the application's requirements for immediate consistency.

  • A. Correct.

    This is correct. Strong consistency ensures that all reads reflect the most recent committed data, which is critical for preventing issues like overselling in an application that requires immediate synchronization across regions.

  • B. Incorrect.

    This is incorrect. Eventual consistency does not guarantee that all regions see the most recent updates immediately, which could lead to overselling in this scenario.

  • C. Incorrect.

    This is incorrect. While eventual consistency can provide low-latency reads, it does not guarantee atomic updates or immediate consistency across multiple regions.

  • D. Incorrect.

    This is incorrect. Strong consistency ensures immediate data consistency but does not prioritize performance over consistency. Eventual consistency is the model that focuses on performance and eventual convergence.

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