Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 180 of 481

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

Google Professional Cloud Developer Question 180

Single answerGoogle Cloud Platform

You are designing a distributed application on Google Cloud that uses Cloud Spanner as the database. The application requires that all users see the most up-to-date data immediately after a write operation, even in the presence of multiple concurrent transactions. Which consistency model should you use to meet this requirement?

  1. A

    Strong consistency

  2. B

    Eventual consistency

  3. C

    Read-after-Write consistency

  4. D

    Causal consistency

Show answer and explanation

Correct answer: A

Explanation

In the given scenario, the application requires that all users see the most up-to-date data immediately after a write operation. Strong consistency is the only model that guarantees this behavior, as it ensures that all reads reflect the latest data, even in a distributed system like Cloud Spanner. Other consistency models, such as eventual or causal consistency, may allow temporary inconsistencies, making them unsuitable for the scenario's requirements.

  • A. Correct.

    Strong consistency ensures that all reads reflect the most recent writes, which is required for scenarios where up-to-date data is mandatory, even with concurrent transactions.

  • B. Incorrect.

    Eventual consistency allows for temporary inconsistencies and may not reflect the latest data immediately, which makes it unsuitable for the requirement of always showing the most up-to-date data.

  • C. Incorrect.

    Read-after-Write consistency is not a consistency model provided by Google Cloud Spanner. It is a different concept and not relevant to this question.

  • D. Incorrect.

    Causal consistency ensures that operations are seen in a causally consistent order, but it does not guarantee that all reads reflect the most recent writes, making it unsuitable for the scenario.

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