0
0
GCPcloud~20 mins

Cloud Spanner for global distribution in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cloud Spanner Global Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
How does Cloud Spanner handle global consistency?

Cloud Spanner is designed for global distribution. What mechanism does it use to ensure strong consistency across regions?

AIt uses a global lock manager to lock data before any transaction.
BIt uses TrueTime API to assign timestamps and coordinate transactions globally.
CIt replicates data asynchronously and resolves conflicts later.
DIt relies on client-side conflict detection and retries.
Attempts:
2 left
💡 Hint

Think about how Spanner achieves external consistency with minimal latency.

Architecture
intermediate
2:00remaining
Choosing Spanner instance configuration for global users

You have users in North America, Europe, and Asia. You want low latency reads and writes globally. Which Spanner instance configuration is best?

AMulti-region instance with nodes in US, Europe, and Asia regions.
BSingle-region instance in US-central1 only.
CSingle-region instance in US-central1 with multi-region replicas.
DMulti-region instance with nodes only in US and Europe.
Attempts:
2 left
💡 Hint

Consider where your users are and how Spanner distributes data.

security
advanced
2:00remaining
Securing data in Cloud Spanner for global distribution

Which option correctly describes how Cloud Spanner secures data at rest and in transit globally?

AData is encrypted at rest using Google-managed keys only; in transit encryption is optional.
BData is encrypted only in transit; at rest it is stored unencrypted for performance.
CData is encrypted at rest and in transit only within a single region.
DData is encrypted at rest using customer-managed keys and in transit using TLS.
Attempts:
2 left
💡 Hint

Think about Google Cloud's default encryption and customer control options.

Best Practice
advanced
2:00remaining
Optimizing schema design for global Cloud Spanner instances

Which schema design practice helps reduce latency and improve performance in a globally distributed Cloud Spanner instance?

AAvoid primary keys to allow flexible querying across regions.
BUse wide tables with many nullable columns to reduce joins.
CUse interleaved tables to colocate related data physically.
DUse many small tables with no foreign keys to simplify replication.
Attempts:
2 left
💡 Hint

Think about how data locality affects distributed database performance.

🧠 Conceptual
expert
2:00remaining
Impact of TrueTime uncertainty on transaction commit latency

Cloud Spanner uses TrueTime with bounded uncertainty for global consistency. How does increasing TrueTime uncertainty affect transaction commit latency?

AHigher uncertainty increases commit latency because Spanner waits longer to ensure consistency.
BHigher uncertainty decreases commit latency by allowing faster commits.
CTrueTime uncertainty has no effect on commit latency as commits are asynchronous.
DHigher uncertainty causes Spanner to abort more transactions but does not affect latency.
Attempts:
2 left
💡 Hint

Consider why Spanner waits before committing transactions.