Pokémon and Kubernetes: How are they connected?

Aaishika S Bhattacharya
4 min readJan 19, 2022

--

Niantic and Google Cloud collaborated to build Pokémon Go, but they ended up scaling the world’s favorite container platform too. Read on to find out how.

Released back in 2016, Pokémon Go was an instant hit. As a matter of fact, the augmented-reality development, available for both Android and iOS devices, surged player traffic way past Niantic’s expectations within 15 minutes of its launch in Australia and New Zealand. Niantic chose to launch Pokémon Go over Google Cloud and the teams estimated 1X player traffic with the worst-case estimate of 5X of the same. Take a look at the image below to visualize the actual traffic in terms of Cloud Datastore Transactions per second shared by Google Cloud:

Cloud Datastore Transactions Per Second for Pokémon Go, shared by Google Cloud

Within a few hours of the launch, the actual player traffic touched ten times the worst-case estimate.

Google Customer Reliability Engineering

Google introduced Customer Reliability Engineering (CRE), a new engagement model in which technical staff from Google integrates with customer teams, creating a shared responsibility for the reliability and success of critical cloud applications.

CRE’s first client was Niantic and their first assignment was monitoring and stabilizing the launch of Pokémon Go in the US. Niantic reached out to the CRE Team for reinforcements.

Google Cloud Technologies Involved

Pokémon Go was a container-based application and used many services across Google Cloud, but Cloud Datastore became a direct proxy for the game’s overall popularity given its role as the game’s primary database for capturing the Pokémon game world. The transactions per second surged to 50 times the initial target. The Google CRE Team seamlessly provisioned extra capacity on behalf of Niantic to stay well ahead of their record-setting growth. The Team worked hand-in-hand with Niantic to review every part of their architecture, tapping the expertise of core Google Cloud engineers and product managers — all against a backdrop of millions of new players pouring into the game. The application logic for the game runs on Google Container Engine (GKE) powered by the open-source Kubernetes project.

What and Why Kubernetes

Kubernetes is an open-source container-orchestration system for automating computer application deployment, scaling, and management. It was originally designed by Google and is now maintained by the Cloud Native Computing Foundation.

Resources like deployments help to automate and manage clusters of applications effortlessly with very little downtime. Deployments keep an eye on the pods and if any of the pods go down due to failure, it tries to get the pod back online. This eliminated the need to keep on monitoring every container on every node on which the application is running.

Back in 2016, Niantic chose GKE for its ability to orchestrate its container cluster at a planetary scale, freeing its team to focus on deploying live changes for their players.

Pokémon Go is the largest Kubernetes deployment ever on Google Container Engine.

How Kubernetes Benefitted in the Process

During the US launch, things did not unfold as expected and a lot of issues emerged around the game’s stability.

Niantic and the Google CRE team had to upgrade to a newer version of GKE that would allow for more than a thousand additional nodes to be added to its container cluster, in preparation for the highly anticipated launch in Japan just a few days later. Careful measures were taken to avoid disrupting existing players, cutting over to the new version while millions of new players signed up and joined the Pokémon game world.

A side benefit of the experience was that due to the scale of the container cluster and accompanying throughput, a multitude of bugs were identified, fixed, and merged into the Kubernetes open-source project, adding to its popularity amongst developers.

On top of this upgrade, the engineers worked in concert to replace the network load balancer, deploying the newer and more sophisticated HTTP/S load balancer in its place. The HTTP/S load balancer is a global system tailored for HTTP/S traffic, offering higher throughput for the amount and types of traffic Pokémon Go was seeing.

The Outcome

Improving upon the US launch, generous capacity provisioning, the architectural swap to the latest version of Container Engine powered by Kubernetes, along with the upgrade to the HTTP/S Load Balancer paid off when the game launched without any incidents in Japan, where the number of new users signing up to play tripled the US launch two weeks earlier.

Google’s global network helped reduce the overall latency for Pokémon Trainers inhabiting the game’s shared world. Game traffic travels Google’s private fiber network through most of its transit, delivering reliable, low-latency experiences for players worldwide.

Ending Notes

Niantic and Google Cloud — spanning CRE, SRE, development, product, support, and executive teams — collectively built Pokémon Go from the ground up. Without Google Cloud’s SRE team in place, I doubt if Pokémon Go would be as popular, even more than 5 years after its launch. One of the most widely played games of all time, the number of players are rising once again, especially now that people are able to start going outside post-pandemic. Who knew Pokémons would help Kubernetes grow?

--

--

Aaishika S Bhattacharya

Jr. Developer Advocate @DigitalOcean 🥑 ∘ Team @Hacktoberfest 👨🏻‍💻 ∘ @Github Campus Expert 🚩 ∘ Design + Code + Git 🛠️