BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Google Cloud Enhances Spanner with Dual-Region Configuration

Google Cloud Enhances Spanner with Dual-Region Configuration

Google Cloud has introduced a significant update to its fully-managed distributed SQL database service, Spanner, which now offers a dual-region configuration option. The company aims with this enhancement to assist enterprises in complying with data residency norms across countries with limited cloud support while ensuring high availability.

Before this update, enterprises operating in countries with only two Google Cloud regions were constrained using regional Spanner configurations. Multi-region configurations required three regions, often resulting in one region being outside the country, thereby conflicting with data residency requirements. The new dual-region configuration alleviates this issue by allowing enterprises to maintain data residency compliance and high availability even with just two cloud regions within a country.

Nitin Sagar, senior product manager at Google, detailed the operational mechanics of the dual-region configuration in a blog post. He explained that during a zonal outage affecting one of the replicas, Spanner can maintain availability as at least two replicas in each region would still be functional. However, the databases will lose availability if an entire region faces an outage. In such cases, the setup can switch to single-region mode, comprising three replicas in one region, to recover availability.

(Source: Google blog post)

The documentation states with multi-region configurations:

There are trade-offs, though, because in a multi-region configuration, the quorum (read-write) replicas are spread across more than one region. You might notice additional network latency when these replicas communicate with each other to form a write quorum. Reads don't require a quorum. The result is that your application achieves faster reads in more places at the cost of a small increase in write latency.

The company suggests designing a schema to prevent hotspots and performance issues. To avoid single-region dependency and optimize performance in multi-region configurations, critical compute resources should be distributed across at least two regions. Additionally, keep high-priority total CPU utilization under 45% in each region to improve performance.

Google Cloud is not the only one offering such capabilities. Other cloud providers like Microsoft, AWS, and Oracle, also provide multi-region setups for their database-as-a-service (DBaaS) offerings, such as Azure SQL, Cosmos DB, Amazon Aurora, Amazon DynamoDB, and Oracle NoSQL database. Furthermore, other database vendors like Cockroach Labs and DataStax offer similar multi-region capabilities.

When it comes to multi-region traffic requirements and a Cloud DBaaS solution, a respondent on a recent Reddit thread wrote:

You'll either need to keep things local to each region as it makes sense or move the architecture to an eventually consistent model using the various tools and techniques available for that.

Lastly, Google Cloud’s new dual-region configurations are now available in Australia, Germany, India, and Japan.

About the Author

Rate this Article

Adoption
Style

BT