What are Containers?
Did you know that every time you enter a search on Google, your search is run in a container? In 2014, Google was deploying two billion containers each week! But what exactly is a container?
If you’re already familiar with virtualization and virtual machines, Linux containers are very similar: Containers run applications in isolation from other applications or services. The difference is how that isolation is accomplished. Instead of abstracting the host hardware using a hypervisor (like Red Hat Enterprise Virtualization or VMware vSphere), with one OS kernel per virtual machine (VM), one OS kernel is divvied up without a hypervisor layer. So, only one kernel is needed for multiple, isolated micro-services or applications – but each container is still given its own resources (memory, processes, file systems, etc.). This means hardware resources are not wasted on a hypervisor layer. Instead, those resources are distributed more efficiently to the containers – and it also means container density can be higher than VM density on any given host.
This isn’t a new technology, but there’s been a lot of recent hype because the industry is finally catching up with technology. Google has been using Linux containers to accommodate their need for hyper-scalability for quite some time now. And they’re not alone in recognizing that the benefits and cost savings associated with containerization versus traditional virtualization can finally be realized with today’s workloads. Early in 2014 – before all the recent hype around containers – Red Hat was already preparing their latest kernel, version 7, to accommodate container formatting. This year, Red Hat announced that they have partnered with Docker to develop Red Hat’s new product, Red Hat Atomic Host. Red Hat has also been working with Google on their open-source Kubernetes project, a tool to manage the Docker containers in Red Hat Atomic.
Virtual Environment Implications
Containers aren’t for every setting and they won’t entirely replace traditional virtualization. Linux containers are best suited for hyper-scale scenarios when fast, fluid, cloud-like deployment capabilities are a must, and resource utilization needs to be highly efficient. They are also useful if applications can be broken down into micro-services and each micro-service would get its own container.
Organizations that are concerned about security or deal with large-scale, sensitive data would also benefit from containerization. The inherent benefit of virtualization – application and service isolation with maximum resource utilization – is a big part of that security. Isolation with containers is accomplished by creating separate Namespaces for containers and utilizing cgroups for resource management. These tools in combination with SELinux – the default kernel for Red Hat Atomic Host – help ensure application isolation.
Another advantage to using Linux containers is their time to deploy. Virtual machines require a fair amount of time to deploy and maintain once deployed. Containers, on the other hand, can be deployed in seconds. Moreover, there’s only one OS instance to patch and update, versus multiple OS instances in a VM environment. That’s one way Google has been able to maintain such a consistent run record for all of its applications and services: two billion containers each week.
Not every data center needs to move away from traditional virtualization and jump on the container bandwagon though. Containers can provide an advantage when traditional virtualization fails to meet the needs of an organization. For instance, containers are advantageous when applications need to be deployed quickly while maximizing resource utilization; in hyper-scale deployments where public, private or hybrid environments need to be consistent across all environments; and when there are large-scale data and security concerns. In all these scenarios Red Hat is leading the way for general adoption of Linux containers and partnering with Docker and Google to provide the most innovative and enterprise-applicable solution in Red Hat Enterprise Linux V7 and Red Hat Atomic Host.
Curious to learn even more about developing trends in data center technology? Check out our Data Center Technology Insights Guide for more information.