Software applications have traditionally been closely tied to the specific servers they run on and the operating systems they use. But as companies look to get more out of their infrastructure while spending less time and effort managing it, vendors are offering easier deployment options. Virtualization and Containerization let you run multiple isolated applications on a single physical server while sharing and managing resources between them.
In this issue, we’ll talk about virtualization and containerization more broadly, aiming to give you a good understanding of these technologies without diving into specific platforms such as Docker and Kubernetes. While those platforms undoubtedly play significant roles here, our intention is to present a more generalized exploration. We’ll try to answer when to choose which technology and why. So, stick around and read on if you want to know the answer.
Players in the Space
Virtualization and containerization can be confusing, partly because so many players are in the space. On the virtualization side, we have open-source platforms like Xen and KVM. Then there’s VMware vSphere, Microsoft Hyper V, Oracle's Virtual Box, and more.
For containers, Docker is the most popular container engine right now. We also have alternatives like rkt, Podman, and Containerd. When it comes to container orchestration, options include Kubernetes, Docker Swarm, and Nomad.
With all these choices, how do you know what to use? Well, before we pick, let's back up and make sure we understand exactly what virtualization and containerization are. That context will help guide our decision.
Virtualization
Virtualization has been around for a while but still plays a key role in cloud computing today. So, let’s start with the basics: What exactly is virtualization?
Virtualization technology allows a single physical server to act like multiple separate computers. It creates virtual or simulated versions of computing resources like CPU, memory, network, and storage. These virtual resources can each run different applications and operating systems independently, even though they are all hosted on the same physical machine.
Here’s a straightforward example. Imagine having three physical servers, each designated for a specific purpose. One manages emails, another deals with web-related tasks, and the third oversees some internal legacy applications. Let’s say all these servers only run at about 35% capacity – nowhere near their full potential. In many traditional environments, critical apps would each run on dedicated servers to maximize stability and reliability. But this also meant inefficient resource use. Virtualization offers a solution.
It lets us divide the email server into two separate entities capable of handling different tasks, freeing up space for those legacy applications to migrate over. We get better hardware efficiency while still meeting operational needs.
With unused capacity freed up, any extra servers can now be repurposed for other uses or even retired, saving on operational and maintenance costs.
Let's talk about how virtualization works to understand where the efficiencies are.
How virtualization works
Virtualization works by creating and managing virtualized environments on a single physical machine. The key components include:
Hypervisors
Virtual machines
Host machines
Guest operating systems
Hypervisor
A hypervisor is software that runs above the physical server or host. It pools the host’s resources and allocates them to virtual machines (VMs).
There are two main types of hypervisors:
Type 1 Hypervisor: A Type 1 hypervisor installs directly on the physical server. They are also called bare metal hypervisors. Type 1 hypervisors are the most common. They provide better security and lower latency. Some examples are:
VMware ESXi
Microsoft Hyper-V
Open source KVM
Type 2 Hypervisor: A Type 2 hypervisor runs on top of a host operating system installed on the physical server. They are also called hosted hypervisors. Type 2 hypervisors see less frequent use, mainly for end-user virtualization. They have higher latency than Type 1 hypervisors. Some examples include:
Oracle VirtualBox
VMware Workstation
Keep reading with a 7-day free trial
Subscribe to ByteByteGo Newsletter to keep reading this post and get 7 days of free access to the full post archives.