- A fully managed relational database service that scales horizontally with strong consistency.
- SLA availability up to 99.999% for multi-regional instances with 10x less downtime than four nines.
- Provides transparent, synchronous replication across region and multi-region configurations.
- Optimizes performance by automatically sharding the data based on request load and size of data so you can spend less time thinking about scaling your database and more time scaling your business.
- You can run instances on a regional scope or multi-regional where your database is able to survive regional failure.
- All tables must have a declared primary key (PK), which can be composed of multiple table columns.
- Can make schema changes like adding a column or adding an index while serving live traffic with zero downtime.
- Pricing for Cloud Spanner is simple and predictable. You are only charged for:
- number of nodes in your instance
- amount of storage that your tables and secondary indexes use (not pre-provisioned)
- amount of network bandwidth (egress) used
- Note that there is no additional charge for replication.
Validate Your Knowledge
A company has an application that uses Cloud Spanner as its backend database. After a few months of monitoring your Cloud Spanner resource, you noticed that the incoming traffic of the application has a predictable pattern. You need to set up automatic scaling that will scale up or scale down your Spanner nodes based on the incoming traffic.
What should you do?
- Build a cron job that executes based on a schedule to review Cloud Monitoring metrics, and then resize the Spanner resources appropriately.
- Set up an alerting policy on Cloud Monitoring that sends an email alert to on-call Site Reliability Engineers (SRE) when the Cloud Spanner CPU metric exceeds the desired threshold. The SREs shall scale the resources up or down appropriately.
- Set up an alerting policy on Cloud Monitoring that sends an alert to a webhook when the Cloud Spanner CPU metric is over or under your desired threshold. Create a Cloud Function that listens to this HTTP webhook and resizes Spanner resources appropriately.
- Set up an alerting policy on Cloud Monitoring that sends an email alert to Google Cloud Support email when the Cloud Spanner CPU metric exceeds the desired threshold. The Google Support team shall scale the resources up or down appropriately.