Cloud Spanner

Definition

Google Cloud's globally distributed database that combines the benefits of relational databases with horizontal scaling.

Use Cases

Provider Equivalents

Frequently Asked Questions

What's the difference between Cloud Spanner and Cloud SQL?
Cloud SQL is a managed MySQL/PostgreSQL/SQL Server database that’s typically designed for a single region and scales mostly by making the machine bigger (vertical scaling) plus read replicas. Cloud Spanner is built to scale out horizontally across many nodes and can replicate data across regions while keeping strong consistency for transactions. Use Cloud SQL for simpler, smaller-to-medium relational workloads; use Spanner when you need global scale with relational transactions.
When should I use Cloud Spanner?
Use Cloud Spanner when you need (1) a relational database with SQL and ACID transactions, (2) very high scale (large data size and/or high read/write throughput), and (3) high availability and optional multi-region replication with strong consistency. Common fits include global user profiles, financial ledgers, inventory systems, and order processing where correctness matters and manual sharding would be risky or expensive.
How much does Cloud Spanner cost?
Cloud Spanner pricing mainly depends on (1) compute capacity (provisioned nodes or processing units), (2) storage used, and (3) network egress (especially cross-region). Multi-region configurations and higher availability typically require more provisioned capacity. Costs can be optimized by right-sizing compute, using autoscaling where available, choosing appropriate instance configuration (regional vs multi-region), and designing schemas/queries to reduce hotspots and unnecessary load.

Category: data

Difficulty: advanced

Related Terms

See Also