Skip to content

Overview

Key terms

  • agent: Nomad process running in server or client mode.
  • client: Responsible for running the tasks assigned to it. Registers itself with the servers and watches for any work to be assigned, also known as a node.
  • server: Manages all jobs and clients, monitors tasks and controls which tasks get placed on which client nodes. The servers replicate data between each other to ensure high availability.
  • dev_agent: An agent configuration that provides useful defaults for running a single node cluster of Nomad.

Key operations

  • task: the smallest unit of work, executed by task drivers.
  • group: a series of tasks that run on the same client.
  • job: core unit of control, defines the application and its configurations. Can contain one or more tasks.
  • jobspec: describes the job, tasks and resources required to run the job.
  • allocation: mapping between a task group in a job and a client. When a job is run, Nomad will choose a client capable of running it.

An application is defined in a jobspec with groups of tasks and once submitted to Nomad, a job is created along with allocations for each group defined in that jobspec.

Technology overview

Below is diagram of how Nomad fits with other technologies.

graph LR
    nomad["Nomad"]
    docker["Docker"]
    consul["Consul"]
    linux["Linux"]

    docker -- Task driver for --> nomad
    consul -- Provides service discovery and service mesh for --> nomad
    linux -- Runs --> nomad

Jobspec relationship

Basic Overview

Big picture

graph TD
    developer["Developer"]
    job["Job"]
    task-group["Task Group"]
    task["Task"]
    driver["Driver"]
    client["Client"]
    allocation["Allocation"]
    evaluation["Evaluation"]
    deployment["Deployment"]
    server["Server"]
    region["Region"]
    datacenter["Datacenter"]

    developer -- writes --> job
    job -- consists of one or more --> task-group
    job -- submitted to --> server
    job --> deployment
    evaluation -- changes --> allocation
    task-group -- a set of --> task
    driver -- executes --> task
    allocation -- schedules task group on --> client
    allocation -- schedules --> task-group

    server -- creates --> allocation
    server -- runs --> evaluation
    server -- manages --> client

    region -- contains one or more --> datacenter
    datacenter -- group of --> client

Last update: August 5, 2023
Created: August 5, 2023