Doing this quick post to introduce Containers (Specifically Docker containers) in my current ecosystem.
Containerization is a great concept and it makes a lot of sense in today’s date. Believe it or not, it’s origin dates back to 1979! It took time for me to digest that fact. Ever since there has been a boom in Dockerization, I have thought of it as a recent innovation in tech industry. But, to my surprise, it actually dates back to far before. This stuff is really cool.
Talking about Docker - it is a container management system, using which you can securely build and share any application anywhere. Imagine having to maintain the runtimes, dependencies, package versioning, patch management etc. which you have to take care of, in order to make sure your application runs smoothly without any issues or rolling out your updates hassel free. Your ambitions are very much dependent on the way you manage your environment. Now imagine all this happening automatically and you are set free of this worry - this is what Docker containers do. They take care of your application like a baby, no matter where you want to run it, and how. Docker is the answer to the stability you are looking for.
How different are they as opposed to Virtual Machines - you may ask. Well, I know what you are thinking - virtual machines can normally be templated into images and we can reuse these images as much as we want to scale up the microservice. However, virtual machines share the hardware - meaning if you want to host 2 VMs having 8 GB of RAM each, first of all you would want to make sure your underlying parent machine has at least 16 GB of RAM. Then you install a hypervisor to do the partitioning of resources so that they can actually be allocated to the VMs. Each VM is then provisioned it’s own OS, own hardware resources etc. thus it ends up consuming a lot. Containers, on the other hand are lightweight - in a way that they play at kernel level. There is no hypervisor in picture, and there is no segregation of hardware resources. They are encapsulated units which take care of application runtime and can be run on any hardware platform - be it Win, Mac or Linux. Of course, they are scalable and secure.
You can build docker images from scratch so that you can worry less about what’s going on in the universe, as this worry is now reduced to a single Dockerfile.