- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
- Data
Scaling Global Database Reads in Google Cloud
This lab explores strategies for optimizing global database read performance in Google Cloud. It compares Cloud SQL cross-region read replicas with Cloud Spanner to evaluate suitable database architectures. A regional Cloud SQL read replica is deployed to improve read performance for another region users. Read latency and data freshness are measured to validate the solution against real-world business requirements.
Lab Info
Table of Contents
-
Challenge
Reproduce the read-latency failure and confirm the freshness requirement
- Deploy a Cloud SQL PostgreSQL primary instance in Europe and configure a North American test VM.
- Populate the inventory database and measure cross-region read latency against the under-100-ms target.
- Establish the five-second data-freshness requirement for inventory updates.
-
Challenge
Evaluate a cross-region read replica against a Cloud Spanner migration for that requirement
- Compare Cloud SQL cross-region read replicas and Cloud Spanner based on read performance, consistency, and implementation effort.
- Evaluate the suitability of both options for the existing PostgreSQL workload and five-second freshness requirement.
- Select the Cloud SQL read replica architecture for implementation and validation.
-
Challenge
Provision the selected configuration
- Create a Cloud SQL PostgreSQL read replica in the North American region.
- Configure network access and database connectivity from the North American test VM.
- Verify that the replica is operational and the inventory records are accessible.
-
Challenge
Test the result with a cross-region write-then-read check
- Measure regional read latency from the North American VM to the Cloud SQL replica.
- Update an inventory record on the European primary database.
- Execute a write-then-read test to measure when the updated record becomes visible on the replica.
-
Challenge
Verify the observed freshness meets the requirement
- Compare the measured replica visibility delay against the five-second freshness requirement.
- Determine whether the freshness test meets the requirement based on the observed result.
- Assess the selected architecture against the measured performance and freshness requirements.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.