Container Orchestration
Container vs Virtual Machine
Container
: Operating system-level virtualization technology.
Virtual Machine
: Hardware-level virtualization technology.
These definitions describe the fundamental difference between containers and virtual machines in terms of the level of abstraction they provide and the way they virtualize resources. Containers virtualize the operating system, allowing multiple isolated user spaces on a single operating system kernel, while virtual machines virtualize the hardware, creating separate instances of an entire operating system and emulating a full physical computer.
Pros of Container
Iteration Speed
, as containers are very lightweight and only include high level SoftwareRobust ecosystem
, as there are many public repositories of pre-made continers, e.g.mysql
,redis
Cons of Container
Shared host exploits
: Containers all share the same underlying hardware system below the operating system layer, it is possible that an exploit in one container could break out of the container and affect the shared hardware.
Pros of Virtual Machine
Full Isolation Security
: run in isolation as a fully standalone system. This means that virtual machines are immune to any exploits or interference from other virtual machines on a shared host.Interactive Development
: Containers are usually static definitions of the expected dependencies and configuration needed to run the container. Virtual machines are more dynamic and can be interactively developed.
Cons of Virtual Machine
Iteration Speed
: time consuming to build and regenerate because they encompass a full stack system.Storage Size Cost
: can take up a lot of storage space.
Docker and Container Orchestration
Docker
: Software that simplifies the use of containers.
Dockerize
: The process of turning my application into a Docker image (containerization).
From the perspective of microservices architecture, containers and Docker do not have any particular advantages. Docker Compose
does support running multi-container environments, but it has the constraint that there must be only one Docker host. In other words, it had limitations when it came to running containers across multiple servers in operational environments.
To make more effective use of containers in operational environments, additional features were needed:
- Managing the start and stop of containers.
- The ability to run containers on multiple hosts, with easy addition and removal of hosts.
- Monitoring and management of container states.
- Management of resources related to containers, such as networks and storage.
All the above is achieved by Container Orchestration
: the integrated management of containers and all associated resources.
Reference
https://www.atlassian.com/microservices/cloud-computing/containers-vs-vms (opens in a new tab)