Virtualization and Containerization

TL;DR: Virtualization allows developers to run multiple OS in different VMs. Containerization allows multiple applications to run in a container with the Host OS.
  • VM - Virtual Machine
  • OS - Operating System
  • hypervisor - software that creates and runs virtual machines

Before containerization, virtualization was the best way to isolate and organize applications, each in their own VM, allowing multiple applications to run on the same physical hardware. Each application running has their own guest OS.

Virtualization Pros

  • mulitple OS can run at the same time
  • easy recovery and maintenance in a condition of failure case
  • due to less usage/need for infrastructure, total cost of ownership came down
  • Virtualization Cons
  • Unstable performance because of running multiple VMs
  • The efficiency of Hypervisors is not as good as the host OS
  • Long boot-up time
  • Containerization abstracts OS, allowing applications to run in a container which shares the host OS and holds only those application which is related to binaries and libraries. Deployments are faster and more reliable because they only contain applications specific to libraries that are isolated from other containers.

    Containerization Pros

  • mulitple OS can run at the same time
  • easy recovery and maintenance in a condition of failure case
  • due to less usage/need for infrastructure, total cost of ownership came down
  • Containerization Cons
  • some container products don't work with other ones due to competition
  • persistent data storage is complicated
  • graphical applications don't work well
  • The primary difference between containerization and virtualization is that containers provide a way to virtualize an OS and run multiple workloads in one OS instance, while hardware is virtualized to run multiple OS instances in VMs. The portability and speed of containers makes it a tool to streamline software development.