diskusi.tech (beta) Community

loading...

Docker Orchestration: How Docker Works in Symphony

andhikayusup profile image andhikayusup Updated on ・3 min read

The ability to scale is important in developing a software products. Scalable products can accommodate to balance user demands and operation cost. This balancing feature means we are having more control on operation spending ... especially on a tight budget project. This issue can be solved efficiently on microservice architecture than monolith architecture. On monolith architecture it is a little bit difficult because you have to scale the entire machine even tough some does not need to be upgrade. On the other hand, microservice let its resources to be broken down to bunch of small but independent service.

Docker Introduction

To be able to build application on microservice architecture, you will need container-based environment such as Docker. Docker is a platform to ship and package your application along with its libraries and dependencies. Therefore, we can easily scale our product without worrying initial environment that our product needed. Scaling product in Virtual Machine is a little bit difficult because we have to install the dependencies in each instance. Docker trying to solve this problem by bundling the application and its dependencies needed to be a package called Docker Container.

Docker vs VM

Alt Text

At a glance, Virtual Machine and Docker looks the same because they share the same main goals which is to create an isolated environment. But, they have distinct way in how to containerized application.

Virtual Machine (VM) can be view as a computer inside a computer. VM simulate hardware such as CPU, memory, and other computer components with the help of a hypervisor (VMWare, Virtual Box). With that said, In every instance of VM, there are simulated hardware along with its own operating system and installed libraries. By having independent OS for every instance is kinda takes a lot of resources. Therefore, the usage of VM for load balancing is a bit expensive compared to Docker.

Docker Orchestration

Alt Text

The way we reproduce the containerized processes and environments is called Docker Orchestration. Common tool to accommodate Docker Orchestration is using Kubernetes. People sometimes thought Kubernetes and Docker are a competing technology like Google and Yahoo. But actually, Kubernetes and Docker are standalone service that can complementing each other to gain the best out of both.

Kubernetes is introduced by google as an open-source projects in 7 June 2014. Kubernetes grow to be famous along with the trend to move from Monolithic architecture to Microservice architecture. Contrary to monolithic architecture, microservice have a hundreds of small and independent services. Managing those services is too complex to handle manually. This is the main problem Docker Orchestration tool are trying to solve. Using Kubernetes, we can easily and automatically manage hundreds of independent microservices. Kubernetes also offers to guarantee the high availability due to its self-healing features.

How to enable Docker Orchestration

Enabling Docker Orchestration with Kubernetes is relatively easy. please see the documentation.

Docker Swarm VS Kubernetes

Kubernetes is not the only container orchestrator available in the market. Another alternative tools to manage containers is Docker Swarm. Docker Swarm has the same goal with Kubernetes but with alternative architecture.

Kubernetes Docker Swarm
Complex to install Easier to install
More functionalities Limited features compared to Kubernetes
Support auto-scaling Manual Scaling
Has built-in monitoring tools Monitoring tools relies on third-party
Manual load-balancing setup Auto load-balancing
Separate CLI tools (kubectl) Integrates with Docker CLI

Conclusion

The obsession to evolve monolith architecture has been rising during 2010s. Beside of its advantage, the trend also influenced by more accessible open-sourced tools to help developer design and build microservice architecture. Among many, Docker along side with Kubernetes has been the perfect Duo because of its combined advantages.

Discussion

pic
Editor guide