An organization is using Google Cloud Spanner for their transactional database. They want to optimize performance for a table that has a high volume of writes. What is a key design best practice in Spanner to avoid 'hotspots'?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: Avoid using monotonically increasing primary keys (like timestamps or IDs)

Monotonically increasing keys cause all writes to hit a single 'split' (node) in Spanner, creating a hotspot. Using UUIDs or bit-reversing keys distributes writes evenly....

๐Ÿ“‹Part of Professional Cloud Architect ยท GCP Certification Practice
Real Exam ScenarioCloud SQL

An organization is using Google Cloud Spanner for their transactional database. They want to optimize performance for a table that has a high volume of writes. What is a key design best practice in Spanner to avoid 'hotspots'?

โœ“ Correct Answer & ExplanationCloud SQL

Correct Answer

Avoid using monotonically increasing primary keys (like timestamps or IDs)

Why This Answer Is Correct

Monotonically increasing keys cause all writes to hit a single 'split' (node) in Spanner, creating a hotspot. Using UUIDs or bit-reversing keys distributes writes evenly.

๐Ÿ“š What This Question Tests

This question evaluates your knowledge of Cloud SQL โ€” a core concept tested in Professional Cloud Architect. Understanding Cloud SQL is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.