Y Containers? 🐳

Tharunravuri
2 min readJun 16, 2021

Have you ever thought about what is a container? Why companies discuss Docker & K8S? Well, there is a lot of benefit to learning and using this stuff in the IT world especially when you are building a robust solution.

Anyways this blog explains to you the idea of using containers for most of the applications.

Back in the days, there is no practice of advanced architectural principles and disciplines. People just build any application using monolithic architecture. Almost all the established enterprises built their legacy applications using this monolithic architecture.

Basically in a monolithic architecture, all the components are going to be tightly coupled and build in a huge package of code and you know what happens even one service goes down. The entire application goes down. Also, the communication between components in a monolithic architecture is completely hardcoded like the connections and operations.

If the dev team wants to develop a new feature they need to implement a new feature considering the entire application and also for any patching related issues, the server downtime should be taken prior.

Looking at all the perspectives like implementing new features, patching, upgrading and monitoring. People thought that this architecture is not architecture-friendly and they brought a concept called micro-services architecture.

In micro-services architecture, each of the components will be considered as a separate service. As the services going to be independent, the failure of one service doesn’t create much impact on other services. All these components communicate with each other using API and API calls.

Also, new services and features can be implemented irrespective of considering other services.

But the problem with microservices architecture is it needs a lot of resources. Ideally, each microservice needs to run in its own environment, and it should contain its own libraries. If all the microservices are deployed in one server, there is a lot of chance to have environmental conflicts between services and which results in crashing the application.

So, people generally use virtualization techniques and deploy these microservices in the VM’s. Apart from the host-level OS these VM’s need guest level OS for hosting the services.

At the end of the day, hosting these many OS may cost you a lot of computing power. So, to eradicate this the idea of containers emerged.

A container is a lightweight version of Virtual Machine. Each service or component can be deployed in the containers using proper YAML configuration files. Each container hosts the source code of your service or package and contains all the libraries and binaries required for the particular service. Apart from that, each container will have its own environment suitable for that service. So there is no chance of environmental conflicts that could occur. Most importantly, containers use host-level OS and they don’t need the use of guest-level OS.

So this is one of the ideas of using containers on an architecture level for building any application.

Meet you with the next blog 👋👋

--

--