Cloud Spanner is a fully managed, scalable, and globally distributed database service by Google Cloud. It combines the benefits of relational databases with non-relational horizontal scale.
Click to reveal answer
intermediate
How does Cloud Spanner achieve global distribution?
Cloud Spanner replicates data across multiple regions automatically, ensuring low latency and high availability worldwide by synchronizing data with strong consistency.
Click to reveal answer
beginner
What is the benefit of strong consistency in Cloud Spanner?
Strong consistency means all users see the same data at the same time, no matter where they are in the world, which helps avoid conflicts and errors in distributed applications.
Click to reveal answer
intermediate
What is a common use case for Cloud Spanner's global distribution?
Applications that require high availability and low latency across multiple countries, such as global financial systems, gaming platforms, or retail services, benefit from Cloud Spanner's global distribution.
Click to reveal answer
advanced
How does Cloud Spanner handle schema changes in a globally distributed setup?
Cloud Spanner supports online schema changes without downtime, allowing updates to tables and indexes while keeping the database available globally.
Click to reveal answer
What type of database is Cloud Spanner?
AA globally distributed relational database
BA local file storage system
CA NoSQL document store
DA simple key-value cache
✗ Incorrect
Cloud Spanner is a relational database designed for global distribution and strong consistency.
Which feature ensures Cloud Spanner data is consistent worldwide?
AEventual consistency
BStrong consistency
CNo replication
DManual syncing
✗ Incorrect
Cloud Spanner uses strong consistency to keep data synchronized globally.
What does Cloud Spanner automatically replicate?
AUser interface settings
BOnly backups
CData across multiple regions
DLocal logs
✗ Incorrect
Cloud Spanner replicates data across regions to provide global availability.
Which is NOT a benefit of Cloud Spanner's global distribution?
ALow latency access worldwide
BHigh availability
CStrong data consistency
DManual data replication
✗ Incorrect
Cloud Spanner handles replication automatically, not manually.
How does Cloud Spanner handle schema changes?
AOnline without downtime
BRequires database shutdown
CNot supported
DOnly offline updates
✗ Incorrect
Cloud Spanner supports online schema changes without interrupting service.
Explain how Cloud Spanner supports global distribution and why it matters for applications.
Think about how data stays the same everywhere and is fast to access.
You got /5 concepts.
Describe a scenario where using Cloud Spanner's global distribution would be beneficial.
Imagine an app used by people all over the world that needs up-to-date data.
You got /5 concepts.
Practice
(1/5)
1. What is the main benefit of using Cloud Spanner's global distribution feature?
easy
A. It keeps applications fast and reliable by storing data across multiple regions.
B. It reduces the cost of storage by using local disks only.
C. It automatically deletes old data to save space.
D. It limits access to data to a single region for security.
Solution
Step 1: Understand global distribution purpose
Cloud Spanner stores data in multiple regions to improve speed and reliability.
Step 2: Compare options
Only It keeps applications fast and reliable by storing data across multiple regions. correctly describes the benefit of global data storage for performance and reliability.
Final Answer:
It keeps applications fast and reliable by storing data across multiple regions. -> Option A
Quick Check:
Global data storage = fast and reliable apps [OK]
Hint: Global means data spread worldwide for speed and reliability [OK]
Common Mistakes:
Thinking global distribution saves storage cost
Believing data is deleted automatically
Assuming data is limited to one region
2. Which of the following is the correct way to specify a multi-region configuration in Cloud Spanner?
easy
A. multi_region_config = "europe-west1"
B. multi_region_config = "us-central1"
C. multi_region_config = "asia-east1"
D. multi_region_config = "nam3"
Solution
Step 1: Identify multi-region config names
Cloud Spanner uses specific multi-region config names like "nam3" for North America multi-region.
Step 2: Check options
Only A is a valid multi-region config. Options B, C, and D are single-region names.
Final Answer:
multi_region_config = "nam3" -> Option D
Quick Check:
Multi-region config uses names like nam3 [OK]
Hint: Multi-region configs have short codes like nam3, not single region names [OK]
Common Mistakes:
Using single region names instead of multi-region codes
Confusing region names with zone names
Misspelling multi-region config strings
3. Given this Cloud Spanner instance configuration: instance_config = "nam3" nodes = 3 What is the expected behavior of this setup?
medium
A. Data is globally distributed across North America with 3 nodes handling requests.
B. Data is stored in a single region with 3 nodes for processing.
C. Data is stored only in Europe with 3 nodes.
D. Data is stored in Asia with 3 nodes but no replication.
Solution
Step 1: Interpret instance_config "nam3"
"nam3" is a multi-region config for North America, so data is distributed across multiple regions there.
Step 2: Understand nodes setting
3 nodes means the instance has 3 processing units to handle workload.
Final Answer:
Data is globally distributed across North America with 3 nodes handling requests. -> Option A
Quick Check:
nam3 = North America multi-region + 3 nodes [OK]
Hint: Multi-region config + nodes = distributed data with processing power [OK]
Common Mistakes:
Assuming single region storage with multi-region config
Ignoring the meaning of nodes
Confusing region names with multi-region configs
4. You configured a Cloud Spanner instance with instance_config = "nam3" but your app experiences high latency in Europe. What is the likely cause?
medium
A. The instance_config "nam3" is invalid and causes errors.
B. You need to increase the number of nodes to reduce latency.
C. The multi-region config "nam3" only covers North America, not Europe.
D. Cloud Spanner does not support multi-region configurations.
Solution
Step 1: Understand "nam3" coverage
"nam3" is a multi-region config limited to North America regions only.
Step 2: Analyze latency cause
High latency in Europe happens because data is not stored close to European users.
Final Answer:
The multi-region config "nam3" only covers North America, not Europe. -> Option C
Quick Check:
nam3 excludes Europe, causing latency there [OK]
Hint: Check if multi-region config covers your app's user locations [OK]
Common Mistakes:
Assuming multi-region covers all continents
Thinking node count fixes geographic latency
Believing "nam3" is invalid
5. You want to deploy a Cloud Spanner instance that serves users in Asia, Europe, and North America with low latency. Which configuration should you choose?
hard
A. Use a single-region config in Asia with 5 nodes.
B. Use the multi-region config "nam-eur-asia1" with enough nodes.
C. Use multiple single-region instances in each continent.
D. Use the multi-region config "nam3" with 3 nodes.
Solution
Step 1: Identify multi-region config covering Asia, Europe, North America
"nam-eur-asia1" is a multi-region config spanning these continents.
Step 2: Understand node allocation
Choosing enough nodes ensures capacity and low latency across regions.
Step 3: Compare other options
Single-region configs or multiple instances increase complexity or limit coverage.
Final Answer:
Use the multi-region config "nam-eur-asia1" with enough nodes. -> Option B
Quick Check:
nam-eur-asia1 covers all needed continents [OK]
Hint: Pick multi-region config covering all user continents [OK]
Common Mistakes:
Choosing single-region config for global users
Using nam3 which excludes Europe and Asia
Deploying multiple instances instead of one multi-region
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.