Virtualization, Docker & Software Architecture
Study Notes
1. Virtual Machine (VM) vs Docker
Virtual Machine (VM): A VM is a complete virtual computer with its own operating system. It runs
on top of a hypervisor and is strongly isolated but heavier in CPU, RAM and storage.
Docker Container: A container packages an application and its dependencies while sharing the
host operating system kernel. Containers are lightweight and start quickly.
When to use VMs: Different operating systems, strong isolation, legacy software, security
boundaries.
When to use Docker: Microservices, CI/CD, cloud-native apps, fast deployment and scaling.
2. What is the Kernel?
The kernel is the core part of an operating system. It manages CPU scheduling, memory, files,
devices and networking. Applications request services from the kernel instead of talking directly to
hardware. Docker containers share the host OS kernel, which is why they are lightweight.
3. Hardware Virtualization
Hardware virtualization uses a hypervisor (such as Hyper-V, VMware ESXi or KVM) to divide one
physical server into multiple virtual machines. Each VM behaves like an independent computer with
its own operating system.
4. Monolithic Architecture
A monolithic application contains all features (UI, business logic and data access) in one
deployable application.
Advantages: Simple to build and deploy for small systems.
Disadvantages: Hard to scale individual components, slower deployments, one failure can affect
the whole application.
Use when: Small projects, prototypes, student projects.
5. N-Tier (Layered) Architecture
The application is separated into layers such as Presentation (Frontend), Business Logic (Backend)
and Database.
Advantages: Better organisation, easier maintenance, improved security, each layer has a clear
responsibility.
Disadvantages: More infrastructure and configuration.
Use when: Enterprise web applications. Your AWS three-tier lab is an example.
6. Microservices Architecture
The application is split into many small independent services. Each service can have its own
database, language and deployment pipeline.
Advantages: Independent scaling, faster releases, fault isolation, technology flexibility.
Disadvantages: Higher operational complexity, networking, monitoring and distributed data
management.
Use when: Large applications with multiple teams (Netflix, Amazon, Uber).
7. Comparison Table
Monolithic: One application, simplest deployment, difficult scaling.
N-Tier: Layered application (Frontend, Backend, Database), moderate complexity, common
enterprise design.
Microservices: Many independent services, highest scalability and flexibility, highest operational
complexity.
8. Quick Memory Tricks
• Virtualization = One physical server → Many virtual machines.
• Hypervisor = Software that creates VMs.
• Kernel = Core of the operating system.
• Docker = Runs containers sharing the host kernel.
• VM = Own OS. Docker = Shares host OS kernel.
• Monolithic = One big application.
• N-Tier = One application split into layers.
• Microservices = Many small independent applications.