Kubernetes - Pokemon GO & Spotify use-case
By: Aditya Kumar Sahu
Tags: Vimal Daga, Spotify, Container Orchestration, Kubernetes, Pokémon Go

Kubernetes or K8s functions.

Why Kubernetes was intoduced? What all use-cases lead to developement of K8s?

Let’s start from the root cause for the development of this container-orchestration tool in the technological world…

The time before containerization rushed into this vast technological era, Virtual Machines, or VMs, were the state-of-the-art option to optimize an industrie’s data center’s physical resources. This arrangement worked well enough, but had some flaws: Virtual machines utilized too many resources because they required both a complete operating system, and emulated instructions to reach the physical CPU. Even with some technologies like Intel VT-x and AMD-V that attempted to solve the emulation problem, virtual machines were behind bare metal.

There comes the implementation of containerization and Docker was the first and still most popular container technology to implement containerization, which was launced on year 2013. Docker’s open-source containerization engine works with most of the products. Now there are numerous tools available which follows containerization, like Podman, CRI-O, etc. As this technology helped to launch any container so quick that it’s spread hiked to 20.3% of the market by year 2015 and the share of customers running Docker has grown at a rate of about 3 to 5 points per year. And by the time almost every tech giants started taking help of this tool as the goal of containers is to maximize resource utilization to reach a similar bare-metal performance with the advantages of VMs.

Now for every use-case in the industries, instead of installing a whole new system, containers were used at their place, let it be for testing some tools or for database servers. Then as the time passed, not one, not two, the companies were left with thousands of containers needed to manage individually, which was really a tough task.

Then there comes the introduction of Kubernetes also known as K8s, 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.

How Kubernetes solved these use-cases?

Well I guess you might have already figured it out, if not then here is the explaination of how container orchestration systems such as Kubernetes offers a solution to these problems. So, the systems say containers which were being used for multiple purposes in the industries which were responsible for handling some of the important tasks, generally in realtime, the systems are kept into a cluster which consists of several other systems performing similar task and the size of each cluster containing systems sometimes ranges to thousands.

So the tools like Kubernetes or K8s which is a contanier orchestration tool are responsible for handling one or multiple clusters of machines and detect the availability of each image running on it. And also if a machine breaks down, the tool should be able to shift its containers to another node while keeping the entire cluster operational. K8s also helps to automatically scale, distribute and manage fault tolerance on containers.

In year 2017, Kubernetes was most discussed topic in Github with second most most reviews on that platform. Along with the K8s, there are several other tools for implementing the same, like Apache Mesos, Docker Swarm, etc.

The aim of Kubernetes is to provide a “platform for automating deployment, scaling, and operations of application containers across clusters of hosts”.

MOST DISCUSSED USE-CASES OF KUBERNETES

Following are the real industry based use-cases which are solved using Kubernetes:

(i) Hybrid and Multiclouds

(ii) Self-Healing

(iii) Scaling Services

(iv) Handling with Server and Serverless architecture

(v) Optimized Resource Usage with Namespaces

Pokemon GO Use-Case

You might already know about Pokemon Go and even maybe played too right? Well how someone can forget this game where the user need to walk in realtime to explore and get the possession of the wide variety of pokemons in your pokeball(around 600 in 2020), amazing right.

This game is a 2016 augmented reality mobile game which was developed and published by Niantic Inc. in collaboration with the Pokemon Company for iOS and Android devices, which basically used Unity engine to run, the best and shocking part is that it grew to 500+ million downloads and 20+ million daily active users within a very short period of time.

And because of it’s huge user traffic it came up with mixed reviews; critics praised the concept but criticized technical problems. It was one of the most used and profitable mobile apps in 2016.

Pokemon Go engineers never thought their user base would increase exponentially to surpass expectations within a short time. They were not ready for it, and the servers couldn’t handle this much traffic.

This AR based game also faced a severe challenge when it came to vertical and horizontal scaling because of the real-time activity by millions of users worldwide, and the worst part was that Niantic Inc. was not prepared for this.

The solution was in 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 also gave them more time to concentrate on building the game’s application logic and new features rather than worrying about the scaling part. And all the containers used for handling this huge traffic was handled by Kubernetes.

For complete story, Click Here.

Spotify Use-Case

Spotify is a Swedish audio streaming and media services provider, launched in October 2008, owned by Spotify AB. The audio-streaming platform has grown to 200+ million monthly active users across the world.

As the demands of new users and updated songs were increasing day by day, the company started shifting it’s environment to docker container to work efficiently. An early adopter of microservices and Docker, Spotify had containerized microservices running across its fleet of VMs with a homegrown container orchestration system called Helios.

But after some time span they can feel that working with these combination of technologies might not be sufficient with the limited man-power, so they decided to switch from Helios to Kubernetes.

Spotify Director Of Engineering, Jai Chakrabarti then read about how the amazing communities had grown up around Kubernetes, so they started to make use of Kubernetes, as Kubernetes was more feature-rich than Helios. As of now only few parts were shifted to Kubernetes, Kubernetes fit very nicely as a complement to Spotify and now as a replacement to Helios. Here are the words(the response) of Director Jai Chakrabarti -

“A small percentage of our fleet has been migrated to Kubernetes, and some of the things that we’ve heard from our internal teams are that they have less of a need to focus on manual capacity provisioning and more time to focus on delivering features for Spotify”.

And now it has been told that it is the biggest service currently running on Kubernetes which takes about 10 million requests per second as an aggregate service and benefits greatly from autoscaling. This shows the potential of Kubernetes or K8s.

_________________________

You can also view multiple other companies real case-studies of Kubernetes from here, which is from official kubernetes website.

— — — — — — — — — — —

THANK YOU for your precious time!!

Article by- Aditya Kumar Sahu.