What is Containerization ?

Ujitha Iroshan
3 min readSep 8, 2021

--

Containerization is a very popular term and a concept in the tech industry today, it has been introduced and become very popular in the last decade. Today I just wanted to discuss a bit about what containerization is and what we have used before containerization came into the picture and why it has become popular with almost everybody using it today.

Virtualization

Before containerization and microservices architecture become popular, softwares, applications are deployed and run on virtual machines.

In order to set up VMs we need to have a server and Host OS which runs on the server. Then to operate VMs we need a Hyperviser.

Hyperviser is a software/firmware that VMs run on top of. There are 2 types of Hypervisors

  • Type 1 — Direct link to the hardware (Ex:- HyperKit on MacOS, Hyper-V on windows)
  • Type 2 — Runs as an app on the host OS (VirtualBox, VMWare)

As the diagram shows, applications that are run on VMs , VM consist of a whole heavy Guest OS including its binary and library files which are needed to run the OS and the applications.

Following are some of drawbacks in VMs,

  • One main drawback of VM is that even if we need to run a single application with total isolation, it should run on top of a guest OS run on VM where guest OS utilizes most of the resources of the server.
  • If applications are developed in different environments (may be using different OS) it could not guarantee to have an identical environment in the VM therefore compatibility issues may occur.

Containerization

Container technology has been around for quite some time. Linux Cgroups and LXC(linux container) were early stages of container technologies. These were used by the big companies like Google, linux and etc. but it has become much more mature and popular in the past few years and now almost everybody uses it.

Containerization is a form of operating system virtualization. Here applications run on containers, but the interesting fact is although it seems a bit similar to VM it is more efficient and easy to use. Here also we need a Server/Hardware and the host OS. And on top of Host OS Container runtime engine runs,

Container runtime engine responsible for communicating with the Host OS and utilizing resources for the Containers run on top of it.

Containers are very light weight compared to VMs which wrap up the applications and spin up in seconds/miliseconds. Containers save a lot of resources since it does not need a bulky guest OS. All Containers share the same kernel.

Benefit of Containerization

  • Containers are designed to include everything an application needs to run , binaries, libraries, configs, dependencies etc. therefore the same container we run and test in the local or development environment can be run in production or anywhere which has a container runtime engine with the necessary environment variable configured. Therefore no compatibility issue.
  • Since Containers are easy to set up, light weight and mobility to run anywhere, it allows quick development and deployment to make software development more agile and cloud native.This has become one of main factors for microservices architecture.
  • Containers are easily scalable, can be spin up in seconds or even milliseconds. Container orchestration engine such as kubernetes can be used to manage, auto scale, automate rollouts and rollbacks on containers.
  • Containers save resources and are cost effective when compared to VM since it does not need heavy guest OS or hypervisor. With faster booting, smaller memory footprints make them perform better.

Popular Container runtimes

Docker is the most popular container runtime engine, following are some of known Container engines.

  • Docker
  • Rocket
  • CRI-O
  • LXD
  • Mesos Containerizer

Today container technologies are so much popular and almost all the tech organisations are either using containers or moving towards it. With the rapid evolution in container technologies we can expect even more features with better performance in future.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Ujitha Iroshan
Ujitha Iroshan

Written by Ujitha Iroshan

Developer, Integration Consultant, Microservice enthusiast. Ex WSO2

No responses yet

Write a response