How Does Nomad Work?
Apr 10, 2020
Learn about what HashiCorp Nomad provides, its architecture, its UX, and how it helps operators at various companies.
- Andy JamesSenior Solutions Engineer
Nomad is a scheduler also known as an orchestrator.
Nomad is an Orchestrator
What is an Orchestrator?
A program to coordinate and schedule complex computer system tasks across infrastructure. Workloads could be containers, VMs, raw executables, JAR files, and more.
Orchestrators first became popular for large data analytics jobs that took too long to process if they weren't intelligently broken up and scheduled efficiently across an infrastructure
HashiCorp Nomad is an orchestrator that provides an efficient way to manage those tasks
Jobs don’t necessarily need to be complex. You can use Nomad as your one tool to schedule all jobs, all applications, and any task, regardless of complexity levels.
Nomad Uses Bin Packing
What is an Bin Packing?
- A workload placement strategy that uses mathmatics to determine the most efficient way to "pack" workloads into your infrastructure resources.
What is Anti-Affinity?
- A workload placement strategy that doesn't allow backup/redundant jobs to be on the same piece of infrastructure, where an outage could cause that job to become unavailable.
Cost Savings of Orchestration
- Save on resource utilization
- Save on reduced developer deployment time
What Can Nomad Run? Where Can It Run?
Well... anything... anywhere.
- Single or Multi-Cloud, Hybrid, or On-prem
- Window, Linux, ARM, etc.
- Raw & Isolated Executables
- Even more with extensible task drivers
Reference Architecture - Building a Nomad Cluster
Nomad requires 3 or 5 servers in its “cluster”
This provides a balance between availability and performance
HashiCorp Consul Agents are present on each nod
Can also support HashiCorp Vault for dynamic credentials out of box
Nomad Customer Case Study
- Infrastructure of 11K+ Nodes
- Managed by 4 SREs
Nomad User Experience
What is a Job?
- A job is any task Nomad needs to run
- Easy to learn
- Written in HCL
Uses the model, Job > Group > Task
- Each Group of tasks will run on the same host
- Each Task is a unique action for Nomad to take
- Job files can be written in HashiCorp Terraform, making CI/CD pipelining easy
Nomad is an Orchestration tool that has several advantages:
- It's a single binary
- Bin Packing algorithms
- Simple job syntax
- Can run any workload
- Multi-Cloud, Multi-OS, Multi-Platform