Google Cloud Professional Cloud Database Engineer — Question 163

Your company is using a multi-region Spanner instance. The instance stores data from an application which does a lot of writes without reading the data. You are noticing a lot of latency regression. You want to reduce latency and improve performance. What should you do?

Answer options

Correct answer: A

Explanation

Enabling leader-aware routing helps direct write operations to the leader of the relevant data partition, which can significantly lower latency for write-heavy applications. Adding indexes generally benefits read operations more than writes and may not address latency issues effectively. Disabling leader-aware routing could worsen latency by not optimizing write paths. Increasing the number of Spanner nodes could improve performance, but it may not specifically address latency in a write-heavy scenario as effectively as the correct option.