Whenever we request for a container its the scheduler which does the work in background and helps in build a environment. It is responsible for selecting a host, deploying a container and starting it. The above image details the actions of the scheduler in a very simplified way.
There is API interface which can be used by a management tool. From here the scheduler would look for the available server, density of containers on these hosts and place the new request on the discovered host. The scheduler may select a host using following constrants
- use the same host to deploy the container till the density is exhausted ( co-location ).
- anti-co-location of containers
- the least dense container
The scheduler is responsible for loading containers onto relevant hosts and starting, stopping, and managing the life cycle of the process.
The scheduler must interact with each host in the group. These allow the scheduler to get information about the members and perform administration tasks. Orchestration in this context generally refers to the combination of container scheduling and managing hosts.
Some popular projects that function as schedulers and fleet management tools are:
- Swarm: scheduler and service management tool.
- mesos: host abstraction service that consolidates host resources for the scheduler.
- kubernetes: advanced scheduler capable of managing container groups.
- compose: container orchestration tool for creating container groups.