Spotify using K8s to solve it’s issues

Sayed Imran
3 min readDec 26, 2020

--

Kubernetes (sometimes shortened to K8s with the 8 standing for the number of letters between the “K” and the “s”) is an open source system to deploy, scale, and manage containerized applications anywhere.

Kubernetes Features:

Automated rollouts and rollbacks:

Kubernetes progressively rolls out changes to our application or its configuration, while monitoring application health to ensure it doesn’t kill all our instances at the same time. If something goes wrong, Kubernetes will rollback the change.

Service discovery and load balancing:

No need to modify application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them.

Service Topology:

Routing of service traffic based upon cluster topology.

Storage orchestration:

Automatically mount the storage system of our choice, whether from local storage, a public cloud provider such as GCP or AWS, or a network storage system such as NFS, iSCSI, etc.

Secret and configuration management:

Deploy and update secrets and application configuration without rebuilding image and without exposing secrets in stack configuration.

Automatic bin packing:

Automatically places containers based on their resource requirements and other constraints, while not sacrificing availability.

Batch execution:

In addition to services, Kubernetes can manage your batch and CI workloads, replacing containers that fail, if desired.

IPv4/IPv6 dual-stack:

Allocation of IPv4 and IPv6 addresses to Pods and Services

Horizontal scaling:

Scale your application up and down with a simple command, with a UI, or automatically based on CPU usage.

Self-healing:

Restarts containers that fail, replaces and reschedules containers when nodes die, kills containers that don’t respond to your user-defined health check, and doesn’t advertise them to clients until they are ready to serve

Spotify is a Swedish audio streaming and media services provider, launched in October 2008. The platform is owned by Spotify AB, a public traded company on the New York Stock Exchange since 2018 through its holding company Spotify Technology S.A. based in Luxembourg. Spotify’s global headquarters are in Stockholm, Sweden.

With due course of time the app gained around 200 million active users around the world.

Initially the Spotify adopted the Docker and deployed the microservices over the dockers containerization and to apply the orchestration system they used the Helios.

By late 2017,Jai Chakrabarti, Director of Engineering, Infrastructure and Operations said “having a small team working on the features was just not as efficient as adopting something that was supported by a much bigger community,” .

He then saw that many of the industries and companies are using the K8s and they also wanted to be a part of it and mentioned that Kubernetes was more feature-rich than Helios.

He also said that “we wanted to benefit from added velocity and reduced cost, and also align with the rest of the industry on best practices and tools.”

In the year the company started to migrate it’s resources to the K8s and at that particular time the part which was migrated to K8s had the feature of taking about 10 million requests per second as an aggregate service.

Before, teams had to wait for an hour to create a new service and get an operational host to run it in production, but with Kubernetes, they are doing that in the order of seconds and minutes. In addition, with Kubernetes’s bin-packing and multi-tenancy capabilities, CPU utilization has improved on average two- to threefold said Site Reliability Engineer James Wen.

--

--

Sayed Imran
Sayed Imran

Written by Sayed Imran

Multi Cloud Certified | CKAD | AWS-SAA | GCP-PCA | AZ-104 | Cloud and DevOps Enthusiast |

No responses yet