Product attributes
Technology attributes
Other attributes
Google Cloud Spanner is a fully managed, distributed relational database service that runs on Google Cloud. Cloud Spanner offers transactional consistency at a global scale, automatic, synchronous replication for high availability, and support for two SQL dialects: GoogleSQL (ANSI 2011 with extensions) and PostgreSQL.Cloud Spanner aims to combine the benefits of relational database structures with non-relational horizontal scale. It also combines transactions, SQL queries, and relational structure with the scalability generally associated with non-relational or NoSQL databases.
Cloud Spanner works via node servers reading and writing transaction requests without storing the data. Each node is replicated across different zones in the region as well as the accompanying database storage. Nodes within a zone are responsible for reading and writing to the storage in their zone. Data is stored in Google's underlying Colossus distributed replicated file system(a cluster-level file system, the successor to Google File System). This offers advantages when it comes to redistributing load as data is not linked to individual nodes. Also, if a node or zone fails, the database is still available, served by the remaining nodes.
Each table in a Cloud Spanner database is stored and sorted by primary key. Tables are divided by ranges of the primary key, known as splits. Each split is managed independently by different spanner nodes. The number of splits for a table changes according to the amount of data (empty tables only have a single split). Splits are dynamically rebalanced according to data and the load while replicated across the different zones. Split replicas are associated with a group (Paxos) that spans zones. Paxos consensus protocols determine one of the zones to be a leader. The leader is responsible for writing transactions for that split, while the other replicas are used for reads. If a leader fails, the consensus protocol determines a new leader. Different zones can become leaders for different splits, distributing the leadership roles among all the Cloud Spanner compute nodes. Nodes are likely to be leaders for some splits and replicas for others. This distributed mechanism of splits, leaders, and replicas allows Cloud Spanner to provide both high availability and scalability.
Cloud Spanner offers ANSI-based SQL dialects over the same rich set of capabilities, GoogleSQL and PostgreSQL. GoogleSQL shares syntax with BigQuery for teams wanting to standardize their data management workflows. The PostgreSQL interface provides familiarity for teams with existing knowledge of PostgreSQL and the portability of schemas and queries to other PostgreSQL environments.
Migration to Spanner varies widely, depending on factors like source database, data size, downtime requirements, application code complexity, sharding schema, custom functions or transformations, failover, and replication strategy. Google's recommended tooling comprises open-source tools like HarbourBridge for Schema and Data migration and third-party tools for assessments like migVisor.
Spanner pricing is based on compute capacity, database storage, backup storage, and network usage, with discounts for committed use.
Regional and multi-region configuration compute capacity is provisioned as processing units or nodes (1 node = 1000 processing units). Regional instance pricing includes 3 read-write replicas in a single region and starts at $0.09 per 100 processing units per hour. Multi-region pricing includes all default replicas (starting at 5) and cross-region replication network usage, starting at $0.30 per 100 processing units per hour.
Database storage regional and multi-region configuration pricing is based on the amount of data stored in the database and includes the cost of storage in replicas. Regional pricing starts at $0.30 per GB per month, and multi-region configuration starts at $0.50 per GB per month.
Both regional and multi-region backup storage is based on the amount of backup storage and includes the cost of storage in replicas. Regional pricing starts at $0.10 per GB per month, and Multi-region pricing starts at $0.30 per GB per month.
Network ingress and egress within the same region are free. Pricing for egress between regions within the same continent starts at $0.10 per GB per month.
Google first introduced Cloud Spanner on February 15, 2017. The database was originally a key-value NoSQL store, but over time became a strongly typed schema and a SQL query processor as well. The development of its NoSQL processor core and SQL interface was in part informed by NoSQL and SQL efforts undertaken by Google engineers as part of the company's in-house F1 system for managing Google AdWords data. Google Cloud Spanner became generally available to Google Cloud customers in May 2017.