Containerization in Cloud Computing

Payal Das
4 min readMay 10, 2021

--

Nowadays, containers are a hot topic, and why not? Application containers certainly cover all the buzzwords: they are cloud-based, server less, lightweight, highly scalable and agile. More than 50% of organizations worldwide are running containerized applications. Containers have many benefits for application management, and they can only play their best role if they make full use of the cloud. Learn why containers are becoming more popular than virtual machines and how to create a path to the cloud for containers.

What do you mean by Containerization?

Containers are a solution to the problem of how to make software run reliably when it is transferred from one computing environment to another. This may be from a developer’s PC to a test environment, from a transitional environment to a production environment, or to a virtual machine in a public or private cloud from a physical machine in a data center.

In short, a container contains a complete runtime environment: an application and all of its dependencies, libraries and other binary files as well as the configuration files required to run it packaged in a bundle. Through containerizing application platform and its dependencies, the differences in operating system distributions and underlying infrastructure can be abstracted.

How does Containerization work?

Fig 1. Architectural Overview of Containers

Each container is an executable software package that runs on top of a host OS. A host can support thousands of containers. Think of a containerized application as the top layer of a multi-layered cake:

1. At the bottom, there is the hardware of the infrastructure, including its CPU, disk storage and network interface. It may exist physically, virtually or in the cloud.

2. Atop of that comes the host OS (Windows, Mac OS or Linux) and its kernel — the latter acts as a bridge between the software of the OS and the hardware of the underlying system.

3. The container engine specific to the containerization technology used and its smallest guest OS are located on top of the host OS.

4. At the top are the binaries and libraries (bins/lib) of each application and the application itself, which run in their respective user spaces (containers).

Why are Containers better than Virtual Machines?

Virtual Machines were the first method to deploy multiple applications on a single platform. It was achieved by running software on top of physical servers to simulate a hardware system. A hypervisor is required to run VMs, because each virtual machine has its own operating system and hardware support requirements. The figure below shows the other layers required in the VM setup, which tends to slow down the development time and incur more costs than containers.

Fig 2. Difference in Architecture between VMs and Containers

A Virtual Machine virtualizes hardware whereas container virtualizes Operating System. The functions performed by the two are basically the same, but the space and effort required by the container are much less than VM.

In virtualization technology, a virtual machine is passed around, which includes an entire operating system and applications. A physical server running three virtual machines will have a hypervisor and three separate OS running on top of it. In contrast, a server running three containerized applications runs a single OS, and each container shares the operating system kernel with other containers. This means that containers are much lighter than virtual machines and use far fewer resources.

What Applications and Services are Commonly Containerized?

Containers can support almost all types of applications, which was virtualized traditionally or run natively on a machine in the previous era. At the same time, there are several computing examples that are particularly suitable for containerization, including:

• Microservices: The microservice architecture can be effectively configured as a set of containers which run in series and are decommissioned and spun-up as required.

• Databases: The database shards can be containerized, and each application has its own dedicated database without connecting them all to the overall database.

•Web server: Starting the web server in the container requires only a few command line inputs and it avoids the need to run the server directly on the host.

• Containers within VMs: Containers can run in VMs, usually to improve security, maximize hardware utilization and to be able to talk to specific services in the VM.

Conclusion

Containers have multiple benefits and also excel in many aspects when compared with Virtual Machines. It is an advanced technological solution which improves the application management and makes the architectural system lighter and more performing. The prominent advantages that container has to offer such as the portability between different platforms and clouds; efficiency through using far few resources than Virtual Machines and delivering higher utilization of compute resources; higher speed; improved security by isolating applications from the host system and from each other; flexibility to work on virtualized infrastructures and easier management has prompted the growing trend for container based development. Alongside, it has proven to provide the agility required for today’s continuous build, integrate and deployment model.

--

--

Payal Das

Payal Das is currently pursuing her B-Tech degree in IT-Data Science. R enthusiast, writes about tech. Follow her on LinkedIn: linkedin.com/in/payald17