Topic 1 Question 19
Your application takes an input from a user and publishes it to the user's contacts. This input is stored in a table in Cloud Spanner. Your application is more sensitive to latency and less sensitive to consistency. How should you perform reads from Cloud Spanner for this application?
Perform Read-Only transactions.
Perform stale reads using single-read methods.
Perform strong reads using single-read methods.
Perform stale reads using read-write transactions.
ユーザの投票
コメント(11)
As mentioned here https://cloud.google.com/spanner/docs/reference/rest/v1/TransactionOptions read-write transaction type has no options, and there is no way to make stale reads with this transaction type, so D) is definitely wrong. In the question, low latency is more critical than consistency, so C) is not an option. Read-Only transactions can do stale reads as well as Single Read methods, but in the documentation https://cloud.google.com/spanner/docs/transactions#read-only_transactions , they encourage to use SingleRead methods where possible. My vote is B)
👍 15emmet2020/05/28B is correct answer here.
👍 4saurabh18052020/11/08https://cloud.google.com/spanner/docs/reads: "A stale read is read at a timestamp in the past. If your application is latency sensitive but tolerant of stale data, then stale reads can provide performance benefits."
B is the answer since the qn is asking about reading from Cloud Spanner; no writes involved
👍 4syu31svc2021/06/20
シャッフルモード