Search This Blog

Tuesday 2 February 2021

Basic understanding of Containerization

  VIRTUAL MACHINES

Virtual machines (VMs) are an abstraction of physical hardware turning one server into many servers. The hypervisor allows multiple VMs to run on a single machine. Each VM includes a full copy of an operating system, the application, necessary binaries and libraries - taking up tens of GBs. VMs can also be slow to boot.

CONTAINERS

Containers are an abstraction at the app layer that packages code and dependencies together. Multiple containers can run on the same machine and share the OS kernel with other containers, each running as isolated processes in user space. Containers take up less space than VMs (container images are typically tens of MBs in size), can handle more applications and require fewer VMs and Operating systems.



Types of Containers

Linux Containers (LXC) — The original Linux container technology is Linux Containers, commonly known as LXC. LXC is a Linux operating system level virtualization method for running multiple isolated Linux systems on a single host.

Docker — Docker started as a project to build single-application LXC containers, introducing several changes to LXC that make containers more portable and flexible to use. It later morphed into its own container runtime environment. At a high level, Docker is a Linux utility that can efficiently create, ship, and run containers.

Benefits of Containers

  • Reduced IT management resources
  • Reduced size of snapshots
  • Quicker spinning up apps
  • Reduced & simplified security updates
  • Less code to transfer, migrate, upload workloads

Popular Container Providers

1) Linux Containers
  • LXC
  • LXD
  • CGManager
2) Docker
3) Windows Server Containers

Differences between Virtual Machines and Containers

                  Virtual Machines

              Containers

  1. Heavy weight
  2. Limited performance
  3. Each VM runs in its own OS
  4. Hardware-level virtualization
  5. Startup time in minutes
  6. Allocates required memory
  7. Fully Isolated and hence more secure

  1. Light weight
  2. Native Performance
  3. All containers share the host OS
  4. OS Virtualization
  5. Startup time in Milliseconds
  6. Requires less memory space
  7. Process-level isolation, possibly less secure















No comments: