By 2020, container technology market will be worth $3B worldwide up from $450M in 2015. Google, Microsoft, Amazon, Oracle, VMware, IBM, RedHat are all heavily investing in this space. Why are containers becoming so popular? Let’s start by looking at what containers are and what problems do they solve!
You can find lots of articles on containers and why they are so popular. However many articles skip the basic concepts which are extremely important to understanding the container technology.
Our goal with this article is to deep dive into those core concepts so you can have a better understanding and appreciation for containers.
Step 1: Basics of software and hardware
Let’s first look at how software applications work. Applications are built using a programming language like C, C++, Java, Python, etc. The actual lines of code that humans generate using these programming languages is called the Source code. Programming languages use their own standard libraries which the source code references for different things like I/O, etc.
Next, a compiler takes the source code and converts it to object code (binaries) that machines can actually understand and execute to run these applications.
Computers have a master chip called Central Processing Unit (CPU) which executes these binary instructions. For example, if you want to listen to music and browse at the same time, then binary code instructions will be sent to the CPU. .
The orchestration of millions of binary instructions is handled by the Operating System (OS) like Windows, Linux, Mac OS X that acts as an intermediary between the hardware and software to run programs seamlessly.
One of the most important components of an operating system is a kernel that handles input/output requests from the software, managing the instructions for the CPU. It handles the memory where these instructions are stored as well as the peripheral devices like keyboards, monitors, printers, speakers, etc.
Click here for an brilliant video from Khan Academy.
Step 2: What is Virtualization?
Physical server machines can run only one single operating system (referred to as host OS).
A technology called the hypervisor allows multiple guest operating systems to run on a physical hardware. Virtualization abstracts the hardware which means that it provides a slice of the available resources like CPU, memory, storage thereby providing an illusion to each virtual machine of having their own exclusive resources.
Virtualization provides a way to run many different operating systems independently on a single machine.
Why is virtualization important?
Virtualization leads to more efficient use of the physical machines thereby reducing the need for companies to buy more hardware. This helps save costs for companies.
Step 3: What are Containers?
One the issues for software development teams is the differences in the development and production physical environments. For example, if a software program was developed using Python version 2.6 on CentOS Linux, then it will run into issues on a Production environment that is running Python version 3.0 on a RedHat Linux operating system.
Another problem is that kernel will take over all memory that is made available to it. If there is 2GB memory available then it will consume all 2GB even if the applications don’t require that much.
Containers are becoming really popular as they offer a solution to these problem – over usage of the memory by kernel and portability issues for software applications due to differences in the physical environments.
While Virtualization is the abstraction of hardware, Containers are the abstraction of the operating system which means that they share the OS kernel
Container is a portable lightweight and isolated package that contains the application along with all the dependencies (version of the programming language, standard library, binaries, configuration files, system files) tightly packaged to run on any hardware.
With all the essentials required to run an application packaged in one place, containers can move seamlessly between different environments.
Step 4: Top 5 advantages of containers over virtual machines:
- Containers are extremely lightweight (only tens of MB’s) compared to Virtual Machines (VM’s) so a physical server machine can host significantly larger number of containers compared to VM’s
- Containers consume less computing power
- Provisioning a container takes seconds compared to VM’s that can take a few minutes
- Containers let you run your application on any hardware
- Development teams can quickly build, test and deploy their applications. With all the benefits offered by public cloud like agility and elasticity, containers are becoming even more popular!
Step 5: Popular Containers Orchestration Platforms
Generally speaking, large application environments will have multi-container setups that have to be orchestrated, managed and scaled properly across physical servers.
Following are the most popular container orchestration platforms in the market:
— Docker (@Docker) March 29, 2019
Updates to latest @Docker Enterprise Engine -18.09.4, UCP – 3.1.5, DTR – 2.6.4 available. Release notes:
Engine – https://t.co/MdVx2o9350
UCP – https://t.co/DT7l6F7VDV
DTR – https://t.co/dJikcX6Bkg pic.twitter.com/z4dd1OYLI3
— Sujay Pillai (@sujaypillai) March 29, 2019
— markmcardle (@markmcardle) April 1, 2019
— Kaitlyn Barnard (@kaitlyn_barnard) March 27, 2019