Friday, 20 February 2015

Quick Introduction to Docker (Part 1)

By Ilanchezhian Ganesamurthy

 
Once in a while, a game-changing technology emerges in the radar, which completely changes the way we communicate, sell, innovate and develop software and much more. Technologies like Linux, Cloud, Big Data, Mobile, Java (write-once, run-anywhere) are few of those, fall under this category. They have provided immense benefit not only to the technology community, but also to the whole human society.

Recently, a new kid in the block has emerged that belongs to the same category. Many consider it as the next big thing in the software delivery pipeline. This technology is known as “Docker”It is gaining significant momentum and it is in high demand in the open source and DevOps worlds. Few believe that it is “one of the fastest-growing open source projects in history”.

In this series of blogs, we will explore Docker and analyze the five important Ws - Why, What, When, Who and Where? This will help us understand why it is disrupting the market and why we need to pay attention to it. Let us explore reasons that create much interest for many industry veterans about Docker.

But, before that, let us get to know what is Docker? To put it simply, it is a container and enables virtualization without using a virtual machine. It is based on the Linux Container (LXC) technology, and promises “Build Once, Configure Once and Run anywhere” functionalities.

Before we deep dive into Docker, here are some facts about Docker usages. This will help in understanding the impact it is creating quietly:
  • There were only 500k+ Docker downloads between January and December 2014. It has now increased to 102.5 million downloads, a staggering increase of 800 %. 
  • In 2014 alone there was a tremendous increase in use of (around 1,200 % growth) of Dockerized apps. There have been roughly 71,000+ Dockerized apps recorded as of Dec 2014. 
  • Again, as of Dec 2014, there were more than 49.500+ projects using Docker in GitHub, an increase of 2,200 % in 2014 alone.
Docker: Quick Facts
  • According to the TechCrunch poll, Docker is one of the candidates for the Best Enterprise Startup of 2014. Few other contenders are GitHub, OpenDNS. 
  • More than 175+ Fortune 500 companies are using Docker in their IT environment. 
  • Most of the tech start-ups and fast growing technology companies are building upon their Docker capabilities. 
  • Docker is supported by famous cloud players like AWS, Google, and MS Azure and so on.
Infographic depicting Docker Growth
(Courtsey: Docker Inc.)




Why is Docker so popular?

The above stated numbers are surely impressive! Now, let us understand why it creates so much traction in the tech community and is mentioned in a number of tech forums by many reputed people in the open source world.

In today’s advanced world, a lot of technologies have emerged, but, enterprises still face significant challenges in their software development and delivery pipeline. This severely hampers an organization’s ability to be responsive. Few prominent challenges are:
  • Difficult to maintain a standard development environment. Each developer machine will have a different version of the third party dependent libraries. Code working in one developer machine may not work properly in the other.
  • Moving code from one environment to another should be planned properly due to a lot of complexity associated with it.
  • Difficult to move code from one environment to another (Ex: Dev to QA; QA to Staging; Staging to Production and so on).
Due to this, we often hear conversations like, “Code works in production, but not in development”; “Bug in production, but works perfectly in Dev”; “Hard to simulate production bug in QA or Dev environment”.

One of the important problems faced in DevOps is configuration mismatch between different environments: Dev, QA, Staging and Production may be installed with different versions of OS, software and dependent libraries. As a result, the code which works in Dev, may not work in QA or in production. Bugs, which are noticed in production, are not observed in QA or dev.

Virtualization helps to address few of the issues mentioned above. Until container existed, Virtual Machine (VM) was the only option to achieve virtualization. They are based on hypervisor, emulate virtual hardware and are of very heavy weight. It needs Guest OS and greater software dependency, which increases the size. VM may easily have a size of 5 to 10 GB, depending upon the OS and application dependencies. Due to VM architecture and its huge size, it occupies large memory. In many instances, it also consumes a long time to load.

As Docker is based on the container technology, it achieves virtualization in a lightweight manner. For people who worked on VM, Docker can be considered as lightweight VM. It gives all the benefits of VM, but at a fraction of high overhead. It has less overhead and better performance when compared to traditional VM. The Docker container does not require a separate Operating System as compared to the traditional VM. Instead, it relies on the host OS kernel's functionality and uses resource isolation. Single host (based on host configuration and VM size) can handle 2 to 5 VM instance, running successfully. Adding more VM to it will degrade the performance severely. But, with Docker, it is very easy to run 15+ containers at a time on the development configuration machine. In server configuration, more than 75 containers are executed parallelly without much of performance degradation. This is possible as Docker uses host OS kernel and does not run any Guest OS by itself.

Irrespective of whether or not you use Docker, the containerization is going to play a critical role in the future of software delivery. Recently, Google (one of Google’s senior engineer) has revealed that Google runs all its software in containers and runs approximately 2 billion containers per week. Yes, you read it correctly, 2 billion per week! Imagine how much of software it runs in a container per second; it works around 3000 containers per second!

This information must inspire you to know and learn about Docker. In part-2, let us dive further and understand more about Docker, and when and where to use it and, so on.

No comments:

Post a Comment