Container Orchestration is a process of deploying and managing the life cycle of a number of containers in a given environment.
Why do we need Container Orchestration?
When we have a large number of containers, they pose a few challenges with operating and maintaining the individual containers, once the number of containers increases.
Following are the some of the common features provided by a Container Orchestration Engine:
- Managing lifecycle/deployment of Containers
- Replication of application instances providing horizontal scalability: Each application instance could be scaled horizontally on demand with minimal effort.
- Allow communication between containers (Security/Networking aspects): Each container has to be identified through an IP and the internal network communication across containers and appropriate network protocols (TCP or UDP) have to be supported.
- Monitor the state of the containers and act on the containers (bring them up or down): Monitor container health and ensure that configured number of container instances is always running and any given time. For instance, if we configure 3 instances for an application instance, if any one instance goes down, the orchestration engine has to identify that the instance is down, and has to bring it back up, thus providing a self-healing feature.
- Provide service discovery: Each container (or the application instance) has to be discovered uniquely through a name (internally through an IP), so as to enable communication with that container.
- Load balancing across replicated container instances: When an application instance is replicated or scaled horizontally, we need to load balance the requests to that application across instances. The orchestration engine has to provide components which will perform this activity.
- Manage configuration details of the applications
A container orchestration tool provides the above capabilities and abstract away the complex tasks of managing containers.
Reference Implementation of Container Orchestration tools:
- Mesos and Marathon
- Diego for Cloud Foundry
- Amazon EC2 Container Service
- Docker Swarm