Skip to content
Google CloudGoogle Cloud SpannerDatabase

google_spanner_instance cost estimation

Globally-consistent, horizontally-scalable SQL database. $0.90/node-hour ($657/month) for regional, $3/node-hour for multi-region. Storage $0.30/GB-month regional, $0.50/GB-month multi-region. Processing Units offer 1/1000th node granularity.

Cloud Spanner is Google's globally-consistent SQL database used for Ads, Play, and other large Google services. The google_spanner_instance resource creates the instance; databases and IAM are separate. Pricing has nodes (or processing units) and storage components.

Node pricing: - Regional (single region): $0.90/node-hour ($657/month per node) - Multi-region (e.g., nam-eur-asia1): $3.00/node-hour ($2,190/month per node) - Dual-region (e.g., nam3): $2.00/node-hour ($1,460/month per node)

Processing Units (PU) offer finer granularity. 1 node = 1000 PU. Minimum is 100 PU ($65.70/month regional). Useful for small workloads that don't justify a full node.

Storage pricing: - Regional: $0.30/GB-month - Multi-region: $0.50/GB-month

Backup pricing: $0.10/GB-month for backups, free until they exceed the database size.

When Spanner wins: - Global apps requiring cross-region strong consistency - Workloads needing relational SQL plus horizontal scalability - Migrations off sharded MySQL/PostgreSQL where consistency matters - Financial/regulated workloads needing ACID across regions

Spanner pricing reality: even the minimum production setup (1 node, regional) is $657/month before storage. Workloads that fit DynamoDB ($1.25/M writes) or PostgreSQL on Cloud SQL ($300/month) usually pay far less. Spanner's price reflects unique capabilities, not commodity database needs.

Recent additions: Spanner Free Tier (5 GB storage, 100 PU) and Spanner Granular Instance Configurations (smaller instances for dev/test).

c3x estimates Spanner based on num_nodes or processing_units, config (region vs multi-region), and storage allocated.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "google_spanner_instance" "main" {
  name             = "prod-spanner"
  config           = "regional-us-central1"
  display_name     = "Production Spanner"
  processing_units = 1000  # 1 node equivalent

  labels = {
    env = "production"
  }
}

resource "google_spanner_database" "app" {
  instance = google_spanner_instance.main.name
  name     = "app-db"

  ddl = [
    "CREATE TABLE users (id INT64, email STRING(255)) PRIMARY KEY (id)",
  ]
}

Pricing dimensions

What you actually pay for when you provision google_spanner_instance.

DimensionUnitWhat's being charged
Regional node hoursper node-hourSpanner nodes in a single region. 1000 PU = 1 node.
$0.90/node-hour ($657/month)
Multi-region node hoursper node-hourMulti-region configurations (e.g., nam-eur-asia1) spanning multiple regions with strong consistency.
$3.00/node-hour ($2,190/month)
Regional storageper GB-monthStorage in a regional instance.
$0.30/GB-month
Multi-region storageper GB-monthStorage in a multi-region instance, replicated across regions.
$0.50/GB-month
Backup storageper GB-monthBackup storage above the database size. Backups within DB size are free.
$0.10/GB-month

Optimization tips

Common ways to reduce google_spanner_instance cost without changing the workload.

Use Processing Units for small workloads

Up to 90% on small workloads

Below 1 node of capacity, use PU (100-900 PU range). Minimum 100 PU at $65.70/month is 10x cheaper than the previous 1-node minimum. Right for low-volume production or staging.

Avoid multi-region unless required

70% on regional vs multi-region

Multi-region is 3.3x more expensive than regional. Only use when business genuinely requires cross-region strong consistency (financial, regulated, global SaaS). For most apps, regional + cross-region read replicas (cheaper) suffices.

Use committed use discounts

20-40% on commitment

1-year commits save 20%; 3-year save 40%. For steady production Spanner, commits are essential. Spanner CUDs cover both nodes and processing units.

Right-size with autoscaler

20-40% on variable workloads

Spanner autoscaler (GA in 2024) adjusts capacity based on CPU and storage. For variable workloads (daily peaks), autoscaling saves 20-40% vs provisioning for peak.

Consider alternatives for small databases

80-90% on small workloads

If you have under 10 GB of data and modest QPS, Cloud SQL PostgreSQL or Firestore is 5-10x cheaper than Spanner. Only choose Spanner when its unique features (horizontal scale, multi-region consistency) are required.

FAQ

Is Spanner overkill for a 10 GB database?

Almost always yes. Spanner's minimum 100 PU at $65/month is fine, but you're paying for capabilities (horizontal scale, multi-region consistency) you don't need at 10 GB. Cloud SQL PostgreSQL or AlloyDB is cheaper. Reserve Spanner for workloads with genuine horizontal scaling needs.

Can I run Spanner dev/test cheaper than production?

Yes. Use the smallest configuration (100 PU regional, ~$65/month). The Spanner Emulator runs locally for free during development. For CI tests, spin up minimum-PU instances and delete after test runs.

How does Spanner pricing compare to AlloyDB?

AlloyDB (Google's managed PostgreSQL) is much cheaper for relational workloads under a single region. AlloyDB starts around $300/month vs Spanner's $657/month. Choose Spanner only when you need multi-region consistency or scale beyond AlloyDB's limits.

Does multi-region really justify the 3x premium?

For globally-distributed apps needing strong consistency, yes. Building this manually (sharding + 2PC + custom protocols) is hugely expensive in engineering time. For most apps, multi-region async replication (which is cheaper) is sufficient, eventually-consistent reads from regional copies.

Related resources

More Google Cloud resources

Estimate this resource in your own Terraform

Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including google_spanner_instance.