Have you ever wondered how large-scale applications handle millions of user requests seamlessly?
The secret behind this seamless performance is Kubernetes, often abbreviated as K8s (because there are 8 letters between "K" & "S"), is a powerful container orchestration tool that used by Google, Tinder, Airbnb, Netflix, and Nokia. It enables you to manage, deploy and secure your packaged application in containers efficiently and smoothly even under heavy loads.
But what does that mean in practical terms? Let's break it down with real-world scenario!
Imagine this
You run a popular web service on a single server, and everything operates smoothly.
However as your user base grows to medium numbers, your server capacity start fluctuating between 40% to 70%, and during peak hours, it can hit 100%.
Now you add more servers to handle the increased load. This means you also need to implement a load balancer to balance the user request that keeps increasing everyday. But the server usage is not constant everytime, especially during off-peak times like nights or early mornings. So you write your own script to scale-up and scale-down the number of active servers which quickly become hard to maintain.
Occasionally, one of your servers might go down. While rare, lasting from minutes to hours, it can significantly impact your users. To mitigate this, you create additional complex script to “heal” the downed servers, either by restart the server or replace them with new one. Maintaining this script adds another layer of complexity to your development workflow.
Now with these scenarios, you might be wondering...
maybe there’s a tool to do that can handle all of this?
Absolutely!
This is where Kubernetes come to play, Kubernetes have standardised way to do all of theses processes, such as providing:
etc...
Kubernetes automates all of these tasks by automating them and in the use case above, Kubernetes allowing you to avoid writing your own script and instead offload them to Kubernetes. Neat, huh?
And let's condiser another scenario: when you have multiple microservices, instead writing your own service discovery or use another additional software, you just use Kubernetes, it’s all built-in in there!
Goodness Kubernetes, it allow you to focus on building and improving your service rather than juggling a circus of complex scripts.