You’ve probably heard of virtual machines (VMs) and their advantage for developers and system administrators that need to turn physical machines into multiple virtual machines. Each VM is sectioned off with its own memory and hard drive space. Containers are a newer form of technology that’s similar but resources are shared differently.
VMs are easy to work with and popular with data centers, but VMs are also resource intensive and require fast machines to support multiple instances. Containers, in comparison, share an operating system and use far less resources than their VM predecessor. Instead of creating a resource that reserves segments of your hardware, a container shares the installed operating system (Windows or Linux) and just segment off your application. This reduces the overhead of a virtual machine but still gives you the advantage of a sandboxed environment for your application.
Traditionally, VMs worked with hypervisors, but since containers share an operating system, they use different type of technology. Docker, which is probably the most popular container technology, uses technology called LXC (Linux Containers).
Another important difference between VMs and containers is that containers only abstract the underlying operating system. With VMs, the hypervisor virtualizes or abstracts each resource such as CPU, memory and storage devices. This also means that with containers, you must use the same operating system. In other words, your apps run on the same operating system across the server. With VMs, you can virtualize hardware, so different operating systems can run on your individualized machines. This is a critical difference when you determine if containers or VMs are the right choice for your software architecture.
With the above in mind, if you just want to run several applications in their own segmented instance and the operating system will be the same for each one, then containers are beneficial since they use fewer resources. If you need to run multiple operating systems, then you still want to stick to VMs as your virtualized solution.
Common Container Tools
We mentioned Docker. This is probably the most common software on the market. Docker is open source and runs on systems that use Linux. One of its main competitors is Google, which also has an open-source solution.
Docker is used with many DevOps departments, because it’s easy to deploy applications using common deployments tools on the market. Some of these tools include Puppet, Chef and Vagrant.
Google’s Kubernetes is another popular container application. Its popularity came from Google being its original creator. Kubernetes is a bit more advanced than Docker. Kubernetes is used to maintain container clusters and is usually built into enterprise architecture where Docker can be used by small and large operations. Kubernetes also runs on Linux environments like most Google products.
For Windows users, the new Windows 2016 operating system offers containers. If you have Azure hosting, you probably already use them and don’t realize it. Windows containers are perfect for any Windows development environment, because these containers let you deploy application instances and link Visual Studio (a Windows developer toolbox) with the application container. The developer can then deploy the application directly from source code change control to the container without every logging into the server.
Only Windows 2016 includes containers, so be sure to include this operating system into your system architecture if you plan to take advantage of containers in Windows.
Before you decide on a solution, ensure that you want to use the same operating system. In most organization, there is standard operating system especially for cloud environments. If this is true for you, containers are an excellent way for you to get the same result for multiple applications but use far less resources. This in turn saves you on technology costs and reduces your overhead.