Cloud Spanner pricing
This document explains Cloud Spanner pricing details.
You can also use the Google Cloud Platform Pricing Calculator to estimate the cost of using Spanner.
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.
Spanner pricing overview
When you use Spanner, you are charged for the following:
The amount of compute capacity in your instance.
Spanner keeps track of the compute capacity (measured in processing units or nodes) of an instance over time. You are charged for the number of nodes multiplied by the hourly rate.
Because an instance's compute capacity can be smaller than 1 node (1000 processing units), this number might be a fraction. For example, an instance with compute capacity of 200 processing units that ran for 6 hours would be charged for 1.2 node hours (200 processing units × 6 hours ÷ 1000 processing units per node).
Any compute capacity that you provision will be billed for a minimum of one hour. For example, if you temporarily scale up your instance for only 30 minutes, you will still be charged for one hour.
After the one hour minimum, billing for compute capacity is prorated. For example, if you provision a 5 node instance at 1:00PM and then at 2:01PM (more than an hour later) you remove one node, the 5th node is billed for 61 minutes.
The amount of storage that your databases use.
Spanner charges you for the average amount of data in your Spanner databases, including tables, secondary indexes, and metadata over a one-month period, multiplied by the monthly rate.
The amount of storage that your backups use.
Spanner charges you for the average amount of storage used by your Spanner backups over a one-month period, multiplied by the monthly rate.
The amount of network bandwidth used.
Some types of network egress traffic, such as application reads of Spanner databases, are subject to bandwidth charges, as shown below. There are no bandwidth charges for Spanner replication or network ingress traffic.
For all base instance configurations (instance configurations with fixed regions and replication topologies), compute capacity and database storage charges include all replicas that Spanner runs for your instance.
If you create a custom instance configuration and add optional read-only replicas to the base instance configuration, Spanner charges you for the amount of compute capacity and database storage used by the base instance configuration and by each optional read-only replica added.
The compute capacity pricing is inclusive of the network used for replicating writes to all the replicas in the instance configuration.
For both base instance configurations and custom instance configurations, backup storage charges include all replicas that store the backup.
Project storage usage and bandwidth usage are calculated in gigabytes (GB), where 1 GB = 230 bytes.
Project storage and bandwidth usage charges accrue daily. You can view unbilled usage at any time on the Google Cloud console.
The following tables show the pricing for each component of Spanner.
Compute capacity
In the following table, you can compare pricing between per use, 1-year committed use discount, and 3-year committed use discounts. Read Cloud Spanner committed use discounts documentation for more details.
Choose a regional configuration from drop down in the table belowChoose a multi-region configuration from drop down in the table below
You can create a custom instance configuration and add optional read-only replicas to the base regional or multi-region instance configuration. Spanner charges you for the compute capacity of these read-only replicas in addition to the compute capacity of the base instance configuration.
As an example, if you create a custom instance configuration and add one
read-only replica us-east1
to the base multi-region instance configuration nam7
,
and provision two nodes to this custom instance configuration, then your total
compute capacity cost is as follows:
Base instance configuration
nam7
: $3 per hour * 2 nodes = $6 per hourAdditional read-only replica
us-east1
: $1 per node per hour * 2 nodes = $2 per hour
In total, your compute capacity costs for the custom instance configuration is $8 per hour.
The compute capacity pricing is inclusive of the network used for replicating writes to all the replicas in the instance configuration.
Storage
Database storage
You are billed only for the storage that you use, including tables, secondary indexes, and the overhead for those indexes.
Choose a regional configuration from drop down in the table belowChoose a multi-region configuration from drop down in the table below
Database storage pricing for adding optional read-only replicas
You can create a custom instance configuration and add optional read-only replicas to the base regional or multi-region instance configuration. Spanner charges you for the database storage used by your read-only replicas in addition to the database storage used by your base instance configuration.
As an example, if you create a custom instance configuration with 1000 GB of
storage and add one read-only replica us-east1
to the base multi-region instance
configuration nam7
, then your total database storage cost is as follows:
Base configuration
nam7
: $0.00068 per GB per hour * 1000 GB = $0.68 per hourAdditional read-only replica
us-east1
: $0.00014 per GB per hour * 1000 GB = $0.14 per hour
In total, your database storage cost for the custom instance configuration is $0.82 per hour.
Backup storage
You are billed only for the storage that you use. A backup is billed from the time it is complete until the time it is deleted. A completed backup is billed for a minimum of 24 hours, irrespective of time of deletion (if less than one day).
Network
Ingress | Free |
Egress within the same region | Free |
Egress between regions within the same continent (per GB) | $0.01 |
Inter-continental egress | At Internet egress rate |
Using following features may incur network charges:
Internet egress rates
For instances with regional configurations, internet egress rates are as shown below.
For instances with multi-region configurations, internet egress is charged as follows:
- Egress from read-write transactions, which consists of the reads and queries in a read-write transaction, is always charged based on the egress cost from the default leader region.
Egress from other reads is charged based on the egress cost of the nearest region that has read-write or read-only replicas. For example, assuming that you are using the multi-region configuration
nam-eur-asia1
:- For clients in
us-central1
, egress is free, because the region is part of the multi-region configuration. - For clients in
us-west1
, egress is charged fromus-central1
, which is the closest region in the multi-region configuration. - For clients in
asia-south1
, egress is charged fromasia-east1
, which is the closest region in the multi-region configuration.
- For clients in
Cloud Spanner Data Boost pricing
Cloud Spanner Data Boost can automatically provide on-demand, isolated compute resources to any existing Spanner instance. You can use it to process workloads like federated queries from Google BigQuery (BQ), data exports using Dataflow or batch queries from your line-of-business applications without impacting your existing Spanner workload. Administrators enable this by granting the required IAM permission and configuring connection to use Data Boost. Spanner queries will automatically connect to Data Boost resources in the same region as your active Spanner instance by default.
Spanner Data Boost measures usage in Serverless Processing Units (SPU) on a per-second basis with a 1-minute minimum charge. SPU represents compute resources required to service a query. It includes CPU, memory and local data transfer. There are no resources to manage or fixed costs; you only pay for actual SPU usage. See documentation for more details on this feature.
Database export and import pricing
There are no additional charges from Spanner for use of the export or import tools; you pay the standard rates for data storage when you import a database to Spanner. However, there are other potential charges associated with importing and exporting databases:
You will be charged the standard rates for Dataflow batch workers when you run an export or import job. The total charge will depend on the amount of data being imported or exported as well as performance factors. For example, if your Spanner instance is already under heavy load, import and export jobs might take longer, resulting in a larger overall charge for Dataflow workers.
If you run an import job in a region that does not overlap with your Cloud Storage bucket configuration, you pay Cloud Storage's standard rates for network egress. To minimize charges, ensure that you choose a region for your import job that overlaps with your bucket configuration. See Choosing an import region for more details.
If you run an export job in a region that does not overlap with your Spanner instance configuration, you pay the standard rates for network egress. To minimize charges, ensure that you choose a region for your export job that overlaps with your instance configuration. See Choosing an export region for more details.
Cloud Spanner free trial instances
A Cloud Spanner free trial instance lets you learn and explore Spanner features and capabilities at no cost for 90 days. During the 90-day free trial period, you can store 10 GB of data in your free trial instance. For more details, see Cloud Spanner free trial instances. If you are a new Google Cloud customer, you are also eligible for the 90-day Google Cloud free trial that gives you $300 credits to use on Google Cloud products including Spanner. The Spanner free trial instance is in addition to the $300 credits offered by the Google Cloud free trial.
You can upgrade from a free trial instance to a paid instance to continue using your instance beyond the 90-day free trial period and scale beyond the free instance usage limits. If you choose to upgrade your free trial instance to a paid instance, you will be charged according to the pricing on this page.
Pricing for moving an instance to a different configuration
You can move your Spanner instance from any regional or multi-region instance configuration to any other regional or multi-region instance configuration.
You will be charged for compute capacity and storage usage at both the source and destination instance configurations while the move is in progress. Once the move is complete, you will be charged for compute capacity and storage usage only at the destination instance configuration. See compute capacity and database storage sections for respective rates.
You will be charged a one-time cost for network usage based on the amount of data you move between the source and destination instance configurations. See the network section for network rates. If the source and destination instance configurations consist of different regions, you are only charged for data moved to “read-write” and “read-only” regions in the destination instance configuration that do not overlap with the regions in the source instance configuration. You are not charged for the data moved to the witness region.
To illustrate network usage costs, let's say you are moving an instance with 1000GB data from a source instance configuration to a destination instance configuration. The network rate for “Egress between the regions within the same continent” is $0.01 per GB. “Ingress” and “Egress within the same region” are free. Let us look at the total network costs in different example scenarios.
If the source instance configuration is us-central1
and the destination
instance configuration is us-east1
, your total network usage costs are 1000GB
* $0.01 per GB * 1 = $10. (In this scenario, the destination instance
configuration has one region that does not overlap with any region in the source
instance configuration.)
If the source instance configuration is us-central1
and the destination
instance configuration is nam8
(which contains read-write regions in
us-west2
and us-west1
), your one-time network usage costs are 1000GB* $0.01
per GB * 2 = $20. (In this scenario, the destination instance configuration has
two regions that do not overlap with any region in the source instance
configuration.)
If the source instance configuration is nam7
(which contains read-write
regions in us-central1
and us-east4
) and the destination instance
configuration is us-central1
, your one-time network usage costs are 1000GB *
$0.01 per GB * 0 = $0. (In this scenario, the destination instance configuration
has zero regions that do not overlap with regions in the source instance
configuration.)
If the source instance configuration is nam7
(which contains read-write
regions in us-central1
and us-east4
) and the destination instance
configuration is eur5
(which contains read-write regions in europe-west2
and
europe-west1
), your one-time network usage costs are 1000GB * $0.12 per GB * 1
+ 1000GB * $0.01 per GB * 1 = $130. (In this scenario, destination instance
configuration has two regions that do not overlap with the regions in the source
instance configuration. Network rates of “Inter-continental egress” ($0.12 per
GB for 0-1TB monthly usage) apply once and “Egress between the regions within
the same continent” ($0.01 per GB) apply once.)
What's next
- Read the Cloud Spanner documentation.
- Get started with Cloud Spanner.
- Try the Pricing calculator.
- Learn about Cloud Spanner solutions and use cases.