What is containerization?
Containerization is a form of virtualization where applications run in isolated user spaces, called containers, while using the same shared operating system (OS). A container is essentially a fully packaged and portable computing environment:
Everything an application needs to run—its binaries, libraries, configuration files, and dependencies—is encapsulated and isolated in its container. The container itself is abstracted away from the host OS, with only limited access to underlying resources—much like a lightweight virtual machine (VM). As a result, the containerized application can be run on various types of infrastructure—on bare metal, within VMs, and in the cloud—without needing to refactor it for each environment.
With containerization, there’s less overhead during startup and no need to set up a separate guest OS for each application since they all share the same OS kernel. Because of this high efficiency, containerization is commonly used for packaging up the many individual microservices that make up modern apps.
How does containerization work?
Think of a containerized application as the top layer of a multi-tier cake:
- At the bottom, there’s the hardware of the infrastructure in question, including its CPU(s), disk storage, and network interfaces.
- Above that is the host OS and its kernel—the latter serves as a bridge between the software of the OS and the hardware of the underlying system.
- The container engine and its minimal guest OS, which are particular to the containerization technology being used, sit atop the host OS.
- At the very top are the binaries and libraries (bins/libs) for each application and the apps themselves, running in their isolated user spaces (containers).
Main benefits of containerization?
Containerized apps can be readily delivered to users in a virtual workspace. It offers broad spectrum of distinctive benefits, ranging from superior agility during software development to easier cost controls.
- lower costs than virtual machines
- Easier management
- Excellent portability across digital workspaces
What applications and services are commonly containerized?
A container may support almost any type of application that in previous eras would have been traditionally virtualized or run natively on a machine. At the same time, there are several computing paradigms that are especially well-suited to containerization, including:
- Microservices: A microservices architecture can be efficiently configured as a set of containers operating in tandem and spun-up and decommissioned as needed.
- Databases: Database shards can be containerized and each app given its own dedicated database instead of needing to connect all of them to a monolithic database.
- Web servers: Spinning up a web server within a container requires just a few command line inputs to get started, plus it avoids the need to run the server directly on the host.
- Containers within VMs: Containers may be run within VMs, usually to maximize hardware utilization, talk to specific services in the VM, or increase security.
- ADCs: An application delivery controller manages the performance and security of an app. When containerized, it makes L4-L7 services more readily available in DevOps environments.