Linux Containers offer a different abstraction of the underlying infrastructure than traditional VMs: Instead of replicating an entire Operating System setup into a VM file (ex: VMDK), you merely bundle the relevant binaries for a particular application that you wish to run. So, in a way, a Container can almost be thought of as a VMware ThinApp (or the equivalent construct from non-VMware VDI Vendors).
I say “almost” because, unlike a ThinApp, a Container can be booted and accessed like a regular server with its own IP address. So, you can run multiple Apache Servers, for example, and each would be accessible over the Internet. The only caveat is that the kernel version of your Container must match the kernel version of the Container Host. So, you cannot run a Linux Container on Windows.
Now, the following questions may be popping into your mind:
Why use Containers instead of running multiple Web Server VMs?
-Well, two reasons come to mind: Preserve system resources of your physical hosts and the speed of Container deployment. If I have 5 Apache VMs running on Ubuntu, they represent 5 instances of system processes in addition to the Web Server processes. Regarding speed, even the fastest SSDs will take seconds to boot a VM. Containers are up and running in milliseconds since they are just additional system processes.
Why use Containers instead of running multiple Apache Virtual Hosts?
-No messing with Apache Config files to ensure unique port numbers: all your Apache Containers can run on port 80 since they will each have unique IPs. Also, changes to the apache binaries for one web server do not affect your entire web farm.
Container technology enables PaaS platforms like Cloud Foundry, Heroku, and OpenShift to scale quickly to customer demand. Again, instead of waiting for VM boot time, the Container is up near-instantaneously for Developers to scale out their applications quickly.
I first heard about Containers when I attended a Cloud Foundry talk by Dr. Nic Williams from Stark & Wayne. It was my first real exposure to PaaS, and I was excited by the concept. My day-to-day work revolves primarily around IaaS, and the Cloud Foundry talk motivated me to learn more.
Are any of you already working with PaaS platforms? If so, what have your experiences been?