Friday, January 3, 2020

Containerizing your apps 1 - Pros and Cons of Containerization against Virtualization and Monolithic Model



Pros
Cons
Example
Containerization
Platform independence. Containers will grab all dependencies at the creation time. No need to set up dependencies in the staging or production environment.

Avoid multiple deployments runs on a single server that makes bottlenecks. Best way to avoid monolithic applications


Containers will start very quickly and can be shut down very quickly

Can deploy multiple containers on the given operating system. Each container has a very low CPU and memory usages. The same user space of the operating system can be shared by multiple containers.


Can deploy services as highly scalable lightweight services with the support of Container orchestrations.

Reduce infrastructure costs and operational simplicity. Can upgrade services without affecting rest of services

Container echo-system is complicated

Centralized log mechanism  and service monitoring mechanism required

Data persistence among multiple schemas

Separate deployment required for each container

Not suitable for simple and non-complicated application
Docker

Kubernetes

AWS Fargate

AWS Kubernetes

Google 
Kubernetes

and etc...

Server
Virtualization
Can test the software under different Operating Systems

Dedicated hardware resource can be arranged
Required high disk spaces to install virtual machines

Takes time to start and shutdown

High CPU and memory usage

High infrastructure setup and maintenance cost

High cost on system backups
Set of virtual machines in one physical server.
Monolithic Model
Simple deployments

Simplifies loggers, security implementations and data persistence


Performance issues as multiple services deployed in a single server

Not suitable for multi tire complicated applications

Tightly coupled and not easy to maintain

Multiple war files deployed in single tomcat server which are interdependent