0% found this document useful (0 votes)
7 views5 pages

Virtualization vs Containerization Explained

this is for all bsit students
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views5 pages

Virtualization vs Containerization Explained

this is for all bsit students
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 3: Virtualization and Containerization

At the end of this module, students should be able to:


• analyze and differentiate between virtualization and containerization technologies.
• evaluate and apply knowledge of advanced cloud paradigms.

In the previous chapter, we explored the foundations of operating systems, which manage hardware
and software resources to provide a platform for applications. But in modern computing—especially in
cloud platforms—organizations need to run many applications efficiently on fewer physical machines. This
is where virtualization and containerization come in. Both technologies help us use resources better, but
they do so in different ways.

Virtualization vs Containerization

Understanding Virtualization

Virtualization is a technology that allows a single physical computer to act like multiple
independent “virtual” computers. Each virtual computer, called a virtual machine (VM), behaves as if it
has its own CPU, memory, storage, and operating system, even though it is sharing the physical hardware
(Vinahost, 2024).

Before virtualization, organizations often dedicated one physical server to one application, which
led to underused resources. Virtualization allows multiple VMs to run on a single physical machine, making
computing more efficient and cost-effective (Amazon Web Services, 2024).

Figure 3.1
Dedicated Servers vs Virtual Machines

Note. Adapted from “How to Speak Like a Data Center Geek: Bare Metal vs Virtualization vs Serverless”
by J. Powers, 2020, Equinix Blog ([Link]
vs-virtualization-vs-serverless/). Copyright 2020 by Equinix.

IT 412 – Platform Technologies [Chapter 3] PAGE 1


• Virtual Machine (VM): A software-based computer that functions independently. Each VM runs
its own full operating system (guest OS).

o Example: A single physical server could host both a Linux VM and a Windows VM,
running different applications simultaneously.

o Downside: VMs are “heavyweight” because each contains a full OS, which consumes
significant resources.

• Hypervisor: A hypervisor is special software that sits between the physical hardware and the
virtual machines (VMs). Its main job is to divide up the computer’s resources (CPU, memory,
storage, network) and assign them to each VM, making sure they run smoothly without interfering
with one another (Oracle, 2024). There are two main types of hypervisors, each with its own
strengths:

o Type 1 Hypervisor (Bare-Metal): This type runs directly on the server’s hardware,
without needing an extra operating system. This makes it very fast, stable, and efficient,
which is why it’s the choice for large-scale enterprise servers, data centers, and cloud
providers. Examples: VMware ESXi, Microsoft Hyper-V, Xen.

o Type 2 Hypervisor (Hosted): This type runs on top of an existing operating system (like
Windows or Linux) just like any other software application. Easier to install and use,
making it popular for personal computers, testing environments, and development work.
Example: Oracle VirtualBox, VMware Workstation.

Understanding Containerization

Containerization is a lighter and more modern approach that was designed to solve the
performance and resource overhead of VMs (Microsoft Azure, 2024c). Instead of creating a whole new
operating system for each application, containers share the host machine’s operating system kernel. This is
the key difference: A VM is like a full house with its own kitchen, bathroom, and utilities while a container
is like an apartment room—it shares the main building infrastructure (OS kernel) but still gives each tenant
(application) their own private, isolated space.

• Container: A container is a portable, self-contained package that bundles an application and all its
dependencies (libraries, code, and settings) together (Docker, 2024). Because it includes everything
it needs, a container is guaranteed to run the same way everywhere, which solves the classic
developer problem of "it works on my machine!" Containers are small, fast, and are designed to
run just one application process.

• Container Engine: A container engine is the software that builds and manages containers. The
most popular one is Docker (Docker, 2024). It gives you all the tools you need to create, share, and
run these lightweight application packages. Because they are so fast and easy to move, containers
have become the standard for modern application development and are key to building flexible,
cloud-native applications.

IT 412 – Platform Technologies [Chapter 3] PAGE 2


Figure 3.2
Architecture: Containers vs Virtual Machines

