In traditional shipping, transport containers allow for the quick distribution of goods in a standardized "package," whether the mode of transportation is ship, plane, train, or truck.
In IT, containers operate similarly: They package an application and the files required to run it into one handy unit.
Along with managing and distributing server applications, containers also make it easier to install and operate them. They facilitate handling complex server applications and allow extensive automation of a data center’s rollout processes. That’s particularly important when deploying scalable, distributed applications within a cloud environment.
When rolling out new applications or releases, an application is dependent on certain elements of its environment, such as local settings or function libraries. It’s often the case that settings in the development environment are different than those in the application’s test and production environment. Because of this, an application can work differently or not at all in rollout.
Other factors can interfere with a smooth rollout, too, including the application's underlying operating system, its version and settings, any added packages and modules, or the network configuration. Deploying multiple applications across different platforms can be a challenge.
That’s where containers offer an immediate advantage. Developers package an application along with everything it needs, such as libraries and configuration files, into a container. The application, therefore, is not installed directly on the target system. The container’s package provides the application’s complete runtime environment.
That lets developers easily move applications back and forth between different environments—to test the application in one hardware environment, for instance, and run it in another. Or they can run an application first on a physical machine and then in a private, public, or hybrid cloud.
Containers make applications independent from the environment where they are executed. They act similarly to a virtual machine (VM). A difference is that while a VM contains applications complete with an operating system, several containers can share one operating system kernel. Each application is given its own user space, which is an entirely isolated environment.
Compared to VMs, therefore, which contain gigabytes, containers consume significantly fewer resources such as computing power and main memory. Containers only contain megabytes. Many more containers than virtual machines, therefore, can fit on a server. Containers are also up and running much faster. While VMs sometimes take several minutes to start, applications are available almost immediately.
Containers complement virtualization
Virtualization solutions, though, are not suitable for all application scenarios, so they are not superfluous and will not be completely replaced by containers.
Containers are well-suited for infrastructures with a large number of application instances that run in parallel. They are also ideal for applications subject to frequent updates and functional extensions. For applications made of different components based on a microservices architecture, containers are an efficient way to implement a new rollout without a large overhead.
Virtualization with hypervisors is still a better choice, though, for some types of applications. One example is the provision and operation of standard server services such as database servers, directory servers, or even web servers. Others are standardized applications subject to longer update cycles that third parties provide.
Containers are, therefore, a useful addition to virtualization rather than a replacement.