Google today announced the beta launch of Cloud Spanner, a new globally distributed database service for mission-critical applications. Cloud Spanner joins Google’s other cloud-based database services, like Bigtable, Cloud SQL and the Cloud Datastore, but with the crucial difference of offering developers the best of both traditional relational databases and NoSQL databases — that is, transactional consistency with easy scalability. Maybe the easiest way to think about Cloud Spanner is as an alternative for developers who are hitting the limits of traditional relational databases like MySQL or PostgreSQL.
If the name Cloud Spanner sounds familiar, that’s probably because Google has long used a version of this database internally, and published a paper about it in 2012. As Google’s Deepti Srivastava told me, Google started working on Spanner in 2007 because it was looking for an alternative to MySQL, which previously ran many of the company’s products. Today, products like Google Photos and many of Google’s mission-critical applications run on Spanner. With Cloud Spanner, Google is making this same database service available to outside developers, as well.
The idea here is to allow developers to take all of the knowledge they built in writing SQL-based applications and allow them to take that to a new database service that still uses the SQL syntax and offers ACID transactions (something you want for your point of sales system if you are a big-box retailer, for example), but also offers many of the advantages of modern NoSQL databases, combined with the kind of scalability and global network that Google itself needs to run its products.
“If you are struggling with the scale of your transactional database — you will go to a sharded database, or NoSQL,” Srivastava said. “If you’re at that stage where you have to make those trade-offs, Spanner is the way to go. You are already doing work to use one of those systems. We try to make that trade-off as simple as possible.”
She also noted that while there is no theoretical limit as to how big a Cloud Spanner database can be (and she also stressed that there’s no reason you couldn’t use it for smaller projects, as well), the main advantage here isn’t necessarily scalability but also the ability to do global transactions. In this respect, it’s probably best to think of Cloud Spanner as an extension of Cloud Datastore, which is Google’s highly scalable NoSQL database service that also offers ACID transactions and SQL-like queries.
We obviously don’t know what performance will look like, but Google promises that Cloud Spanner will be on par with other cloud database services.
Google also promises 99.9999 percent uptimes for Cloud Spanner, and the project will launch with client libraries for languages like Java, Go, Python and Node.js. During the beta test, a number of companies also built drivers for other languages, so we’ll likely see support for other languages soon.
Prices start a $0.90 per node per hour (which includes replication) and storage will cost $0.30 per GB per month. Network ingress is free and egress is charged according to Google’s usual cross-region and internet egress rates.