An input published to a user's contacts is stored in Cloud Spanner. The app prioritizes low latency over strong consistency. Which read pattern should you use?
Choose an answer
Tap an option to check your answer.
Correct answer: Perform stale reads using single-read methods..
Why this is the answer
The correct answer is to perform stale reads using single-read methods. Cloud Spanner offers different read types. Stale reads provide the lowest latency because they can be served by any replica without needing to coordinate with the leader, making them ideal when low latency is prioritized over strong consistency. Using single-read methods further optimizes for latency by avoiding the overhead of transactions when only reading data. Performing Read-Only transactions would offer strong consistency but introduce higher latency than stale reads. Performing strong reads using single-read methods would also ensure strong consistency, but again, at the cost of higher latency compared to stale reads. Performing stale reads using read-write transactions is incorrect because read-write transactions are designed for operations that modify data and inherently incur higher overhead than single-read methods, even for stale reads.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed