Bare metal vs VM vs Container

Bare metal vs. VM vs. Container
Bare metal vs. VM vs. Container

We are going to discuss following topic in this post Need of Containerization, What are Containers ? and Comparison of Bare metal vs. VM vs. Container

Need of Containerization

Software application cannot run alone. It requires dependencies like libraries, interpreters, subpackages, compilers, extensions etc. We also require its configuration, site specific details, license, database and other things for getting services.

We have tried to solve this problem by using configuration management systems like Ansible or Puppet etc. Ansible or Puppet is used to install software, configure and update.            

On the other hand we know that different languages provide their own packaging methods like java provides jar file, python provides eggs etc. These are language specific and also it does not removes complete dependencies like we need to have java run time environment before running jar file.

Someone also provide omnibus package which includes software application along with dependencies.

Some vendor also provide complete VM image. Complete VM image size will be more, take much more time for building image and not easy to maintain. 

Upgrading new software images, security patches, maintaining latest packages along with maintaining servers are very difficult for operation.

Here a container comes into the picture to solve these problems.

What are Containers ?

Malcolm McLean a truck driver proposed container concept in 1950s. He proposed that instead of loading and unloading of goods from truck to ship and from ship to truck we can directly load and unload the truck body itself to the ship. This concept certainly reduces cost and save time drastically.

Container
Container

Modern IT industry borrowed the same concept for delivering software container.

Software container is nothing but a standard packaging and distribution format that is widely used. It provides an abstraction between application and its dependencies. Container format contain everything that is required by application to be run on container run time environment.

It enables use of optimized resources, ease to scale, lowering the cost and easy to maintain.

Bare metal vs. VM vs. Container

Virtualization provides us to utilise hardware resources in efficient way, faster application deployment, provide VM mobility. It saves power and space consumption compared to physical server deployment model where one application run in a single server.

Virtual machine limitation and benefit of container:

  • Depends on virtualization platform.
  • Need separate VM for each application deployment.
  • Not very efficiently utilise resources as each VM contains their operating system.
  • Not very convenient for high scale deployment.
  • Running multiple applications in a single VM is problematic.
  • Image size is larger than container.
  • Performance is almost 30% lower than container application as containers run on real CPU rather than virtualized CPU in case of VM.
  • Efficient use of disk space in container due to shared file system.
  • Container image can run on any platform that support standard container format with supported kernel version.
Bare metal vs. VM vs. Container
Bare metal vs. VM vs. Container

Now a day’s container is most popular among developer as they need to focus on coding application not its dependencies. No need to maintain different software version corresponding to Linux distribution, libraries and language version ….etc.

Docker container is most popular and widely used containerization platform in the industry. We will discuss more on docker container later.