Databases

Back up on demand, emulate and develop with ease — new Spanner features

Database

At Google, we built Cloud Spanner to support our need for a scalable, multi-version database with relational semantics. It’s become an important capability for teams that need a globally distributed, strongly consistent database service. Spanner continues to launch new enterprise capabilities, and we’re announcing the general availability of managed backup-restore. This can help you achieve high business continuity and add data protection without much management overhead. This feature provides you protection against user or application errors that result in logical data corruption. You can now take consistent, on-demand backup of databases in your regional or multi-regional configurations, and restore those backups onto the same or different instance with the same instance configuration. These restores are optimized to reduce the time to first byte access to the data in a backup. This means you can get access to terabytes of data being restored from a backup within minutes after a failure. 

Life sciences and healthcare organization Verily, an Alphabet company, launched the Project Baseline COVID-19 Testing Program to expand access to COVID-19 screening and testing. Verily is using Spanner to ensure the Project Baseline application is able to scale automatically to meet the demand and provide high availability. In addition to scale insurance, Spanner offers strong external consistency with a monthly uptime SLA of up to 99.999%. Google Cloud customers across industries, including financial services, retail, gaming and technology, use Spanner for workloads that must be able to scale quickly while not compromising on relational semantics, atomic transactions, and strong external consistency.

This new managed backup-restore capability is available via client libraries, API, gcloud, and Cloud Console. You can use this feature to back up and restore your databases, whatever their size. Here’s what it looks like in practice:

GCP Spanner.gif

We’re also introducing new features to add even more reliability, flexibility, and ease of use to your experience developing applications with Spanner, including:

  • Local emulator (in beta)
    Cloud Spanner Emulator can be used for correctness testing. Spanner Emulator runs in an offline environment and provides emulation of the Spanner API (both REST and gRPC) and SQL layer. It helps reduce application development costs and improve developer productivity. 
  • Query optimizer versioning (generally available)
    Spanner's optimizer uses a combination of well-established heuristics and cost-based optimization to produce efficient plans for low-latency queries with optimal CPU utilization. Newly released Query Optimizer versions let Spanner generate even more efficient query execution plans. However, for a small subset of queries, this can result in varying performance profiles. With Query Optimizer versioning, you now have greater control and can run your database, application, and queries with specific optimizer versions that produce the best performance, and switch between the new version or prior versions at your convenience. 
  • Foreign keys (generally available)
    Foreign keys in Spanner allow you to define referential integrity constraints between columns in different tables. Spanner ensures referential integrity by rejecting attempts to add invalid data. The addition of foreign key support means Spanner now has two ways to relate table data: foreign keys and interleaving. Interleaving also provides referential integrity constraints, but it’s useful primarily in cases where physical co-location of data between parent-child tables can improve query performance.  
  • C++ client library (generally available) 
    If you use C++ for your application development, whether for building games, financial services, or any other high-performance need, you can now benefit from the idiomatic C++ client library for Spanner. This library implements best practices such as session pool management and retry logic so application developers don’t have to worry about those tasks.

Learn more
To get started with Spanner, create an instance or try it out with a Spanner Qwiklab. Google Cloud is currently offering free access to training and certification, including access to Qwiklabs, for 30 days. Register before April 30, 2020 to get started for free.