Why You Should Use Google’s Cloud Spanner for Your Next Game

SADA Says | Cloud Computing Blog

By Miles Ward | SADA CTO

Are you working to build a worldwide, modern game? What if the game you’re working on became the next Apex Legends, or the next Angry Birds, or the next Dragon Ball Legends, or even the next Pokemon Go? What an incredible opportunity it is, that even tiny development teams can reach a planet-wide audience. It also makes for a serious challenge: Who knows where user load will come from? Who knows what usage patterns will emerge? And, player expectations for scalability have never been higher. Of course your system can handle a billion players!

Wait— can it really handle a billion players?

Does your game support billions of players

Maybe you’re stuck on the hardest part— trying to figure out how you’ll handle all of the data. There are so many options for the database layer for in-app purchases, user identities, and metadata— which one can you rely on?

Let me be as direct as I can be— what you need is Spanner. It is built for big.

GCP Spanner design goals graphic

Spanner is a completely unique database built from scratch by Google for planet-scale problems. I spoke a bit about it (and did a live demo!) at Velocity a few years back. There’s also a great interview with the illustrious and industrious PM Lead for Spanner, Deepti Srivastava (howdy Deepti!) that’s really worth a look. Its core differentiation from other databases is easy to say, but not easy to do:

GCP Spanner Relational and non-relational worlds overview

Spanner has the best parts of relational databases (strong schemas, ANSI 2011 SQL, and ACID compliance), the best parts of non-relational or no-sql databases (high-availability, data distribution, huge scalability), but the real magic is that it does all that automatically, without complex DBA management tasks or the operational risks that comes along with it.

How can it do that? Take a read about True Time and the array of atomic clocks and GPS devices that provide a globally consistent, highly accurate clock for ensuring every single transaction is externally serializable: the gold standard of consistency and accuracy.

Turns out, all of that tech mumbo-jumbo is absolutely critical for games. What happens when a DB isn’t scalable? You can’t join the match. What happens when it’s inconsistent? Items you bought disappear! What happens when it has these ancient and confusing things (which Spanner *does not have*) called “maintenance windows” or “planned downtime”? You can’t play the game.

Google has produced a super useful, detailed guide called “Best practices for using Cloud Spanner as a gaming database.” The guide explains how to leverage this game-changer (pun intended!) for database performance, transactional consistency, and operational ease. 

GCP Spanner Cloud Nodes
(Spanner does automatic load and data distribution, globally, in a transactionally consistent way. Amazing!)

This best practices document covers the following:

  • How Spanner is different than your typical game DB
  • How to tell if Spanner is the right fit for your game
  • Gotchas to avoid
  • Clear guidance on operational design, schemas, queries and more
  • And critically, how to get started with Spanner!

SADA, the 2018 Google Cloud Global Partner of the Year, can help your game company leverage this revolutionary tech for your game backends. If you’re interested in a more hands-on approach to bringing Spanner into your toolkit, don’t hesitate to reach out HERE.

Also, a big shout-out and thank you to Joe Holley for the incredible write-up!


Our expert teams of consultants, architects, and solutions engineers are ready to help with your bold ambitions, provide you with more information on our services, and answer your technical questions. Contact us today to get started.

Scroll to Top