Note. Adapted from “Virtual Machines (VMs) vs Containers: What’s The Difference?” by M. Raza & C. Kidd, 2020, BMC Blog
([Link] Copyright 2020 by BMC Software.

Container Orchestration: Managing at Scale


The move to using many containers (each running a small part of an application) created a new
challenge: managing hundreds or even thousands of them. Container orchestration is the automatic
management of containers throughout their lifecycle—deployment, scaling, monitoring, and recovery.
Without orchestration, running large-scale containerized applications would be chaotic and error-prone.

Kubernetes: The industry standard for container orchestration is Kubernetes, also known as K8s
(Google Cloud, 2024b). Originally built by Google and now open-source, Kubernetes takes care of the
heavy lifting by automating container management. Here’s what Kubernetes does:

• Automated Deployment: You just declare how many containers you want, and Kubernetes makes
sure they are created and running.

• Scaling: Kubernetes can automatically add or remove containers depending on demand.

• Self-Healing: If a container crashes, Kubernetes detects it and automatically restarts or replaces


it—without human help.

IT 412 – Platform Technologies [Chapter 3] PAGE 3


Serverless Computing
Serverless computing is an execution model where the cloud provider handles all underlying
infrastructure—servers, provisioning, and scaling—letting developers focus solely on writing and
deploying code (IBM, 2024). The term “serverless” reflects that you don’t see or manage servers, even
though they exist behind the scenes. It signifies a shift from thinking about infrastructure to thinking about
code: instead of “servers,” you think in “functions” (IBM, 2024; Wikipedia, 2024).

Function as a Service (FaaS) is the most common form of serverless computing. In this model,
developers write small units of code called functions that execute only in response to events such as a button
click or file upload (IBM, 2024; Sumo Logic, 2024).
o No Server Management: You don’t need to provision, maintain, or patch servers; everything
is handled by the cloud provider (IBM, 2024).
o Pay-Per-Execution: Billing is based solely on code execution time, not idle infrastructure,
making it ideal for workloads with unpredictable demand (IBM, 2024; Sumo Logic, 2024).
o Automatic Scaling: The platform dynamically adjusts the number of function instances based
on demand, ensuring reliable performance under variable loads (Medium, 2024; PayPro
Global, 2024).

Figure 3.3
IaaS, CaaS, and FaaS

Note. Adapted from “Cloud Computing Basics – Serverless” by Digital Cloud Training, n.d., *Digital Cloud Training*. Retrieved
from [Link]

Figure 3.3 highlights how cloud services reduce the amount of work users need to do. In
Infrastructure as a Service (IaaS), users manage virtual machines, operating systems, and applications,
while the provider handles the underlying hardware. Container as a Service (CaaS) abstracts more of the
environment, allowing users to deploy and manage containers without worrying about the full operating
system. Functions as a Service (FaaS), or serverless computing, takes abstraction even further: developers
write small units of code called functions. These functions run only when needed, scale automatically to
handle demand, and users pay only for the time the functions run, making it efficient and flexible (Powers,
2020).

IT 412 – Platform Technologies [Chapter 3] PAGE 4


Virtualization, containerization, and serverless computing are all technologies that help
organizations use computing resources more efficiently, but they do so at different levels. Virtualization
allows a single physical computer to run multiple full operating systems simultaneously, creating isolated
virtual machines that behave like independent computers. This approach improves hardware utilization and
provides flexibility for running different operating systems and applications on the same physical server.

Containerization takes this concept a step further by isolating individual applications rather than
entire operating systems. Containers share the host operating system’s kernel but still keep applications and
their dependencies separate. This makes containers lightweight, fast, and highly portable, allowing
applications to be deployed consistently across different environments—from a developer’s laptop to a
large cloud server. Container orchestration tools, like Kubernetes, help manage large numbers of containers
automatically, handling tasks such as scaling, deployment, and self-healing, which would be difficult to
manage manually.

Serverless computing builds on the idea of abstraction by allowing developers to focus entirely on
writing code in small, event-driven units called functions. The cloud provider takes care of all infrastructure,
including provisioning servers, scaling resources, and handling failures. This eliminates the need to manage
virtual machines or containers directly and ensures that applications can scale automatically while only
consuming resources when they are actually in use.

Together, these three technologies represent a progression of abstraction in computing.


Virtualization abstracts hardware, containerization abstracts applications, and serverless abstracts both
applications and infrastructure. Understanding the differences and relationships among these paradigms
helps organizations make informed decisions about how to design, deploy, and manage applications
efficiently. By leveraging these technologies, organizations can improve performance, reduce costs,
respond dynamically to demand, and streamline the deployment of modern cloud-native applications.

References:

• Amazon Web Services. (2024). Introduction to virtualization. AWS Documentation.


• Docker. (2024). What is Docker? Docker Docs.
• Digital Cloud Training. (n.d.). Cloud computing basics – Serverless. Digital Cloud Training.
Retrieved from [Link]
• Google Cloud. (2024b). Kubernetes overview. Google Cloud Documentation.
• IBM. (2024). Serverless computing overview. IBM Cloud Docs.
• Medium. (2024). Serverless computing: Key concepts and benefits. Medium.
• Oracle. (2024). Hypervisor types and virtualization. Oracle Documentation.
• PayPro Global. (2024). Understanding serverless computing. PayPro Global.
• Powers, J. (2020). How to speak like a data center geek: Bare metal vs virtualization vs serverless.
Equinix Blog.
• Raza, M., & Kidd, C. (2020). Virtual machines (VMs) vs containers: What’s the difference? BMC
Blog.
• Silberschatz, A., Galvin, P. B., & Gagne, G. (2018). Operating system concepts (10th ed.). Wiley.
• Sumo Logic. (2024). Serverless computing and FaaS. Sumo Logic Docs.
• Vinahost. (2024). Virtualization technology overview. Vinahost Knowledge Base.
• Wikipedia. (2024). Serverless computing. Wikipedia.
• Microsoft Azure. (2024c). Introduction to containerization. Microsoft Azure Docs.

IT 412 – Platform Technologies [Chapter 3] PAGE 5

Common questions

Powered by AI

The progression from virtualization to serverless computing reflects a trend towards increasing levels of resource abstraction, significantly impacting how applications are deployed and managed. Virtualization abstracts the physical hardware by creating virtual machines to improve resource utilization and flexibility but requires management of each virtual environment . Containerization takes abstraction further by isolating applications within containers that share the host's OS kernel, simplifying application deployment without the overhead of a full operating system . Serverless computing—embodying the pinnacle of abstraction—shifts the focus entirely to writing discrete functions while the cloud provider manages the infrastructure's scalability and performance, allowing developers to concentrate solely on code and functionality . This evolution reduces the time and complexity associated with infrastructure management, enabling rapid deployment and dynamic scaling, which are essential for modern cloud-native application development .

Containerization has transformed software development practices by introducing a standardized environment for application deployment, which enhances consistency and reliability across different environments. Containers encapsulate an application together with its dependencies, ensuring that it runs identically regardless of the underlying infrastructure, thus resolving the common 'it works on my machine' problem . This uniformity allows developers to develop and test applications in environments that mirror production, reducing environment-related issues and pipeline inconsistencies . Furthermore, the portability offered by containers facilitates rapid, consistent deployment across various platforms, from local development environments to diverse cloud services, simplifying the development lifecycle and accelerating time to market for new applications . As a result, containerization supports agile development methodologies by enabling frequent deployments and seamless integration into continuous deployment pipelines .

Virtualization and containerization both aim to improve resource utilization and efficiency, but they differ fundamentally in architecture. Virtualization allows a single physical computer to act like multiple independent virtual computers, each running its own guest operating system. This can lead to significant overhead since each virtual machine contains a full operating system, making them heavyweight . Conversely, containerization shares the host operating system’s kernel, allowing for lighter weight and more efficient resource use as containers only bundle the application and necessary dependencies . Both technologies improve computing efficiency but do so at different levels; virtualization by leveraging full OS resources and containerization by reducing overhead related to OS duplication .

Function as a Service (FaaS) is a cloud computing model that allows developers to write small, discrete units of code called functions, which execute only in response to specific events like HTTP requests or database interactions . This model enhances resource efficiency because resources are allocated only during function execution, leading to a 'pay-per-execution' billing model that minimizes costs associated with idle resources . FaaS also offers significant flexibility, as the cloud platform dynamically adjusts the number of function instances based on demand, ensuring responsive performance without the need for manual scaling or infrastructure management . This paradigm shifts the focus from infrastructure management to functionally driven application development .

Containerization technologies like Docker provide several advantages over traditional virtual machines, especially in cloud-native environments. Containers are lighter and more portable because they bundle only the application and its dependencies, sharing the host OS kernel, which reduces the overhead of running a full operating system for each instance . This makes containers ideal for cloud-native applications, as they start up faster and consume fewer system resources, allowing applications to deploy consistently across various environments, from development to production . Additionally, containers resolve common deployment issues with their 'write once, run anywhere' approach, providing a significant boost in flexibility and portability compared to virtual machines .

Serverless computing fundamentally changes the approach to application scalability by abstracting infrastructure management, allowing applications to scale automatically and on-demand without manual intervention. In traditional server-based models, scaling requires estimating demand, provisioning new server resources, and potentially redistributing workloads, which can be time-consuming and inefficient. However, in a serverless model, the cloud provider automatically adjusts the number of function instances to meet current demand, ensuring consistent performance during fluctuating loads without over-provisioning resources . This eliminates the need for developers to forecast demand or manage server resources, streamlining scalability, and reducing costs by charging only for execution time, not idle server capacity . This flexibility and efficiency make serverless computing particularly attractive for applications with highly variable workloads .

Serverless computing represents a further step in abstraction compared to virtualization and containerization. While virtualization involves creating virtual instances of entire operating systems and managing them on physical hardware, and containerization involves managing lightweight applications that run on a shared operating system kernel, serverless abstracts away both applications and infrastructure. Developers in a serverless environment focus solely on writing code, which runs in response to events without manual server or container management . The cloud provider handles the infrastructure aspects, including provisioning, scaling, and maintaining servers, offering automatic scaling and a pay-per-execution model . This model is ideal for workloads with unpredictable demand, as resources are consumed only when functions are actively running .

Hypervisors serve as the fundamental technology that enables virtualization by sitting between the physical hardware and the virtual machines (VMs). They are responsible for dividing up the computer’s resources such as CPU, memory, storage, and network, and allocating them to each VM . Hypervisors ensure that virtual machines run smoothly without interfering with one another, maintaining isolation between different VMs even as they share the underlying physical infrastructure . There are two main types of hypervisors: Type 1, which runs directly on the server’s hardware for high efficiency, and Type 2, which runs on top of an existing operating system for ease of use in personal or development environments .

Infrastructure as a Service (IaaS) provides users with the capability to manage entire virtual machines, including the operating systems and applications, offering a high degree of control over the computing environment. Users are responsible for configuring and maintaining these virtual machines and the applications running on them . In contrast, Container as a Service (CaaS) abstracts the environment further, focusing on managing containers without needing to handle the full operating system. CaaS simplifies the deployment of containerized applications and allows users to manage containers' scaling and lifecycle, providing a more streamlined yet controlled experience compared to the comprehensive control offered by IaaS . Both models offer different levels of abstraction, catering to distinct use cases depending on the required balance between control and operational simplicity .

Container orchestration is crucial for managing large-scale applications composed of numerous containers, as it automates complex tasks such as deployment, scaling, monitoring, and recovery of containers. Kubernetes, the industry standard for container orchestration, provides several critical functions: automated deployment, where it ensures the specified number of containers are created and running; scaling, by dynamically adding or removing containers based on demand; and self-healing, by restarting or replacing failed containers without human intervention . Kubernetes effectively addresses the challenge of manually managing a large number of containers, making it indispensable for building and maintaining scalable, resilient containerized applications .

You might also like