Hello, Dev Freinds! π
Welcome to the series of Beginner to Expert guide on Docker π & Kubernetes βΈοΈ
From our previous blog, I hope you got the idea of why containers are used. If you haven't yet read it, do check it out before jumping here.
Now let's go way back to the past and understand how we came up with this idea of containers.
Bare Metal System
Before containerization, or even before virtualization, there is only one type of machine, which is usually called a bare-metal system.
In a bare-metal system, we usually have a host machine where we need to install OS, binaries, libraries, and dependencies, and then run applications on top of that.
But there are a lot of issues with this system.
Here in the figure, we can see the shared level of binaries and libraries. And now imagine you have two applications that require the same library but a different version. So, maintaining two versions of the same library is difficult. For that, we need to set different environment variables for different processes.
Due to these dependency issues, it's harder to manage multiple applications on the same machine. Which ultimately leads to low utilization of resources, which makes it an inefficient system.
As all the applications are running on the same host machine, the failure of one system can lead to the failure of multiple applications because they may share the same dependencies.
The start-up and shut-down times of these systems are usually high.
Provisioning a new system and decommissioning a system takes lots of time (hours).
Virtual Machine
Then, around 2000β2005, a new concept of virtual machines emerged to solve some of these problems.
In a virtual machine system, the system tries to divide the system resources into multiple parts and use them to run any application independently.
There are also two types of virtual machine concepts.
Type 1 virtual machines are basically where there is no underlying virtual machine, and in Type 2 virtual machines, there is an underlying operating system for the host machine.
So the main benefits of using a virtual machine rather than bare machines are:
- No dependency conflict
- Better utilization of resources, i.e., more efficiency.
- Small bluster radius
- Fast start-up and shut-down times
- Fast provision and decommission time (minutes).
Container
To take the concept of virtual machines to the next level, we came across the concept of containers.
The main difference between a virtual machine and a container is that a virtual machine has its own kernel, while a container shares the kernel of the host machine.
The advantages of containers are:
It's taking advantage of virtual machines with faster startup, shutdown, provision (seconds), and decommission times. And also, it's lightweight to use in development.
Virtual Machine + Container
The most common configuration you can see in real-life applications is that it combines the concept of a virtual machine with containers for better performance and isolation.
Container Orchestration
To take it one step further, Container Orchestration like Kubernetes is used to manage multiple containers.
Here Node defines each independent container.
Trade-Off
To summarize them all, I've prepared a chart that shows the benefits and difficulties of all the types of systems mentioned.
I hope you liked the explanation of the history and evolution of virtualization.
So, buckle up and go through this series to understand better. π
See you soon in the next blog. π
Connect with me on LinkedIn and Twitter for more. ππ©βπ»
Top comments (0)