NOMAD — the Docker Scheduler
Nomad is a DevOps tool by HoshiCorp
Nomad is used for scheduling Containers over a Cluster of Nodes/Datacenter/Cloud.
*Nomad’s design is inspired by Google “OMEGA”.
When we have a Cluster of 100 nodes, we can use Nomad to deploy multiple Containers across 100 nodes.
Nomad will manage deployment, fault tolerance, service discovery, scalability, etc.
Multiple Dev teams can submit Jobs at the same time to Nomad, which will schedule/place the Job’s Tasks in parallel over 100 or lesser nodes.
**Nomad’s Design :
- A Job is a declaration of work submitted to Scheduler
- A Job — collection of Tasks [ group ]
- A Task is a Docker container — running an App inside container
- Parallel, Shared state, optimistic concurrent — scheduler
- Task attributes
**There are 2 scheduling algorithms — bin packing and Spread.
Nomad uses the bin packing algorithm, it tries to utilize all of a node’s resources before placing tasks on a different node [ 100% utilization of Single Node’s resources — CPU and RAM]
Bin packing — reduces Infrastructure costs and maximizes Node/Resource density [ full capacity utilization ]
** New Job description — is declarative
A Job -> Task group -> Task instance
A Job -> 5 Tasks in a group -> Task instance details
Task instance -> Docker image -> 50 MHz CPU, 500 MB RAM, 10 GB disk
When this job is submitted to Nomad, it will schedule and run 5 Tasks instances [ Docker containers ] across the cluster of 100 Nodes [ any Node — which has free capacity ]. If the count is increased from 5 to 20, Nomad simply schedules 15 additional tasks on Free nodes.
**Nomad tool is competing with Kubernetes, Docker Swarm and Mesos — Marathon schedulers.