Case Study of Kubernetes and Pokemon Go!!
Sheetal Agarwal
AWS Community Builder | 4X GCP Certified | 3X AWS Certified | 1X Azure Certified | DevOps Engineer | Cloud Engineer | SRE | Kubernetes | Jenkins | Terraform | Ansible
What is Kubernetes ?
Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.
In other words, you can cluster together groups of hosts running Linux containers, and Kubernetes helps you easily and efficiently manage those clusters.
Kubernetes clusters can span hosts across on-premise, public, private, or hybrid clouds. For this reason, Kubernetes is an ideal platform for hosting cloud-native applications that require rapid scaling, like real-time data streaming through Apache Kafka.
Google and Kubernetes -
Kubernetes began life as a project within Google. It’s a successor to — though not a direct descendent of — Google Borg, an earlier container management tool that Google used internally. Google open sourced Kubernetes in 2014, in part because the distributed microservices architectures that Kubernetes facilitates makes it easy to run applications in the cloud. Google sees the adoption of containers, microservices, and Kubernetes as potentially driving customers to its cloud services (although Kubernetes certainly works with Azure and AWS as well). Kubernetes is currently maintained by the Cloud Native Computing Foundation, which is itself under the umbrella of the Linux Foundation.
How does Kubernetes work?
A working Kubernetes deployment is called a cluster. You can visualize a Kubernetes cluster as two parts: the control plane and the compute machines, or nodes.
Each node is its own Linux environment, and could be either a physical or virtual machine. Each node runs pods, which are made up of containers.
The control plane is responsible for maintaining the desired state of the cluster, such as which applications are running and which container images they use. Compute machines actually run the applications and workloads.
Kubernetes runs on top of an operating system and interacts with pods of containers running on the nodes.
Advantages of Kubernetes -
With Kubernetes we can:
- Orchestrate containers across multiple hosts.
- Make better use of hardware to maximize resources needed to run your enterprise apps.
- Control and automate application deployments and updates.
- Mount and add storage to run stateful apps.
- Scale containerized applications and their resources on the fly.
- Declaratively manage services, which guarantees the deployed applications are always running the way you intended them to run.
- Health-check and self-heal your apps with autoplacement, autorestart, autoreplication, and autoscaling.
Case Study of Pokemon Go -
500+ million downloads and 20+ million daily active users. That’s HUGE. Pokemon Go engineers never thought their user base would increase exponentially surpassing the expectations within a short time, they were not ready for it, and even the servers couldn’t handle this much traffic.
Google Cloud got the ultimate test in July when its new customer Niantic released Pokémon GO, and the game shattered all prior estimates of player traffic. Engineers at Google and Niantic prepared for worst-case-scenario traffic at five times beyond expectations. Instead, they dealt with traffic 50 times beyond expectations.
Pokémon GO uses over a dozen services across Google Cloud. And it is the largest Kubernetes deployment ever on Google Container Engine.
Kubernetes and Google Container Engine are the backbone of Pokémon GO’s infrastructure -
Pokémon GO is running on the Google Container Engine making use of GKE’s cluster orchestration based on open source Kubernetes Containers. Besides using many Google Cloud Platform Services, the GCP Cloud Datastore is also business critical, since it is used as the primary database for building up Pokémon GO’s augmented reality foundation (real streetmaps with virtual Pokemons jumping around).
The challenge -
The horizontal scaling on one side but Pokemon Go also faced a severe challenge when it came to vertical scaling because of the real-time activity by millions of users worldwide. Niantic was not prepared for this.
The solution -
The magic of containers. The application logic for the game ran on Google Container Engine (GKE) powered by the open source Kubernetes project. Niantic chose GKE for its ability to orchestrate their container cluster at planetary-scale, freeing its team to focus on deploying live changes for their players. In this way, Niantic used Google Cloud to turn Pokémon GO into a service for millions of players, continuously adapting and improving. This got them more time to concentrate on building the game’s application logic and new features rather than worrying about the scaling part.
Thank You for Reading the Article !!